LostInTranslation

This gem provides you three tasks to translate your locale yamls!

Installation

Add this line to your application's Gemfile:

gem 'lost_in_translation'

And then execute:

$ bundle

Or install it yourself as:

$ gem install lost_in_translation

Usage

There are three tasks you can execute.

ATTENTION: Use at your own risk! Back your shit up, before using this!

Each will ask you for the file
If this gem is installed inside a Rails-Application you just have to written e.g.:

'en' -> for en.yml   
'de' -> for de.yml   
...

One will be the master-file (this one will not be changed)
and
One will be the slave-file (this one will be changed)

Script 1: Interactive

rake lit:interactive   

This script will ask you for the missing value.
It will find every difference and will ask you to fill every hole... yeah.
After everything is filled out it will merge the data back into your File.

Script 2: Recent

rake lit:recent

REQUIRED: Connection to Git This script will ask you for the missing value.
It will find everything you changed in your master-file since you last pushed commit.
After everything is filled out it will merge the data back into your File.

Script 3: Cleanup (Deletes something!)

rake lit:cleanup  

This script will find every key/value inside your slave-file that isnĀ“t present in your master-file.
And it will be deleted!!!!

Sometimes the Rake tasks aren't working

In this case you can use the Rails-Console and the Class -LostInTranslation-.

rails c
LostInTranslation.interactive
or
LostInTranslation.recent
or
LostInTranslation.cleanup

Yet to come

I am planning on an integration of Translation APIs.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/datyv/lost_in_translation. 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.