r18n-core 4.0.0 → 5.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog.md +398 -0
  3. data/README.md +23 -13
  4. data/lib/r18n-core.rb +10 -25
  5. data/lib/r18n-core/filter_list.rb +6 -3
  6. data/lib/r18n-core/filters.rb +21 -22
  7. data/lib/r18n-core/i18n.rb +9 -16
  8. data/lib/r18n-core/locale.rb +20 -21
  9. data/lib/r18n-core/locales/cy.rb +1 -1
  10. data/lib/r18n-core/locales/en-au.rb +1 -1
  11. data/lib/r18n-core/locales/en-gb.rb +1 -1
  12. data/lib/r18n-core/locales/en-us.rb +1 -1
  13. data/lib/r18n-core/locales/en.rb +2 -2
  14. data/lib/r18n-core/locales/es-cl.rb +1 -1
  15. data/lib/r18n-core/locales/es-us.rb +1 -1
  16. data/lib/r18n-core/locales/es.rb +2 -0
  17. data/lib/r18n-core/locales/fi.rb +2 -2
  18. data/lib/r18n-core/locales/fr.rb +3 -3
  19. data/lib/r18n-core/locales/it.rb +3 -3
  20. data/lib/r18n-core/locales/pt.rb +2 -0
  21. data/lib/r18n-core/locales/zh-cn.rb +1 -1
  22. data/lib/r18n-core/locales/zh-tw.rb +1 -1
  23. data/lib/r18n-core/locales/zh.rb +2 -0
  24. data/lib/r18n-core/translated.rb +4 -4
  25. data/lib/r18n-core/translated_string.rb +1 -6
  26. data/lib/r18n-core/translation.rb +1 -1
  27. data/lib/r18n-core/unsupported_locale.rb +2 -0
  28. data/lib/r18n-core/utils.rb +1 -1
  29. data/lib/r18n-core/version.rb +1 -1
  30. metadata +198 -89
  31. data/.rspec +0 -1
  32. data/Rakefile +0 -13
  33. data/r18n-core.gemspec +0 -29
  34. data/spec/filters_spec.rb +0 -327
  35. data/spec/i18n_spec.rb +0 -274
  36. data/spec/locale_spec.rb +0 -251
  37. data/spec/locales/af_spec.rb +0 -9
  38. data/spec/locales/cs_spec.rb +0 -23
  39. data/spec/locales/en-us_spec.rb +0 -28
  40. data/spec/locales/en_spec.rb +0 -13
  41. data/spec/locales/es-us_spec.rb +0 -11
  42. data/spec/locales/fa_spec.rb +0 -10
  43. data/spec/locales/fi_spec.rb +0 -9
  44. data/spec/locales/fr_spec.rb +0 -9
  45. data/spec/locales/hu_spec.rb +0 -19
  46. data/spec/locales/id_spec.rb +0 -23
  47. data/spec/locales/it_spec.rb +0 -10
  48. data/spec/locales/no_spec.rb +0 -9
  49. data/spec/locales/pl_spec.rb +0 -23
  50. data/spec/locales/ru_spec.rb +0 -23
  51. data/spec/locales/sk_spec.rb +0 -23
  52. data/spec/locales/th_spec.rb +0 -9
  53. data/spec/locales/vi_spec.rb +0 -9
  54. data/spec/r18n_spec.rb +0 -192
  55. data/spec/spec_helper.rb +0 -38
  56. data/spec/translated_spec.rb +0 -225
  57. data/spec/translation_spec.rb +0 -189
  58. data/spec/translations/extension/deep/en.yml +0 -1
  59. data/spec/translations/extension/en.yml +0 -2
  60. data/spec/translations/extension/notransl.yml +0 -1
  61. data/spec/translations/general/en.yml +0 -52
  62. data/spec/translations/general/nolocale.yml +0 -6
  63. data/spec/translations/general/ru.yml +0 -7
  64. data/spec/translations/two/en.yml +0 -2
  65. data/spec/translations/two/fr.yml +0 -0
  66. data/spec/translations/with_regions/en-US.yml +0 -0
  67. data/spec/translations/yaml/en-GB.yml +0 -1
  68. data/spec/translations/yaml/en-us.yml +0 -1
  69. data/spec/translations/yaml/en.yaml +0 -1
  70. data/spec/yaml_loader_spec.rb +0 -63
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a07951d2b74c13c824f759f496022ba65a190760e6b681958bfd037304713e2
4
- data.tar.gz: 118665d95730bc8984258f0c0d29ab1d174acc99631319633f475bd3374aca70
3
+ metadata.gz: ef8fd883bdb307b7895551a01d0d9abe1b8cf39d78f26d8d45289245b98d7cb4
4
+ data.tar.gz: 2964f46777aa5b30c6fcdb964acfb94c4d4c5e3d8c0a0ddfe878569487c84fa5
5
5
  SHA512:
