Closed jamesarosen closed 12 years ago
Users can translate the key 172 in the bulk translation mode by going to: /tr8n/phrases or you could add another helpful tag:
<%= tr8n_phrases_link_tag("The best fishing site") %>
which will link them directly to the phrase, but only if the inline translations are enabled.
The tr8n_phrases_link_tag is also useful when you deal with lists of data:
<%= select_tag(:items, tr8n_options_for_select(["milk", "bread", "cheese"], "cheese", "Shopping item")) %> <%= tr8n_phrases_link_tag("Shopping items") %>
Notice that this time i am making the link to all of the phrases by using the items description. When user enables inline translations, they will have a little icon next to the drop down box that will take them directly to the phrases in the list.
Great tip! I'll try to add this to the documentation.
Good to know above mentioned things @berk . But when I use tr8n method in my helper file then it don't translate strings used in helpers methods of rails app.
@taimoor try switching to the Tr8n Client SDK instead of Tr8n gem. In the SDK i will be adding support for i18n standard fallback mechanism. So all t() methods will go through tr() backend. Along with many other new features, like ongoing Rails 4.0, 4.1 support, new TML syntax, better UI tools, etc...
https://github.com/tr8n/tr8n_rails_clientsdk
I will give you a script to migrate all your translations to the service.
Thanks for suggesting a solution. So can you give me script so that I can transition to your suggested changes at local setup of project.
This template
produces this HTML (for non-default-language users)
Right-clicking the link brings up the translation for key 173. There's no way for the user to translate 172 (the title attribute).