i18n-js 3.9.0 → 4.0.0.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +4 -0
  3. data/.github/FUNDING.yml +1 -1
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +41 -0
  5. data/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
  6. data/.github/PULL_REQUEST_TEMPLATE.md +38 -0
  7. data/.github/dependabot.yml +15 -0
  8. data/.github/workflows/ruby-tests.yml +61 -0
  9. data/.gitignore +11 -7
  10. data/.rubocop.yml +12 -0
  11. data/CHANGELOG.md +12 -553
  12. data/CODE_OF_CONDUCT.md +74 -0
  13. data/CONTRIBUTING.md +79 -0
  14. data/Gemfile +3 -0
  15. data/LICENSE.md +20 -0
  16. data/README.md +86 -1041
  17. data/Rakefile +10 -20
  18. data/exe/i18n +5 -0
  19. data/i18n-js.gemspec +47 -29
  20. data/lib/guard/i18n-js/templates/Guardfile +10 -0
  21. data/lib/guard/i18n-js/version.rb +13 -0
  22. data/lib/guard/i18n-js.rb +78 -0
  23. data/lib/i18n-js/cli/command.rb +43 -0
  24. data/lib/i18n-js/cli/export_command.rb +108 -0
  25. data/lib/i18n-js/cli/init_command.rb +50 -0
  26. data/lib/i18n-js/cli/ui.rb +30 -0
  27. data/lib/i18n-js/cli/version_command.rb +18 -0
  28. data/lib/i18n-js/cli.rb +47 -0
  29. data/lib/i18n-js/listen.rb +80 -0
  30. data/lib/i18n-js/schema.rb +92 -0
  31. data/lib/i18n-js/version.rb +5 -0
  32. data/lib/i18n-js.rb +66 -1
  33. metadata +122 -196
  34. data/.editorconfig +0 -24
  35. data/.github/workflows/tests.yaml +0 -100
  36. data/.npmignore +0 -27
  37. data/Appraisals +0 -44
  38. data/app/assets/javascripts/i18n/filtered.js.erb +0 -23
  39. data/app/assets/javascripts/i18n/shims.js +0 -240
  40. data/app/assets/javascripts/i18n/translations.js +0 -3
  41. data/app/assets/javascripts/i18n.js +0 -1095
  42. data/gemfiles/i18n_0_6.gemfile +0 -7
  43. data/gemfiles/i18n_0_7.gemfile +0 -7
  44. data/gemfiles/i18n_0_8.gemfile +0 -7
  45. data/gemfiles/i18n_0_9.gemfile +0 -7
  46. data/gemfiles/i18n_1_0.gemfile +0 -7
  47. data/gemfiles/i18n_1_1.gemfile +0 -7
  48. data/gemfiles/i18n_1_2.gemfile +0 -7
  49. data/gemfiles/i18n_1_3.gemfile +0 -7
  50. data/gemfiles/i18n_1_4.gemfile +0 -7
  51. data/gemfiles/i18n_1_5.gemfile +0 -7
  52. data/gemfiles/i18n_1_6.gemfile +0 -7
  53. data/gemfiles/i18n_1_7.gemfile +0 -7
  54. data/gemfiles/i18n_1_8.gemfile +0 -7
  55. data/i18njs.png +0 -0
  56. data/lib/i18n/js/dependencies.rb +0 -63
  57. data/lib/i18n/js/engine.rb +0 -87
  58. data/lib/i18n/js/fallback_locales.rb +0 -70
  59. data/lib/i18n/js/formatters/base.rb +0 -25
  60. data/lib/i18n/js/formatters/js.rb +0 -39
  61. data/lib/i18n/js/formatters/json.rb +0 -13
  62. data/lib/i18n/js/middleware.rb +0 -82
  63. data/lib/i18n/js/private/config_store.rb +0 -31
  64. data/lib/i18n/js/private/hash_with_symbol_keys.rb +0 -36
  65. data/lib/i18n/js/segment.rb +0 -81
  66. data/lib/i18n/js/utils.rb +0 -91
  67. data/lib/i18n/js/version.rb +0 -7
  68. data/lib/i18n/js.rb +0 -274
  69. data/lib/rails/generators/i18n/js/config/config_generator.rb +0 -19
  70. data/lib/rails/generators/i18n/js/config/templates/i18n-js.yml +0 -27
  71. data/lib/tasks/export.rake +0 -8
  72. data/package.json +0 -25
  73. data/spec/fixtures/custom_path.yml +0 -5
  74. data/spec/fixtures/default.yml +0 -5
  75. data/spec/fixtures/erb.yml +0 -5
  76. data/spec/fixtures/except_condition.yml +0 -7
  77. data/spec/fixtures/js_available_locales_custom.yml +0 -1
  78. data/spec/fixtures/js_export_dir_custom.yml +0 -7
  79. data/spec/fixtures/js_export_dir_none.yml +0 -6
  80. data/spec/fixtures/js_extend_parent.yml +0 -6
  81. data/spec/fixtures/js_extend_segment.yml +0 -6
  82. data/spec/fixtures/js_file_per_locale.yml +0 -7
  83. data/spec/fixtures/js_file_per_locale_with_fallbacks_as_default_locale_symbol.yml +0 -4
  84. data/spec/fixtures/js_file_per_locale_with_fallbacks_as_hash.yml +0 -6
  85. data/spec/fixtures/js_file_per_locale_with_fallbacks_as_locale.yml +0 -4
  86. data/spec/fixtures/js_file_per_locale_with_fallbacks_as_locale_without_fallback_translations.yml +0 -4
  87. data/spec/fixtures/js_file_per_locale_with_fallbacks_enabled.yml +0 -4
  88. data/spec/fixtures/js_file_per_locale_without_fallbacks.yml +0 -4
  89. data/spec/fixtures/js_file_with_namespace_prefix_and_pretty_print.yml +0 -9
  90. data/spec/fixtures/js_sort_translation_keys_false.yml +0 -6
  91. data/spec/fixtures/js_sort_translation_keys_true.yml +0 -6
  92. data/spec/fixtures/json_only.yml +0 -18
  93. data/spec/fixtures/locales.yml +0 -133
  94. data/spec/fixtures/merge_plurals.yml +0 -6
  95. data/spec/fixtures/merge_plurals_with_no_overrides.yml +0 -4
  96. data/spec/fixtures/merge_plurals_with_partial_overrides.yml +0 -4
  97. data/spec/fixtures/millions.yml +0 -4
  98. data/spec/fixtures/multiple_conditions.yml +0 -7
  99. data/spec/fixtures/multiple_conditions_per_locale.yml +0 -7
  100. data/spec/fixtures/multiple_files.yml +0 -7
  101. data/spec/fixtures/no_config.yml +0 -2
  102. data/spec/fixtures/no_scope.yml +0 -4
  103. data/spec/fixtures/simple_scope.yml +0 -5
  104. data/spec/js/currency.spec.js +0 -62
  105. data/spec/js/current_locale.spec.js +0 -19
  106. data/spec/js/dates.spec.js +0 -276
  107. data/spec/js/defaults.spec.js +0 -31
  108. data/spec/js/extend.spec.js +0 -110
  109. data/spec/js/interpolation.spec.js +0 -124
  110. data/spec/js/jasmine/MIT.LICENSE +0 -20
  111. data/spec/js/jasmine/jasmine-html.js +0 -190
  112. data/spec/js/jasmine/jasmine.css +0 -166
  113. data/spec/js/jasmine/jasmine.js +0 -2476
  114. data/spec/js/jasmine/jasmine_favicon.png +0 -0
  115. data/spec/js/json_parsable.spec.js +0 -14
  116. data/spec/js/locales.spec.js +0 -31
  117. data/spec/js/localization.spec.js +0 -78
  118. data/spec/js/numbers.spec.js +0 -174
  119. data/spec/js/placeholder.spec.js +0 -24
  120. data/spec/js/pluralization.spec.js +0 -219
  121. data/spec/js/prepare_options.spec.js +0 -41
  122. data/spec/js/require.js +0 -2083
  123. data/spec/js/specs.html +0 -49
  124. data/spec/js/specs_requirejs.html +0 -72
  125. data/spec/js/translate.spec.js +0 -304
  126. data/spec/js/translations.js +0 -188
  127. data/spec/js/utility_functions.spec.js +0 -20
  128. data/spec/ruby/i18n/js/fallback_locales_spec.rb +0 -84
  129. data/spec/ruby/i18n/js/segment_spec.rb +0 -286
  130. data/spec/ruby/i18n/js/utils_spec.rb +0 -138
  131. data/spec/ruby/i18n/js_spec.rb +0 -797
  132. data/spec/spec_helper.rb +0 -80
  133. data/yarn.lock +0 -138
data/CHANGELOG.md CHANGED
@@ -1,557 +1,16 @@
1
- # Change Log
2
- All notable changes to this project will be documented in this file.
3
- This project adheres to [Semantic Versioning](http://semver.org/).
1
+ # Changelog
4
2
 
3
+ <!--
4
+ Prefix your message with one of the following:
5
5
 
6
- ## [Unreleased]
6
+ - [Added] for new features.
7
+ - [Changed] for changes in existing functionality.
8
+ - [Deprecated] for soon-to-be removed features.
9
+ - [Removed] for now removed features.
10
+ - [Fixed] for any bug fixes.
11
+ - [Security] in case of vulnerabilities.
12
+ -->
7
13
 
8
- ### Added
14
+ ## Unreleased
9
15
 
10
- - Nothing
11
-
12
- ### Changed
13
-
14
- - Nothing
15
-
16
- ### Fixed
17
-
18
- - Nothing
19
-
20
-
21
- ## [3.9.0]
22
-
23
- ### Added
24
-
25
- - [Ruby] Allow to set custom locales instead of using only `I18n.available_locales`.
26
- (PR: https://github.com/fnando/i18n-js/pull/617)
27
-
28
-
29
- ## [3.8.4]
30
-
31
- ### Fixed
32
-
33
- - [Ruby] Fix proc exported to JS/JSON file(s) causing issues like git merge conflicts
34
- (PR: https://github.com/fnando/i18n-js/pull/591)
35
-
36
-
37
- ## [3.8.3]
38
-
39
- ### Changed
40
-
41
- - [Ruby] Generate translations in JS as `JSON.parse` instead of object literal for performance
42
- (PR: https://github.com/fnando/i18n-js/pull/605)
43
- (PR: https://github.com/fnando/i18n-js/pull/606)
44
- (PR: https://github.com/fnando/i18n-js/pull/607)
45
-
46
-
47
- ## [3.8.2] - 2021-03-18
48
-
49
- ### Fixed
50
-
51
- - [Ruby] Stop using deprecated method
52
- (PR: https://github.com/fnando/i18n-js/pull/598)
53
- - [Ruby] Fix typo in error class reference
54
- (Commit: https://github.com/fnando/i18n-js/commit/cc075ad0a36e940205d0a14390379d69013d188e)
55
-
56
-
57
- ## [3.8.1] - 2021-02-25
58
-
59
- ### Fixed
60
-
61
- - [Ruby] Fix performance issue reading config
62
- (PR: https://github.com/fnando/i18n-js/pull/593)
63
-
64
-
65
- ## [3.8.0] - 2020-10-15
66
-
67
- ### Added
68
-
69
- - [JS] Add option `scope` for `toHumanSize()`
70
- (PR: https://github.com/fnando/i18n-js/pull/583)
71
-
72
-
73
- ## [3.7.1] - 2020-06-30
74
-
75
- ### Fixed
76
-
77
- - [JS] For translation missing behaviour `guess`, replace all underscores to spaces properly
78
- (PR: https://github.com/fnando/i18n-js/pull/574)
79
-
80
-
81
- ## [3.7.0] - 2020-05-29
82
-
83
- ### Added
84
-
85
- - [JS] Allow options to be passed in when calling `I18n.localize`/`I18n.l`
86
- (PR: https://github.com/fnando/i18n-js/pull/570)
87
-
88
-
89
- ## [3.6.0] - 2020-02-14
90
-
91
- ### Added
92
-
93
- - [Ruby] Allow `suffix` to be added to generated translations files
94
- (PR: https://github.com/fnando/i18n-js/pull/561)
95
-
96
-
97
- ## [3.5.1] - 2019-12-21
98
-
99
- ### Changed
100
-
101
- - [JS] Bound shortcut functions
102
- (PR: https://github.com/fnando/i18n-js/pull/560)
103
-
104
-
105
- ## [3.5.0] - 2019-11-12
106
-
107
- ### Added
108
-
109
- - [JS] Support for `%k` strftime format to match Ruby strftime
110
- (PR: https://github.com/fnando/i18n-js/pull/554)
111
-
112
-
113
- ## [3.4.2] - 2019-11-11
114
-
115
- ### Fixed
116
-
117
- - [Ruby] Fix regression introduced in PR #551
118
- (PR: https://github.com/fnando/i18n-js/pull/555)
119
-
120
-
121
- ## [3.4.1] - 2019-11-01
122
-
123
- ### Fixed
124
-
125
- - [Ruby] Fix merging of plural keys to work with fallbacks that aren't overridden
126
- (PR: https://github.com/fnando/i18n-js/pull/551)
127
-
128
-
129
- ## [3.4.0] - 2019-10-15
130
-
131
- ### Added
132
-
133
- - [Ruby] Allow `prefix` to be added to generated translations files
134
- (PR: https://github.com/fnando/i18n-js/pull/549)
135
-
136
-
137
- ## [3.3.0] - 2019-06-06
138
-
139
- ### Added
140
-
141
- - [JS] Support for `%P`, `%Z`, and `%l` strftime formats to match Ruby strftime
142
- (PR: https://github.com/fnando/i18n-js/pull/537)
143
-
144
-
145
- ## [3.2.3] - 2019-05-24
146
-
147
- ### Changed
148
-
149
- - [Ruby] Allow rails 6 to be used with this gem
150
- (PR: https://github.com/fnando/i18n-js/pull/536)
151
-
152
-
153
- ## [3.2.2] - 2019-05-09
154
-
155
- ### Fixed
156
-
157
- - [JS] Return invalid date/time input values (null & undefined) as-is
158
- (Commit: https://github.com/fnando/i18n-js/commit/869d1689ed788ff50121de492db354652971c23d)
159
-
160
-
161
- ## [3.2.1] - 2019-01-22
162
-
163
- ### Changed
164
-
165
- - [Ruby] `json_only` option should allow multiple locales.
166
- (PR: https://github.com/fnando/i18n-js/pull/531)
167
- - [Ruby] Simplified and cleaned code related to JS/JSON formatting.
168
- (PR: https://github.com/fnando/i18n-js/pull/531)
169
- - [JS] Use strict value comparison
170
-
171
- ### Fixed
172
-
173
- - [Ruby] Relax `i18n` version requirement back to `>= 0.6.6`
174
- (PR: https://github.com/fnando/i18n-js/pull/530)
175
- - [Ruby] Fix merging of plural keys across locales.
176
- (PR: https://github.com/fnando/i18n-js/pull/472)
177
-
178
-
179
- ## [3.2.0] - 2018-11-16
180
-
181
- ### Added
182
-
183
- - [Ruby] Add option `json_only` to generate translations in JSON
184
- (PR: https://github.com/fnando/i18n-js/pull/524)
185
-
186
- ### Changed
187
-
188
- - [Ruby] Requires `i18n` to be `>= 0.8.0` for CVE-2014-10077
189
-
190
-
191
- ## [3.1.0] - 2018-11-01
192
-
193
- ### Added
194
-
195
- - [Ruby] Add option to allow setting a different I18n backend
196
- (PR: https://github.com/fnando/i18n-js/pull/519)
197
-
198
- ### Fixed
199
-
200
- - [JS] Fix missing translation when pluralizing with default scopes
201
- (PR: https://github.com/fnando/i18n-js/pull/516)
202
-
203
-
204
- ## [3.0.11] - 2018-07-06
205
-
206
- ### Fixed
207
-
208
- - [JS] Fix interpolation for array with non string/null elements
209
- (PR: https://github.com/fnando/i18n-js/pull/505)
210
-
211
-
212
- ## [3.0.10] - 2018-06-21
213
-
214
- ### Fixed
215
-
216
- - [JS] Fix extend method changing keys with `null` to empty objects
217
- (PR: https://github.com/fnando/i18n-js/pull/503)
218
- - [JS] Fix variable name in an internal method
219
- (PR: https://github.com/fnando/i18n-js/pull/501)
220
-
221
-
222
- ## [3.0.9] - 2018-06-21
223
-
224
- ### Fixed
225
-
226
- - [JS] Fix translation array interpolation for array with null
227
-
228
-
229
- ## [3.0.8] - 2018-06-06
230
-
231
- ### Changed
232
-
233
- - [JS] Interpolate translation array too
234
- (PR: https://github.com/fnando/i18n-js/pull/498)
235
-
236
-
237
- ## [3.0.7] - 2018-05-30
238
-
239
- ### Fixed
240
-
241
- - [Ruby] Fix new bug occuring when config file is absent
242
-
243
-
244
- ## [3.0.6] - 2018-05-30
245
-
246
- ### Fixed
247
-
248
- - [Ruby] Make JS `i18n/filtered` depends on i18n-js config too
249
- (PR: https://github.com/fnando/i18n-js/pull/497)
250
-
251
-
252
- ## [3.0.5] - 2018-02-26
253
-
254
- ### Changed
255
-
256
- - [Ruby] Support `I18n` `1.0.x`
257
- (PR: https://github.com/fnando/i18n-js/pull/492)
258
-
259
-
260
- ## [3.0.4] - 2018-01-26
261
-
262
- ### Fixed
263
-
264
- - [Ruby] Fix `JS::Dependencies.using_asset_pipeline?` returning true when sprockets installed but disabled
265
- (PR: https://github.com/fnando/i18n-js/pull/488)
266
-
267
-
268
- ## [3.0.3] - 2018-01-02
269
-
270
- ### Fixed
271
-
272
- - [Ruby] Fix extend method when translations has array values
273
- (PR: https://github.com/fnando/i18n-js/pull/487)
274
-
275
-
276
- ## [3.0.2] - 2017-10-26
277
-
278
- ### Changed
279
-
280
- - [Ruby] Avoid writing new file if a file with same content already exists
281
- (PR: https://github.com/fnando/i18n-js/pull/473)
282
- - [JS] Fix fallback when "3-part" locale like `zh-Hant-TW` is used
283
- It was falling back to `zh` first instead of `zh-Hant` (see new test case added)
284
- (PR: https://github.com/fnando/i18n-js/pull/475)
285
-
286
-
287
- ## [3.0.1] - 2017-08-02
288
-
289
- ### Changed
290
-
291
- - [Ruby] Relax Rails detection code to work with alternative installation methods
292
- (PR: https://github.com/fnando/i18n-js/pull/467)
293
- - [JS] Fix fallback when "3-part" locale like `zh-Hant-TW` is used
294
- It fallbacks to `zh` only before, now it fallbacks to `zh-Hant`
295
- (PR: https://github.com/fnando/i18n-js/pull/465)
296
-
297
-
298
- ## [3.0.0] - 2017-04-01
299
-
300
- This is a fake official release, the *real* one will be `3.0.0.rc17`
301
- And today is not April Fools' Day
302
-
303
- ### Fixed
304
-
305
- - Ends the longest Release Candidate period among all ruby gems
306
- (v3.0.0.rc1 released at 2012-05-10)
307
-
308
-
309
- ## [3.0.0.rc16] - 2017-03-13
310
-
311
- ### Changed
312
-
313
- - [Ruby] Drop support for Ruby < `2.1.0`
314
-
315
- ### Fixed
316
-
317
- - [JS] Make defaultValue works on plural translation
318
- - [JS] Fix UMD pattern so the global/root won’t be undefined
319
-
320
-
321
- ## [3.0.0.rc15] - 2016-12-07
322
-
323
- ### Added
324
-
325
- - Nothing
326
-
327
- ### Changed
328
-
329
- - [JS] Allow `defaultValue` to work in pluralization
330
- (PR: https://github.com/fnando/i18n-js/pull/433)
331
- - [Ruby] Stop validating the fallback locales against `I18n.available_locales`
332
- This allows some locales to be used as fallback locales, but not to be generated in JS.
333
- (PR: https://github.com/fnando/i18n-js/pull/425)
334
- - [Ruby] Remove dependency on gem `activesupport`
335
-
336
- ### Fixed
337
-
338
- - [JS] Stop converting numeric & boolean values into objects
339
- when merging objects with `I18n.extend`
340
- (PR: https://github.com/fnando/i18n-js/pull/420)
341
- - [JS] Fix I18n pluralization fallback when tree is empty
342
- (PR: https://github.com/fnando/i18n-js/pull/435)
343
- - [Ruby] Use old syntax to define lambda for compatibility with older Rubies
344
- (Issue: https://github.com/fnando/i18n-js/issues/419)
345
- - [Ruby] Fix error raised in middleware cache cleaning in parallel test
346
- (Issue: https://github.com/fnando/i18n-js/issues/436)
347
-
348
-
349
- ## [3.0.0.rc14] - 2016-08-29
350
-
351
- ### Changed
352
-
353
- - [JS] Method `I18n.extend()` behave as deep merging instead of shallow merging. (https://github.com/fnando/i18n-js/pull/416)
354
- - [Ruby] Use object/class instead of block when registering Sprockets preprocessor (https://github.com/fnando/i18n-js/pull/418)
355
- To ensure that your cache will expire properly based on locale file content after upgrading,
356
- you should run `rake assets:clobber` and/or other rake tasks that clear the asset cache once gem updated
357
- - [Ruby] Detect & support rails 5 (https://github.com/fnando/i18n-js/pull/413)
358
-
359
-
360
- ## [3.0.0.rc13] - 2016-06-29
361
-
362
- ### Added
363
-
364
- - [Ruby] Added option `js_extend` to not generate JS code for translations with usage of `I18n.extend` ([#397](https://github.com/fnando/i18n-js/pull/397))
365
-
366
- ### Changed
367
-
368
- - Nothing
369
-
370
- ### Fixed
371
-
372
- - [JS] Initialize option `missingBehaviour` & `missingTranslationPrefix` with default values ([#398](https://github.com/fnando/i18n-js/pull/398))
373
- - [JS] Throw an error when `I18n.strftime()` takes an invalid date ([#383](https://github.com/fnando/i18n-js/pull/383))
374
- - [JS] Fix default error message when translation missing to consider locale passed in options
375
- - [Ruby] Reset middleware cache on rails startup
376
- ([#402](https://github.com/fnando/i18n-js/pull/402))
377
-
378
-
379
- ## [3.0.0.rc12] - 2015-12-30
380
-
381
- ### Added
382
-
383
- - [JS] Allow extending of translation files ([#354](https://github.com/fnando/i18n-js/pull/354))
384
- - [JS] Allow missingPlaceholder to receive extra data for debugging ([#380](https://github.com/fnando/i18n-js/pull/380))
385
-
386
- ### Changed
387
-
388
- - Nothing
389
-
390
- ### Fixed
391
-
392
- - [Ruby] Fix of missing initializer at sprockets. ([#371](https://github.com/fnando/i18n-js/pull/371))
393
- - [Ruby] Use proper method to register preprocessor documented by sprockets-rails. ([#376](https://github.com/fnando/i18n-js/pull/376))
394
- - [JS] Correctly round unprecise floating point numbers.
395
- - [JS] Ensure objects are recognized when passed in from an iframe. ([#375](https://github.com/fnando/i18n-js/pull/375))
396
-
397
-
398
- ## 3.0.0.rc11
399
-
400
- ### breaking changes
401
-
402
- ### enhancements
403
-
404
- ### bug fixes
405
-
406
- - [Ruby] Handle fallback locale without any translation properly ([#338](https://github.com/fnando/i18n-js/pull/338))
407
- - [Ruby] Prevent translation entry with null value to override value in fallback locale(s), if enabled ([#334](https://github.com/fnando/i18n-js/pull/334))
408
-
409
-
410
- ## 3.0.0.rc10
411
-
412
- ### breaking changes
413
-
414
- - [Ruby] In `config/i18n-js.yml`, if you are using `%{locale}` in your filename and are referencing specific translations keys, please add `*.` to the beginning of those keys. ([#320](https://github.com/fnando/i18n-js/pull/320))
415
- - [Ruby] The `:except` option to exclude certain phrases now (only) accepts the same patterns the `:only` option accepts
416
-
417
- ### enhancements
418
-
419
- - [Ruby] Make handling of per-locale and not-per-locale exporting to be more consistent ([#320](https://github.com/fnando/i18n-js/pull/320))
420
- - [Ruby] Add option `sort_translation_keys` to sort translation keys alphabetically ([#318](https://github.com/fnando/i18n-js/pull/318))
421
-
422
- ### bug fixes
423
-
424
- - [Ruby] Fix fallback logic to work with not-per-locale files ([#320](https://github.com/fnando/i18n-js/pull/320))
425
-
426
-
427
- ## 3.0.0.rc9
428
-
429
- ### enhancements
430
-
431
- - [JS] Force currency number sign to be at first place using `sign_first` option, default to `true`
432
- - [Ruby] Add option `namespace` & `pretty_print` ([#300](https://github.com/fnando/i18n-js/pull/300))
433
- - [Ruby] Add option `export_i18n_js` ([#301](https://github.com/fnando/i18n-js/pull/301))
434
- - [Ruby] Now the gem also detects pre-release versions of `rails`
435
- - [Ruby] Add `:except` option to exclude certain phrases or groups of phrases from the
436
- outputted translations ([#312](https://github.com/fnando/i18n-js/pull/312))
437
- - [JS] You can now set `I18n.missingBehavior='guess'` to have the scope string output as text instead of of the
438
- "[missing `scope`]" message when no translation is available.
439
- Combined that with `I18n.missingTranslationPrefix='SOMETHING'` and you can
440
- still identify those missing strings.
441
- ([#304](https://github.com/fnando/i18n-js/pull/304))
442
-
443
- ### bug fixes
444
-
445
- - [JS] Fix missing translation message when scope is passed in options
446
- - [Ruby] Fix save cache directory verification when path is a symbolic link ([#329](https://github.com/fnando/i18n-js/pull/329))
447
-
448
-
449
- ## 3.0.0.rc8
450
-
451
- ### enhancements
452
-
453
- - Add support for loading via AMD and CommonJS module loaders ([#266](https://github.com/fnando/i18n-js/pull/266))
454
- - Add `I18n.nullPlaceholder`
455
- Defaults to I18n.missingPlaceholder (`[missing {{name}} value]`)
456
- Set to `function() {return "";}` to match Ruby `I18n.t("name: %{name}", name: nil)`
457
- - For date formatting, you can now also add placeholders to the date format, see README for detail
458
- - Add fallbacks option to `i18n-js.yml`, defaults to `true`
459
-
460
- ### bug fixes
461
-
462
- - Fix factory initialization so that the Node/CommonJS branch only gets executed if the environment is Node/CommonJS
463
- (it currently will execute if module is defined in the global scope, which occurs with QUnit, for example)
464
- - Fix pluralization rules selection for negative `count` (e.g. `-1` was lead to use `one` for pluralization) ([#268](https://github.com/fnando/i18n-js/pull/268))
465
- - Remove check for `Rails.configuration.assets.compile` before telling Sprockets the dependency of translations JS file
466
- This might be the reason of many "cache not expired" issues
467
- Discovered/reported in #277
468
-
469
- ## 3.0.0.rc7
470
-
471
- ### enhancements
472
-
473
- - The Rails Engine initializer is now named as `i18n-js.register_preprocessor` (https://github.com/fnando/i18n-js/pull/261)
474
- - Rename `I18n::JS.config_file` to `I18n::JS.config_file_path` and make it configurable
475
- Expected a `String`, default is still `config/i18n-js.yml`
476
- - When running `rake i18n:js:export`, the `i18n.js` will also be exported to `I18n::JS.export_i18n_js_dir_path` by default
477
- - Add `I18n::JS.export_i18n_js_dir_path`
478
- Expected a `String`, default is `public/javascripts`
479
- Set to `nil` will disable exporting `i18n.js`
480
-
481
- ### bug fixes
482
-
483
- - Prevent toString() call on `undefined` when there is a missing interpolation value
484
- - Added support for Rails instances without Sprockets object (https://github.com/fnando/i18n-js/pull/241)
485
- - Fix `DEFAULT_OPTIONS` in `i18n.js` which contained an excessive comma
486
- - Fix `nil` values are exported into JS files which causes strange translation error
487
- - Fix pattern to replace all escaped $ in I18n.translate
488
- - Fix JS `I18n.lookup` modifies existing locales accidentally
489
-
490
- ## 3.0.0.rc6
491
-
492
- ### enhancements
493
-
494
- - You can now assign `I18n.locale` & `I18n.default_locale` before loading `i18n.js` in `application.html.*`
495
- (merged to `i18n-js-pika` already)
496
- - You can include ERB in `config/i18n-js.yml`(https://github.com/fnando/i18n-js/pull/224)
497
- - Add support for +00:00 style time zone designator (https://github.com/fnando/i18n-js/pull/167)
498
- - Add back rake task for export (`rake i18n:js:export`)
499
- - Not overriding translation when manually run `I18n::JS.export` (https://github.com/fnando/i18n-js/pull/171)
500
- - Move missing placeholder text generation into its own function (for easier debugging) (https://github.com/fnando/i18n-js/pull/169)
501
- - Add support for milliseconds (`lll` in `yyyy-mm-ddThh:mm:ss.lllZ`) (https://github.com/fnando/i18n-js/pull/192)
502
- - Add back i18n-js.yml config file generator : `rails generate i18n:js:config` (https://github.com/fnando/i18n-js/pull/225)
503
-
504
- ### bug fixes
505
-
506
- - `I18n::JS.export` no longer exports locales other than those in `I18n.available_locales`, if `I18n.available_locales` is set
507
- - I18.t supports the base scope through the options argument
508
- - I18.t accepts an array as the scope
509
- - Fix regression: asset not being reloaded in development when translation changed
510
- - Requires `i18n` to be `~> 0.6`, `0.5` does not work at all
511
- - Fix using multi-star scope with top-level translation key (https://github.com/fnando/i18n-js/pull/221)
512
-
513
-
514
- ## Before 3.0.0.rc5
515
-
516
- - Things happened.
517
-
518
-
519
-
520
- [Unreleased]: https://github.com/fnando/i18n-js/compare/v3.9.0...HEAD
521
- [3.9.0]: https://github.com/fnando/i18n-js/compare/v3.8.4...v3.9.0
522
- [3.8.4]: https://github.com/fnando/i18n-js/compare/v3.8.3...v3.8.4
523
- [3.8.3]: https://github.com/fnando/i18n-js/compare/v3.8.2...v3.8.3
524
- [3.8.2]: https://github.com/fnando/i18n-js/compare/v3.8.1...v3.8.2
525
- [3.8.1]: https://github.com/fnando/i18n-js/compare/v3.8.0...v3.8.1
526
- [3.8.0]: https://github.com/fnando/i18n-js/compare/v3.7.1...v3.8.0
527
- [3.7.1]: https://github.com/fnando/i18n-js/compare/v3.7.0...v3.7.1
528
- [3.7.0]: https://github.com/fnando/i18n-js/compare/v3.6.0...v3.7.0
529
- [3.6.0]: https://github.com/fnando/i18n-js/compare/v3.5.1...v3.6.0
530
- [3.5.1]: https://github.com/fnando/i18n-js/compare/v3.5.0...v3.5.1
531
- [3.5.0]: https://github.com/fnando/i18n-js/compare/v3.4.2...v3.5.0
532
- [3.4.2]: https://github.com/fnando/i18n-js/compare/v3.4.1...v3.4.2
533
- [3.4.1]: https://github.com/fnando/i18n-js/compare/v3.4.0...v3.4.1
534
- [3.4.0]: https://github.com/fnando/i18n-js/compare/v3.3.0...v3.4.0
535
- [3.3.0]: https://github.com/fnando/i18n-js/compare/v3.2.3...v3.3.0
536
- [3.2.3]: https://github.com/fnando/i18n-js/compare/v3.2.2...v3.2.3
537
- [3.2.2]: https://github.com/fnando/i18n-js/compare/v3.2.1...v3.2.2
538
- [3.2.1]: https://github.com/fnando/i18n-js/compare/v3.2.0...v3.2.1
539
- [3.2.0]: https://github.com/fnando/i18n-js/compare/v3.1.0...v3.2.0
540
- [3.1.0]: https://github.com/fnando/i18n-js/compare/v3.0.11...v3.1.0
541
- [3.0.11]: https://github.com/fnando/i18n-js/compare/v3.0.10...v3.0.11
542
- [3.0.10]: https://github.com/fnando/i18n-js/compare/v3.0.9...v3.0.10
543
- [3.0.9]: https://github.com/fnando/i18n-js/compare/v3.0.8...v3.0.9
544
- [3.0.8]: https://github.com/fnando/i18n-js/compare/v3.0.7...v3.0.8
545
- [3.0.7]: https://github.com/fnando/i18n-js/compare/v3.0.6...v3.0.7
546
- [3.0.6]: https://github.com/fnando/i18n-js/compare/v3.0.5...v3.0.6
547
- [3.0.5]: https://github.com/fnando/i18n-js/compare/v3.0.4...v3.0.5
548
- [3.0.4]: https://github.com/fnando/i18n-js/compare/v3.0.3...v3.0.4
549
- [3.0.3]: https://github.com/fnando/i18n-js/compare/v3.0.2...v3.0.3
550
- [3.0.2]: https://github.com/fnando/i18n-js/compare/v3.0.1...v3.0.2
551
- [3.0.1]: https://github.com/fnando/i18n-js/compare/v3.0.0...v3.0.1
552
- [3.0.0]: https://github.com/fnando/i18n-js/compare/v3.0.0.rc16...v3.0.0
553
- [3.0.0.rc16]: https://github.com/fnando/i18n-js/compare/v3.0.0.rc15...v3.0.0.rc16
554
- [3.0.0.rc15]: https://github.com/fnando/i18n-js/compare/v3.0.0.rc14...v3.0.0.rc15
555
- [3.0.0.rc14]: https://github.com/fnando/i18n-js/compare/v3.0.0.rc13...v3.0.0.rc14
556
- [3.0.0.rc13]: https://github.com/fnando/i18n-js/compare/v3.0.0.rc12...v3.0.0.rc13
557
- [3.0.0.rc12]: https://github.com/fnando/i18n-js/compare/v3.0.0.rc11...v3.0.0.rc12
16
+ - Initial release.
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at me@fnando.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [https://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://contributor-covenant.org/version/1/4/