Permalink
Browse files

Add support for running i18n 0.3.7 in ci

This is the version used by Rails 2.3.x
  • Loading branch information...
1 parent 6f49a8b commit 416e13a7aee58e6bc1201e95fb3953f48850a5f8 @chrismcg chrismcg committed Aug 25, 2011
Showing with 15 additions and 1 deletion.
  1. +5 −0 Gemfile.i18n_037
  2. +9 −0 lib/localeapp.rb
  3. +1 −1 lib/localeapp/exception_handler.rb
View
@@ -0,0 +1,5 @@
+source :rubyforge
+gemspec
+
+gem 'i18n', '0.3.7'
+gem 'activesupport', '2.3.14'
View
@@ -5,12 +5,21 @@
# we're in 2.3 and we need to load rails to get the vendored i18n
require 'thread' # for rubygems > 1.6.0 support
require 'active_support'
+ # This ugliness so we can load AS in the travis env
+ @loaded_active_support = true
end
begin
require 'i18n/core_ext/hash'
rescue LoadError
+ # This ugliness so we can load AS in the travis env
# Assume that we're in rails 2.3 and AS supplies deep_merge
+ # Load AS if we need to
+ unless @loaded_active_support
+ # we're in 2.3 and we need to load rails to get the vendored i18n
+ require 'thread' # for rubygems > 1.6.0 support
+ require 'active_support'
+ end
end
require 'localeapp/i18n_shim'
@@ -7,7 +7,7 @@ def self.call(exception, locale, key, options)
Localeapp.log("Detected missing translation for key(s) #{key.inspect}")
[*key].each do |key|
- Localeapp.missing_translations.add(locale, key, options)
+ Localeapp.missing_translations.add(locale, key, options || {})
end
[locale, key].join(', ')

0 comments on commit 416e13a

Please sign in to comment.