I am trying to automatically extract strings from ruby views .erb files to config/lang/ files for example en.yml
Is there some updated alternative to this?
http://zigzag.github.io/2009/12/17/get-your-local-rails-application-ready-for-i18n.html
It is supposed to be a gem tool that will extract strings if used like this:
ready_for_i18n <you view path> <target path>
There is a number of gems that do this. One list of such gems is maintained on the i18n-tasks wiki:
- Slimkeyfy extracts plain strings from Slim views and Rails Controllers.
- haml-i18n-extractor automates string extraction from HAML.
- i15r for ERB and Haml.
- i18n-html_extractor another extractor for ERB with an interactive mode.
Try i18n-tasks gem
$ i18n-tasks add-missing
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With