i18n-js 3.0.10 → 3.0.11

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: d881382110db91a98e8af030855cebf2636194145c9c67203391ecc6823d34ab
4
- data.tar.gz: 4918d0712878f819a2c90a24e624ab1fe601fffbdd6abd5c6184c53838e2bef6
3
+ metadata.gz: 7710293eab5e7adff0b04ffe9183dd61ab18c70e93d75a4680570e8da83deb81
4
+ data.tar.gz: 8111e523870314db2f1aa49c305797ad1876523fccb9276fc8bd98c2b1a3bff5
5
5
  SHA512:
6
- metadata.gz: e6616ef9bf22c95974b742ce3f85177e50f13a4887d005865de1f8fe6f7e81f8bffc54c46df38311c6f22e8c37d0392d9ecf671185764edc6e87cc9b0f592503
7
- data.tar.gz: cc7e6115c6fa710941512235e27fa241f9206bb366455cbc209a02ca587d3c9116ab2a67270591c408d8ac7f8136186487a200bb2d2bfa7a617a379374d96418
6
+ metadata.gz: a7f2f4b3b52dbd1528b5dde88292a4b44401c58d59d7a41da253961948ae9c7d2c1233bac4fba8208d5391e9ea6397ed019f1dda3034c89eab9774b9a86b8c3b
7
+ data.tar.gz: 11be532db0104cec86932f67776754ba7f885c3f00f0335d130ebd8844abcb6fb30703b96e6e9a9827099548166963b642d5bee0f9f687ebd5e24c5598ce6971
@@ -3,7 +3,10 @@
3
3
  sudo: false
4
4
  language: ruby
5
5
  cache:
6
- - bundler
6
+ bundler: true
7
+ yarn: true
8
+ directories:
9
+ - node_modules
7
10
  rvm:
8
11
  - 2.1.10
9
12
  - 2.2.8
@@ -15,7 +18,7 @@ rvm:
15
18
  - ruby-head
16
19
  before_install:
17
20
  # Need to install something extra to test JS
18
- - npm install
21
+ - yarn install
19
22
  # Bundler 1.16.1 and rubygems 2.7.3 got issue
20
23
  # https://github.com/travis-ci/travis-ci/issues/8978#issuecomment-354036443
21
24
  - gem update --system
@@ -18,6 +18,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
18
18
  - Nothing
19
19
 
20
20
 
21
+ ## [3.0.11] - 2018-07-06
22
+
23
+ ### Fixed
24
+
25
+ - [JS] Fix interpolation for array with non string/null elements
26
+ (PR: https://github.com/fnando/i18n-js/pull/505)
27
+
28
+
21
29
  ## [3.0.10] - 2018-06-21
22
30
 
23
31
  ### Fixed
@@ -326,7 +334,8 @@ And today is not April Fools' Day
326
334
 
327
335
 
328
336
 
329
- [Unreleased]: https://github.com/fnando/i18n-js/compare/v3.0.10...HEAD
337
+ [Unreleased]: https://github.com/fnando/i18n-js/compare/v3.0.11...HEAD
338
+ [3.0.11]: https://github.com/fnando/i18n-js/compare/v3.0.10...v3.0.11
330
339
  [3.0.10]: https://github.com/fnando/i18n-js/compare/v3.0.9...v3.0.10
331
340
  [3.0.9]: https://github.com/fnando/i18n-js/compare/v3.0.8...v3.0.9
332
341
  [3.0.8]: https://github.com/fnando/i18n-js/compare/v3.0.7...v3.0.8
@@ -602,7 +602,7 @@
602
602
  translation = this.interpolate(translation, options);
603
603
  } else if (isArray(translation)) {
604
604
  translation = translation.map(function(t) {
605
- return this.interpolate(t, options);
605
+ return (typeof(t) === "string" ? this.interpolate(t, options) : t);
606
606
  }, this);
607
607
  } else if (isObject(translation) && isSet(options.count)) {
608
608
  translation = this.pluralize(options.count, scope, options);
@@ -2,6 +2,6 @@
2
2
 
3
3
  module I18n
4
4
  module JS
5
- VERSION = "3.0.10"
5
+ VERSION = "3.0.11"
6
6
  end
7
7
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "i18n-js",
3
- "version": "3.0.10",
3
+ "version": "3.0.11",
4
4
  "description": "A javascript library similar to Ruby on Rails i18n gem",
5
5
  "author": "Nando Vieira",
6
6
  "license": "MIT",
@@ -269,7 +269,9 @@ describe("Translate", function(){
269
269
  null,
270
270
  "An item with a param of " + options.value,
271
271
  "Another item with a param of " + options.value,
272
- "A last item with a param of " + options.value
272
+ "A last item with a param of " + options.value,
273
+ ["An", "array", "of", "strings"],
274
+ {foo: "bar"}
273
275
  ]);
274
276
  });
275
277
  });
@@ -63,7 +63,9 @@ var DEBUG = false;
63
63
  null,
64
64
  "An item with a param of {{value}}",
65
65
  "Another item with a param of {{value}}",
66
- "A last item with a param of {{value}}"
66
+ "A last item with a param of {{value}}",
67
+ ["An", "array", "of", "strings"],
68
+ {foo: "bar"}
67
69
  ]
68
70
 
69
71
  , null_key: null
