Harvey
Harvey

Reputation: 5821

Howto find unmarked strings with gettext?

Does gettext have a way to warn me about strings that have not been wrapped in _() or N_()?

Basically is there a way to get a list of all strings that do NOT match the keywords used by xgettext. So, I want:

! xgettext source_code

Answer from the gettext mailing list:

  1. Run xgettext once, without --extract-all, to get the normal POT file.
  2. Run xgettext with --extract-all, to get all strings.
  3. Run "msgcomm --less-than=2" on the two POT files, to get the difference, and see whether the output is empty. You can use option --force-po to force an empty POT file even if both inputs are the same.

-- Bruno Haible

Upvotes: 4

Views: 378

Answers (1)

SamB
SamB

Reputation: 9222

You could compare the output with and without the --extract-all flag...

Upvotes: 1

Related Questions