That sounds to be a good idea too, since we're dealing with displaying which
can depends on locale, it's better and cleaner to my mind to handle this at
that level.
A good things is that when developing D2W app, the debug tool enable you to
dump created keys directly by clicking on "Created Keys" on the app webpage.
But I didn't find all the keys which were supposed to be created.
So I have to force the localization to be English (the application will be in
English only for the moment), i.e. :
er.extensions.ERXLocalizer.availableLanguages=(English)
Actually I haven't dived into localization yet because it's not a requirement
for my app, I should do it in a near future.
Thanks for your help!
Anthonin
On Thu, 2015-02-26 at 10:13 -0700, Ramsey Gurley wrote:
The correct way is to use localization. If you put
“PropertyKey.agency.name” = “Agency”;
in your
Resources/English.lproj/Localizable.strings
file, you’ll get the desired effect. You can easily generate these by
visiting all the pages you want to localize and then dumping your localized
keys to the console.
http://localhost/cgi-bin/WebObjects/YourApp.woa/wa/ERXDirectAction/dumpCreatedKeys
There’s also a ERD2WPageRunner class to automate this if you have many
page configurations you’d like to generate.
On Feb 26, 2015, at 3:10 AM, Lize Anthonin (@JCOMMOPS)
<[email protected]> wrote:
Hi all,
Quick question, I have some rules defined in my D2W
application, which aim to improve display for foreign entity, for instance (I
don't use RuleModeler, so the syntax must be not correct here, but it's no big
deal for that question) :
pageConfiguration = 'foo' => displayPropertyKey =
("agency.name")
propertyKey = 'agency.name' => displayNameForProperty = "Agency"
My question is, I have to repeat this for a lot of properties :
propertyKey = 'agency.name' => displayNameForProperty = "Agency"
propertyKey = 'program.name' => displayNameForProperty =
"Program"
...
FYI, the "name" field is a standard I use in a lot of entities.
Is there a way to define a generic rule, with some king of
chaining assignment to an existing key (e.g.
er.directtoweb.assignments.ERDKeyValueAssignment), like :
propertyKey like '*.name' => displayNameForProperty = "<<the
magic key I'm looking for referencing foreign entity name>>"
?
It is just to avoid doing it every time and having a huge rules
file.
Thanks
_______________________________________________
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]