Comment by sami.jaber:

@jat: yes exactly.

To be more precise, here is an extract of the last mail I sent to Ray on  
this topic :

I struggle with the way UiBinder handles the messages properties file name.
When UIBinder catches a <ui:msg>, he generates (internally thru  
MessagesWriter class) an i18n messages file named  
<ui.xml.name><uiBinderName>ImplGenMessages.

1) I'm not supposed to know the naming scheme nor the generated messages  
interface name, right ? so how can I provide (without putting a -extra  
param at compile time and looking for the classes in the target  
directories) the right properties file ?

2) In that case, the generated interface is called  
i18nScreenMyUiBinderImplGenMessages and I have to provide for each locales  
the following file properties i18nScreenMyUiBinderImplGenMessages.properties

The naming scheme is really not intuitive and my ui.xml file name is pretty  
simple.

Couldn't we provide a mechanism to override the [prefix]_GenMessages  
template file name ?

Basically, it would just be about allowing the user to put an annotation in  
his template that would be used by the MessageWriter class.

Here is MessageWriter.java constructor :

{{{
  // Localizable classes cannot have underscores in their names.
     this.messagesClassName = uiBinderImplClassName.replaceAll("_", "")  
+     "GenMessages";
}}}

would be replaced by

{{{
     this.messagesClassName = getAnnotation("@genMessagesFileName);
}}}

Sami


For more information:
http://code.google.com/p/google-web-toolkit/wiki/UiBinderI18n

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to