rails-i18n 0.6.5 → 4.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +217 -0
  3. data/README.md +48 -19
  4. data/lib/rails_i18n/common_pluralizations/east_slavic.rb +10 -3
  5. data/lib/rails_i18n/common_pluralizations/{only_one.rb → one_other.rb} +6 -5
  6. data/lib/rails_i18n/common_pluralizations/one_two_other.rb +7 -9
  7. data/lib/rails_i18n/common_pluralizations/one_upto_two_other.rb +1 -1
  8. data/lib/rails_i18n/common_pluralizations/romanian.rb +1 -0
  9. data/rails/locale/af.yml +199 -0
  10. data/rails/locale/ar.yml +163 -87
  11. data/rails/locale/az.yml +36 -42
  12. data/rails/locale/be.yml +205 -0
  13. data/rails/locale/bg.yml +28 -34
  14. data/rails/locale/{bn-IN.yml → bn.yml} +36 -42
  15. data/rails/locale/bs.yml +46 -44
  16. data/rails/locale/ca.yml +43 -49
  17. data/rails/locale/cs.yml +75 -62
  18. data/rails/locale/cy.yml +88 -44
  19. data/rails/locale/da.yml +32 -32
  20. data/rails/locale/de-AT.yml +48 -41
  21. data/rails/locale/de-CH.yml +58 -47
  22. data/rails/locale/de-DE.yml +210 -0
  23. data/rails/locale/de.yml +51 -44
  24. data/rails/locale/el.yml +41 -41
  25. data/rails/locale/en-AU.yml +28 -34
  26. data/rails/locale/en-CA.yml +28 -43
  27. data/rails/locale/en-GB.yml +28 -34
  28. data/rails/locale/en-IE.yml +199 -0
  29. data/rails/locale/en-IN.yml +28 -34
  30. data/rails/locale/en-NZ.yml +199 -0
  31. data/rails/locale/en-US.yml +35 -35
  32. data/rails/locale/en-ZA.yml +205 -0
  33. data/rails/locale/en.yml +34 -34
  34. data/rails/locale/eo.yml +28 -34
  35. data/rails/locale/es-419.yml +199 -0
  36. data/rails/locale/es-AR.yml +38 -39
  37. data/rails/locale/es-CL.yml +32 -33
  38. data/rails/locale/es-CO.yml +38 -39
  39. data/rails/locale/es-CR.yml +204 -0
  40. data/rails/locale/es-EC.yml +205 -0
  41. data/rails/locale/es-ES.yml +204 -0
  42. data/rails/locale/es-MX.yml +39 -39
  43. data/rails/locale/es-PA.yml +205 -0
  44. data/rails/locale/es-PE.yml +60 -37
  45. data/rails/locale/es-US.yml +204 -0
  46. data/rails/locale/es-VE.yml +40 -41
  47. data/rails/locale/es.yml +41 -36
  48. data/rails/locale/et.yml +33 -39
  49. data/rails/locale/eu.yml +41 -47
  50. data/rails/locale/fa.yml +41 -47
  51. data/rails/locale/fi.yml +43 -49
  52. data/rails/locale/fr-CA.yml +29 -35
  53. data/rails/locale/fr-CH.yml +35 -35
  54. data/rails/locale/fr-FR.yml +207 -0
  55. data/rails/locale/fr.yml +172 -187
  56. data/rails/locale/{gl-ES.yml → gl.yml} +33 -39
  57. data/rails/locale/he.yml +35 -41
  58. data/rails/locale/hi-IN.yml +35 -41
  59. data/rails/locale/hi.yml +37 -43
  60. data/rails/locale/hr.yml +61 -61
  61. data/rails/locale/hu.yml +51 -57
  62. data/rails/locale/id.yml +50 -44
  63. data/rails/locale/is.yml +31 -31
  64. data/rails/locale/it-CH.yml +199 -0
  65. data/rails/locale/it.yml +82 -82
  66. data/rails/locale/ja.yml +53 -55
  67. data/rails/locale/km.yml +164 -0
  68. data/rails/locale/kn.yml +38 -44
  69. data/rails/locale/ko.yml +29 -35
  70. data/rails/locale/lb.yml +206 -0
  71. data/rails/locale/lo.yml +85 -43
  72. data/rails/locale/lt.yml +85 -49
  73. data/rails/locale/lv.yml +63 -48
  74. data/rails/locale/mk.yml +80 -51
  75. data/rails/locale/mn.yml +56 -62
  76. data/rails/locale/mr-IN.yml +206 -0
  77. data/rails/locale/ms.yml +199 -0
  78. data/rails/locale/nb.yml +32 -33
  79. data/rails/locale/ne.yml +199 -0
  80. data/rails/locale/nl.yml +65 -59
  81. data/rails/locale/nn.yml +70 -28
  82. data/rails/locale/or.yml +193 -0
  83. data/rails/locale/pa.yml +205 -0
  84. data/rails/locale/pl.yml +69 -53
  85. data/rails/locale/pt-BR.yml +44 -44
  86. data/rails/locale/{pt-PT.yml → pt.yml} +35 -41
  87. data/rails/locale/rm.yml +74 -32
  88. data/rails/locale/ro.yml +41 -34
  89. data/rails/locale/ru.yml +51 -51
  90. data/rails/locale/sk.yml +35 -40
  91. data/rails/locale/sl.yml +33 -37
  92. data/rails/locale/sq.yml +205 -0
  93. data/rails/locale/sr.yml +128 -61
  94. data/rails/locale/{sv-SE.yml → sv.yml} +34 -34
  95. data/rails/locale/sw.yml +24 -30
  96. data/rails/locale/ta.yml +205 -0
  97. data/rails/locale/th.yml +25 -31
  98. data/rails/locale/tl.yml +105 -135
  99. data/rails/locale/tr.yml +62 -56
  100. data/rails/locale/tt.yml +215 -0
  101. data/rails/locale/ug.yml +204 -0
  102. data/rails/locale/uk.yml +54 -60
  103. data/rails/locale/ur.yml +206 -0
  104. data/rails/locale/uz.yml +251 -0
  105. data/rails/locale/vi.yml +33 -35
  106. data/rails/locale/wo.yml +30 -36
  107. data/rails/locale/zh-CN.yml +47 -41
  108. data/rails/locale/zh-HK.yml +205 -0
  109. data/rails/locale/zh-TW.yml +50 -44
  110. data/rails/locale/zh-YUE.yml +205 -0
  111. data/rails/pluralization/ar.rb +1 -0
  112. data/rails/pluralization/bg.rb +3 -0
  113. data/rails/pluralization/bn.rb +3 -0
  114. data/rails/pluralization/br.rb +1 -0
  115. data/rails/pluralization/ca.rb +3 -0
  116. data/rails/pluralization/da.rb +3 -0
  117. data/rails/pluralization/de-AT.rb +3 -0
  118. data/rails/pluralization/de-CH.rb +3 -0
  119. data/rails/pluralization/de-DE.rb +3 -0
  120. data/rails/pluralization/de.rb +3 -0
  121. data/rails/pluralization/el.rb +3 -0
  122. data/rails/pluralization/en-AU.rb +3 -0
  123. data/rails/pluralization/en-CA.rb +3 -0
  124. data/rails/pluralization/en-GB.rb +3 -0
  125. data/rails/pluralization/en-IN.rb +3 -0
  126. data/rails/pluralization/en-NZ.rb +3 -0
  127. data/rails/pluralization/en.rb +3 -0
  128. data/rails/pluralization/eo.rb +3 -0
  129. data/rails/pluralization/es-419.rb +3 -0
  130. data/rails/pluralization/es-AR.rb +3 -0
  131. data/rails/pluralization/es-CL.rb +3 -0
  132. data/rails/pluralization/es-CO.rb +3 -0
  133. data/rails/pluralization/es-EC.rb +3 -0
  134. data/rails/pluralization/es-ES.rb +3 -0
  135. data/rails/pluralization/es-MX.rb +3 -0
  136. data/rails/pluralization/es-PE.rb +3 -0
  137. data/rails/pluralization/es-VE.rb +3 -0
  138. data/rails/pluralization/es.rb +3 -0
  139. data/rails/pluralization/et.rb +3 -0
  140. data/rails/pluralization/eu.rb +3 -0
  141. data/rails/pluralization/fi.rb +3 -0
  142. data/rails/pluralization/fr-CA.rb +3 -0
  143. data/rails/pluralization/fr-CH.rb +3 -0
  144. data/rails/pluralization/fr-FR.rb +3 -0
  145. data/rails/pluralization/gl.rb +3 -0
  146. data/rails/pluralization/gv.rb +1 -0
  147. data/rails/pluralization/hi-IN.rb +3 -0
  148. data/rails/pluralization/hsb.rb +28 -0
  149. data/rails/pluralization/hu.rb +2 -2
  150. data/rails/pluralization/is.rb +3 -0
  151. data/rails/pluralization/it-CH.rb +3 -0
  152. data/rails/pluralization/it.rb +3 -0
  153. data/rails/pluralization/lag.rb +1 -0
  154. data/rails/pluralization/lt.rb +1 -0
  155. data/rails/pluralization/lv.rb +1 -0
  156. data/rails/pluralization/mk.rb +1 -0
  157. data/rails/pluralization/mn.rb +3 -0
  158. data/rails/pluralization/mr-IN.rb +3 -0
  159. data/rails/pluralization/mt.rb +1 -0
  160. data/rails/pluralization/nb.rb +3 -0
  161. data/rails/pluralization/ne.rb +3 -0
  162. data/rails/pluralization/nl.rb +3 -0
  163. data/rails/pluralization/nn.rb +3 -0
  164. data/rails/pluralization/or.rb +3 -0
  165. data/rails/pluralization/pa.rb +3 -0
  166. data/rails/pluralization/pl.rb +1 -0
  167. data/rails/pluralization/sl.rb +1 -0
  168. data/rails/pluralization/sv.rb +3 -0
  169. data/rails/pluralization/sw.rb +3 -0
  170. data/rails/pluralization/ur.rb +3 -0
  171. data/rails/pluralization/zh-CN.rb +3 -0
  172. data/rails/pluralization/zh-HK.rb +3 -0
  173. data/rails/pluralization/zh-TW.rb +3 -0
  174. data/rails/pluralization/zh-YUE.rb +3 -0
  175. data/rails/transliteration/de.yml +12 -0
  176. data/rails/transliteration/el.yml +104 -0
  177. data/rails/transliteration/fr.yml +36 -0
  178. data/rails/transliteration/pl.yml +22 -0
  179. data/rails/transliteration/ro.yml +14 -0
  180. data/rails/transliteration/ru.rb +2 -0
  181. data/rails/transliteration/uk.rb +3 -1
  182. metadata +278 -194
  183. data/rails/locale/csb.yml +0 -210
  184. data/rails/locale/dsb.yml +0 -215
  185. data/rails/locale/fur.yml +0 -199
  186. data/rails/locale/gsw-CH.yml +0 -199
  187. data/rails/locale/hsb.yml +0 -214
  188. data/rails/locale/sr-Latn.yml +0 -170
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3ef211a46854f8107b760aaecdefa31385cdcdd7
4
+ data.tar.gz: a77d02a7bdd4bae72519cf26280855deec3b00f0
5
+ SHA512:
6
+ metadata.gz: 4770d595ece444f9a328b1146fc38468946a9f5035a4949f6f1d5704af5045eb5c7355e0bf45539abfda72239644189b31022d60a47f7eed7840ccb3777b57e3
7
+ data.tar.gz: 1918d0ec6b34ee41d1ef6591b9393b70da93ca1ae2416ff7826af90b284475fea6fe46fb81eadf3c8a0b38e38585dfae548f6fe9f9eabc5e80dfff9ee815a311
data/CHANGELOG.md CHANGED
@@ -1,3 +1,220 @@
1
+ ## 4.0.9 (2016-07-05)
2
+ - Update Bosnian (bs)
3
+ - Update Arabic (ar)
4
+ - Update Panjabi (pa)
5
+ - Update German (de)
6
+ - Update Spanish (es)
7
+ - Update Chinese (zh-CN, zh-TW)
8
+ - Add Albanian (sq)
9
+
10
+ ## 4.0.8 (2015-12-24)
11
+ - Add Panjabi (pa)
12
+ - Update Russian (ru)
13
+
14
+ ## 4.0.7 (2015-11-20)
15
+ - Update Khmer (km)
16
+ - Update Greek (el)
17
+ - Update German (de)
18
+
19
+ ## 4.0.6 (2015-10-23)
20
+ - Depend on i18n (~> 0.7)
21
+ - Update Indonesian (id)
22
+ - Update German (de)
23
+ - Update Spanish (es)
24
+ - Update Russian (ru) - Revert "bringing the month names to uppercase"
25
+ - Update Turkish (tr) - Use turkish lira symbol instead of TL
26
+ - Update Dutch (nl)
27
+
28
+ ## 4.0.5 (2015-09-06)
29
+ - Update Portuguese (pt)
30
+ - Update Korean (ko)
31
+ - Update Dutch (nl)
32
+ - Update German (de, de-AT, de-CH)
33
+ - Update Spanish (es, es-AR, es-CL, es-CO, es-CR, es-PE, es-US, es-VE)
34
+ - Update French (fr-CA, fr-CH, fr)
35
+ - Add Luxembourgish (lb)
36
+ - Add Marathi (mr-IN)
37
+ - Update Swedish (sv)
38
+ - Update Arabic (ar)
39
+ - Update Finnish (fi)
40
+ - Add Uyghur (ug)
41
+ - Update Japanese (ja)
42
+ - Update Russian (ru)
43
+ - Add Greek transliteration rules (el)
44
+ - Update Hebrew (he)
45
+ - Update Italian (it)
46
+ - Update Greek (el)
47
+
48
+ ## 4.0.4 (2015-02-27)
49
+ - Complete Brazilian Portuguese translation (pt-BR)
50
+ - Fix east slavic pluralization and transliteration rules
51
+ - Update Polish (pl)
52
+ - Change confirmation error message for es-* locales
53
+ - Update Swedish (sv)
54
+ - Update French (fr)
55
+ - Update Dutch (nl)
56
+ - Update Swiss German (de-CH)
57
+ - Update German (de, de-AT)
58
+ - Update Turkish (tr)
59
+ - Update Lithuanian (lt)
60
+ - Update Urdu (ur)
61
+ - Update Chinese (zh-CN, zh-HK, zh-TW, zh-YUE)
62
+ - Update Khmer (km)
63
+ - Update Lithuanian (lt)
64
+ - Update Italian (it)
65
+ - Add Belarusian (be)
66
+ - Add Tatar (tt)
67
+ - Update Croatian (hr)
68
+
69
+ ## 4.0.3 (2014-09-04)
70
+ - Remove activemodel and activerecord namespaces
71
+ - Update Hebrew translation (he)
72
+ - Add Tamil (ta)
73
+ - Update Ukrainian (uk)
74
+ - Update Italian (it)
75
+ - Update Dutch (nl)
76
+ - Add es-US locale
77
+ - Update Korean (ko)
78
+ - Update Norwegian bokmål (nb)
79
+ - Update Norwegian (nn)
80
+ - Update Czech (cs)
81
+ - Update Indonesian (id)
82
+ - Update Chinese Simplified (zh-CN)
83
+ - Complete Russion (ru)
84
+ - Update Arabic (ar)
85
+ - Update Turkish (tr)
86
+ - Update Vietnamese (vi)
87
+ - Update French (fr, fr-CA, fr-CH)
88
+ - Update Croatian (hr)
89
+ - Update Icelandic (is)
90
+ - Update English (en, en-AU, en-CA, en-GB, en-IE, en-IN, en-NZ)
91
+ - Update Wolof (wo)
92
+ - Update Spanish/Mexico (es-MX)
93
+ - Update German (de)
94
+ - Update Latvian (lv)
95
+ - Update Khmer (km)
96
+ - Update Polish (po)
97
+
98
+ ## 4.0.2 (2014-03-23)
99
+ - Complete French translation (fr)
100
+ - Make East Slavic pluralization faster
101
+ - Update Upper Sorbian translation (dsb)
102
+ - Add new locale Spanish for Ecuador (es-EC)
103
+ - Update German translation for Switzerland (de-CH)
104
+ - Update Hebrew translation (he)
105
+ - Change currency for Latvian (lv)
106
+ - Use two letter week day abbreviations for Dutch (nl)
107
+ - Update Arabic translation (ar)
108
+ - Update Hungarian translation (hu)
109
+ - Change currency for Ireland (en-IE)
110
+ - Update Ukrainian translation (uk)
111
+ - Add Papiamento/Curaçao translation (pap-CW)
112
+ - Add Cantonese translation (zh-YUE)
113
+ - Update Portugese translation for Brazil (pt-BR)
114
+ - Update Tagalog translation (tl)
115
+ - Update English translation for India (en-IN)
116
+ - Update Lithuanian translation (lt)
117
+ - Update date formats for Finnish (fi)
118
+
119
+ ## 4.0.1 (2013-12-19)
120
+ - Fix typos, formats and delimiters for Swiss-German (iso-639-2/gsw-CH)
121
+ - Add missing keys to Dutch (nl)
122
+ - Fix translations for Lithuanian (lt)
123
+ - Add Spanish/Panama (es-PA)
124
+ - Add Urdu (ur)
125
+ - Remove whitespace between attribute and message in Chinese (zh-CN)
126
+ - Support Rails 4.1.0.beta1
127
+
128
+ ## 4.0.0 (2013-10-05)
129
+ - Fix values of 'restrict_dependent_destroy' key for many languages
130
+ - Fix currency separator and delimiters for es-AR, fi, ro and sv
131
+ - Fix 'errors.messages.too_(long|short)' for German (de)
132
+ - Add transliteration rules for German (de)
133
+ - Add missing keys to Chinese/Hong Kong (zh-HK)
134
+ - Add English/Ireland (en-IE)
135
+ - Add missing keys to Icelandic (is)
136
+ - Add missing keys to Danish (da)
137
+ - Fix a grammar error for Bulgarian (bg)
138
+ - Order keys of French (fr) locale alphabetically
139
+ - Singularize Millionen, Billionen for German/Switzerland (de-CH)
140
+ - Fix date format for Italian (it)
141
+ - Add transliteration rules for French (fr)
142
+ - Add Spanish/Costa Rica (es-CR)
143
+ - Remove trailing spaces for many languages
144
+ - Fix abbr_month_names and month_names for Catalan (ca)
145
+ - Reintroduce English/US (en-US)
146
+ - Add transliteration rules for Romanian (ro)
147
+ - Fix abbr_day_names and abbr_month_names for French (fr)
148
+ - Fix 'storage_units.units.byte' key for Chinese/Taiwan (zh-TW)
149
+ - Use 12-hour clock for :en-US and :en-CA
150
+ - Fix 'date.formats.default' key in en-US locale
151
+ - Fix some translations for Chinese/Hong Kong (zh-HK)
152
+ - Fix translations for less_than_x_{minutes,seconds} for Japanese (ja)
153
+ - Fix 'errors.messages.confirmation' key for Russian (ru)
154
+ - Fix 'datetime.distance_in_words' keys for Hungarian (hu)
155
+ - Fix the currency unit for Polish (pl)
156
+ - Fix the currency unit for French/Switzerland (fr-CH)
157
+
158
+ ## 0.7.4 (2013-07-04)
159
+ - Add Odiya language (or)
160
+ - Revert several translations for Spanish/Colombia (es-CO)
161
+ - Add Swiss-German (iso-639-2/gsw-CH)
162
+ - Add Chinese/Hong Kong (zh-HK)
163
+ - Fix some translations for Mongolian (mn)
164
+ - Fix some translations for Hebrew (he)
165
+ - Fix date and time formats for English/Austraria (en-AU)
166
+ - Add English/New Zealand (en-NZ)
167
+ - Fix some translations for Finnish (fi)
168
+ - Fix the case in x_seconds for Russian (ru)
169
+ - Add :many pluralization value for Polish (pl)
170
+ - Change the value of strip_insignificant_zeros to false for Norwegian (nb)
171
+
172
+ ## 0.7.3 (2013-03-19)
173
+ - Fix number delimiter and separator for Italian (it)
174
+ - Fix currency delimiter and separator for Romanian (ro)
175
+ - Fix time formats for Portuguese/Brazil (pt-BR)
176
+ - Fix several translations for Estonian (et)
177
+ - Fix several translations for Spanish/Colombia (es-CO)
178
+ - Fix the translation of half_a_minute for Tagalog (tl)
179
+ - Fix separators for Russian (ru)
180
+ - Add Afrikaans locale (af)
181
+ - Fix some spelling mistakes for Catalan (ca)
182
+ - Use secure Rubygems URL
183
+ - Change capitalization rules for Italian (it)
184
+ - Fix abbreviations, currency format, etc. for Greek (el)
185
+ - Fix the translation of submit for Portuguese (pt)
186
+
187
+ ## 0.7.2 (2012-12-28)
188
+ - Remove spurious `mis` from Welsh month names
189
+ - Add OneOther default pluralization rule and create corresponding locale pluralization files
190
+ - Add pluralization files for locales with region
191
+ - Update Persian (fa) translation
192
+
193
+ ## 0.7.1 (2012-11-24)
194
+ - Update Peruvian Spanish (es-PE) translation
195
+ - Fix pluralization rules for OneTwoOther
196
+ - Fix pluralization rules for Hungarian (hu)
197
+ - Update Japanese (ja) translation
198
+ - Fix and complete translations of Macedonian (mk), Cyrillic Serbian (sr) and Serbo-Croatian (scr)
199
+
200
+ ## 0.7.0 (2012-10-23)
201
+ - Remove Swiss German (gsw-CH) as a duplicate of de-CH
202
+ - Remove en-US
203
+ - Remove region code from bn-IN, gl-ES, pt-PT and sv-SE
204
+ - Move iso-639-2 locales into their own directory
205
+ - Add pluralization rule for Upper Sorbian
206
+ - Fix grammar mistakes on Bulgarian (bg) translation
207
+ - Add Latin American Spanish (es-419) translation
208
+
209
+ ## 0.6.6 (2012-09-07)
210
+ - added Uzbek (uz) translation
211
+ - added Swiss Italian (it-CH) translation
212
+ - fixed Swiss German (de-CH) translation
213
+ - added Polish (pl) transliteration
214
+ - fixed Greek (el) translation
215
+ - added Nepali (ne) translation
216
+ - fixed Argentina Spanish (es-AR) translation
217
+
1
218
  ## 0.6.5 (2012-07-02)
