Rails 国际化覆盖率

Rails i18n coverage

是否有工具(或内置方法)可以查看给定的翻译条目是否不再被引用?即使是 "mechanical" 方法也会有所帮助,这意味着运行测试套件并报告哪些 i18n 条目被命中和未被命中的东西。 (我想它也可以报告缺少哪些翻译,但这不是我暂时想要的。)

我认为 i18n-tasks gem has what you're looking for as it can find missing and unused translations. It also provides you with a spec template that will fail your suite if any locales have missing or unused translations (see Installation section on the README).