Welcome to AppLocale's Ruby gem. This gem helps customers of AppLocale.dev to easily pull down their
latest translations with a simple bundle exec applocale pull
.
Add this line to your application's Gemfile:
group :development do
gem 'applocale-ruby'
end
And then execute:
$ bundle
Or install it yourself as:
$ gem install applocale-ruby
Then follow the instructions in Usage to setup your configuration file.
Using AppLocale's gem requires a configuration file to be present. By default we assume this file to
live at config/applocale.yml
but you can alternatively run each command with --config-file=path-to-applocale.yml
You'll need to login to your AppLocale instance and login to your account, click API Tokens to have the information ready for this step after creating an API Token and Project.
Sample configuration file:
applocale:
host: https://translations.example.com
project_id: 234qfewaf
api_key: API_KEY_HERE
locale_directory: "config/locales" # Default, you can override this if you wish.
Once you have your configuration file setup for your project you can proceed to use the following commands.
After that, to pull ALL your setup languages in AppLocale:
bundle exec applocale pull
Or just your specified languages:
bundle exec applocale pull en es
Bug reports and pull requests are welcome on GitHub at https://github.com/applocale/applocale-ruby. 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.
This project uses Standard to minimize bike shedding related to source formatting.
Please run ./bin/format
prior to submitting pull requests.
Everyone interacting in the Applocale::Ruby project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.