trc doesn't seem to work
Closed this issue · 3 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. add i18n.trc("asdf", "jklö") somewhere
2. change the locale to something else but default
3. text from default language will be taken instead of translated text
Or is there something I don't know about trc?
Original issue reported on code.google.com by Simon...@gmail.com
on 9 Jul 2009 at 7:48
GoogleCodeExporter commented
Did you translated the message files into another language?
These three calls should show up as 3 different entries in the messages.pot
file:
trc("context", "world")
trc("other-context", "world");
tr("world");
Here's the messages.pot file:
#: test.java:3
msgctxt "context"
msgid "world"
msgstr ""
#: test.java:4
msgctxt "other-context"
msgid "world"
msgstr ""
#: test.java:5
msgid "world"
msgstr ""
Make sure to also use the latest version of the gettext-ant-tasks to generate
the
messages.pot file.
The xgettext invocation I used for this example was:
xgettext -ktrc:1c,2 -ktrnc:1c,2,3 -ktr -kmarktr -ktrn:1,2 -k test.java
Original comment by berge...@gmail.com
on 17 Jul 2009 at 3:32
GoogleCodeExporter commented
Ah. Working. Thank you! My xgettext command was wrong (-ktrc without 1c,2).
I've also
corrected this in the tutorial.
About gettext-ant-tasks: The tutorial also shows
<gettext-extract keysFile="messages.pot" poDirectory="po" keywords="-k -ktrc
-ktr
-kmarktr -ktrn:1,2 -ktrl">
-- should this be ktrc:1c,2 too here?
Original comment by Simon...@gmail.com
on 17 Jul 2009 at 8:06
GoogleCodeExporter commented
yeah, the tutorial is probably not updated, good catch!
Closing this as WontFix.
Original comment by berge...@gmail.com
on 17 Jul 2009 at 8:28
- Changed state: WontFix