6
- metadata.gz: f7fe8b6c0ab1bb0804050d24c6ca85f0b47b388d83a4ce8c459b76e232c3bc1a9635e87ebd23e044280e4e68d189ca87910a4a57fab6153a763254707a29248e
7
- data.tar.gz: b8cf0b271f94bdccefcd3d5e10351a05837c5d483cf0fc78bad43cf687a8c2742701ef38c4874e5c8720c1726690eb9c758f9f815ef982bdae07a1789385c5fb
6
+ metadata.gz: 376737013d9e16b9873140a971df8456c76df92e60b69b610bd339a8c1e2df955dd412eee46a34e35b89e89508e6811bac6d252dcc85077972d0fa561bf97c5f
7
+ data.tar.gz: dc72f088623675f0dacdf2a8f6fd4987616605142b514b48ce2a00a2d29f2073230efb96b60bab30164175d30eef3d40ccc467fb1281d4f24a856f4dc5d16089
data/ChangeLog.md ADDED
@@ -0,0 +1,398 @@
1
+ # Change Log
2
+
3
+ ## Unreleased
4
+
5
+ ## 5.0.1 (2021-03-04)
6
+
7
+ ## 5.0.0 (Warszawa) (2021-03-04)
8
+
9
+ * Take out `r18n-core` gem from mono-repository.
10
+ * Set `I18n#locale` with region by its parent equal to received locale.
11
+ For example, if project has `en-US` and `de-DE` locales,
12
+ and `Accept-Language` HTTP header contains only `de` — set `de-DE` as locale.
13
+ * Add locales with regions as sublocales of each other.
14
+ And load them all, not only for the first! Recursively, I guess.
15
+ * Don't use `en` as default sublocale, it's strange.
16
+ * Remove block setters.
17
+ I don't know why (for what) they were here, they were introduced without any description.
18
+ I see no profit from such approach. Use regular `set` or justify the necessity, please.
19
+ * Rename `UnpluralizetedTranslation` to `UnpluralizedTranslation` (more correct spelling).
20
+ * Remake `i18n` and `now` arguments to keyword arguments for `localize` and `format_*` methods.
21
+ * Allow Hashes with blocks for `named_variables` filter.
22
+ It forces Symbol keys, but it does not break specs and it's more flexible.
23
+ * Fix custom `format_*` methods for classes with namespaces.
24
+ * Drop Ruby 2.4 support.
25
+ * Support Ruby 3.
26
+ * Avoid Ruby 4 in gem specs.
27
+ * Add metadata to gem specs.
28
+ * Add Alexander Popov as a gem author.
29
+ * Run specs in random order, fix phantom fails.
30
+ * Replace `rake` with `toys`.
31
+ * Add Codecov and SimpleCov.
32
+ * Update RuboCop, its configuration, and resolve new offenses.
33
+ * Fix many Ruby warnings.
34
+ * Add badges into README.
35
+
36
+ ## 4.0.0 (Santiago)
37
+
38
+ * Drop Ruby 2.3 support (by Alexander Popov).
39
+ * Drop `R18n::Utils.hash_map` (by Alexander Popov).
40
+ * Add Ruby 2.6 and 2.7 for CI (by Alexander Popov).
41
+ * Allow to add custom (per-project) locales (by Alexander Popov).
42
+ * Add block for `R18n.change` (change affects only code inside block)
43
+ (by Alexander Popov).
44
+ * Add `language` and `region` readers for `Locale` (by Alexander Popov).
45
+ * Allow upcased region in translation file names (like `en-US.yml`)
46
+ (by Alexander Popov).
47
+ * Load `base` translations from parent locale (by Alexander Popov).
48
+ * Downcase locales with regions for `Translated`, like `name_en_us`
49
+ instead of `name_en-US` (by Alexander Popov).
50
+ * Add Spanish Chile (`es-CL`) (by Juan Gil Miqueo).
51
+ * Add `:with_seconds` option for Time formatting (by Alexander Popov).
52
+ * Replace custom `gsub` in `R18n::Utils.escape_html` with `CGI.escapeHTML`
53
+ (by Alexander Popov).
54
+ * Improve Indonesian translation (by Mohammad Satrio).
55
+ * Improve documentation (by Alexander Popov).
56
+ * Fix issue with wildcard in `Accept-Language` header (by Alexander Popov).
57
+
58
+ ## 3.2.0 (Kawasaki)
59
+ * Support `*.yaml` files (by Alexander Popov).
60
+ * Locate processed `code` in `UnsupportedLocale`, like in `Locale` (by Alexander Popov).
61
+ * Fix `TranslatedString#to_ary`, don't return `Untranslated` (by Alexander Popov).
62
+ * Add Welsh language (`cy`) (by Mei Gwilym).
63
+ * Add support for custom classes localizing (`R18n.l`) (by Alexander Popov).
64
+ * Replace blank-padded day in date with no-padded (by Alexander Popov).
65
+ * Fix `TranslatedString#to_hash` (by Christian Höppner and Alexander Popov).
66
+
67
+ ## 3.1.2 (i)
68
+ * Call `Translation#itself` as translation key instead of `Kernel#itself` implementation (by Alexander Popov).
69
+
70
+ ## 3.1.1 (У)
71
+ * Fix errors and warnings from `gem build`
72
+
73
+ ## 3.1 (Одинцово)
74
+ * Move `named_variables` filter from `r18n-rails-api` to `r18n-core` (by Alexander Popov).
75
+ * Add possibility for `R18n::Locale` to define custom formatters (by Alexander Popov).
76
+ * Fix `R18n.set` for `r18n-desktop` (by Alexander Popov).
77
+
78
+ ## 3.0.5 (ب)
79
+ * Fix Farsi locale name (by @iriman).
80
+
81
+ ## 3.0.4 (𐤀)
82
+ * Fix `Translated` compatibility with `Hash` (by Alexander Popov).
83
+
84
+ ## 3.0.3 (〥)
85
+ * Fix missed filters in `Untranslted` initialization (by Alexander Popov).
86
+
87
+ ## 3.0.2 (Ё)
88
+ * Fix `Untranslted.to_s` (by Patrik Rak).
89
+
90
+ ## 3.0.1 (Brooklyn)
91
+ * Fix `no` locale deprecation warning.
92
+
93
+ ## 3.0 (New York)
94
+ * Deprecate `no` locale, use `nb` instead (by Alexander Popov).
95
+ * Remove unsafe `!!proc` filter.
96
+ * Reduce `eval` calls (by Alexander Popov).
97
+
98
+ ## 2.2 (La Habana)
99
+ * Change date format in `en` locale to `YYYY-MM-DD` (by Alexander Popov).
100
+ * Add `TranslatedString#as_json` for ActiveSupport compatibility (by Tim Craft).
101
+ * Fix `TranslatedString#html_safe?` behavior (by Tim Craft).
102
+ * Fix unsupported `LANG` environment (by Chris Poirier).
103
+ * Fix `Locale#localize` method for `DateTime` objects (by Alexander Popov).
104
+
105
+ ## 2.1.8 (Ѣ)
106
+ * Fix `true` and `false` keys support (by Alexander Popov).
107
+
108
+ ## 2.1.7 (Sewe)
109
+ * Add Afrikaans locale (by Llewellyn van der Merwe).
110
+
111
+ ## 2.1.6 (Berlin)
112
+ * Better `TranslatedString` → `String` converting (by Patrik Rak).
113
+ * Add Ruby on Rails 5 support.
114
+
115
+ ## 2.1.5 (මාතර)
116
+ * Fix Ruby 2.4 support (by Alexander Popov)
117
+
118
+ ## 2.1.4 (Bakı)
119
+ * Add Azerbaijani locale (by Adil Aliyev).
120
+
121
+ ## 2.1.3 (Seoul)
122
+ * Add Korean locale (by Patrick Cheng).
123
+
124
+ ## 2.1.2 (Wien)
125
+ * Fix Ruby 2.3 support.
126
+
127
+ ## 2.1.1 (Barcelona)
128
+ * Better sanity check for Accept-Language header (by Viktors Rotanovs).
129
+
130
+ ## 2.1 (Một)
131
+ * Add Vietnamese locale (by Nguyễn Văn Được).
132
+ * Add Persian locale.
133
+ * Allow to change date/time order in locales.
134
+ * Fix pluralization in locales without plural forms.
135
+ * Fix Mongolian base translations.
136
+
137
+ ## 2.0.4 (Ikkuna)
138
+ * Fix Windows support (by janahanEDH).
139
+
140
+ ## 2.0.3 (Hévíz)
141
+ * Fix Thai locale (by Kasima Tharnpipitchai).
142
+
143
+ ## 2.0.2 (Budapest)
144
+ * Fix array support in translations.
145
+ * Fix Rails support for dialect locales.
146
+
147
+ ## 2.0.1 (Amsterdam)
148
+ * Fix Dutch locale.
149
+
150
+ ## 2.0.0 (Москва)
151
+ * Remove Ruby 1.8 and 1.9 support.
152
+ * Add JRuby 9000 support.
153
+
154
+ ### 1.1.11 (São Paulo)
155
+ * Allow to set Proc as `default` option in Rails I18n back-end.
156
+
157
+ ### 1.1.10 (十)
158
+ * Fix Esperanto locale by Larry Gilbert.
159
+ * Fix Chinese locale (by 刘当一).
160
+
161
+ ### 1.1.9 (Не знайдено)
162
+ * Fix Rails 4.0.4 support. Prevent loop on `enforce_available_locales`.
163
+
164
+ ### 1.1.8 (Osam)
165
+ * Add Croatian locale (by Dino Kovač).
166
+ * Add Serbian latin locale (by Dino Kovač).
167
+
168
+ ### 1.1.7 (Tujuh)
169
+ * Return `nil` on untranslated in models with Translated.
170
+ * Add `transliterate` method to I18n back-end.
171
+ * Add Indonesian locale (by Guntur Akhmad).
172
+
173
+ ### 1.1.6 (Vitebsk)
174
+ * Return `TranslatedString` after global String filters.
175
+ * Fix path in global String filters.
176
+
177
+ ### 1.1.5 (Hilo)
178
+ * Fix Sinatra plugin under multi-threaded web-server (by Viktors Rotanovs).
179
+ * Fix `BigDecimal` localizing (by François Beausoleil).
180
+ * Add American American Spanish locale (by renemarcelo).
181
+
182
+ ### 1.1.4 (Bokmål)
183
+ * Add Norwegian `no` locale as gateway to Bokmål or Nynorsk.
184
+ * Fix Norwegian Bokmål locale code.
185
+ * Fix Hungarian time format (Kővágó Zoltán).
186
+
187
+ ### 1.1.3 (Saint Petersburg)
188
+ * Fix memory leak from cache key mismatch in Rails plugin (by silentshade).
189
+
190
+ ### 1.1.2 (Marshal)
191
+ * Fix translation and untranslated marshalizing (by silentshade).
192
+ * Allow to compare untranslated strings.
193
+ * Fix untranslated strings output in tests.
194
+
195
+ ### 1.1.1 (Dunhuang)
196
+ * Don't change YAML parser in Ruby 1.9.
197
+ * Allow to change locale by argument in R18n Rails back-end.
198
+ * Set also Rails I18n locale in Rails auto-detect filter.
199
+ * Fix caching with custom filters (by Anton Onyshchenko).
200
+ * Fix translation variables with `%1` text inside (by Taras Kunch).
201
+ * Fix Latvian locale (by Aleksandrs Ļedovskis).
202
+
203
+ ### 1.1.0 (Leipzig)
204
+ * A lot of fixes in Rails I18n compatibility (thanks for Stephan Schubert).
205
+ * Return `Untranslted`, when user try to call another translation key on
206
+ already translated string.
207
+ * Add `Translation#to_hash` to get raw translation.
208
+ * Add `Translation#inspect` to easy debug.
209
+ * Return translation, when pluralization filter did not get count.
210
+ * Set R18n back-end on Rails plugin init, to use it in console.
211
+ * Allow to use Integer in translation keys.
212
+
213
+ ### 1.0.1 (Phuket Town)
214
+ * Fix translation reloading in Rails and Sinatra.
215
+ * Use global R18n settings for Sinatra extension.
216
+ * Allow to override desktop auto-detect by LANG environment on all platforms.
217
+ * Add support for JRuby in 1.9 mode.
218
+ * Rename `R18n.reset` to `R18n.reset!` and add `R18n.clear_cache!`.
219
+ * Fix Sinatra with loaded ActiveSupport.
220
+ * Add Mongolian locale (by Elias Klughammer).
221
+
222
+ ### 1.0.0 (Bangkok)
223
+ * Add `R18n.default_places`.
224
+ * Rails `SafeBuffer` support.
225
+ * Allow in Rails app to put filters to `app/i18n` reload them in development.
226
+ * Move `R18n::I18n.available_locales` to `R18n.available_locales`.
227
+ * Rename `_keys` to `translation_keys`.
228
+ * Use Kramdown instead of Maruku for Markdown.
229
+ * Allow to use R18n for Rails without mailer.
230
+ * Allow to overwrite I18n object for models.
231
+ * Autoload R18n::Translated.
232
+ * Set default locale to R18n on Rails start to easy use in Rails console.
233
+ * Use env language in Rails console.
234
+ * Mark untranslated part as red in Rails console.
235
+ * Allow to temporary change locale by `R18n.change`.
236
+ * Add `R18n.locale` shortcut.
237
+ * Allow return from setter block locale code, instead of I18n object.
238
+ * Allow to set custom filters for I18n object.
239
+ * Add Galician locale (by Eduard Giménez).
240
+ * Add Traditional Chinese and Simplified Chinese (by Francis Chong).
241
+ * Fix Norsk locale (by Peter Haza).
242
+
243
+ ### 0.4.14 (üç)
244
+ * Fix support for Ruby 1.9.3.
245
+ * Added Turkish locale (by Ahmet Özkaya).
246
+ * Fix Swedish locale (by Pär Wieslander).
247
+
248
+ ### 0.4.13 (Sti)
249
+ * Fix `Pathname` to `String` error in `r18n-desktop`.
250
+ * Add Norwegian locale (by Oddmund Strømme).
251
+
252
+ ### 0.4.12 (Шлях)
253
+ * Fix `Pathname` to `String` conversion error.
254
+ * Fix model translation for non-ActiveRecord (by Szymon Przybył).
255
+ * Add Ukrainian locale (by Ярослав Руденок).
256
+
257
+ ### 0.4.11 (Nancy)
258
+ * Support for Sinatra 1.3.
259
+ * Fix JRuby support by Paul Walker.
260
+ * Add R18n helpers to Rails mailer by Alexey Medvedev.
261
+
262
+ ### 0.4.10 (Kvantum)
263
+ * Add R18n.set(locales, places), R18n.t and R18n.l shortcuts.
264
+ * Convert float to number on pluralization.
265
+ * Fix loading empty translation file.
266
+ * Add Portuguese locale.
267
+ * Add Dutch locale (by Sander Heilbron).
268
+ * Add Swedish locale (by Magnus Hörberg).
269
+
270
+ ### 0.4.9 (Kazan)
271
+ * Add support for Psych YAML parser (thanks for Ravil Bayramgalin).
272
+ * Fix ActiveRecord support in Translated.
273
+ * Fix Translated to return non-string values.
274
+ * Fix human time localization.
275
+ * Add Bulgarian locale (by Mitko Kostov).
276
+ * Add Australian English locale (by Dave Sag).
277
+
278
+ ### 0.4.8 (En ni to)
279
+ * Fix support for Ruby 1.9.2.
280
+ * Fix caching issue (by Viktors Rotanovs).
281
+ * Add Danish locale (by Hans Czajkowski Jørgensen)
282
+ * Fix Italian locale (by Viktors Rotanovs).
283
+ * Move untranslated filters with html highlight to `r18n-core`.
284
+
285
+ ### 0.4.7.1 (Kyū)
286
+ * Fix Japanese locale in Ruby 1.9.1.
287
+
288
+ ### 0.4.7 (Mado)
289
+ * Fix auto-detect locale in Windows and Ruby 1.9.1 (by Marvin Gülker).
290
+ * Fix auto-detect locale in JRuby (by Kővágó, Zoltán).
291
+ * Fix human time format on 60 minutes.
292
+ * Add Hungarian locale (by Kővágó, Zoltán).
293
+ * Add Japanese locale (by hryk).
294
+ * Fix Polish locale (by Piotr Szotkowski).
295
+
296
+ ### 0.4.6 (Trinity)
297
+ * Add support for new interpolation syntax in Rails 3.
298
+ * Add Catalian locale (by Jordi Romero).
299
+ * Add Finish locale (by Laura Guillén).
300
+ * Add British locale (by JP Hastings-Spital).
301
+ * Add Latvian locale (by Iļja Ketris).
302
+ * Fix Spanish (by Jordi Romero), German, French, Esperanto (by Iļja Ketris) and
303
+ Polish locales.
304
+ * Fix documentation (by Iļja Ketris and felix).
305
+ * Remove RubyGems from plugins requires.
306
+
307
+ ### 0.4.5 (Annual)
308
+ * Filters for several types.
309
+ * Global HTML escaping run before Markdown and Textile formatting.
310
+ * Fix active filters after passive filters.
311
+ * Fix human time formatting for dates with same month days.
312
+
313
+ ### 0.4.4 (Frank)
314
+ * Use before filter to lazy set I18n object in Sinatra extension.
315
+ * Set I18n object to thread (by Simon Hafner).
316
+ * Add to l Rails helper R18n syntax.
317
+ * Add common helpers.
318
+ * Clear cache in `R18n.reset`.
319
+ * Clean up code and fix bug (by Akzhan Abdulin).
320
+ * Add Thai locale (by Felix Hanley).
321
+
322
+ ### 0.4.3 (Flange)
323
+ * Add R18n style methods to Rails controllers.
324
+ * Fix for non-string translations in Rails I18n.
325
+ * Use default locale from Rails I18n config.
326
+ * Load translations recursively.
327
+ * Add Slovak locale (by Ahmed Al Hafoudh)
328
+
329
+ ### 0.4.2 (EMS)
330
+ * Fixes for Ruby 1.8.6 (by Akzhan Abdulin).
331
+ * Add method to get translation keys.
332
+
333
+ ### 0.4.1 (Lazy Boole)
334
+ * Add passive filters.
335
+ * Receive filter position as option `Hash`.
336
+ * Fix base translations (by Pavel Kunc).
337
+
338
+ ### 0.4 (D-Day)
339
+ * Rails I18n compatibility.
340
+ * Rewrite a lot of core code to fast and cleanup version.
341
+ * Custom translation loaders.
342
+ * Add reload! method to I18n.
343
+ * Add t and l helpers to Sinatra and desktop plugins.
344
+ * Syntax sugar for default values.
345
+ * Named variables.
346
+ * New locale API.
347
+ * Change API for extension translations.
348
+
349
+ ### 0.3.2 (Pidgin)
350
+ * Print path of untranslated string by filters.
351
+ * Add Italian locale (by Guido De Rosa).
352
+ * Fix Polish locale (by Adrian Pacała).
353
+ * Fix American English locale (by Max Aller).
354
+
355
+ ### 0.3.1 (Yield)
356
+ * Add Chinese locale (by Ilia Zayats).
357
+ * Add Spanish locale (by Andre O Moura).
358
+ * Add Brazilian Portuguese locale (by Andre O Moura).
359
+ * Remove RubyGems requires.
360
+
361
+ ### 0.3 (Vladivostok)
362
+ * `Translated` mixin to I18n support to model or any other class.
363
+ * New cool time formatters.
364
+ * Filters for translations.
365
+ * Add filters to escape HTML, Markdown and Textile syntax.
366
+ * Pluralization and variables is now filters and can be replaced.
367
+ * I18n#locales now contain all detected locales, used to load translations,
368
+ instead of just received from user.
369
+ * Bug-fix in locale code case.
370
+ * Add Czech locale (by Josef Pospíšil).
371
+
372
+ ### 0.2.3 (Shanghai eclipse)
373
+ * R18n will return path string if translation isn't exists.
374
+ * Add `UnsupportedLocale` class for locale without information file.
375
+ * Load absent locale information from default locale.
376
+ * Add Polish locale (by Tymon Tobolski).
377
+
378
+ ### 0.2.2 (Clone Wars)
379
+ * Localize numbers in pluralization.
380
+ * Bug-fix in translation variables.
381
+
382
+ ### 0.2.1 (Neun)
383
+ * Ruby 1.9 compatibility.
384
+ * Add German locale (by Benjamin Meichsner).
385
+
386
+ ### 0.2 (Freedom of Language)
387
+ * Locale class can be extended for special language (for example, Indian locale
388
+ may has another digits grouping).
389
+ * Load translations from several dirs.
390
+ * Add French locale.
391
+ * Add Kazakh locale.
392
+
393
+ ### 0.1.1 (Saluto)
394
+ * Loading I18n object without translations.
395
+ * Add output for standalone month name.
396
+ * Don't call procedures from translations if it isn't secure.
397
+ * Add Esperanto locale.
398
+ * English locale now contain UK date standards.
data/README.md CHANGED
@@ -1,9 +1,18 @@
1
- # R18n
1
+ # R18n Core
2
2
 
