i18n 0.2.1 → 0.3.0
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.
- data/README.textile +44 -9
- data/Rakefile +2 -1
- data/VERSION +1 -1
- data/lib/i18n.rb +60 -15
- data/lib/i18n/backend.rb +14 -0
- data/lib/i18n/backend/active_record.rb +69 -0
- data/lib/i18n/backend/active_record/store_procs.rb +37 -0
- data/lib/i18n/backend/active_record/translation.rb +82 -0
- data/lib/i18n/backend/active_record_missing.rb +55 -0
- data/lib/i18n/backend/base.rb +235 -0
- data/lib/i18n/backend/cache.rb +71 -0
- data/lib/i18n/backend/chain.rb +74 -0
- data/lib/i18n/backend/fallbacks.rb +51 -0
- data/lib/i18n/backend/gettext.rb +75 -0
- data/lib/i18n/backend/helpers.rb +53 -0
- data/lib/i18n/backend/metadata.rb +73 -0
- data/lib/i18n/backend/pluralization.rb +57 -0
- data/lib/i18n/backend/simple.rb +15 -227
- data/lib/i18n/core_ext/object/meta_class.rb +5 -0
- data/lib/i18n/{string.rb → core_ext/string/interpolate.rb} +2 -0
- data/lib/i18n/exceptions.rb +2 -0
- data/lib/i18n/gettext.rb +25 -0
- data/lib/i18n/helpers.rb +5 -0
- data/lib/i18n/helpers/gettext.rb +64 -0
- data/lib/i18n/locale.rb +6 -0
- data/lib/i18n/locale/fallbacks.rb +98 -0
- data/lib/i18n/locale/tag.rb +28 -0
- data/lib/i18n/locale/tag/parents.rb +24 -0
- data/lib/i18n/locale/tag/rfc4646.rb +76 -0
- data/lib/i18n/locale/tag/simple.rb +41 -0
- data/test/all.rb +7 -2
- data/test/api/basics.rb +3 -1
- data/test/api/interpolation.rb +35 -4
- data/test/api/lambda.rb +5 -3
- data/test/api/link.rb +4 -2
- data/test/api/localization/date.rb +2 -0
- data/test/api/localization/date_time.rb +3 -1
- data/test/api/localization/lambda.rb +4 -2
- data/test/api/localization/time.rb +3 -1
- data/test/api/pluralization.rb +12 -15
- data/test/api/translation.rb +5 -3
- data/test/backend/active_record/active_record_test.rb +40 -0
- data/test/backend/active_record/all.rb +3 -0
- data/test/backend/active_record/api_test.rb +54 -0
- data/test/backend/active_record/setup.rb +166 -0
- data/test/backend/active_record_missing/active_record_missing_test.rb +63 -0
- data/test/backend/all/api_test.rb +88 -0
- data/test/backend/cache/cache_test.rb +69 -0
- data/test/backend/chain/api_test.rb +80 -0
- data/test/backend/chain/chain_test.rb +64 -0
- data/test/backend/fallbacks/api_test.rb +84 -0
- data/test/backend/fallbacks/fallbacks_test.rb +57 -0
- data/test/backend/metadata/metadata_test.rb +65 -0
- data/test/backend/pluralization/api_test.rb +86 -0
- data/test/backend/pluralization/pluralization_test.rb +43 -0
- data/test/backend/simple/all.rb +2 -0
- data/test/backend/simple/api_test.rb +27 -20
- data/test/backend/simple/helpers_test.rb +26 -0
- data/test/backend/simple/lookup_test.rb +2 -1
- data/test/backend/simple/{setup/localization.rb → setup.rb} +29 -11
- data/test/backend/simple/translations_test.rb +1 -6
- data/test/{string_test.rb → core_ext/string/interpolate_test.rb} +4 -2
- data/test/fixtures/locales/de.po +67 -0
- data/test/fixtures/locales/en.rb +2 -0
- data/test/fixtures/locales/plurals.rb +113 -0
- data/test/gettext/api_test.rb +204 -0
- data/test/gettext/backend_test.rb +84 -0
- data/test/i18n_exceptions_test.rb +3 -1
- data/test/i18n_load_path_test.rb +8 -1
- data/test/i18n_test.rb +30 -7
- data/test/locale/fallbacks_test.rb +128 -0
- data/test/locale/tag/rfc4646_test.rb +145 -0
- data/test/locale/tag/simple_test.rb +35 -0
- data/test/test_helper.rb +11 -5
- data/test/with_options.rb +2 -0
- metadata +75 -11
- data/test/backend/simple/setup/base.rb +0 -21
data/test/with_options.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sven Fuchs
|
@@ -13,7 +13,7 @@ autorequire:
|
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
15
|
|
16
|
-
date: 2009-
|
16
|
+
date: 2009-11-30 00:00:00 +01:00
|
17
17
|
default_executable:
|
18
18
|
dependencies: []
|
19
19
|
|
@@ -32,9 +32,32 @@ files:
|
|
32
32
|
- Rakefile
|
33
33
|
- VERSION
|
34
34
|
- lib/i18n.rb
|
35
|
+
- lib/i18n/backend.rb
|
36
|
+
- lib/i18n/backend/active_record.rb
|
37
|
+
- lib/i18n/backend/active_record/store_procs.rb
|
38
|
+
- lib/i18n/backend/active_record/translation.rb
|
39
|
+
- lib/i18n/backend/active_record_missing.rb
|
40
|
+
- lib/i18n/backend/base.rb
|
41
|
+
- lib/i18n/backend/cache.rb
|
42
|
+
- lib/i18n/backend/chain.rb
|
43
|
+
- lib/i18n/backend/fallbacks.rb
|
44
|
+
- lib/i18n/backend/gettext.rb
|
45
|
+
- lib/i18n/backend/helpers.rb
|
46
|
+
- lib/i18n/backend/metadata.rb
|
47
|
+
- lib/i18n/backend/pluralization.rb
|
35
48
|
- lib/i18n/backend/simple.rb
|
49
|
+
- lib/i18n/core_ext/object/meta_class.rb
|
50
|
+
- lib/i18n/core_ext/string/interpolate.rb
|
36
51
|
- lib/i18n/exceptions.rb
|
37
|
-
- lib/i18n/
|
52
|
+
- lib/i18n/gettext.rb
|
53
|
+
- lib/i18n/helpers.rb
|
54
|
+
- lib/i18n/helpers/gettext.rb
|
55
|
+
- lib/i18n/locale.rb
|
56
|
+
- lib/i18n/locale/fallbacks.rb
|
57
|
+
- lib/i18n/locale/tag.rb
|
58
|
+
- lib/i18n/locale/tag/parents.rb
|
59
|
+
- lib/i18n/locale/tag/rfc4646.rb
|
60
|
+
- lib/i18n/locale/tag/simple.rb
|
38
61
|
- test/all.rb
|
39
62
|
- test/api/basics.rb
|
40
63
|
- test/api/interpolation.rb
|
@@ -46,18 +69,39 @@ files:
|
|
46
69
|
- test/api/localization/time.rb
|
47
70
|
- test/api/pluralization.rb
|
48
71
|
- test/api/translation.rb
|
72
|
+
- test/backend/active_record/active_record_test.rb
|
73
|
+
- test/backend/active_record/all.rb
|
74
|
+
- test/backend/active_record/api_test.rb
|
75
|
+
- test/backend/active_record/setup.rb
|
76
|
+
- test/backend/active_record_missing/active_record_missing_test.rb
|
77
|
+
- test/backend/all/api_test.rb
|
78
|
+
- test/backend/cache/cache_test.rb
|
79
|
+
- test/backend/chain/api_test.rb
|
80
|
+
- test/backend/chain/chain_test.rb
|
81
|
+
- test/backend/fallbacks/api_test.rb
|
82
|
+
- test/backend/fallbacks/fallbacks_test.rb
|
83
|
+
- test/backend/metadata/metadata_test.rb
|
84
|
+
- test/backend/pluralization/api_test.rb
|
85
|
+
- test/backend/pluralization/pluralization_test.rb
|
49
86
|
- test/backend/simple/all.rb
|
50
87
|
- test/backend/simple/api_test.rb
|
88
|
+
- test/backend/simple/helpers_test.rb
|
51
89
|
- test/backend/simple/lookup_test.rb
|
52
|
-
- test/backend/simple/setup
|
53
|
-
- test/backend/simple/setup/localization.rb
|
90
|
+
- test/backend/simple/setup.rb
|
54
91
|
- test/backend/simple/translations_test.rb
|
92
|
+
- test/core_ext/string/interpolate_test.rb
|
93
|
+
- test/fixtures/locales/de.po
|
55
94
|
- test/fixtures/locales/en.rb
|
56
95
|
- test/fixtures/locales/en.yml
|
96
|
+
- test/fixtures/locales/plurals.rb
|
97
|
+
- test/gettext/api_test.rb
|
98
|
+
- test/gettext/backend_test.rb
|
57
99
|
- test/i18n_exceptions_test.rb
|
58
100
|
- test/i18n_load_path_test.rb
|
59
101
|
- test/i18n_test.rb
|
60
|
-
- test/
|
102
|
+
- test/locale/fallbacks_test.rb
|
103
|
+
- test/locale/tag/rfc4646_test.rb
|
104
|
+
- test/locale/tag/simple_test.rb
|
61
105
|
- test/test_helper.rb
|
62
106
|
- test/with_options.rb
|
63
107
|
has_rdoc: true
|
@@ -83,10 +127,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
127
|
version:
|
84
128
|
requirements: []
|
85
129
|
|
86
|
-
rubyforge_project:
|
130
|
+
rubyforge_project: i18n
|
87
131
|
rubygems_version: 1.3.5
|
88
132
|
signing_key:
|
89
|
-
specification_version:
|
133
|
+
specification_version: 3
|
90
134
|
summary: New wave Internationalization support for Ruby
|
91
135
|
test_files:
|
92
136
|
- test/all.rb
|
@@ -100,16 +144,36 @@ test_files:
|
|
100
144
|
- test/api/localization/time.rb
|
101
145
|
- test/api/pluralization.rb
|
102
146
|
- test/api/translation.rb
|
147
|
+
- test/backend/active_record/active_record_test.rb
|
148
|
+
- test/backend/active_record/all.rb
|
149
|
+
- test/backend/active_record/api_test.rb
|
150
|
+
- test/backend/active_record/setup.rb
|
151
|
+
- test/backend/active_record_missing/active_record_missing_test.rb
|
152
|
+
- test/backend/all/api_test.rb
|
153
|
+
- test/backend/cache/cache_test.rb
|
154
|
+
- test/backend/chain/api_test.rb
|
155
|
+
- test/backend/chain/chain_test.rb
|
156
|
+
- test/backend/fallbacks/api_test.rb
|
157
|
+
- test/backend/fallbacks/fallbacks_test.rb
|
158
|
+
- test/backend/metadata/metadata_test.rb
|
159
|
+
- test/backend/pluralization/api_test.rb
|
160
|
+
- test/backend/pluralization/pluralization_test.rb
|
103
161
|
- test/backend/simple/all.rb
|
104
162
|
- test/backend/simple/api_test.rb
|
163
|
+
- test/backend/simple/helpers_test.rb
|
105
164
|
- test/backend/simple/lookup_test.rb
|
106
|
-
- test/backend/simple/setup
|
107
|
-
- test/backend/simple/setup/localization.rb
|
165
|
+
- test/backend/simple/setup.rb
|
108
166
|
- test/backend/simple/translations_test.rb
|
167
|
+
- test/core_ext/string/interpolate_test.rb
|
109
168
|
- test/fixtures/locales/en.rb
|
169
|
+
- test/fixtures/locales/plurals.rb
|
170
|
+
- test/gettext/api_test.rb
|
171
|
+
- test/gettext/backend_test.rb
|
110
172
|
- test/i18n_exceptions_test.rb
|
111
173
|
- test/i18n_load_path_test.rb
|
112
174
|
- test/i18n_test.rb
|
113
|
-
- test/
|
175
|
+
- test/locale/fallbacks_test.rb
|
176
|
+
- test/locale/tag/rfc4646_test.rb
|
177
|
+
- test/locale/tag/simple_test.rb
|
114
178
|
- test/test_helper.rb
|
115
179
|
- test/with_options.rb
|
@@ -1,21 +0,0 @@
|
|
1
|
-
module Tests
|
2
|
-
module Backend
|
3
|
-
module Simple
|
4
|
-
module Setup
|
5
|
-
module Base
|
6
|
-
def setup
|
7
|
-
super
|
8
|
-
I18n.backend = I18n::Backend::Simple.new
|
9
|
-
backend_store_translations :en, :foo => {:bar => 'bar', :baz => 'baz'}
|
10
|
-
end
|
11
|
-
|
12
|
-
def teardown
|
13
|
-
super
|
14
|
-
I18n.load_path = []
|
15
|
-
I18n.backend = nil
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|