gettext - 如何使用 gettext 查找未标记的字符串?

标签 gettext

gettext 是否有办法警告我有关未包装在 _()N_() 中的字符串?

基本上有没有一种方法可以获取所有与 xgettext 使用的关键字匹配的字符串的列表。所以,我想要:

! xgettext 源代码

来自 gettext 邮件列表的答复:

  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

最佳答案

您可以比较带有和不带有 --extract-all 标志的输出...

关于gettext - 如何使用 gettext 查找未标记的字符串?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2548975/

相关文章:

php - gettext,如何处理同音字?

Python xgettext 合并gettext 和ngettext 字符串,打破翻译查找

java - Spring:如何获得 "ACTUAL"/"CURRENT"区域设置,就像它适用于消息一样?

python gettext : specify locale in _()

python : using gettext everywhere with __init__. py

不同环境下的php gettext目录结构

perl - 如何确定gettext的安装版本?

php - ubuntu下设置php的gettext

java - JTextField getText() NullPointerException

python : No translation file found for domain using custom locale folder