]> git.openstreetmap.org Git - rails.git/commitdiff
Switch to i18n version 0.5.0 but keep old style interpolation
authorTom Hughes <tom@compton.nu>
Wed, 6 Apr 2011 19:21:37 +0000 (20:21 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 6 Apr 2011 19:39:20 +0000 (20:39 +0100)
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
config/initializers/i18n.rb

index 52cf5528cee65cbe2da5bef3dc16ce29c8e5e84a..e897f3e4ab86efb96b0484764a358b00d9628260 100644 (file)
@@ -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 '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
 
   # 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
index 8aadeaacf8edcba856e819b196777b6bfa927522..37d3cdebfe48f7333aaea389fb68cc46c4633fb9 100644 (file)
@@ -1,4 +1,9 @@
 module I18n
 module I18n
+  original_verbosity = $VERBOSE
+  $VERBOSE = nil
+  INTERPOLATION_PATTERN = /\{\{(\w+)\}\}/
+  $VERBOSE = original_verbosity
+
   module Backend
     class Simple
       module Implementation
   module Backend
     class Simple
       module Implementation