Gem 管理本地化翻译可以用这个 gem i18n-tasks

Rei · 2014年02月23日 · 最后由 siriuszhuang 回复于 2014年03月22日 · 3001 次阅读

https://github.com/glebm/i18n-tasks

Manage translations in ruby applications with the awesome power of static analysis

$ rake -T | grep i18n
rake i18n:add_missing[placeholder]        # add placeholder for missing values to the base locale (default: key.humanize)

rake i18n:fill:base_value[locales]        # copy base locale values for all untranslated keys to locales (default: all non-base)

rake i18n:fill:blanks[locales]            # add "" values for missing and untranslated keys to locales (default: all)

rake i18n:fill:google_translate[locales]  # add Google Translated values for untranslated keys to locales (default: all non-base)

rake i18n:missing[locales]                # show missing translations

rake i18n:missing:blank[locales]          # keys that exist in base locale but are blank in passed locales

rake i18n:missing:eq_base[locales]        # keys present but with value same as in base locale

rake i18n:missing:not_in_base             # keys present in code but not existing in base locale data

rake i18n:normalize[locales]              # normalize translation data: sort and move to the right files

rake i18n:remove_unused[locales]          # remove unused keys

rake i18n:spreadsheet_report[path]        # save missing and unused translations to an Excel file

rake i18n:unused                          # show unused translations

好东西。

一开始很好奇 campo 的翻译怎么这么整齐,后来看代码发现 Gem 有这个。

好东西!非常感谢~

需要 登录 后方可回复, 如果你还没有账号请 注册新账号