1

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 my .pot file:

msgid "date_format"
msgstr ""

Is there some way to get this straight?

Martin Ueding
  • 8,245
  • 6
  • 46
  • 92

1 Answers1

3

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

Go Dan
  • 15,194
  • 6
  • 41
  • 65