On 20 jan, 21:23, thm <[email protected]> wrote:
> Hey gurus,
> using GWT 2.0 I fiddled around with i18n and plural forms.  From the
> examples I thought I could write
>
> addressBookTab_removeAddressConfirmationDialogTitle=Remove {0,number}
> Addresses?
> addressBookTab_removeAddressConfirmationDialogTitle[one]=Remove
> Address?
>
> in my properties file and then run the I18NSync tool and have my java
> interface generated.  However, what I get is:
>
>   /**
>    * Translated "Remove {0,number,integer} Addresses?".
>    *
>    * @return translated "Remove {0,number,integer} Addresses?"
>    */
>   @DefaultMessage("Remove {0,number,integer} Addresses?")
>   @Key("addressBookTab_removeAddressConfirmationDialogTitle")
>   String addressBookTab_removeAddressConfirmationDialogTitle(String
> arg0);
>
>   /**
>    * Translated "Remove Address?".
>    *
>    * @return translated "Remove Address?"
>    */
>   @DefaultMessage("Remove Address?")
>   @Key("addressBookTab_removeAddressConfirmationDialogTitle[one]")
>   String addressBookTab_removeAddressConfirmationDialogTitle_one_();
>
> Even worse, when I manually write a method like
>
> @DefaultMessage("Remove {0,number} Addresses?")
> @PluralText({"one", "Remove Address?"})
> String addressBookTab_removeAddressConfirmationDialogTitle
> (@PluralCount int addressCount);
>
> everything works as expected.  But when I run I18NSync again, it
> _overwrites_ the method with the two methods shown above.  That's not
> exactly "sync", it's more like "fuck it up", rather.
>
> What am I doing wrong?

I believe I18NSync is going to become deprecated.

Why don't you write your interface first with the appropriate
@Generate annotation and then grab the generated *.properties file (in
the -extra dir) to help you translate your app?
When you need a new "label" in your app, just create a new method in
your Messages interface, with the appropriate @DefaultValue
annotation; if you need help in updating your translated *.properties
file, then compile your app with the "-extra somefolder" argument and
grab the generated properties file to see what you should add to your
other files.

-- 
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