开发者

xgettext extracts wrong literals

开发者 https://www.devze.com 2023-04-11 06:03 出处:网络
I use this to extract all string literals that need translation: xgettext -o $@ -k\"Localizer.get\" $^ --from-code=utf-8

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".

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号