开发者

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 string开发者_如何学Gos 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


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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