i18n-js 3.9.1 → 3.9.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af88256d90ed5aa70fdaf88ce224e2b3bdb378b65d3e4a826dd9073484d6d691
4
- data.tar.gz: 3a6409f3e78871438978ebaeb10853e6c49b38eddb3be679a4bf5f550ebc1b17
3
+ metadata.gz: 7d3a003954d81c9cbb7c2f18791ed8baf068f3fbbe6587ce59cd893b7852d1f2
4
+ data.tar.gz: d9fcb2bf3de34987021c2ac556ae65bcecbdfe6cbb638455d6e7919e03268d8c
5
5
  SHA512:
6
- metadata.gz: 93da6d4965b27b83a8064a0665b3689e8a55bf750881b4cfd00d220e3e73379c56840ff452a3fe586c66c69ff7b1f5132193160913ced2d956e2145ff4567894
7
- data.tar.gz: 9ce7b91903ac75ee8e7c320058d45893330033eb5628b2ef1a3d8e29466053d21b931a6f1c87c15f7bb1f83bbce0c5c33a8b785c8be79c5acbdbb48eafb459ba
6
+ metadata.gz: 07b6670d05343e82e44041379917a56ee72b185b1bfdcceefe6ae8eae9a1eece1852db7a378eaf8a38f5769ec76587737b200bfb22e50444a02e14bbb4b78793
7
+ data.tar.gz: afe058283a6af31ab843ba2c0da1f1949d37623a3e0823c786cb947b252eac51ffc25c4f856c01e9e1ec87546dd31dddf4705e1f6b5597a3edd02e950e674ed2
@@ -45,6 +45,7 @@ jobs:
45
45
  - gemfiles/i18n_1_7.gemfile
46
46
  - gemfiles/i18n_1_8.gemfile
47
47
  - gemfiles/i18n_1_9.gemfile
48
+ - gemfiles/i18n_1_10.gemfile
48
49
  allow_failures:
49
50
  - false
50
51
  include:
data/Appraisals CHANGED
@@ -46,3 +46,7 @@ end
46
46
  appraise "i18n_1_9" do
47
47
  gem "i18n", "~> 1.9.0"
48
48
  end
49
+
50
+ appraise "i18n_1_10" do
51
+ gem "i18n", "~> 1.10.0"
52
+ end
data/CHANGELOG.md CHANGED
@@ -18,6 +18,14 @@ This project adheres to [Semantic Versioning](https://semver.org/).
18
18
  - Nothing
19
19
 
20
20
 
21
+ ## [3.9.2] - 2022-03-31
22
+
23
+ ### Fixed
24
+
25
+ - [JS] Fix pluralization fallback in i18n.js
26
+ (PR: https://github.com/fnando/i18n-js/pull/645)
27
+
28
+
21
29
  ## [3.9.1] - 2022-02-08
22
30
 
23
31
  ### Changed
@@ -26,7 +34,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
26
34
  (PR: https://github.com/fnando/i18n-js/pull/638)
27
35
 
28
36
 
29
- ## [3.9.0]
37
+ ## [3.9.0] - 2021-07-30
30
38
 
31
39
  ### Added
32
40
 
@@ -34,7 +42,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
34
42
  (PR: https://github.com/fnando/i18n-js/pull/617)
35
43
 
36
44
 
37
- ## [3.8.4]
45
+ ## [3.8.4] - 2021-07-27
38
46
 
39
47
  ### Fixed
40
48
 
@@ -42,7 +50,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
42
50
  (PR: https://github.com/fnando/i18n-js/pull/591)
43
51
 
44
52
 
45
- ## [3.8.3]
53
+ ## [3.8.3] - 2021-05-21
46
54
 
47
55
  ### Changed
48
56
 
@@ -525,7 +533,8 @@ And today is not April Fools' Day
525
533
 
526
534
 
527
535
 
528
- [Unreleased]: https://github.com/fnando/i18n-js/compare/v3.9.1...HEAD
536
+ [Unreleased]: https://github.com/fnando/i18n-js/compare/v3.9.2...HEAD
537
+ [3.9.2]: https://github.com/fnando/i18n-js/compare/v3.9.1...v3.9.2
529
538
  [3.9.1]: https://github.com/fnando/i18n-js/compare/v3.9.0...v3.9.1
530
539
  [3.9.0]: https://github.com/fnando/i18n-js/compare/v3.8.4...v3.9.0
531
540
  [3.8.4]: https://github.com/fnando/i18n-js/compare/v3.8.3...v3.8.4
@@ -433,7 +433,7 @@
433
433
  , pluralizerKey
434
434
  , message;
435
435
 
436
- if (isObject(translations)) {
436
+ if (translations && isObject(translations)) {
437
437
  while (pluralizerKeys.length) {
438
438
  pluralizerKey = pluralizerKeys.shift();
439
439
  if (isSet(translations[pluralizerKey])) {
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "i18n", "~> 1.10.0"
6
+
7
+ gemspec path: "../"
@@ -2,6 +2,6 @@
2
2
 
3
3
  module I18n
4
4
  module JS
5
- VERSION = "3.9.1"
5
+ VERSION = "3.9.2"
6
6
  end
7
7
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "i18n-js",
3
- "version": "3.8.0",
3
+ "version": "3.9.2",
4
4
  "description": "A javascript library similar to Ruby on Rails i18n gem",
5
5
  "author": "Nando Vieira",
6
6
  "license": "MIT",
@@ -148,6 +148,15 @@ describe("Pluralization", function(){
148
148
  expect(I18n.p(5, "inbox", { count: 5 })).toEqual('You have 5 messages');
149
149
  });
150
150
 
151
+ it("fallback to default locale when I18n.fallbacks is enabled and value is null", function() {
152
+ I18n.locale = "pt-BR";
153
+ I18n.fallbacks = true;
154
+ I18n.translations["pt-BR"].inbox = null;
155
+ expect(I18n.p(0, "inbox", { count: 0 })).toEqual("You have no messages");
156
+ expect(I18n.p(1, "inbox", { count: 1 })).toEqual("You have 1 message");
157
+ expect(I18n.p(5, "inbox", { count: 5 })).toEqual("You have 5 messages");
158
+ });
159
+
151
160
  it("fallback to 'other' scope", function() {
152
161
  I18n.locale = "pt-BR";
153
162
  I18n.fallbacks = true;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n-js
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.9.1
4
+ version: 3.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-08 00:00:00.000000000 Z
11
+ date: 2022-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -121,6 +121,7 @@ files:
121
121
  - gemfiles/i18n_0_9.gemfile
122
122
  - gemfiles/i18n_1_0.gemfile
123
123
  - gemfiles/i18n_1_1.gemfile
124
+ - gemfiles/i18n_1_10.gemfile
124
125
  - gemfiles/i18n_1_2.gemfile
125
126
  - gemfiles/i18n_1_3.gemfile
126
127
  - gemfiles/i18n_1_4.gemfile
@@ -229,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
230
  - !ruby/object:Gem::Version
230
231
  version: '0'
231
232
  requirements: []
232
- rubygems_version: 3.3.6
233
+ rubygems_version: 3.3.10
233
234
  signing_key:
234
235
  specification_version: 4
235
236
  summary: It's a small library to provide the Rails I18n translations on the Javascript.