views:

253

answers:

2

I was wondering, is it possible to synchronize with any tool or gem or w/e 2 or more yml files?

eg. i have the Greek yml file called el.yml

el:
  layout:
    home: "Αρχική"

and the english one called en.yml

en:
  layout:
    home: "Home"
    category: "Category"

Is there any tool that based on a single yml file ie en.yml ( root ) that goes to the rest of the ymls and creates the missing translations with the default (en.yml) values?

After running such a tool i would expect to have the el.yml become likes this:

el:
  layout:
    home: "Αρχική"
    category: "Category"

I am using a similar tool in .NET RESX Synchronizer and it does exactly that, but for resx files.

+1  A: 

It's not exactly what you need, but maybe checking out http://github.com/newsdesk/translate out can prove useful.

Quote:

This plugin provides a web interface for translating Rails I18n texts (requires Rails 2.2 or higher) from one locale to another. The plugin has been tested only with the simple I18n backend that ships with Rails. I18n texts are read from and written to YAML files under config/locales.

Petros
A: 

Didn't found either, so I wrote a lil gem: http://github.com/nofxx/i18n_sync

nofxx