i18n-js 3.0.8 → 3.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/app/assets/javascripts/i18n.js +4 -2
- data/lib/i18n/js/version.rb +1 -1
- data/package.json +1 -1
- data/spec/js/translate.spec.js +4 -3
- data/spec/js/translations.js +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39b2813fcbbec8bbb3dc23712043e5bbb9c34ad5a6a91c617f8fb7c43a6012df
|
4
|
+
data.tar.gz: 209aed0138760420e27694a6b18747aaae0ba38cc81856cb25a5d00a1e88e100
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a3e2a7b297f31c95064f81603623206f1e43b9d384858c56d8127243f121753ca0c441a6c5027a3e074f030211d737b8b34d15fe95c911c9367a9720b55d34e
|
7
|
+
data.tar.gz: c94a433c6c4a720f454ff4fbd920d86c3605934c3b79c38d4e5935c60ae38a4f885e6b60cb338fb1a71d3cd93c1555af2df1d379daa8764607292d1ddbc5f2fa
|
data/CHANGELOG.md
CHANGED
@@ -18,6 +18,13 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
18
18
|
- Nothing
|
19
19
|
|
20
20
|
|
21
|
+
## [3.0.9] - 2018-06-21
|
22
|
+
|
23
|
+
### Fixed
|
24
|
+
|
25
|
+
- [JS] Fix translation array interpolation for array with null
|
26
|
+
|
27
|
+
|
21
28
|
## [3.0.8] - 2018-06-06
|
22
29
|
|
23
30
|
### Changed
|
@@ -309,7 +316,8 @@ And today is not April Fools' Day
|
|
309
316
|
|
310
317
|
|
311
318
|
|
312
|
-
[Unreleased]: https://github.com/fnando/i18n-js/compare/v3.0.
|
319
|
+
[Unreleased]: https://github.com/fnando/i18n-js/compare/v3.0.9...HEAD
|
320
|
+
[3.0.9]: https://github.com/fnando/i18n-js/compare/v3.0.8...v3.0.9
|
313
321
|
[3.0.8]: https://github.com/fnando/i18n-js/compare/v3.0.7...v3.0.8
|
314
322
|
[3.0.7]: https://github.com/fnando/i18n-js/compare/v3.0.6...v3.0.7
|
315
323
|
[3.0.6]: https://github.com/fnando/i18n-js/compare/v3.0.5...v3.0.6
|
@@ -388,7 +388,6 @@
|
|
388
388
|
options = options || {}
|
389
389
|
|
390
390
|
var locales = this.locales.get(options.locale).slice()
|
391
|
-
, requestedLocale = locales[0]
|
392
391
|
, locale
|
393
392
|
, scopes
|
394
393
|
, fullScope
|
@@ -447,7 +446,6 @@
|
|
447
446
|
I18n.pluralizationLookup = function(count, scope, options) {
|
448
447
|
options = options || {}
|
449
448
|
var locales = this.locales.get(options.locale).slice()
|
450
|
-
, requestedLocale = locales[0]
|
451
449
|
, locale
|
452
450
|
, scopes
|
453
451
|
, translations
|
@@ -611,6 +609,10 @@
|
|
611
609
|
|
612
610
|
// This function interpolates the all variables in the given message.
|
613
611
|
I18n.interpolate = function(message, options) {
|
612
|
+
if (message === null) {
|
613
|
+
return message;
|
614
|
+
}
|
615
|
+
|
614
616
|
options = options || {}
|
615
617
|
var matches = message.match(this.placeholder)
|
616
618
|
, placeholder
|
data/lib/i18n/js/version.rb
CHANGED
data/package.json
CHANGED
data/spec/js/translate.spec.js
CHANGED
@@ -260,9 +260,10 @@ describe("Translate", function(){
|
|
260
260
|
it("returns an array with values interpolated", function(){
|
261
261
|
var options = {value: 314};
|
262
262
|
expect(I18n.t("arrayWithParams", options)).toEqual([
|
263
|
-
|
264
|
-
|
265
|
-
|
263
|
+
null,
|
264
|
+
"An item with a param of " + options.value,
|
265
|
+
"Another item with a param of " + options.value,
|
266
|
+
"A last item with a param of " + options.value
|
266
267
|
]);
|
267
268
|
});
|
268
269
|
});
|
data/spec/js/translations.js
CHANGED
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.
|
4
|
+
version: 3.0.9
|
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-
|
11
|
+
date: 2018-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|