Localer
Localer is an automatic detecting missing I18n translations tool.
The aim is to preserve the integrity of translations. Localer parses and merges keys for all locales in an application. At the next step, it searches missed translations for calculated keys.
Installation
Add this line to your application's Gemfile:
gem 'localer'
And then execute:
$ bundle
Or install it yourself as:
$ gem install localer
Usage
At the root directory of a Rails app, run:
localer check .
or for specific Rails path:
localer check /path/to/rails/application
Support
Localer supports Ruby 2.3+, Rails. 4.1+
Configuration
The behavior of Localer can be controlled via the .localer.yml
configuration file. It makes it possible to disable locales and keys. The file can be placed in your project directory.
Disable specific locale
By default, Localer enables all locales, but you can disable it:
Locale:
EN:
Enabled: false
Exclude keys globally
By default, Localer enables all keys, but you can disable keys started with specified string or by regex:
Exclude:
- /population\z/
- .countries.france
Exclude keys for specific locale
Locale:
EN:
Exclude:
- /population\z/
- .countries.france
Development
After checking out the repo, run bundle exec appraisal install
to install dependencies for each appraisal. Then, run bundle exec appraisal rake
to run the tests.
Built With
- Thor - Used for building command-line interfaces.
- Appraisal - Used for testing against different versions of dependencies
- Cucumber + Aruba - Used for testing command-line commands
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/aderyabin/localer. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
License
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the Localer project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.