i18n 0.5.0 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of i18n might be problematic. Click here for more details.

Files changed (63) hide show
  1. data/CHANGELOG.textile +3 -12
  2. data/README.textile +17 -4
  3. data/lib/i18n.rb +37 -5
  4. data/lib/i18n/backend.rb +1 -0
  5. data/lib/i18n/backend/base.rb +32 -4
  6. data/lib/i18n/backend/cldr.rb +99 -0
  7. data/lib/i18n/backend/gettext.rb +3 -3
  8. data/lib/i18n/backend/interpolation_compiler.rb +1 -1
  9. data/lib/i18n/backend/metadata.rb +1 -1
  10. data/lib/i18n/config.rb +13 -1
  11. data/lib/i18n/core_ext/string/interpolate.rb +0 -9
  12. data/lib/i18n/exceptions.rb +31 -3
  13. data/lib/i18n/locale/fallbacks.rb +3 -3
  14. data/lib/i18n/tests/localization/procs.rb +24 -25
  15. data/lib/i18n/version.rb +1 -1
  16. metadata +16 -121
  17. data/ci/Gemfile.no-rails +0 -5
  18. data/ci/Gemfile.no-rails.lock +0 -14
  19. data/ci/Gemfile.rails-2.3.x +0 -9
  20. data/ci/Gemfile.rails-2.3.x.lock +0 -23
  21. data/ci/Gemfile.rails-3.x +0 -9
  22. data/ci/Gemfile.rails-3.x.lock +0 -23
  23. data/lib/i18n/core_ext/kernel/surpress_warnings.rb +0 -9
  24. data/lib/i18n/interpolate/ruby.rb +0 -31
  25. data/test/all.rb +0 -8
  26. data/test/api/all_features_test.rb +0 -58
  27. data/test/api/cascade_test.rb +0 -28
  28. data/test/api/chain_test.rb +0 -24
  29. data/test/api/fallbacks_test.rb +0 -30
  30. data/test/api/key_value_test.rb +0 -28
  31. data/test/api/memoize_test.rb +0 -60
  32. data/test/api/pluralization_test.rb +0 -30
  33. data/test/api/simple_test.rb +0 -28
  34. data/test/backend/cache_test.rb +0 -83
  35. data/test/backend/cascade_test.rb +0 -85
  36. data/test/backend/chain_test.rb +0 -67
  37. data/test/backend/exceptions_test.rb +0 -23
  38. data/test/backend/fallbacks_test.rb +0 -116
  39. data/test/backend/interpolation_compiler_test.rb +0 -102
  40. data/test/backend/key_value_test.rb +0 -46
  41. data/test/backend/memoize_test.rb +0 -47
  42. data/test/backend/metadata_test.rb +0 -67
  43. data/test/backend/pluralization_test.rb +0 -44
  44. data/test/backend/simple_test.rb +0 -79
  45. data/test/backend/transliterator_test.rb +0 -81
  46. data/test/core_ext/hash_test.rb +0 -30
  47. data/test/core_ext/string/interpolate_test.rb +0 -99
  48. data/test/gettext/api_test.rb +0 -206
  49. data/test/gettext/backend_test.rb +0 -93
  50. data/test/i18n/exceptions_test.rb +0 -116
  51. data/test/i18n/interpolate_test.rb +0 -61
  52. data/test/i18n/load_path_test.rb +0 -26
  53. data/test/i18n_test.rb +0 -236
  54. data/test/locale/fallbacks_test.rb +0 -124
  55. data/test/locale/tag/rfc4646_test.rb +0 -142
  56. data/test/locale/tag/simple_test.rb +0 -32
  57. data/test/run_all.rb +0 -21
  58. data/test/test_data/locales/de.po +0 -72
  59. data/test/test_data/locales/en.rb +0 -3
  60. data/test/test_data/locales/en.yml +0 -3
  61. data/test/test_data/locales/invalid/empty.yml +0 -1
  62. data/test/test_data/locales/plurals.rb +0 -113
  63. data/test/test_helper.rb +0 -56
@@ -1,56 +0,0 @@
1
- $KCODE = 'u' if RUBY_VERSION <= '1.9'
2
-
3
- require 'rubygems'
4
- require 'test/unit'
5
-
6
- # Do not load the i18n gem from libraries like active_support.
7
- #
8
- # This is required for testing against Rails 2.3 because active_support/vendor.rb#24 tries
9
- # to load I18n using the gem method. Instead, we want to test the local library of course.
10
- alias :gem_for_ruby_19 :gem # for 1.9. gives a super ugly seg fault otherwise
11
- def gem(gem_name, *version_requirements)
12
- gem_name =='i18n' ? puts("skipping loading the i18n gem ...") : super
13
- end
14
-
15
- require 'bundler/setup'
16
- require 'i18n'
17
- require 'mocha'
18
- require 'test_declarative'
19
-
20
- class Test::Unit::TestCase
21
- def teardown
22
- I18n.locale = nil
23
- I18n.default_locale = :en
24
- I18n.load_path = []
25
- I18n.available_locales = nil
26
- I18n.backend = nil
27
- end
28
-
29
- def translations
30
- I18n.backend.instance_variable_get(:@translations)
31
- end
32
-
33
- def store_translations(*args)
34
- data = args.pop
35
- locale = args.pop || :en
36
- I18n.backend.store_translations(locale, data)
37
- end
38
-
39
- def locales_dir
40
- File.dirname(__FILE__) + '/test_data/locales'
41
- end
42
- end
43
-
44
- module Kernel
45
- def setup_rufus_tokyo
46
- require 'rufus/tokyo'
47
- rescue LoadError => e
48
- puts "can't use KeyValue backend because: #{e.message}"
49
- end
50
- end
51
-
52
- Object.class_eval do
53
- def meta_class
54
- class << self; self; end
55
- end
56
- end unless Object.method_defined?(:meta_class)