Translations
Edit your translation files in a synchronized way.
Naming
- One translation is your
master. This file is always complete and serves as a reference for theslaves. - All translations that are not
masterareslaves. This means that they may not be up-to-date and can be synchronized with the master usingtranslate.
The default master is en, but you may alter it using the -m <locale> switch.
Usage
Currently there are some commands to alter your translation files:
add: Add a new key to all your filesupdate: Update a key in a single filechange: Change the meaning of a key in a way that requires a re-translation for all localesmove: Move a key aroundremove: Remove a key from all filestranslate: Translate all keys that are missing from a given file
And there are commands to view your translations:
view: View all translations for a given key
For more info just run translations help <command>.
Requirements
- All your translations are stored in YAML format and one file per locale called
<locale>.yml - Optimally you work in a rails project, e.g. your translations are stored in
config/locales, but you may alter this location with-d <directory> - Optimally you have a master
Missing/Coming Features
The following features (or whatever comes to your mind) will probably be implemented in the next time:
- Support for Pluralizations
- Support for Cascading
Installation
Add this line to your application's Gemfile:
gem 'translations'
And then execute:
$ bundle
Or install it yourself as:
$ gem install translations
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request