Sublime Forum

Rails Localization for Sublime Text

#1

Working on apps that require localization is still cumbersome: you need to make sure the translation is set, check what it is and change it accordingly.
In order to make this simpler I’ve built hover-locales for Sublime Text - https://github.com/alvesjtiago/hover-locales

It shows the translations stored under config/locales for each key whenever you hover an I18n.translation string. Clicking it automatically goes to the file where it’s set so you can quickly change it.

To install just search for hover locales on package control.

It would be great to get your feedback and appreciate all the PR’s and suggestions on the repo. Thanks

1 Like

#2

Wow that’s nice! I’ll try it out :smile:

1 Like

#3

Nice plugin, one suggestion would be escaping html in translations (not a good idea, I know), otherwise sublime won’t show popups.
Like so:

html_out += '<span style="color: #f00;">' + html.escape(key, quote=False) + "</span>" + ": " + html.escape(value["string"], quote=False)
1 Like

#4

Thank you :blush:
Let me know how it goes once you get a chance to try it out!

0 Likes

#5

Thanks for the suggestion @apaju! I’ll change it and release it in the next version.

0 Likes