-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
human_attribute_name scopes translations differently for nested classes since rails 3.0.2 #760
Comments
Imported from Lighthouse. I was just searching for this bug too and you gave me the answer. Problem is.. what happens now if i corrent my locales to this new design, then it will be considered a bug and "fixed"? |
Imported from Lighthouse. to fix this bug try redesign locale files to Exampleclass Hotels::Period pl:
activerecord:
models:
hotels:
period: 'okres'
attributes:
hotels:
period:
name: 'nazwa'
start_date: 'początek'
end_date: 'koniec'
days: 'dni'
discount: 'zniżka' |
Imported from Lighthouse. My temporary workaround is :
|
Imported from Lighthouse. nice work ;) = form_for(@period, :url => period_path(@period), :html => { :multipart => true, :method => :put }) do |f|
= f.label :name, :class => 'form-label size-60 fl-space2' autotranslate :name doesn't work with namespaced models :( |
Imported from Lighthouse. autotranslate :name ?? |
Imported from Lighthouse. @robert, as i understand, the fix is correct, only the CHANGELOG is not. Right? dot notation should be the correct way. |
Imported from Lighthouse. i had tried to do labels with I18n from http://blog.plataformatec.com.br/2010/02/rails-3-i18n-changes/ i found answer. p "#{object_name}.#{method_name}" # me puts here
I18n.t("helpers.label.#{object_name}.#{method_name}", :default => "").presence
return "hotels_period.name" so in locales yml, keys must be like : pl: not
its just another inconsistence ? |
Imported from Lighthouse. Original ticket at: http://rails.lighthouseapp.com/projects/8994/tickets/6034
Created by Robert Pankowecki - 2011-02-22 08:32:34 UTC
Calling
seeks for translation key:
on Rails 3.0.1
but for
on Rails 3.0.2 and 3.0.3
This is due to changes in :
GEM_HOME/gems/activemodel-3.0.2/lib/active_model/translation.rb
The changelog states that:
so i believe that it was not intentional.
The text was updated successfully, but these errors were encountered: