gwtproject / gwt

GWT Open Source Project
http://www.gwtproject.org
1.52k stars 376 forks source link

Reliable way to extract messages for translation that are shared with server-side code #8818

Open dankurka opened 9 years ago

dankurka commented 9 years ago

Originally reported on Google Code with ID 8858

It seems that our process of extracting messages for translation involves invoking the
GWT compiler and taking the messages to translate from an auxiliary output file. (I'm
guessing that the i18n generator outputs data about all the annotations it sees?)

This doesn't work for messages that are shared with server-side code, because the GWT
compiler doesn't output the messages that aren't actually used in client code. As a
result, they don't get translated. Workarounds like running the GWT compiler in draft
mode don't entirely solve the problem.

So, it seems like we should have a different way to extract messages for translation?
Perhaps one that doesn't invoke the GWT compiler?

(Apologies for the lack of detail.)

Reported by skybrian@google.com on 2014-08-13 19:17:30

dankurka commented 9 years ago
@John, Shouldn't your patch for shareing i18n solve this problem? https://gwt-review.googlesource.com/#/c/1550/

Reported by manuel.carrasco.m on 2014-08-13 19:44:38

dankurka commented 9 years ago
Well, it solves sharing the messages with the server, so you can get it that way, but
it doesn't directly solve extracting the messages without a compile.

However, it could be used as part of the solution, making it easier to extract those
messages from source as part of a build step.

Reported by jat@jaet.org on 2014-08-13 20:02:30