Forem Creators and Builders 🌱

Ben Halpern for Forem Core Team

Posted on

Use bin/untranslated_erb to find hardcoded text that could be moved to i18n files.

Just a heads up that we shipped a new tool that can help track down text in the codebase which is still hardcoded and may need to be moved to locale variables.

Run bin/untranslated_erb to output a bunch of instances of text on erb pages which may be good opportunities to contribute to our current internatioinalization effort.

The script will output files which have text that could be moved to variables, for example:

app/views/users/_comments_section.html.erb

  8:Last
  8:comments
 10:All
 10:comments
 15:View all activity
 22:Recent comments
 53:View all
 53:comments
Enter fullscreen mode Exit fullscreen mode

For more info on this project, check out this post and this issue.

Happy coding!

Top comments (1)

Collapse
 
cronlabspl profile image
cronlabspl

I dont understand whats all this fuss is about.