3
- R18n is an i18n tool to translate your Ruby application into several languages.
3
+ [![Cirrus CI - Base Branch Build Status](https://img.shields.io/cirrus/github/r18n/r18n-core?style=flat-square)](https://cirrus-ci.com/github/r18n/r18n-core)
4
+ [![Codecov branch](https://img.shields.io/codecov/c/github/r18n/r18n-core/master.svg?style=flat-square)](https://codecov.io/gh/r18n/r18n-core)
5
+ [![Code Climate](https://img.shields.io/codeclimate/maintainability/r18n/r18n-core.svg?style=flat-square)](https://codeclimate.com/github/r18n/r18n-core)
6
+ [![Depfu](https://img.shields.io/depfu/r18n/r18n-core?style=flat-square)](https://depfu.com/repos/github/r18n/r18n-core)
7
+ [![License](https://img.shields.io/github/license/r18n/r18n-core.svg?style=flat-square)](LICENSE)
8
+ [![Gem](https://img.shields.io/gem/v/r18n-core.svg?style=flat-square)](https://rubygems.org/gems/r18n-core)
4
9
 
5
- Use `r18n-rails` or `sinatra-r18n` to localize Web applications and
6
- `r18n-desktop` to localize desktop application.
10
+ [R18n](https://github.com/r18n/r18n) is an i18n tool to translate your Ruby application
11
+ into several languages.
12
+
13
+ You can use [wrapper plugins](https://github.com/r18n/r18n#wrapper-plugins)
14
+ like `r18n-rails` or `sinatra-r18n` to localize web applications
15
+ and `r18n-desktop` to localize desktop application.
7
16
 
8
17
  ## Features
9
18
 
@@ -18,8 +27,9 @@ See full features in [main README](https://github.com/r18n/r18n/blob/master/READ
18
27
 
19
28
  ## Usage
20
29
 
21
- To add i18n support to your app, you can use the particular plugin for your
22
- environment: `r18n-rails`, `sinatra-r18n` or `r18n-desktop`.
30
+ To add i18n support to your app, we suggest you to use
31
+ [the particular plugin](https://github.com/r18n/r18n#wrapper-plugins) for your environment,
32
+ for example `r18n-rails`, `sinatra-r18n` or `r18n-desktop`.
23
33
 
24
34
  If you develop you own plugin or want to use only core gem, you will need to
25
35
  set default translation places and current locale:
@@ -52,21 +62,21 @@ language/country code (RFC 3066). Upcased region (`en-US`) and
52
62
 
53
63
  In your translation files you can use:
54
64
 
55
- * Strings
65
+ * Strings
56
66
 
57
67
  ```yaml
58
68
  robot: This is a robot
59
69
  percent: "Percent sign (%)"
60
70
  ```
61
71
 
62
- * Numbers
72
+ * Numbers
63
73
 
64
74
  ```yaml
65
75
  number: 123
66
76
  float: 12.45
67
77
  ```
68
78
 
69
- * Pluralizable messages
79
+ * Pluralizable messages
70
80
 
71
81
  ```yaml
72
82
  robots: !!pl
@@ -75,7 +85,7 @@ In your translation files you can use:
75
85
  n: '%1 robots'
76
86
  ```
77
87
 
78
- * Filters
88
+ * Filters
79
89
 
80
90
  ```yaml
81
91
  filtered: !!custom_type
@@ -374,20 +384,20 @@ locale = R18n.locale('en')
374
384
 
375
385
  You can then get the following from the locale:
376
386
 
377
- * Locale title and RFC 3066 code:
387
+ * Locale title and RFC 3066 code:
378
388
 
379
389
  ```ruby
380
390
  locale.title #=> "English"
381
391
  locale.code #=> "en"
382
392
  ```
383
393
 
384
- * Language direction (left to right, or right to left for Arabic and Hebrew):
394
+ * Language direction (left to right, or right to left for Arabic and Hebrew):
385
395
 
386
396
  ```ruby
387
397
  locale.ltr? #=> true
388
398
  ```
389
399
 
390
- * Week start day (`:monday` or `:sunday`):
400
+ * Week start day (`:monday` or `:sunday`):
391
401
 
392
402
  ```ruby
393
403
  locale.week_start #=> :sunday