79643754

Date: 2025-05-29 10:46:00
Score: 0.5
Natty:
Report link

With the -k*[keywordspec]* argument of xgettext you can add keywords. The default keyword specifications stay enabled, though. And for Java, these keywords include getString, no matter from which class:

To disable the default keyword specifications, the option ‘-k’ or ‘--keyword’ or ‘--keyword=’, without a keywordspec, can be used.

https://www.gnu.org/software/gettext/manual/gettext.html#Language-specific-options

So, just adding -k with an "empty" keywordspec removes the default keywords.
Considering this, the full command should be:

find src -iname "*.java" | xargs xgettext -k -ktrc -ktr -kmarktr -ktrn:1,2 -o po/keys.pot --from-code=utf-8
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Filler text (0.5): ,,,,,,,,
  • Low reputation (0.5):
Posted by: timlg07