Topic: How to translated form-label on devise forms?

Hi,
How do I do translation on devise form labels?
I did the following but it doesn't work.

The form

<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %><p class="h2"></p>
  <div class ="row"><%= f.label(:email,:class=>"form-label")%>
  <%= f.email_field(:email,:class=>"wide-textbox")%></div>

  <div class ="row"><%= f.label(:password,:class=>"form-label")%>
  <%= f.password_field(:password,:autocomplete => "off",:class =>"wide-textbox")%></div>

  <% if devise_mapping.rememberable? -%>
    <div class ="row"><%= f.check_box(:remember_me,:class=>"remember-me-checkbox")%><%= f.label(:remember_me,:class=>"remember-me")%></div>
  <% end -%>
  <div class="row"><%= f.submit(:value=>"",:class=>"button-signin")%></div>
<% end %>
            <div class="row">
              <span class="forgot-password">
                <%= link_to "Forgot password?", new_password_path(resource_name)%><br />
                <%= link_to "Didn't receive confirmation email?", new_confirmation_path(resource_name)%><br />
              </span>
            </div><!-- /.row -->
          </form>

My en-US yml file

en-US:
helpers:
  label:
    email: Email Address
    password: Password
    remember_me: Remember Me

But it still doesn't render the correct form labels.

Last edited by limgw (2012-06-26 07:31:40)

Re: How to translated form-label on devise forms?

I found out the solution it is.
For session/devise sign)in page it is:
en.yml

  helpers:
      label:
       session:
           email: Email Address
           password: Password

For registration page it is

activerecord:
     models:
      user:
     attributes:
      user_attribute1: