devise translation keys not built into views

17 views
Skip to first unread message

fugee ohu

unread,
Aug 28, 2017, 1:46:26 PM8/28/17
to Ruby on Rails: Talk
I can generate views and translations but how do i generate views with keys instead of static text? I have to edit my vies to put in the keys   manually?

Rolandas Barysas

unread,
Aug 28, 2017, 2:06:26 PM8/28/17
to rubyonra...@googlegroups.com
Read Rails internationalization guide: http://guides.rubyonrails.org/i18n.html

On Mon, Aug 28, 2017 at 8:46 PM, fugee ohu <fuge...@gmail.com> wrote:
I can generate views and translations but how do i generate views with keys instead of static text? I have to edit my vies to put in the keys   manually?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9297ab97-4436-48aa-bf8a-a724051166df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Rolandas
Message has been deleted

fugee ohu

unread,
Aug 28, 2017, 2:13:52 PM8/28/17
to Ruby on Rails: Talk


On Monday, August 28, 2017 at 2:06:26 PM UTC-4, Rolandas Barysas wrote:
Read Rails internationalization guide: http://guides.rubyonrails.org/i18n.html
On Mon, Aug 28, 2017 at 8:46 PM, fugee ohu <fuge...@gmail.com> wrote:
I can generate views and translations but how do i generate views with keys instead of static text? I have to edit my vies to put in the keys   manually?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.



--
Rolandas
 
Whats that have to do with devise?
 

Rolandas Barysas

unread,
Aug 28, 2017, 2:37:08 PM8/28/17
to rubyonra...@googlegroups.com
If you have devise templates in mind (which you generate with `rails generate devise:views`), then you use Rails Internationalization API - just replace static text with #t methods, and add any missing strings to the localization file. 

To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3ce9ba68-24ad-4297-85ce-88bab2c89df0%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Rolandas
Reply all
Reply to author
Forward
0 new messages