0

我们如何更改 Rails 4 中翻译的复数规则?我尝试修改初始化程序/inflections.rb 如下:

ActiveSupport::Inflector.inflections(:fr) do |inflect|
   inflect.irregular 'Niveau', 'Niveaux'
end

ActiveSupport::Inflector.inflections(:fr) do |inflect|
  inflect.acronym 'RESTful'
end

并像这样在页面中传递翻译:

= link_to t('links.back_to', model: Level.model_name.human.pluralize), levels_path

但它仍然通过应用默认模式进行翻译。关于如何解决这个问题的任何想法?谢谢

4

0 回答 0