A Ruby gem that manages translation and localization with static analysis to find missing and unused i18n keys.
i18n-tasks is a Ruby gem that provides static analysis for internationalization (i18n) in Ruby applications. It scans your codebase to detect missing translation keys and identify unused keys in locale files, helping maintain clean and complete translations. The tool also offers automation for adding missing keys, removing unused ones, and integrating with translation services like Google Translate and DeepL.
Ruby and Rails developers working on internationalized applications who need to manage translation keys efficiently. It's particularly useful for teams maintaining large codebases with multiple locales.
Developers choose i18n-tasks because it automates the tedious process of managing translation keys, catching issues before runtime and reducing overhead from unused translations. Its static analysis approach is more reliable than runtime checks, and its extensive feature set covers everything from detection to automated fixes.
Manage translation and localization with static analysis, for Ruby i18n
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses AST and regexp scanners to statically analyze code for translation key usage, catching missing and unused keys before runtime, which prevents errors in production.
Can automatically add missing keys with placeholders, remove unused keys, and normalize locale files, reducing manual overhead in large codebases.
Supports multiple backends like Google Translate, DeepL, OpenAI, Yandex, and watsonx, allowing seamless machine translation of missing keys.
Offers configurable scanners, routers for organizing locale files, and support for custom adapters, adapting to various project structures.
Dynamic keys like `t 'cats.#{cat}.name'` are not recognized by default, requiring hints or enabling non-strict mode, which can lead to false positives or missed keys.
Does not support I18n.localize and has limited support for some keyword arguments (e.g., scope in regexp scanner), creating gaps for certain use cases.
Relies on Psych for YAML processing, which can cause unexpected changes in multi-line string formatting during normalization, as noted in the README.