Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why no i18n in views? #1642

Closed
tmaier opened this issue Feb 12, 2012 · 6 comments
Closed

Why no i18n in views? #1642

tmaier opened this issue Feb 12, 2012 · 6 comments

Comments

@tmaier
Copy link

tmaier commented Feb 12, 2012

Is there any reason why the views at

do not use any calls to i18n?

Else I would sit down and add all of them to devise.en.yml.

@josevalim
Copy link
Contributor

Because it is unnecessary complexity for those not using I18n.

@a-square
Copy link

How is changing <h2>Sign in</h2> to <h2><%= t :sign_in, :default => 'Sign in' %></h2> (or even just <h2><%= t :sign_in %></h2> if you provide English translation in the gem) going to complicate anything?

You have made devise the go-to authentication gem, and Rails is not only used in America, so this is kind of dickish to the rest of the world, wouldn't you agree?

@josevalim
Copy link
Contributor

You have made devise ...

You are welcome!

... and Rails is not only used in America, so this is kind of dickish to the rest of the world, wouldn't you agree?

@Kallikanzarid, LOL. I am one of the I18n gem maintainers and I am a brazilian, living in Poland. I work for @plataformatec and we build apps both in english and portuguese.

In our experience, if your app is used in just one language (which is the majority), it is easier to copy the views to your application and translate it (rails g devise:views) than fiddling with a yaml file. This is our preference. So no, I don't agree. If you want to re-use views in a multi-language app, there is already a gem that does it.

@a-square
Copy link

LOL. I am one of the I18n gem maintainers and I am a brazilian, living in Poland.
@josevalim Please forgive me, then :(

If you want to re-use views in a multi-language app, there is already a gem that does it.
Can you point me to it, please?

@josevalim
Copy link
Contributor

@tillmo
Copy link

tillmo commented Dec 31, 2012

It took me some effort to understand how to proceed, so here for those in a similar situation:

  • Install the gems devise-i18n and devise-i18n-views (add them to your Gemile)
  • rails g devise:views:locale <your locale>
  • rails g devise:views:i18n_templates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants