gettext 是否有办法警告我有关未包装在 _()
或 N_()
中的字符串?
基本上有没有一种方法可以获取所有不与 xgettext 使用的关键字匹配的字符串的列表。所以,我想要:
! xgettext 源代码
来自 gettext 邮件列表的答复:
- Run xgettext once, without --extract-all, to get the normal POT file.
- Run xgettext with --extract-all, to get all strings.
- 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
最佳答案
您可以比较带有和不带有 --extract-all
标志的输出...
关于gettext - 如何使用 gettext 查找未标记的字符串?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2548975/