From 10033fded101ef323b8add0d702ed17d40c5f7dd Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 6 Apr 2011 20:21:37 +0100 Subject: [PATCH 1/1] Switch to i18n version 0.5.0 but keep old style interpolation It's impossible to stop rails 2 loading a newer i18n gem if it is installed, so go with the flow and use the latest one but override the interpolation pattern for now. --- config/environment.rb | 2 +- config/initializers/i18n.rb | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/config/environment.rb b/config/environment.rb index 52cf5528c..e897f3e4a 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -25,7 +25,7 @@ Rails::Initializer.run do |config| config.gem 'httpclient' config.gem 'SystemTimer', :version => '>= 1.1.3', :lib => 'system_timer' config.gem 'sanitize' - config.gem 'i18n', :version => '= 0.4.1' + config.gem 'i18n', :version => '>= 0.5.0' # Only load the plugins named here, in the order given (default is alphabetical). # :all can be used as a placeholder for all plugins not explicitly named diff --git a/config/initializers/i18n.rb b/config/initializers/i18n.rb index 8aadeaacf..37d3cdebf 100644 --- a/config/initializers/i18n.rb +++ b/config/initializers/i18n.rb @@ -1,4 +1,9 @@ module I18n + original_verbosity = $VERBOSE + $VERBOSE = nil + INTERPOLATION_PATTERN = /\{\{(\w+)\}\}/ + $VERBOSE = original_verbosity + module Backend class Simple module Implementation -- 2.43.2