Comment #1 on issue 32 by bergerfx: I18n.trc() implementation does not
match javadoc
http://code.google.com/p/gettext-commons/issues/detail?id=32
The documentation has been updated in subversion, so I think this is fixed
now. If
not, please reopen. Thanks!
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
I think the problem was not the documentation, but the implementation:
We used to be able to use code like this:
trc("chat (noun)", "chat");
which shows up in the .po file as "chat (noun)".
Since version 0.9.6, the I18n.trc() methods will try to look up a
concatenation of
context and English string, forcing us to write something like this:
trc("(noun)", "chat");
But: the string will only be extracted as "(noun)" in the .po file, making
it more or
less unusable.
I wonder if this is somehow the intended behavior and I'm missing the point?
And maybe the title of this issue should be changed to something less
misleading.
yes, we changed the inner workings of this which breaks existing
translations with new versions of the library.
The reason is that the native gettext tools added proper message context
handling to their Java implementation.
Switching to the official way of handling message context uses the full
syntax of the generated .pot file and allows
translation tools to display the context information better to translators.