I just wanted to announce the release of my open source english text
extraction tool for Ruby On Rails, the (h)erbgobbler. The
HerbGobbler is used to take a non-localized Rails project and convert
the views into localized versions of those views. It does this
through the following steps:
- It is meant to be run on a totally non-localized code base (empty
- It parses all of your erb files under app/views
- It finds all of the english text (combining for full sentences)
and extracts that text into config/locales/en.yml
- It replaces the english that it found with <%= t “.key” %> calls
More information can be found here: http://www.i18n-rails.com/
If you aren’t using the default rails i18n mechanism, details on how
to customize the HerbGobbler to store the extracted text into your
datastore can be found on the git-hub page:
The one caveat with the HerbGobbler is that it will not get you to a
distinguish between text meant to just be code (like class names) and
text meant to be text. So you typically only get about 95%
localization through running the HerbGobbler.
This project is very much still in beta and should be tread as such.
Please report any bugs directly on the github page.