I use this to extract all string literals that need translation:
xgettext -o $@ -k"Localizer.get" $^ --from-code=utf-8
These should be extracted:
Localizer.get("Could not find the config file. (This should *not* happen!)")
These not:
SettingsWrapper.getString("date_format")
But both end up in m开发者_如何学运维y .pot file:
msgid "date_format"
msgstr ""
Is there some way to get this straight?
From the xgettext manual, getString
is a default keyword specification for Java. You will need to disable default keywords and explicitly include any desired keyword specifications that were disabled which you want to enable. Try changing -k"Localizer.get"
to -k -k"Localizer.get"
.
精彩评论