diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-26 17:13:52 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-26 17:13:52 +0000 |
commit | 768d67f27bf6804ec52afae7cefc2724ff9af654 (patch) | |
tree | f3a2b0e67979077d9a06e95d56c4a8323d342641 /config/initializers | |
parent | 1781d87477e07b441fe3de19e8aea08b98ea0fe7 (diff) | |
download | redmine-768d67f27bf6804ec52afae7cefc2724ff9af654.tar.gz redmine-768d67f27bf6804ec52afae7cefc2724ff9af654.zip |
Workaround for i18n 0.4.x with the old style syntax. #6428 #5608
This will also silance the whole trace with the deprecation warning.
Contributed by Felix Schäfer
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4183 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/10-patches.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index cdc3bfd79..4753dae3d 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -78,3 +78,17 @@ module AsynchronousMailer end ActionMailer::Base.send :include, AsynchronousMailer + +# TODO: Hack to support i18n 4.x on Rails 2.3.5. Remove post 2.3.6. +# See http://www.redmine.org/issues/6428 and http://www.redmine.org/issues/5608 +module I18n + module Backend + module Base + def warn_syntax_deprecation! + return if @skip_syntax_deprecation + warn "The {{key}} interpolation syntax in I18n messages is deprecated. Please use %{key} instead.\nDowngrade your i18n gem to 0.3.7 (everything above must be deinstalled) to remove this warning, see http://www.redmine.org/issues/5608 for more information." + @skip_syntax_deprecation = true + end + end + end +end |