Comment 3 for bug 876786

Revision history for this message
Aldis Berjoza (graudeejs) wrote :

RoR = Ruby on Rails
It should be added to rails snippets.

I think that this would be very useful to many Ruby on Rails programmers, who meed to write internationalized sites

It is especially useful, if you fallow methods described in http://guides.rubyonrails.org/i18n.html

No imagine that you need to have "This internationalized text" somewhere in code (let's imagine that we need it in app/views/documents/index.html.haml file)

In my setup, i hit "t" and tab and snippet start working:
I18n.t("app.views.documents.index.some_text", :default => "some_text")
At this moment you have some_text selected... you type in "This internationalized text" and get
I18n.t("app.views.documents.index.This_internationalized_text", :default => "This internationalized text")

Now, in yaml file, where you keep translations, you write
lv:
..app:
....views:
....documents:
......index:
........This_internationalized_text: "Šis internacionalizētais teksts"

Node prefixed dots replresend spaces

With help of this sipped I translated my work a LOT faster