rabelyoda: Rails Localization Made Easy
I have always been fond of small utilities that do one thing, probably one deadly simple thing, and by that save you from lots of boring routine on a day-by-day basis.
Say, you’ve got a Ruby on Rails project. Say, you keep a dozen files in your config/locales folder. Say, you periodically need to sync all of them to the original en.yml file and send to your translators for an update. It’s usually very boring and the chance of missing a string or another is high.
So, here comes a nifty gem to help you with that.
What it does is as follows:
- It reads all config/locales/*.yml
- It outputs them to config/locales.out/*.yml
- It adds all missing strings from en.yml to the other ymls.
- For each such string, “[pls translate]” is added at the beginning, so it’s easy to identify them in the resulting file.
- It removes all strings not present in en.yml from the other ymls.
After that you grab the resulting files from config/locales.out and send them over to your translators. When the translation is made, you simply overwrite your original files in config/locales. That’s it. Nothing else.
Give it a try:
sudo gem install rabelyoda
cd your-rails-project-folder
rabelyoda
Or browse the code at GitHub.
La-lal-la-la-la-la-la. :)







2