I am trying to use internationalization in rails. Here i've found that for the command
<%= t :hello_world %>
I know that Ineed to define :hello_world in the file config/locales/en.yml like this
# config/locales/en.yml
en:
hello_world: Hello world!
What i want to know is as in django it generates translation files using makemessages, is there any way to do it in rails? It becomes a tedious task to find and write whole translations.
Thanks
You might consider checking https://github.com/svenfuchs/i18n-missing_translations that provides a way to build a yml with missing translations keys while you browse your application.
Wiring it when you run your tests should yielld all missing translations if you have exhaustive coverage.
It doesn't seem as slick as Django's makemessages is, but it's a start.
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