I agree with Fabian: I would add the key displayName like that:
        {
                name = ListUser;
                displayName = "ListUserKey";
                action = "session.navController.listUserAction";
        },

And in your Localizable.strings file, I put this:
        "Nav.ListUserKey" = "Liste des Utilisateurs”;


And don’t forget you can do interesting stuffs like a dynamic list of children.

For example:
        {
                name = Computers;
                displayName = "ComputersKey”;
                action = "session.navController.listComputersAction";
                children = "session.computerChoice.toString";
        },

and in your session class:

public NSArray<String> notificationChoice() {
        if (user().name).equals("jonathan ive")
                return new NSArray<String>(new String[] { "CreateComputer", 
“ListSecretNewComputer", “SearchComputer", “SendComputers" });
        return new NSArray<String>(new String[] {"CreateComputer", 
"SearchComputer" });
}

Hope it helps.

Philippe


On 10 juil. 2014, at 18:14, Pascal Robert <[email protected]> wrote:

> Bingo! I had to add:
> 
> er.extensions.ERXNavigationManager.localizeDisplayKeys=true
> 
> ----- Mail original -----
> De: "Fabian Peters" <[email protected]>
> À: "WebObjects-Dev Apple" <[email protected]>
> Cc: "Pascal Robert" <[email protected]>
> Envoyé: Jeudi 10 Juillet 2014 12:09:09
> Objet: Re: The Good Path to D2W localization
> 
> Looking at the code, you may have to use "displayName" to get the 
> localization. And there's a property that may disable the localization: 
> er.extensions.ERXNavigationManager.localizeDisplayKeys
> 
> Am 10.07.2014 um 15:25 schrieb Pascal Robert <[email protected]>:
> 
>> Works great for property keys, thanks!
>> 
>> But it doesn't work for navigation. I added this:
>> 
>> "Nav.Computers" = "Ordinateurs";
>> "Nav.CreateComputer" = "Ajouter un ordinateur";
>> "Nav.SearchComputers" = "Rechercher des ordinateurs";
>> 
>> and my NavigationMeny.plist:
>> 
>> (
>>   {
>>       name = Root;
>>       directActionClass = DirectAction;
>>       directActionName = default;
>>       children = ("Computers", "Mobile", "Software", "Networks", 
>> "Manufacturers", "Locations");
>>   },
>>   {
>>       name = "Computers";
>>       action = "session.navController.listComputersAction";
>>       children = ("CreateComputer","SearchComputers");
>>   },
>>   {
>>       name = "CreateComputer";
>>       action = "session.navController.createComputerAction";
>>   },
>>   {
>>       name = "SearchComputers";
>>       action = "session.navController.searchComputersAction";
>>   }
>> )
>> 
>> But I still get "Computers", "CreateComputer" and "SearchComputers" in the 
>> navigation.
>> 
>> ----- Mail original -----
>> De: "Fabian Peters" <[email protected]>
>> À: [email protected]
>> Cc: "Pascal Robert" <[email protected]>
>> Envoyé: Jeudi 10 Juillet 2014 09:58:12
>> Objet: Re: The Good Path to D2W localization
>> 
>> Hi Pascal,
>> 
>> You shouldn't need to specify additional rules. By default 
>> ERDDefaultDisplayNameAssignment handles localization and ERModern is quite 
>> good at logging unknown or deprecated localization keys. My localization 
>> files consist mostly of these types of keys:
>> 
>> "Entity.name.Location" = "Ort";
>> "PropertyKey.amount" = "Betrag";
>> "Pages.CreatePerson" = "Person anlegen";
>> "Nav.Settings" = "Einstellungen";
>> "TabKey.Owner" = "Eigentümer";
>> 
>> This covers entity names, property names, page configurations and navigation 
>> elements. I only subclassed the default assignment to handle entity-specific 
>> property names.
>> 
>> Fabian
>> 
>> Am 10.07.2014 um 13:35 schrieb Pascal Robert <[email protected]>:
>> 
>>> Hi,
>>> 
>>> What is the proper way to do D2W localization? In the wiki, it says that 
>>> you should add rules like this:
>>> 
>>> 100 : (pageConfiguration like '*Computer*' and propertyKey = 'model') => 
>>> displayNameForProperty = "Computer.PropertyKey.model" 
>>> [ERDLocalizedAssignment]
>>> 
>>> And having the correspondant 
>>> 
>>> "Computer.PropertyKey.model" = "Modèle";
>>> 
>>> in the Localizable.strings. It works, but that means I will have to add a 
>>> lot of rules. Is there a better way to do localization without the rules? 
>>> This is with ERModernLook.
>>> 
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list      ([email protected])
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/lists.fabian%40e-lumo.com
>>> 
>>> This email sent to [email protected]
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/prabier%40icloud.com
> 
> This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to