Finally got some traction thanks to the clues I got from Federico
Kerek, author of Essential GWT - http://my.safaribooksonline.com/9780321705631

It seems like it is something I don't understand with the default
locale mechanism. I haven't figured it out, but it seems that to get
plural handling to work I need:

- In my module's gwt.xml file:
  <extend-property name="locale" values="en"/>
- In my Messages extentsion:
@DefaultLocale("en")
public interface MyMessages extends Messages ...
- Explicitly load the "en" locale by appending to the URL
&locale=en

Does this provide enough clues for anyone to see where I might be
doing this wrong?

Regards,
/PEZ

On Jun 10, 2:54 pm, PEZ <[email protected]> wrote:
> I'm using GWT 2.0.3. I have now also tried using a .properties file
> instead. Like so:
>
> hours[one]=an hour
> hours={0} {1,number} hours {2}
>
> With the same, boring, results.
>
> /PEZ
>
> On Jun 9, 10:38 pm, PEZ <[email protected]> wrote:
>
>
>
> > I'm making (porting really) a "relative time" module for human
> > readable date-and-time messages to GWT. The first (alpha-ish) version
> > is up on Github:http://github.com/PEZ/GWT-Relative-Time
>
> > Anyone who tries it will notice that it reports all times as plurals.
> > When it should say "an hour ago", it says "1 hours ago". My messages
> > interface looks like so:
>
> > public interface TimeMessages extends Messages {
> > ...
> >     @DefaultMessage("{0} {1,number} hours {2}")
> >     @PluralText({"one", "an hour"})
> >     String hours(String prefix, @PluralCount int count, String
> > suffix);
> > ...
>
> > }
>
> > From what I can understand of the documentation, that is how you
> > should be able to deal with singular and plural forms, right? Well, it
> > doesn't work. Anyone who knows how this works? Or, if it's a bug in
> > GWT, can I work myself around it?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to