svenfuchs / rails-i18n

Repository for collecting Locale data for Ruby on Rails I18n as well as other interesting, Rails related I18n stuff
http://rails-i18n.org
MIT License
3.95k stars 2.78k forks source link

de-capitalization problem #4

Closed pdietrich closed 13 years ago

pdietrich commented 14 years ago

Hi!

I have the following problem with I18n and the "label" form helper:

in my de.yml I have:

de:
  activerecord:
    attributes:
      feedback:
        email: 'E-Mail-Adresse'

In my form I have

<% form_for(@feedback) do |f| %>
    <%= f.label :email %>
    <%= f.text_field :email %>
<% end %>

What happens is that the label method de-capitalizes the string returned by I18n so I get 'E-mail-adresse' in the output which unfortunately is wrong in German. It is easy to work around this by manually creating an html label tag with a <%= I18n.t 'activerecord.attributes.feedback.email' %> inside.

I think the label form helper should not touch the string returned by I18n.

Cheers, Patrick

PS: my Rails version is 2.3.4

pdietrich commented 14 years ago

I just noticed that I actually had <%= f.label I18n.t(:email) %> which obviously can't work. label doesnt use I18n at al up to now.

Sorry for the false alarm. Anyhow, the label method should be fixed.

thermotoga commented 14 years ago

yes, same problem here. its quite annoying for german speaking people. one way to get around it is <%=t :email %><

kuroda commented 13 years ago

This issue is not relevant to the rails-i18n repository.