I'm back with more clues. =)
I wanted to add some locales to my module. Figured I could get a
boiler plate for the properties file if I used the @Generate
annotation. I noticed that it created both an "_en.properties" file
and a "_default.properties". What's more; the "_en" file completely
lacked the plural form info! The "_default" file had them though.
I then moved the "_defaults" file to the same directory as my
TimeMessages.java file and renamed it
"TimeMessages_default.properties".
With this in place I can remove <extend-property name="locale"
values="en"/> from my module's .gwt.xml file and, more important, the
"&locale=en" from the URL when running my app. I still need the
@DefaultLocale("en") annotation though, even though the documentation
clearly states that this is not necessary.
In conclusion, if you run in to this problem, try
- generating properties files using @Generate
- place YourMessages_default.properties side by side with
YourMessages.java
- prepend the YourMessages interface with a @DefaultLocale("en")
annotation.
About that @Generate. This is what worked for me. Just before my
extension of the Message interface:
@Generate(format =
{"com.google.gwt.i18n.rebind.format.PropertiesFormat"})
The GWT log said it created my properties file, but I couldn't find
it. I fixed that by adding the compiler flag "-extra extras" and then
found the properties files generated in the "extras" directory.
Including this info here since I spent more than an hour figuring it
out.
Seriously, this part of the GWT docs is not up to the standards of
what's common with GWT. Is there anyway I can help with fixing that?
Regards,
/PEZ
On Jun 11, 11:05 am, PEZ <
p...@pezius.com> wrote:
> Finally got some traction thanks to the clues I got from Federico
> Kerek, author of Essential GWT -
http://my.safaribooksonline.com/9780321705631