2
219
  - fixed Icelandic translation
3
220
  - fixed Portuguese translation
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  Rails Locale Data Repository
2
2
  ============================
3
3
 
4
+ [![Gem Version](https://badge.fury.io/rb/rails-i18n.svg)](http://badge.fury.io/rb/rails-i18n)
4
5
  [![Build Status](https://secure.travis-ci.org/svenfuchs/rails-i18n.png)](http://travis-ci.org/svenfuchs/rails-i18n)
5
6
 
6
7
  Central point to collect locale data for use in Ruby on Rails.
@@ -9,11 +10,15 @@ Central point to collect locale data for use in Ruby on Rails.
9
10
 
10
11
  Add to your Gemfile:
11
12
 
12
- gem 'rails-i18n'
13
+ gem 'rails-i18n', '~> 4.0.0' # For 4.0.x
14
+ gem 'rails-i18n', '~> 3.0.0' # For 3.x
15
+ gem 'rails-i18n', github: 'svenfuchs/rails-i18n', branch: 'master' # For 4.x
16
+ gem 'rails-i18n', github: 'svenfuchs/rails-i18n', branch: 'rails-3-x' # For 3.x
13
17
 
14
18
  or run this command:
15
19
 
16
- gem install rails-i18n
20
+ gem install rails-i18n -v '~> 4.0.0' # For 4.0.x
21
+ gem install rails-i18n -v '~> 3.0.0' # For 3.x
17
22
 
18
23
  Note that your rails version must be 3.0 or higher if you want to install `rails-i18n` as a gem. For rails 2.x, install it manually as described below.
19
24
 
@@ -46,23 +51,40 @@ Locale data whose structure is compatible with Rails 2.3 are available on the se
46
51
 
47
52
  Available locales are:
48
53
 
49
- > ar, az, bg, bn-IN, bs, ca, cs, csb, cy, da, de, de-AT, de-CH, dsb, el, en-AU, en-CA, en-GB, en-IN, en-US, eo,
50
- > es, es-AR, es-CL, es-CO, es-MX, es-PE, es-VE, et, eu, fa, fi, fr, fr-CA, fr-CH, fur, gl-ES,
51
- > gsw-CH, he, hi, hi-IN, hr, hsb, hu, id, is, it, ja, kn, ko, lo, lt, lv, mk, mn, nb,
52
- > nl, nn, pl, pt-BR, pt-PT, rm, ro, ru, sk, sl, sr, sr-Latn, sv-SE, sw, th,
53
- > tl, tr, uk, vi, wo, zh-CN, zh-TW
54
+ > af, ar, az, be, bg, bn, bs, ca, cs, cy, da, de, de-AT, de-CH, de-DE, el,
55
+ > en, en-AU, en-CA, en-GB, en-IE, en-IN, en-NZ, en-US, en-ZA, eo, es,
56
+ > es-419, es-AR, es-CL, es-CO, es-CR, es-EC, es-ES, es-MX, es-PA, es-PE, es-US, es-VE,
57
+ > et, eu, fa, fi, fr, fr-CA, fr-CH, fr-FR, gl, he, hi, hi-IN, hr, hu, id, is, it,
58
+ > it-CH, ja, km, kn, ko, lb, lo, lt, lv, mk, mn, mr-IN, ms, nb, ne, nl, nn, or,
59
+ > pa, pl, pt, pt-BR, rm, ro, ru, sk, sl, sq, sr, sv, sw, ta, th, tl, tr, tt, ug, uk,
60
+ > ur, uz, vi, wo, zh-CN, zh-HK, zh-TW, zh-YUE
54
61
 
55
- Following locales are complete:
62
+ Currently, no locales are complete. Typically they lack the following keys:
56
63
 
57
- > az, bg, bs, ca, csb, da, de, de-AT, de-CH, el, en-AU, en-CA, en-GB, en-IN, en-US, eo, es, es-AR, es-CL, es-CO, es-MX, es-VE, et,
58
- > eu, fa, fi, fr, fr-CA, fr-CH, fur, gsw-CH, he, hi, hi-IN, hr, hu, is, it, ja, kn, ko, lv, mn, nb,
59
- > nl, pt-BR, pt-PT, ru, sk, sv-SE, sw, th, tl, tr, uk, vi, wo, zh-CN, zh-TW
64
+ - `activerecord.errors.messages.record_invalid`
65
+ - `activerecord.errors.messages.restrict_dependent_destroy`
60
66
 
61
- Following locales have some missing translations or pluralizations:
67
+ We always welcome your contributions!
62
68
 
63
- > ar, bn-IN, cs, cy, dsb, es-PE, gl-ES, hsb, id, lo, lt, mk, nn, pl, rm, ro, sl, sr, sr-Latn
69
+ ## Currency symbols
64
70
 
65
- We always welcome your contributions!
71
+ Some locales have the symbol of the currency (e.g. `€`) under the key `number.currency.format.unit`,
72
+ while others have the code (e.g. `CHF`). The value of the key depends on the widespread adoption of
73
+ the unicode currency symbols by fonts.
74
+
75
+ For example the Turkish Lira sign (`₺`) was recently added in Unicode 6.2 and while most popular
76
+ fonts have a glyph, there are still many fonts that will not render the character correctly.
77
+
78
+ If you want to provide a different value, in a Rails app, you can create your own locale file under
79
+ `config/locales/tr.yml` and override the respective key:
80
+
81
+ ```YAML
82
+ tr:
83
+ number:
84
+ currency:
85
+ format:
86
+ unit: TL
87
+ ```
66
88
 
67
89
  ## How to contribute
68
90
 
@@ -75,14 +97,14 @@ If you are not,
75
97
  * Save your locale data on the [Gist](http://gist.github.com).
76
98
  * Open an issue with reference to the Gist you created.
77
99
 
78
- ### Fetch the `rails-18n` repository
100
+ ### Fetch the `rails-i18n` repository
79
101
 
80
102
  * Get a github account and Git program if you haven't. See [Help.Github](http://help.github.com/) for instructions.
81
103
  * Fork `svenfuchs/rails-i18n` repository and clone it into your PC.
82
104
 
83
105
  ### Create or edit your locale file
84
106
 
85
- * Have a look in `rails/locale/en-US.yml`, which can be used as the base of your translation.
107
+ * Have a look in `rails/locale/en.yml`, which should be used as the base of your translation.
86
108
  Note that we use `&errors_messages` and `<<: *errors_messages` to anchor and merge a part of translation data.
87
109
  * Create or edit your locale file.
88
110
  Please pay attention to save your files as UTF-8.
@@ -91,20 +113,25 @@ If you are not,
91
113
 
92
114
  Before committing and pushing your changes, test the integrity of your locale file.
93
115
 
94
- rake spec
116
+ bundle exec rake spec
95
117
 
96
118
  Make sure you have included all translations with:
97
119
 
98
- rake i18n-spec:completeness rails/locale/en-US.yml rails/locale/YOUR_NEW_LOCALE.yml
120
+ bundle exec rake i18n-spec:completeness rails/locale/en.yml rails/locale/YOUR_NEW_LOCALE.yml
99
121
 
100
- You can list all complete locales:
122
+ You can list all complete and incomplete locales:
101
123
 
102
124
  thor locales:complete
125
+ thor locales:incomplete
103
126
 
104
127
  Also, you can list all available locales:
105
128
 
106
129
  thor locales:list
107
130
 
131
+ You can list all missing keys:
132
+
133
+ i18n-tasks missing es
134
+
108
135
  ### Edit README.md
109
136
 
110
137
  Add your locale name to the list in `README.md` if it isn't there.
@@ -120,6 +147,8 @@ We will do the formality check and publish it as quick as we can.
120
147
  * [devise-i18n](https://github.com/tigrish/devise-i18n)
121
148
  * [will-paginate-i18n](https://github.com/tigrish/will-paginate-i18n)
122
149
  * [i18n-country-translation](https://github.com/onomojo/i18n-country-translations) for translations of country names
150
+ * [i18n-spec](https://github.com/tigrish/i18n-spec) for RSpec matchers to test your locale files
151
+ * [iso](https://github.com/tigrish/iso) for the list of valid language/region codes and their translations
123
152
 
124
153
  ## License
125
154
 
@@ -6,16 +6,23 @@
6
6
  module RailsI18n
7
7
  module Pluralization
8
8
  module EastSlavic
9
+
10
+ FROM_2_TO_4 = (2..4).to_a.freeze
11
+ FROM_5_TO_9 = (5..9).to_a.freeze
12
+ FROM_11_TO_14 = (11..14).to_a.freeze
13
+ FROM_12_TO_14 = (12..14).to_a.freeze
14
+
9
15
  def self.rule
10
16
  lambda do |n|
17
+ n ||= 0
11
18
  mod10 = n % 10
12
19
  mod100 = n % 100
13
20
 
14
21
  if mod10 == 1 && mod100 != 11
15
22
  :one
16
- elsif [2, 3, 4].include?(mod10) && ![12, 13, 14].include?(mod100)
23
+ elsif FROM_2_TO_4.include?(mod10) && !FROM_12_TO_14.include?(mod100)
17
24
  :few
18
- elsif mod10 == 0 || (5..9).to_a.include?(mod10) || (11..14).to_a.include?(mod100)
25
+ elsif mod10 == 0 || FROM_5_TO_9.include?(mod10) || FROM_11_TO_14.include?(mod100)
19
26
  :many
20
27
  else
21
28
  :other
@@ -25,7 +32,7 @@ module RailsI18n
25
32
 
26
33
  def self.with_locale(locale)
27
34
  { locale => {
28
- :'i18n' => {
35
+ :i18n => {
29
36
  :plural => {
30
37
  :keys => [:one, :few, :many, :other],
31
38
  :rule => rule }}}}
@@ -1,18 +1,19 @@
1
- # Used in Hungarian
1
+ # Used as "default" pluralization rule
2
+
2
3
  module RailsI18n
3
4
  module Pluralization
4
- module OnlyOne
5
+ module OneOther
5
6
  def self.rule
6
- Proc.new { :one }
7
+ lambda { |n| n == 1 ? :one : :other }
7
8
  end
8
9
 
9
10
  def self.with_locale(locale)
10
11
  { locale => {
11
12
  :'i18n' => {
12
13
  :plural => {
13
- :keys => [:one],
14
+ :keys => [:one, :other],
14
15
  :rule => rule }}}}
15
16
  end
16
17
  end
17
18
  end
18
- end
19
+ end
@@ -5,15 +5,13 @@ module RailsI18n
5
5
  module Pluralization
6
6
  module OneTwoOther
7
7
  def self.rule
8
- def self.rule
9
- lambda do |n|
10
- if n == 1
11
- :one
12
- elsif n == 2
13
- :two
14
- else
15
- :other
16
- end
8
+ lambda do |n|
9
+ if n == 1
10
+ :one
11
+ elsif n == 2
12
+ :two
13
+ else
14
+ :other
17
15
  end
18
16
  end
19
17
  end
@@ -4,7 +4,7 @@ module RailsI18n
4
4
  module Pluralization
5
5
  module OneUptoTwoOther
6
6
  def self.rule
7
- lambda { |n| n >= 0 && n < 2 ? :one : :other }
7
+ lambda { |n| n && n >= 0 && n < 2 ? :one : :other }
8
8
  end
9
9
 
10
10
  def self.with_locale(locale)