diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2012-07-31 05:46:25 -0700 |
---|---|---|
committer | José Valim <jose.valim@plataformatec.com.br> | 2012-07-31 05:46:25 -0700 |
commit | 13af5aceffb7197230c0934becaa4e9e20cfda23 (patch) | |
tree | cb26a237300c6498ac4407282b2fb9cbe5924c3c /railties/lib/rails/generators | |
parent | b09d6aae9ebf851b9cd682df50bbfe43391222b5 (diff) | |
parent | 7db0b073fec6bc3e6f213b58c76e7f43fcc2ab97 (diff) | |
download | rails-13af5aceffb7197230c0934becaa4e9e20cfda23.tar.gz rails-13af5aceffb7197230c0934becaa4e9e20cfda23.tar.bz2 rails-13af5aceffb7197230c0934becaa4e9e20cfda23.zip |
Merge pull request #7197 from davidcelis/i18n_inflector
Make ActiveSupport::Inflector locale aware and multilingual
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb b/railties/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb index 5d8d9be237..9262c3379f 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb @@ -1,8 +1,9 @@ # Be sure to restart your server when you modify this file. -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', 'people' @@ -10,6 +11,6 @@ # end # # These inflection rules are supported but not enabled by default: -# ActiveSupport::Inflector.inflections do |inflect| +# ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.acronym 'RESTful' # end |