On 2012/06/14 15:19:09, rkj wrote:
I am a bit confused now. I follow the example:
https://developers.google.com/web-toolkit/doc/latest/tutorial/i18n
As I understand the GWT.create should create proper implementation
based on
properties file - why isn't that so?

The issue is that they would need to integrate these messages with their
translation system, but they don't have the hooks to do so.  For
example, there is no @Generate notation here, and no way to put one
appropriate for whatever they are doing with translations.  They can't
specify MD5 keys or some other key that won't collide with what they
have elsewhere in their app.

It is possible to supply the translations anyway, but they will have to
know about it themselves and do something different than every other
message in the app.

Problem with passing an instance of this is that it's practically an
inner class
of CellTree, so I would have to allow passing this interface to
CellTree - is
that expected? How does GWT handle more complicated widgets?

AFAIK, there aren't any other widgets that need translations.
Basically, either the widget should be self-contained, which means it
has all the translations for all supported languages, or it needs to
allow the caller to pass in the messages to use.  You can leave a helper
method without Messages that just GWT.creates it and hopes for the best
(hopefully only used by people that aren't localizing their app).

For example, the caller could create an empty extension of the Messages
interface (which would need to be moved so it could be accessed) and add
their own @Generate* annotations on it as needed to tie into their
translation system, and then GWT.create it themselves when creating the
widget.

http://gwt-code-reviews.appspot.com/1739803/

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

Reply via email to