rails-i18n 5.1.2 → 7.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +97 -3
  3. data/README.md +115 -46
  4. data/lib/rails_i18n/common_pluralizations/east_slavic.rb +1 -1
  5. data/lib/rails_i18n/railtie.rb +3 -0
  6. data/lib/rails_i18n.rb +0 -1
  7. data/rails/locale/af.yml +18 -18
  8. data/rails/locale/ar.yml +57 -57
  9. data/rails/locale/az.yml +19 -19
  10. data/rails/locale/be.yml +43 -43
  11. data/rails/locale/bg.yml +14 -14
  12. data/rails/locale/bn.yml +24 -24
  13. data/rails/locale/bs.yml +38 -38
  14. data/rails/locale/ca.yml +46 -22
  15. data/rails/locale/cs.yml +19 -19
  16. data/rails/locale/cy.yml +26 -26
  17. data/rails/locale/da.yml +27 -21
  18. data/rails/locale/de-AT.yml +17 -17
  19. data/rails/locale/de-CH.yml +17 -17
  20. data/rails/locale/de-DE.yml +17 -17
  21. data/rails/locale/de.yml +17 -17
  22. data/rails/locale/el-CY.yml +46 -33
  23. data/rails/locale/el.yml +48 -35
  24. data/rails/locale/en-AU.yml +25 -15
  25. data/rails/locale/en-CA.yml +23 -16
  26. data/rails/locale/en-CY.yml +24 -17
  27. data/rails/locale/en-GB.yml +24 -17
  28. data/rails/locale/en-IE.yml +25 -18
  29. data/rails/locale/en-IN.yml +24 -17
  30. data/rails/locale/en-NZ.yml +25 -18
  31. data/rails/locale/en-TT.yml +213 -0
  32. data/rails/locale/en-US.yml +22 -20
  33. data/rails/locale/en-ZA.yml +23 -19
  34. data/rails/locale/en.yml +22 -22
  35. data/rails/locale/eo.yml +16 -16
  36. data/rails/locale/es-419.yml +22 -19
  37. data/rails/locale/es-AR.yml +21 -19
  38. data/rails/locale/es-CL.yml +20 -18
  39. data/rails/locale/es-CO.yml +27 -25
  40. data/rails/locale/es-CR.yml +20 -18
  41. data/rails/locale/es-EC.yml +22 -19
  42. data/rails/locale/es-ES.yml +26 -24
  43. data/rails/locale/es-MX.yml +20 -18
  44. data/rails/locale/es-NI.yml +23 -21
  45. data/rails/locale/es-PA.yml +29 -25
  46. data/rails/locale/es-PE.yml +21 -19
  47. data/rails/locale/es-US.yml +20 -18
  48. data/rails/locale/es-VE.yml +20 -18
  49. data/rails/locale/es.yml +26 -26
  50. data/rails/locale/et.yml +19 -19
  51. data/rails/locale/eu.yml +23 -23
  52. data/rails/locale/fa.yml +22 -21
  53. data/rails/locale/fi.yml +23 -23
  54. data/rails/locale/fr-CA.yml +27 -25
  55. data/rails/locale/fr-CH.yml +25 -23
  56. data/rails/locale/fr-FR.yml +25 -23
  57. data/rails/locale/fr.yml +37 -35
  58. data/rails/locale/gl.yml +12 -12
  59. data/rails/locale/he.yml +17 -17
  60. data/rails/locale/hi-IN.yml +14 -14
  61. data/rails/locale/hi.yml +14 -14
  62. data/rails/locale/hr.yml +38 -29
  63. data/rails/locale/hu.yml +14 -14
  64. data/rails/locale/id.yml +22 -21
  65. data/rails/locale/is.yml +16 -16
  66. data/rails/locale/it-CH.yml +28 -15
  67. data/rails/locale/it.yml +21 -18
  68. data/rails/locale/ja.yml +23 -23
  69. data/rails/locale/ka.yml +19 -20
  70. data/rails/locale/km.yml +16 -16
  71. data/rails/locale/kn.yml +14 -14
  72. data/rails/locale/ko.yml +17 -17
  73. data/rails/locale/lb.yml +45 -42
  74. data/rails/locale/lo.yml +28 -28
  75. data/rails/locale/lt.yml +22 -22
  76. data/rails/locale/lv.yml +28 -28
  77. data/rails/locale/mg.yml +219 -0
  78. data/rails/locale/mk.yml +14 -14
  79. data/rails/locale/ml.yml +26 -26
  80. data/rails/locale/mn.yml +14 -14
  81. data/rails/locale/mr-IN.yml +16 -16
  82. data/rails/locale/ms.yml +14 -14
  83. data/rails/locale/nb.yml +27 -21
  84. data/rails/locale/ne.yml +17 -17
  85. data/rails/locale/nl.yml +17 -17
  86. data/rails/locale/nn.yml +16 -16
  87. data/rails/locale/oc.yml +24 -24
  88. data/rails/locale/or.yml +14 -14
  89. data/rails/locale/pa.yml +16 -16
  90. data/rails/locale/pap-AW.yml +215 -0
  91. data/rails/locale/pap-CW.yml +215 -0
  92. data/rails/locale/pl.yml +56 -56
  93. data/rails/locale/pt-BR.yml +57 -57
  94. data/rails/locale/pt.yml +58 -57
  95. data/rails/locale/rm.yml +24 -24
  96. data/rails/locale/ro.yml +69 -69
  97. data/rails/locale/ru.yml +45 -45
  98. data/rails/locale/sk.yml +17 -17
  99. data/rails/locale/sl.yml +39 -39
  100. data/rails/locale/sq.yml +87 -79
  101. data/rails/locale/sr.yml +48 -46
  102. data/rails/locale/st.yml +215 -0
  103. data/rails/locale/sv-SE.yml +19 -19
  104. data/rails/locale/sv.yml +21 -21
  105. data/rails/locale/sw.yml +14 -14
  106. data/rails/locale/ta.yml +16 -16
  107. data/rails/locale/te.yml +20 -22
  108. data/rails/locale/th.yml +8 -8
  109. data/rails/locale/tl.yml +132 -132
  110. data/rails/locale/tr.yml +19 -19
  111. data/rails/locale/tt.yml +16 -16
  112. data/rails/locale/ug.yml +16 -16
  113. data/rails/locale/uk.yml +42 -42
  114. data/rails/locale/ur.yml +24 -23
  115. data/rails/locale/uz.yml +37 -37
  116. data/rails/locale/vi.yml +18 -17
  117. data/rails/locale/wo.yml +18 -18
  118. data/rails/locale/zh-CN.yml +16 -16
  119. data/rails/locale/zh-HK.yml +34 -34
  120. data/rails/locale/zh-TW.yml +20 -20
  121. data/rails/locale/zh-YUE.yml +34 -34
  122. data/rails/pluralization/hu.rb +2 -2
  123. data/rails/pluralization/ka.rb +2 -2
  124. data/rails/pluralization/pap-AW.rb +3 -0
  125. data/rails/pluralization/pap-CW.rb +3 -0
  126. data/rails/pluralization/pt-BR.rb +3 -0
  127. data/rails/pluralization/sr.rb +29 -2
  128. data/rails/pluralization/st.rb +3 -0
  129. data/rails/pluralization/tr.rb +1 -1
  130. data/rails/transliteration/da.yml +10 -0
  131. data/rails/transliteration/fa.yml +47 -0
  132. data/rails/transliteration/ka.yml +37 -0
  133. data/rails/transliteration/uk.rb +5 -21
  134. metadata +23 -13
  135. data/lib/rails_i18n/unicode.rb +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f47d025c31e0d151f0c7d6402d93a6f46e516a76