@@ -0,0 +1,131 @@
1
+ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
+ # yarn lockfile v1
3
+
4
+
5
+ balanced-match@^1.0.0:
6
+ version "1.0.0"
7
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
8
+
9
+ brace-expansion@^1.1.7:
10
+ version "1.1.11"
11
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
12
+ dependencies:
13
+ balanced-match "^1.0.0"
14
+ concat-map "0.0.1"
15
+
16
+ coffeescript@>=1.0.1:
17
+ version "2.3.1"
18
+ resolved "https://registry.yarnpkg.com/coffeescript/-/coffeescript-2.3.1.tgz#a25f69c251d25805c9842e57fc94bfc453ef6aed"
19
+
20
+ concat-map@0.0.1:
21
+ version "0.0.1"
22
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
23
+
24
+ fs.realpath@^1.0.0:
25
+ version "1.0.0"
26
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
27
+
28
+ gaze@~1.1.2:
29
+ version "1.1.3"
30
+ resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a"
31
+ dependencies:
32
+ globule "^1.0.0"
33
+
34
+ glob@~7.1.1:
35
+ version "7.1.2"
36
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
37
+ dependencies:
38
+ fs.realpath "^1.0.0"
39
+ inflight "^1.0.4"
40
+ inherits "2"
41
+ minimatch "^3.0.4"
42
+ once "^1.3.0"
43
+ path-is-absolute "^1.0.0"
44
+
45
+ globule@^1.0.0:
46
+ version "1.2.1"
47
+ resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.1.tgz#5dffb1b191f22d20797a9369b49eab4e9839696d"
48
+ dependencies:
49
+ glob "~7.1.1"
50
+ lodash "~4.17.10"
51
+ minimatch "~3.0.2"
52
+
53
+ growl@^1.10.2:
54
+ version "1.10.5"
55
+ resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"
56
+
57
+ inflight@^1.0.4:
58
+ version "1.0.6"
59
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
60
+ dependencies:
61
+ once "^1.3.0"
62
+ wrappy "1"
63
+
64
+ inherits@2:
65
+ version "2.0.3"
66
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
67
+
68
+ jasmine-growl-reporter@~1.0.1:
69
+ version "1.0.1"
70
+ resolved "https://registry.yarnpkg.com/jasmine-growl-reporter/-/jasmine-growl-reporter-1.0.1.tgz#375306cef1fbf6357ad7913ca0358aa2285d6d39"
71
+ dependencies:
72
+ growl "^1.10.2"
73
+
74
+ jasmine-node@^1.14.5:
75
+ version "1.15.0"
76
+ resolved "https://registry.yarnpkg.com/jasmine-node/-/jasmine-node-1.15.0.tgz#d5e9a92623c111f55e4b83ff2ab0407ddbc2a5b7"
77
+ dependencies:
78
+ coffeescript ">=1.0.1"
79
+ gaze "~1.1.2"
80
+ jasmine-growl-reporter "~1.0.1"
81
+ jasmine-reporters "~1.0.0"
82
+ mkdirp "~0.3.5"
83
+ requirejs ">=0.27.1"
84
+ underscore ">= 1.3.1"
85
+ walkdir ">= 0.0.1"
86
+
87
+ jasmine-reporters@~1.0.0:
88
+ version "1.0.2"
89
+ resolved "https://registry.yarnpkg.com/jasmine-reporters/-/jasmine-reporters-1.0.2.tgz#ab613ed5977dc7487e85b3c12f6a8ea8db2ade31"
90
+ dependencies:
91
+ mkdirp "~0.3.5"
92
+
93
+ lodash@~4.17.10:
94
+ version "4.17.10"
95
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
96
+
97
+ minimatch@^3.0.4, minimatch@~3.0.2:
98
+ version "3.0.4"
99
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
100
+ dependencies:
101
+ brace-expansion "^1.1.7"
102
+
103
+ mkdirp@~0.3.5:
104
+ version "0.3.5"
105
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.5.tgz#de3e5f8961c88c787ee1368df849ac4413eca8d7"
106
+
107
+ once@^1.3.0:
108
+ version "1.4.0"
109
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
110
+ dependencies:
111
+ wrappy "1"
112
+
113
+ path-is-absolute@^1.0.0:
114
+ version "1.0.1"
115
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
116
+
117
+ requirejs@>=0.27.1:
118
+ version "2.3.5"
119
+ resolved "https://registry.yarnpkg.com/requirejs/-/requirejs-2.3.5.tgz#617b9acbbcb336540ef4914d790323a8d4b861b0"
120
+
121
+ "underscore@>= 1.3.1":
122
+ version "1.9.1"
123
+ resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961"
124
+
125
+ "walkdir@>= 0.0.1":
126
+ version "0.0.12"
127
+ resolved "https://registry.yarnpkg.com/walkdir/-/walkdir-0.0.12.tgz#2f24f1ade64aab1e458591d4442c8868356e9281"
128
+
129
+ wrappy@1:
130
+ version "1.0.2"
131
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
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.0.10
4
+ version: 3.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-29 00:00:00.000000000 Z
11
+ date: 2018-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -179,6 +179,7 @@ files:
179
179
  - spec/ruby/i18n/js/utils_spec.rb
180
180
  - spec/ruby/i18n/js_spec.rb
181
181
  - spec/spec_helper.rb
182
+ - yarn.lock
182
183
  homepage: http://rubygems.org/gems/i18n-js
183
184
  licenses:
184
185
  - MIT