Tool for Text Extraction from erb/rhtml files for internationalization (i18n) purposes
HerbGobbler is a software localization tool for Ruby on Rails based websites seeking to translate their website into multiple languages. It aims to assist businesses and localization services with website internationalization. The HerbGobbler enables software internationalization of Ruby on Rails based websites by:
By automating the text extraction process in software internationalization, the HerbGobbler increases quality of the final foreign language translation by implementing industry best practices, while at the same time decreasing the number of bugs that normally occur in the time consuming and tedious foreign localization process.
<div class="bullet"> <div class="description"> If you're on an old version of Rubygems (before 1.3.6) </div> <pre class='sunburst'>Run: $ gem update --system </pre> <div>
<div class="bullet"> <div class="description"> <%= t '.if_you_re_on' %> </div> <pre class='sunburst'>$ <%= t '.run_gem_update' %></pre> <div>
Getting started with the HerbGobbler is easy:
$ gem install herbgobbler
If you’re on an old version of Rubygems (before 1.3.6)
$ gem update --system
Use the gobble command to extract all the english text from your .erb files and place the extracted text into the RAILS_ROOT/config/locals/en.yml file
$ gobble i18n -a ~/my/rails/root/
The HerbGobbler is very much beta software. It attempts to implement the best practices in internationalization (i18n) and localization by extracting complete sentences (even when these sentences contain html). If you discover a piece of text that is not being properly extracted, or a pattern of extraction that you think is incorrect, please enter a bug into the system and a patch will be issued.
The Herbgobbler also has experimental tr8n support. By running:
$ gobble -tr8n -a ~/my/rails/root
The Herbgobbler will rewrite your erb files with tr8n embed (tr) tags. This is a more beta feature than the rest of the Herbgobbler. If you discover any problems please submit a bug through github being sure to include the block of erb that is causing problems.
HerbGobbler provides several command line options to make text extraction simppler
If you are interested in exporting text to a different data store than the default rails i18n format (en.yml), this can be done by implementing a TranslationStore.