Rails 3 pulls in i18n version 0.4.1 as a separate gem which then
breaks our code if it is running on a machine with rails 3 installed
as it tries to monkey patch i18n and fails, so this fix allows us
to run on a machine with rails 3 installed.
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'
# 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
module I18n
module Backend
module I18n
module Backend
- module Base
- protected
- alias_method :old_init_translations, :init_translations
+ class Simple
+ module Implementation
+ protected
+ alias_method :old_init_translations, :init_translations
- def init_translations
- old_init_translations
+ def init_translations
+ old_init_translations
- merge_translations(:nb, translations[:no])
- translations[:no] = translations[:nb]
+ store_translations(:nb, translations[:no])
+ translations[:no] = translations[:nb]
- friendly = translate('en', 'time.formats.friendly')
+ friendly = translate('en', 'time.formats.friendly')
- available_locales.each do |locale|
- unless lookup(locale, 'time.formats.friendly')
- store_translations(locale, :time => { :formats => { :friendly => friendly } })
+ available_locales.each do |locale|
+ unless lookup(locale, 'time.formats.friendly')
+ store_translations(locale, :time => { :formats => { :friendly => friendly } })
+ end