Changes redmine attribute i18n.

pull/72/head
Martin Czuchra 12 years ago
parent 82e75e3066
commit 2815770661
  1. 7
      config/initializers/10-patches.rb

@ -20,7 +20,12 @@ module ActiveRecord
# Translate attribute names for validation errors display
def self.human_attribute_name(attr, options = {})
l("field_#{attr.to_s.gsub(/_id$/, '')}")
begin
options = options.merge({:raise => true})
super(attr, options)
rescue I18n::MissingTranslationData => e
l("field_#{attr.to_s.gsub(/_id$/, '')}")
end
end
end
end

Loading…
Cancel
Save