How to strengthen language excesses on Rails generators?

In Rails 4 (which supports multilingual kinks) I can set:

config.i18n.default_locale = :es

in my config / application.rb, which allows me to do such things in the console:

'general'.pluralize(:es)  => "generales"

But when I run:

rails g model General conciencia:string atencion:string

Rails generates files with a “general” with multiple extensions as “generals”, which in Spanish should be “general”

Doesn't Rails use a multilingual inflector for its generators if the locale is set? Is there a way to get them to use them?

Thanks!

+4
source share
1 answer

A little late, but for the record: there is an argument in Rails about why this is (so this is not a mistake, but you can discuss it):

: https://github.com/rails/rails/issues/10125#issuecomment-17274499

Rails 4 . . , i18n , .

, , , API ..

, . "", Active Record Region "", ( , , , ).

, , : en, get i18ned, : es. . , .

, , , , ..

, i18n ( ), .

, , of: en, .

0

All Articles