Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
title: Internationalization made easier with static analysis
date: "2014-02-27 09:41 CET"
tags: i18n, ruby
published: true
[i18n-tasks][i18n-tasks] finds and manages missing and unused translations in your application.
The default approach to locale data management with gems such as [i18n][i18n-gem] is flawed.
If you use a key that does not exist, this will only blow up at runtime. Keys left over from removed code accumulate
in the resource files and introduce unnecessary overhead on the translators. Translation files can quickly turn to disarray.
i18n-tasks improves this by using static analysis. It scans calls such as `I18n.t('some.key')` and provides reports on key usage, missing, and unused keys.
It can also can pre-fill missing keys, including from Google Translate, and it can remove unused keys as well.
i18n-tasks can be used with any project using [i18n][i18n-gem] (default in Rails).
It can make translation easier in many ways:
$ i18n-tasks
Usage: i18n-tasks <command> [options]
-v, --version Print the version
-h, --help Display this help message.
Available commands:
missing show missing translations
unused show unused translations
translate-missing translate missing keys with Google Translate
add-missing add missing keys to the locales
find show where the keys are used in the code
normalize normalize translation data: sort and move to the right files
remove-unused remove unused keys
config display i18n-tasks configuration
xlsx-report save missing and unused translations to an Excel file
See `<command> --help` for more information on a specific command.
There are lots of settings and you can use this on non-ruby codebases.
Reports come rendered in colourful full-resolution [terminal tables](
<a href="" target="_blank"><img width="539" height="331" src="" style="max-width:100%;"></a>
$ i18n-tasks usages 'activities.*'
<a href="" target="_blank"><img width="655" height="193" src="" alt="i18n-screenshot" title="i18n-tasks find output screenshot" style="max-width:100%;"></a>
### See also
* [i18n-tasks on GitHub](
* [HackerNews thread](
[i18n-tasks]: "glebm/i18n-tasks on Github"
[i18n-gem]: "svenfuchs/i18n on Github"