4
- data.tar.gz: 0cf230086a7ea9458f53dd932634bef2e24f565f
2
+ SHA256:
3
+ metadata.gz: 64db0ab46aa5ba19b123b26cc573ccc8dcb92c3621c574b2c506aca2529e888d
4
+ data.tar.gz: 7f390e39a5b9ca3ad45997a9109535e1bb9346271dc6dd5d76ef6ac68db48c2d
5
5
  SHA512:
6
- metadata.gz: 8d44c26ef774368b53a279e46b46204c9cb5cea299f2137337e04e756e18e485c1d1a42a6d1c36cd2a33e19a898e1e059f5d8ae4a2fe4ac37b7c21eb601b9feb
7
- data.tar.gz: cd17107fda51daee7487e7242e62f6298e697b8c52de23d07ba926552522ff64844f75db301ecf1981ad8046692d12ac6856956894fbb7fd3765e27ac76d3fdd
6
+ metadata.gz: 9539c4e1840616800bedadd48ad004e41cff64605de87e6d944b000fac19fff9ee3a3bea6ca5cd27ab92493ceb0234e4d396ec5ba970030042569e9986df7f28
7
+ data.tar.gz: 2d852dcee634a47cd9be44f474217da359cc95281c52708fa213b620284f20de067531bb56d9a7dd89684b869e0696a35ae918024ed366e0fd36cf5c5a8a78a4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,99 @@
1
+ ## 6.0.0
2
+ - Update rails-i18n.gemspec to use Railties 6.0.0
3
+ - Add Malagasy (mg) locale
4
+ - Update following locales:
5
+ - Afrikaans (af)
6
+ - Arabic (ar)
7
+ - Azerbaijani (az)
8
+ - Belarusian (be)
9
+ - Bulgarian (bg)
10
+ - Bengali (bn)
11
+ - Bosnian (bs)
12
+ - Catalan (ca)
13
+ - Czech (cs)
14
+ - Welsh (cy)
15
+ - Danish (da)
16
+ - German (de-AT, de-CH, de-DE, de)
17
+ - Greek (el-CY, el)
18
+ - English (en-AU, en-CA, en-CY, en-GB, en-IE, en-IN, en-NZ, en-US, en-Za, en)
19
+ - Esperanto (eo)
20
+ - Spanish (es-419, es-AR, es-CL, es-CO, es-CR, es-EC, es-ES, es-MX, es-NI, es-PA, es-PE, es-US, es-VE, es)
21
+ - Estonian (et)
22
+ - Basque (eu)
23
+ - Farsi/Persian (fa)
24
+ - Finnish (fi)
25
+ - French (fr-CA, fr-CH, fr-FR, fr)
26
+ - Galician (gl)
27
+ - Hebrew (he)
28
+ - Hindi (hi-IN, hi)
29
+ - Croatian (hr)
30
+ - Hungarian (hu)
31
+ - Indonesian (id)
32
+ - Icelandic (is)
33
+ - Italian (it, it-CH)
34
+ - Japanese (ja)
35
+ - Georgian (ka)
36
+ - Khmer (km)
37
+ - Kannada (kn)
38
+ - Korean (ko)
39
+ - Luxembourgish (lb)
40
+ - Lao (lo)
41
+ - Lithuanian (lt)
42
+ - Latvian (lv)
43
+ - Malagasy (mg)
44
+ - Macedonian (mk)
45
+ - Malayalam (ml)
46
+ - Mongolian (mn)
47
+ - Marathi (mr-IN)
48
+ - Malay (ms)
49
+ - Norwegian Bokmål (nb)
50
+ - Nepali (ne)
51
+ - Dutch (nl)
52
+ - Norwegian (nn)
53
+ - Occitan (oc)
54
+ - Oriya/Odiya (or)
55
+ - Panjabi (pa)
56
+ - Polish (pl)
57
+ - Portuguese (pt-BR, pt)
58
+ - Raeto-Romance (rm)
59
+ - Romanian (ro)
60
+ - Russian (ru)
61
+ - Slovak (sk)
62
+ - Slovenian (sl)
63
+ - Albanian (sq)
64
+ - Cyrillic Serbian (sr)
65
+ - Swedish (sv-SE, sv)
66
+ - Swahili (sw)
67
+ - Tamil (ta)
68
+ - Telugu (te)
69
+ - Thai (th)
70
+ - Tagalog (tl)
71
+ - Turkish (tr)
72
+ - Tatar (tt)
73
+ - Uyghur (ug)
74
+ - Ukrainian (uk)
75
+ - Urdu (ur)
76
+ - Uzbek (uz)
77
+ - Vietnamese (vi)
78
+ - Wolof (wo)
79
+ - Chinese (zh-CN, zh-HK, zh-TW, zh-YUE)
80
+
81
+ ## 6.0.0.beta1 (2019-01-28)
82
+
83
+ - Update rails-i18n.gemspec to use Railties 6.0.0.beta1
84
+ - Update Gemfile
85
+ - Update .travis.yml
86
+
87
+ ## 5.1.3 (2019-01-28)
88
+
89
+ - Update following locales:
90
+ - Spanish (es-*)
91
+ - English (en-*)
92
+ - Hungarian (hu)
93
+ - Hebrew (he)
94
+ - Cyrillic Serbian (sr)
95
+ - Farsi/Persian (fa)
96
+
1
97
  ## 5.1.2 (2018-10-29)
2
98
  - Add Telugu (te) locale
3
99
  - Update following locales:
@@ -101,7 +197,6 @@
101
197
  - Update Spanish locales (ES-\*)
102
198
  - Update Brazilian Portuguese (pt-BR)
103
199
  - Update Dutch (nl)
104
- - Update Indonesian (id)
105
200
  - Update Arabic (ar)
106
201
  - Add German (de-DE)
107
202
  - Add French (fr-FR)
@@ -184,7 +279,6 @@
184
279
  - Update Urdu (ur)
185
280
  - Update Chinese (zh-CN, zh-HK, zh-TW, zh-YUE)
186
281
  - Update Khmer (km)
187
- - Update Lithuanian (lt)
188
282
  - Update Italian (it)
189
283
  - Add Belarusian (be)
190
284
  - Add Tatar (tt)
@@ -280,7 +374,7 @@
280
374
  - Fix the currency unit for French/Switzerland (fr-CH)
281
375
 
282
376
  ## 0.7.4 (2013-07-04)
283
- - Add Odiya language (or)
377
+ - Add Oriya/Odiya language (or)
284
378
  - Revert several translations for Spanish/Colombia (es-CO)
285
379
  - Add Swiss-German (iso-639-2/gsw-CH)
286
380
  - Add Chinese/Hong Kong (zh-HK)
data/README.md CHANGED
@@ -2,45 +2,54 @@ Rails Locale Data Repository
2
2
  ============================
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/rails-i18n.svg)](http://badge.fury.io/rb/rails-i18n)
5
- [![Build Status](https://secure.travis-ci.org/svenfuchs/rails-i18n.png)](http://travis-ci.org/svenfuchs/rails-i18n)
5
+ [![Build Status](https://secure.travis-ci.org/svenfuchs/rails-i18n.svg)](http://travis-ci.org/svenfuchs/rails-i18n)
6
6
 
7
- Central point to collect locale data for use in Ruby on Rails.
7
+ Centralization of locale data collection for Ruby on Rails.
8
8
 
9
- ## Gem installation
9
+ ## Gem Installation
10
10
 
11
- Add to your Gemfile:
11
+ Include the gem to your Gemfile:
12
12
 
13
- gem 'rails-i18n', '~> 5.1' # For 5.0.x, 5.1.x and 5.2.x
14
- gem 'rails-i18n', '~> 4.0' # For 4.0.x
15
- gem 'rails-i18n', '~> 3.0' # For 3.x
16
- gem 'rails-i18n', github: 'svenfuchs/rails-i18n', branch: 'master' # For 5.x
17
- gem 'rails-i18n', github: 'svenfuchs/rails-i18n', branch: 'rails-4-x' # For 4.x
18
- gem 'rails-i18n', github: 'svenfuchs/rails-i18n', branch: 'rails-3-x' # For 3.x
13
+ ``` ruby
14
+ gem 'rails-i18n', '~> 7.0.0' # For 7.0.0
15
+ gem 'rails-i18n', '~> 6.0' # For 6.x
16
+ gem 'rails-i18n', '~> 5.1' # For 5.0.x, 5.1.x and 5.2.x
17
+ gem 'rails-i18n', '~> 4.0' # For 4.0.x
18
+ gem 'rails-i18n', '~> 3.0' # For 3.x
19
+ gem 'rails-i18n', github: 'svenfuchs/rails-i18n', branch: 'master' # For 5.x
20
+ gem 'rails-i18n', github: 'svenfuchs/rails-i18n', branch: 'rails-4-x' # For 4.x
21
+ gem 'rails-i18n', github: 'svenfuchs/rails-i18n', branch: 'rails-3-x' # For 3.x
22
+ ```
19
23
 
20
- or run this command:
24
+ Alternatively, execute the following command:
21
25
 
22
- gem install rails-i18n -v '~> 5.1' # For For 5.0.x, 5.1.x and 5.2.x
23
- gem install rails-i18n -v '~> 4.0' # For 4.0.x
24
- gem install rails-i18n -v '~> 3.0' # For 3.x
26
+ ``` shell
27
+ gem install rails-i18n -v '~> 7.0.0' # For 7.0.0
28
+ gem install rails-i18n -v '~> 6.0' # For 6.x
29
+ gem install rails-i18n -v '~> 5.1' # For For 5.0.x, 5.1.x and 5.2.x
30
+ gem install rails-i18n -v '~> 4.0' # For 4.0.x
31
+ gem install rails-i18n -v '~> 3.0' # For 3.x
32
+ ```
25
33
 
26
- 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.
34
+ Note that your Ruby on Rails version must be 3.0 or higher in order to install the `rails-i18n` gem. For rails 2.x, install it manually as described in the Manual Installation section below.
27
35
 
28
36
  ## Configuration
29
37
 
30
- By default `rails-i18n` loads all locale files, pluralization and
31
- transliteration rules available in the gem. This behaviour can be changed, if you
32
- specify in `config/environments/*` the locales which have to be loaded via
33
- `I18n.available_locales` option:
38
+ `rails-i18n` gem initially loads all available locale files, pluralization and transliteration rules. This default behaviour can be changed. If you specify in `config/environments/*` the locales which have to be loaded via `I18n.available_locales` option:
34
39
 
35
- config.i18n.available_locales = ['es-CO', :de]
40
+ ``` ruby
41
+ config.i18n.available_locales = ['es-CO', :de]
42
+ ```
36
43
 
37
44
  or
38
45
 
39
- config.i18n.available_locales = :nl
46
+ ``` ruby
47
+ config.i18n.available_locales = :nl
48
+ ```
40
49
 
41
- ## Manual installation
50
+ ## Manual Installation
42
51
 
43
- Download the locale files that are found in the directory [rails/locale](http://github.com/svenfuchs/rails-i18n/tree/master/rails/locale/) and put them into the `config/locales` directory of your Rails application.
52
+ Download desired locale files found in [rails/locale](http://github.com/svenfuchs/rails-i18n/tree/master/rails/locale/) directory and move them into the `config/locales` directory of your Rails application.
44
53
 
45
54
  If any translation doesn't suit well to the requirements of your application, edit them or add your own locale files.
46
55
 
@@ -52,33 +61,36 @@ Locale data whose structure is compatible with Rails 2.3 are available on the se
52
61
 
53
62
  ## Available Locales
54
63
 
55
- Available locales are:
64
+ Available locales:
56
65
 
57
66
  > af, ar, az, be, bg, bn, bs, ca, cs, cy, da, de, de-AT, de-CH, de-DE, el, el-CY,
58
- > en, en-AU, en-CA, en-GB, en-IE, en-IN, en-NZ, en-US, en-ZA, en-CY,eo, es,
67
+ > en, en-AU, en-CA, en-GB, en-IE, en-IN, en-NZ, en-US, en-ZA, en-CY, en-TT, eo, es,
59
68
  > es-419, es-AR, es-CL, es-CO, es-CR, es-EC, es-ES, es-MX, es-NI, es-PA, es-PE, es-US, es-VE,
60
69
  > et, eu, fa, fi, fr, fr-CA, fr-CH, fr-FR, gl, he, hi, hi-IN, hr, hu, id, is, it,
61
70
  > it-CH, ja, ka, km, kn, ko, lb, lo, lt, lv, mk, ml, mn, mr-IN, ms, nb, ne, nl, nn, oc, or,
62
- > pa, pl, pt, pt-BR, rm, ro, ru, sk, sl, sq, sr, sw, ta, te, th, tl, tr, tt, ug,
71
+ > pa, pl, pt, pt-BR, rm, ro, ru, sk, sl, sq, sr, st, sw, ta, te, th, tl, tr, tt, ug,
63
72
  > ur, uz, vi, wo, zh-CN, zh-HK, zh-TW, zh-YUE
64
73
 
65
- Complete locales are:
74
+ Complete locales:
66
75
 
67
76
  > af, da, de, de-AT, de-CH, de-DE, en-US, es, es-419, es-AR, es-CL, es-CO, es-CR, es-EC,
68
- > es-ES, es-MX, es-NI, es-PA, es-PE, es-US, es-VE, et, fa, fr, fr-CA, fr-CH, fr-FR, id, ja, ka, ml, nb,
69
- > nl, nn, pt-BR, sv, sv-SE, tr, zh-CN, zh-HK, zh-TW, zh-YUE, uk
77
+ > es-ES, es-MX, es-NI, es-PA, es-PE, es-US, es-VE, et, fa, fr, fr-CA, fr-CH, fr-FR, id, it, ja, ka, ml, nb,
78
+ > nl, nn, pt, pt-BR, sv, sv-SE, tr, zh-CN, zh-HK, zh-TW, zh-YUE, uk
70
79
 
71
80
  Currently, most locales are incomplete. Typically they lack the following keys:
72
81
 
73
82
  - `activerecord.errors.messages.record_invalid`
74
83
  - `activerecord.errors.messages.restrict_dependent_destroy.has_one`
75
84
  - `activerecord.errors.messages.restrict_dependent_destroy.has_many`
85
+
86
+ The following keys should NOT be included:
87
+
76
88
  - `errors.messages.model_invalid`
77
89
  - `errors.messages.required`
78
90
 
79
91
  We always welcome your contributions!
80
92
 
81
- ## Currency symbols
93
+ ## Currency Symbols
82
94
 
83
95
  Some locales have the symbol of the currency (e.g. `€`) under the key `number.currency.format.unit`,
84
96
  while others have the code (e.g. `CHF`). The value of the key depends on the widespread adoption of
@@ -87,10 +99,10 @@ the unicode currency symbols by fonts.
87
99
  For example the Turkish Lira sign (`₺`) was recently added in Unicode 6.2 and while most popular
88
100
  fonts have a glyph, there are still many fonts that will not render the character correctly.
89
101
 
90
- If you want to provide a different value, in a Rails app, you can create your own locale file under
102
+ If you want to provide a different value, you can create a custom locale file under
91
103
  `config/locales/tr.yml` and override the respective key:
92
104
 
93
- ```YAML
105
+ ``` yaml
94
106
  tr:
95
107
  number:
96
108
  currency:
@@ -98,50 +110,67 @@ tr:
98
110
  unit: TL
99
111
  ```
100
112
 
101
- ## How to contribute
113
+ ## How to Contribute
102
114
 
103
- ### Quick contribution
115
+ ### Quick Contribution
104
116
 
105
- If you are familiar with GitHub operations, follow the procedures described in the subsequent sections.
117
+ If you are familiar with GitHub operations, then follow the procedures described in the subsequent sections.
106
118
 
107
- If you are not,
119
+ If not,
108
120
 
109
- * Save your locale data on the [Gist](http://gist.github.com).
121
+ * Save your locale data in a [Gist](http://gist.github.com).
110
122
  * Open an issue with reference to the Gist you created.
111
123
 
112
- ### Fetch the `rails-i18n` repository
124
+ ### Fetching the `rails-i18n` Repository
113
125
 
114
126
  * Get a github account and Git program if you haven't. See [Help.Github](http://help.github.com/) for instructions.
115
127
  * Fork `svenfuchs/rails-i18n` repository and clone it into your PC.
116
128
 
117
- ### Create or edit your locale file
129
+ ### Creating or Editing your Locale File
118
130
 
119
131
  * Have a look in `rails/locale/en.yml`, which should be used as the base of your translation.
120
132
  * Create or edit your locale file.
121
133
  Please pay attention to save your files as UTF-8.
122
134
 
123
- ### Test your locale file
135
+ ### Testing your Locale File
124
136
 
125
137
  Before committing and pushing your changes, test the integrity of your locale file.
138
+ (You can also run the tests using Docker, see below)
126
139
 
127
- bundle exec rake spec
140
+ ``` shell
141
+ bundle exec rake spec
142
+ ```
128
143
 
129
144
  Make sure you have included all translations with:
130
145
 
131
- bundle exec rake i18n-spec:completeness rails/locale/en.yml rails/locale/YOUR_NEW_LOCALE.yml
146
+ ``` shell
147
+ bundle exec rake i18n-spec:completeness rails/locale/en.yml rails/locale/YOUR_NEW_LOCALE.yml
148
+ ```
149
+
150
+ Make sure it is normalized with:
151
+
152
+ ``` shell
153
+ thor locales:normalize LOCALE # or "thor locales:normalize_all"
154
+ ```
132
155
 
133
156
  You can list all complete and incomplete locales:
134
157
 
135
- thor locales:complete
136
- thor locales:incomplete
158
+ ``` shell
159
+ thor locales:complete
160
+ thor locales:incomplete
161
+ ```
137
162
 
138
163
  Also, you can list all available locales:
139
164
 
140
- thor locales:list
165
+ ``` shell
166
+ thor locales:list
167
+ ```
141
168
 
142
169
  You can list all missing keys:
143
170
 
144
- i18n-tasks missing es
171
+ ``` shell
172
+ i18n-tasks missing es
173
+ ```
145
174
 
146
175
  ### Edit README.md
147
176
 
@@ -153,6 +182,46 @@ If you are ready, push the repository into the Github and send us a pull request
153
182
 
154
183
  We will do the formality check and publish it as quick as we can.
155
184
 
185
+ ### Add an informative title to your pull request or issue
186
+
187
+ If your pull request or issue concerns a specific locale - please indicate the relevant locale
188
+ in the issue or pull request title in order to facilitate triage.
189
+
190
+ **Best:**
191
+
192
+ *Danish: change da.errors.messages.required to "skal udfyldes"*
193
+
194
+ **Good:**
195
+
196
+ *Human precision in Swedish locale file is set to 1*
197
+
198
+ *Update es-PE.yml, the currency unit is incorrect*
199
+
200
+ **Bad:**
201
+
202
+ *Changing some string about validation*
203
+
204
+ ### Docker
205
+
206
+ Build the image:
207
+
208
+ ```
209
+ docker build --tag=railsi18n .
210
+ ```
211
+
212
+ Run the tests:
213
+
214
+ ```
215
+ docker run railsi18n
216
+ ```
217
+
218
+ To run the other commands described above:
219
+
220
+ ```
221
+ docker run railsi18n bundle exec rake i18n-spec:completeness rails/locale/en.yml rails/locale/YOUR_NEW_LOCALE.yml
222
+
223
+ ```
224
+
156
225
  ## See also
157
226
 
158
227
  * [devise-i18n](https://github.com/tigrish/devise-i18n)
@@ -1,7 +1,7 @@
1
1
  # Originally was implemented by Yaroslav Markin in "russian" gem
2
2
  # (http://github.com/yaroslav/russian)
3
3
  #
4
- # Used for Belarusian, Bosnian, Croatian, Russian, Serbian, Serbo-Croatian, Ukrainian.
4
+ # Used for Belarusian, Bosnian, Croatian, Russian, Serbo-Croatian, Ukrainian.
5
5
 
6
6
  module RailsI18n
7
7
  module Pluralization
@@ -3,11 +3,14 @@ require 'rails'
3
3
  module RailsI18n
4
4
  class Railtie < ::Rails::Railtie #:nodoc:
5
5
  initializer 'rails-i18n' do |app|
6
+ app.config.eager_load_namespaces << ::I18n if ::I18n.respond_to?(:eager_load!)
7
+
6
8
  RailsI18n::Railtie.instance_eval do
7
9
  pattern = pattern_from app.config.i18n.available_locales
8
10
 
9
11
  add("rails/locale/#{pattern}.yml")
10
12
  add("rails/pluralization/#{pattern}.rb")
13
+ add("rails/ordinals/#{pattern}.rb")
11
14
  add("rails/transliteration/#{pattern}.{rb,yml}")
12
15
 
13
16
  init_pluralization_module
data/lib/rails_i18n.rb CHANGED
@@ -1,2 +1 @@
1
- require 'rails_i18n/unicode'
2
1
  require 'rails_i18n/railtie'
data/rails/locale/af.yml CHANGED
@@ -5,8 +5,8 @@ af:
5
5
  messages:
6
6
  record_invalid: 'Validering het misluk: %{errors}'
7
7
  restrict_dependent_destroy:
8
- has_one: "Kan rekord nie skrap nie omdat 'n afhanklike %{record} bestaan"
9
- has_many: 'Kan rekord nie skrap nie omdat afhanklike %{record} bestaan'
8
+ has_one: Kan rekord nie skrap nie omdat 'n afhanklike %{record} bestaan
9
+ has_many: Kan rekord nie skrap nie omdat afhanklike %{record} bestaan
10
10
  date:
11
11
  abbr_day_names:
12
12
  - Son
@@ -17,7 +17,7 @@ af:
17
17
  - Vry
18
18
  - Sat
19
19
  abbr_month_names:
20
- -
20
+ -
21
21
  - Jan
22
22
  - Feb
23
23
  - Mar
@@ -43,7 +43,7 @@ af:
43
43
  long: "%B %d, %Y"
44
44
  short: "%b %d"
45
45
  month_names:
46
- -
46
+ -
47
47
  - Januarie
48
48
  - Februarie
49
49
  - Maart
@@ -75,43 +75,42 @@ af:
75
75
  one: sowat 1 jaar
76
76
  other: sowat %{count} jaar
77
77
  half_a_minute: halfminuut
78
- less_than_x_minutes:
79
- one: minder as 1 minuut
80
- other: minder as %{count} minute
81
78
  less_than_x_seconds:
82
79
  one: minder as 1 sekonde
83
80
  other: minder as %{count} sekondes
81
+ less_than_x_minutes:
82
+ one: minder as 1 minuut
83
+ other: minder as %{count} minute
84
84
  over_x_years:
85
85
  one: meer as 1 jaar
86
86
  other: meer as %{count} jaar
87
- x_days:
88
- one: 1 dag
89
- other: "%{count} days"
87
+ x_seconds:
88
+ one: 1 sekonde
89
+ other: "%{count} sekondes"
90
90
  x_minutes:
91
91
  one: 1 minuut
92
92
  other: "%{count} minute"
93
+ x_days:
94
+ one: 1 dag
95
+ other: "%{count} days"
93
96
  x_months:
94
97
  one: 1 maand
95
98
  other: "%{count} maande"
96
99
  x_years:
97
100
  one: 1 jaar
98
101
  other: "%{count} jare"
99
- x_seconds:
100
- one: 1 sekonde
101
- other: "%{count} sekondes"
102
102
  prompts:
103
- day: Dag
104
- hour: Uur
103
+ second: Sekondes
105
104
  minute: Minuut
105
+ hour: Uur
106
+ day: Dag
106
107
  month: Maand
107
- second: Sekondes
108
108
  year: Jaar
109
109
  errors:
110
110
  format: "%{attribute} %{message}"
111
111
  messages:
112
112
  accepted: moet aanvaar word
113
113
  blank: mag nie leeg wees nie
114
- present: moet leeg wees
115
114
  confirmation: pas nie by bevestiging nie
116
115
  empty: mag nie leeg wees nie
117
116
  equal_to: moet gelyk wees aan %{count}
@@ -127,6 +126,8 @@ af:
127
126
  not_a_number: is nie 'n getal nie
128
127
  not_an_integer: moet 'n heelgetal wees
129
128
  odd: moet onewe wees
129
+ other_than: moet anders wees as %{count}
130
+ present: moet leeg wees
130
131
  required: moet bestaan
131
132
  taken: is reeds geneem
132
133
  too_long:
@@ -138,7 +139,6 @@ af:
138
139
  wrong_length:
139
140
  one: is die verkeerde lengte (moet 1 karakter wees)
140
141
  other: is die verkeerde lengte (moet %{count} karakters wees)
141
- other_than: moet anders wees as %{count}
142
142
  template:
143
143
  body: 'There were problems with the following fields:'
144
144
  header: