Reputation: 2962
I work on a RoR website that is translated into a number of languages. It's a real pain to manage the "what's new to translate" for each release. We have to collect all the new keys and send them out in a spreadsheet to the translation team. So, my question is:
How do people structure their locales files and manage the addition of new keys so that it's easy and painless to communicate changes to the translation team?
Upvotes: 4
Views: 833
Reputation: 778
I wrote a gem to solve the "what's new to translate problem"
https://github.com/zoodles/vocab
After you install the gem, you run the following command:
vocab init
This will save a reference to the current git master SHA to a file called .vocab
After adding strings to the site, you run:
vocab extract rails
This will generate a yml file containing all the english keys and strings that have been added since the commit represented by the SHA in .vocab. You can send this file to translators for translation.
When the translations come back from translators, you can run the command:
vocab merge rails
This will put the translated values in all the correct yml files under config/locales.
Upvotes: 2
Reputation: 10564
http://www.github.com/mynewsdesk/translate
This is really awesome though won't organise your languages translation yml's into any particular categorised structure. It will insert the word "missing" however, where necessary and remove orphaned entries.
You might also wish to look at the textmate bundle.
Upvotes: 3
Reputation: 381
We recently switched to https://webtranslateit.com/. A great tool for managing our locales. Just push up the latest master locale yml file to their web service and it will flag all new string as untranslated and it even track changes on old strings and mark them as "Need Verification". My colleague wrote a blog post about our translation workflow for a couple of days ago.
Upvotes: 1
Reputation: 10194
Easy actually... The best thing to do is to send the translation team your complete English language file. If they are professionals, they are using a translation memory tool such as Trados or Deja Vu. THey will import your file and the strings that they already translated will pre-populate, and they will be left with only the delta.
Upvotes: 0
Reputation: 10293
I would suggest some simple ways. We follow the first one -
Always maintain the entries in the locale files sorted on the key. This will help you to find out the extras/missing by doing a simple diff using any diff tool
Put a marker at the end of file after previous release and add new key-values at the end of the file
Upvotes: 0