On 2010-10-29, at 2:08 AM, Johan Henselmans wrote:
>
> Op 28 okt 2010, om 18:38 heeft David Holt het volgende geschreven:
>
>>
>> On 2010-10-28, at 4:20 AM, Johan Henselmans wrote:
>>
>>>
>>> Op 21 okt 2010, om 15:53 heeft David LeBer het volgende geschreven:
>>>
>>>>
>>>> On 2010-10-21, at 9:46 AM, David Avendasora wrote:
>>>>
>>>>> Hey Johan,
>>>>>
>>>>> I had the same problem to start with. They are handled by the
>>>>> Localizable.strings instead of rules (yeah, weird, I know)
>>>>
>>>> I think Johan understood that...
>>>>
>>>>>
>>>>> For Example in Resources/English.lproj/Localizable.strings I have:
>>>>>
>>>>> "Pages.QueryAccount" = "Search for Accounts";
>>>>>
>>>>> In Resources/Spanish.lproj/Localizable.strings I have:
>>>>>
>>>>> "Pages.QueryAccount" = "Buscar para Los Cuentas";
>>>>
>>>> The trick (aside from the Pages prefix) is that you are localizing the
>>>> page configuration name.
>>>
>>>
>>> That works nice and dandy, but I can't seem to get the Search All page to
>>> localize. I tried to remove the Home page from the navigation.plist, and to
>>> point the homeAction in MainNavigationController to something else, but the
>>> default Search All page still shows up.
>>
>> Did you look in DirectAction to see where the login action points?
>>
>> You can set the default page in rules. You need to define startUpTask and
>> startUpEntity
>
> Thanks!
>
> I only found examples of the rules in ERDiva*, in which it assigned "home" to
> the startupTask.
>
> In the default template of Eclipse, which property would you assign to the
> the startUpTask? (I tried several, like "query", with startUpEntity =
> "Performance", or startUpTask = "queryPerformance" or startUpTask =
> "queryPerformanceTask" , but none of the rules seemed to work).
From ERD2WFactory:
public WOComponent defaultPage(WOSession wosession) {
D2WContext d2wcontext = ERD2WContext.newContext(wosession);
return pageWithContextTaskEntity(d2wcontext, d2wcontext.startupTask(),
d2wcontext.startupEntityName(), wosession.context());
}
If you set the startupTask as 'query' and the startupEntityName as
'Performance' that should work. If your default task is 'inspect' or 'edit'
you'll need to feed it a specific object and if it's 'list' you'll need to feed
it a data source. Some sort of default page based on a login action is probably
a more reasonable way to go.
>
>
>
>>
>>
>>>
>>> Looking at the Page Configuration it says No Page Configuration, so
>>> localizing the Page attribute does not work. How then, do you localize this
>>> Search All page?
>>
>> This is handled by this rule in ERModernLook
>>
>> 20 : task = 'queryAll' => displayNameForPageConfiguration = "Search All"
>> [com.webobjects.directtoweb.Assignment]
>>
>> You'll need to disable the rule and then, since there is no page
>> configuration for queryAll, set a new one in your app:
>>
>> 100 : task = 'queryAll' => pageConfiguration = "QueryAll"
>> [com.webobjects.directtoweb.Assignment]
>>
>
>
> It's a bit odd. I tried to overrule the
You do know that to override a rule you need to provide a rule with priority >
than the one you want to override?
The 10 should be > 20
>
> 20 : task = 'queryAll' => displayNameForPageConfiguration = "Search All"
> [com.webobjects.directtoweb.Assignment]
> with
>
> 10 : task = 'queryAll' => displayNameForPageConfiguration = "QueryAll"
> [com.webobjects.directtoweb.Assignment]
> 10 : task = 'queryAll' => pageConfiguration = "QueryAll"
> [com.webobjects.directtoweb.Assignment]
>
> and with
>
> 10 : task = 'queryAll' => displayNameForPageConfiguration = ""
> [com.webobjects.directtoweb.Assignment]
> 10 : task = 'queryAll' => pageConfiguration = "QueryAll"
> [com.webobjects.directtoweb.Assignment]
>
> but they all ended up displaying the Search All header.
>
> Only after disabling the rule with priority 20 in ERModernLook, the header of
> the QueryAll page adjusted to the localized option.
This is what I had to do too.
David
>
>
>
>
>> And then add entries to your .strings file
>>
>> "Pages.QueryAll" = "This searches everything";
>>
>>
>>
>>>
>>>
>>> Another still lingering question is how to localize entity names and
>>> property keys of entities.
>>
>> Entity: "Entity.name.Person" = "HumanUser";
>>
>> PropertyKey: "PropertyKey.isDone" = "Complete";
>
> Odd. I tried that, and failed. Then I retried it after your mail, and now it
> works. You must have sent me some magical attachments in your mail...
>
>
>>
>>>
>>>>
>>>>>
>>>>> Dave
>>>>>
>>>>> On Oct 21, 2010, at 9:28 AM, Johan Henselmans wrote:
>>>>>
>>>>>> I might say I really like the way ERModernLook…looks.
>>>>>>
>>>>>> One question that remains for me how localization is taken care of:
>>>>>>
>>>>>> I added
>>>>>>
>>>>>> # Localization
>>>>>> ERXLanguages = (en,nl)
>>>>>> er.extensions.ERXLocalizer.defaultLanguage=English
>>>>>> er.extensions.ERXLocalizer.useLocalizedFormatters=true
>>>>>> er.extensions.ERXLocalizer.fileNamesToWatch=("Localizable.strings","ValidationTemplate.strings")
>>>>>> er.extensions.ERXLocalizer.availableLanguages=(English,Dutch)
>>>>>> #er.extensions.ERXLocalizer.frameworkSearchPath=(app,ERModernDirectToWeb,ERDirectToWeb,ERExtensions)
>>>>>>
>>>>>> er.extensions.ERXLocalizer.English.locale = en
>>>>>> er.extensions.ERXLocalizer.Dutch.locale = nl
>>>>>>
>>>>>> to the Properties, and Localizable.strings in Dutch.lproj and
>>>>>> English.lproj tend to work for the navigation menu items, but I noticed
>>>>>> that some of the stuff does not localize by default:
>>>>>>
>>>>>> For instance, there if I have a queryPageForEntityNamed it still tells
>>>>>> "Query [Entity Name]", and editPageForNewObjectWithEntityNamed it tell
>>>>>> "Create [Entity Name]".
>>>>>>
>>>>>> I'd like to be able to replace
>>>>>> Query with 'Zoek'
>>>>>> and
>>>>>> Create with "Maak"
>>>>>>
>>>>>> for instance.
>>>>>>
>>>>>> I could not find a way to localize these terms nor the entityNames, like
>>>>>> Ramsay Gurley does in his R2D2W framework and templates, where one can
>>>>>> add in Localizable.strings
>>>>>>
>>>>>> (eg)
>>>>>> "Entity.name.Performance" = "Voorstelling";
>>>>>>
>>>>>> Have I overlooked something? Plans in that direction?
>>>>>>
>>>>>> (that was the dutch lesson for today).
>>>>>>
>>>>>>
>>>>>> Johan Henselmans
>>>>>> [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:
>>>>>> http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.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:
>>>>> http://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com
>>>>>
>>>>> This email sent to [email protected]
>>>>
>>>> ;david
>>>>
>>>> --
>>>> David LeBer
>>>> Codeferous Software
>>>> 'co-def-er-ous' adj. Literally 'code-bearing'
>>>> site: http://codeferous.com
>>>> blog: http://davidleber.net
>>>> profile: http://www.linkedin.com/in/davidleber
>>>> twitter: http://twitter.com/rebeld
>>>> --
>>>> Toronto Area Cocoa / WebObjects developers group:
>>>> http://tacow.org
>>>>
>>>>
>>>>
>>>>
>>>
>>> Johan Henselmans
>>> [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:
>>> http://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com
>>>
>>> This email sent to [email protected]
>>
>
> Johan Henselmans
> [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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]