0.0
No commit activity in last 3 years
No release in over 3 years
Manage YAML translations
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10.3
~> 3.0
~> 0.7

Runtime

~> 0.18.1
 Project Readme

Translations

Edit your translation files in a synchronized way.

Naming

  1. One translation is your master. This file is always complete and serves as a reference for the slaves.
  2. All translations that are not master are slaves. This means that they may not be up-to-date and can be synchronized with the master using translate.

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 files
  • update: Update a key in a single file
  • change: Change the meaning of a key in a way that requires a re-translation for all locales
  • move: Move a key around
  • remove: Remove a key from all files
  • translate: 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
  • validate: Validate that a translations has all keys, that are in the master

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

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request