LocaleData Client
The localedata gem provides a command line interface for the Ruby on Rails translation management platform LocaleData on https://www.localedata.com.
Installation
Add this line to your application's Gemfile:
gem "localedata", group: :developmentExecute the following command:
$ bundle installOr install it yourself as:
$ gem install localedataFinally, create the default configuration file:
$ bundle exec localedata installConfiguration
You need to configure your access token on your development machine. Add the folowing line into your .bashrc (or .zshrc) file:
export LOCALEDATA_ACCESS_TOKEN="YOUR-SECRET-ACCESS-TOKEN"You can edit the configuration in config/localedata.yml:
projects:
- id: "YOUR-PROJECT-ID"
locales:
en: "config/locales/en.yml"
sk: "config/locales/sk.yml"You can find the project ID and your access token on your LocaleData project page.
Usage
localedata pull # downloads all your locales
localedata pull en de # downloads only the en and de localesLicense
The gem is available as open source under the terms of the MIT License.