I18NSync: interfaces generation from properties files with dots is not supported

121 views
Skip to first unread message

Polina

unread,
Aug 21, 2006, 8:57:58 AM8/21/06
to Google Web Toolkit
Hi

if a property file keys contain dots - the interface's methods names
generated by I18NSync also contain dots - this results in unacceptable
Java methods names.

E.g.:

some.key=some value

=>

/**.....
* @gwt.key some.key
*/
String some.key();


Thanx,
Polina

Emily

unread,
Aug 21, 2006, 11:41:28 AM8/21/06
to Google Web Toolkit
Yes, that is the intended behavior. The i18n scripts intentionally
generate methods named identically to their corresponding property
names, even when those method names aren't valid. (The rationale is
that it causes compiler errors which makes it easy to find the method
names you need to tweak.)

After running the i18n script, you can change the illegal method names
to whatever legal ones you would like to use for the given property.
The @gwt.key attribute maintains the association between a method and
its corresponding property name even though you change the method name.
See
http://code.google.com/webtoolkit/documentation/com.google.gwt.i18n.client.Constants.html
for more information on @gwt.key and an example.

Cheers,

Emily

Polina

unread,
Aug 22, 2006, 3:00:41 AM8/22/06
to Google Web Toolkit
Thanks, Emily,

nevertheless when you need to generate a lot of methods from a large
properties file automatic dots replacement can be usefull.


Polina

Reply all
Reply to author
Forward
0 new messages