i18n-js 3.7.0 → 3.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -2
- data/app/assets/javascripts/i18n.js +1 -1
- data/i18n-js.gemspec +1 -1
- data/lib/i18n/js/version.rb +1 -1
- data/package.json +1 -1
- data/spec/js/translate.spec.js +8 -3
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8b0336b575e1fcbf19bc557cb7fd709db85f8831a842970c03f34517baa90c2
|
4
|
+
data.tar.gz: 4f86f0c6d7e05b0aeb4b8f7898d5947b6a06dd402593d34c068f98da28ed09ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20f3d107d1e745c7948ff2fa10173712e84bf58894cab7f1d21f58b5c647bf17fb0a664cc2bb4363d3def74898c0a85dda1a8de6c64161400bd1044663a61cc0
|
7
|
+
data.tar.gz: bc0fa3a90ff5ef2a23c4f084845238564b6c66d9deb96abb79478f719e37e065744cd775b3d8de33765f1d72a266325672b8bcfe95fc1dbd9c0aceb507538d5c
|
data/CHANGELOG.md
CHANGED
@@ -18,6 +18,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
18
18
|
- Nothing
|
19
19
|
|
20
20
|
|
21
|
+
## [3.7.1] - 2020-06-30
|
22
|
+
|
23
|
+
### Fixed
|
24
|
+
|
25
|
+
- [JS] For translation missing behaviour `guess`, replace all underscores to spaces properly
|
26
|
+
(PR: https://github.com/fnando/i18n-js/pull/574)
|
27
|
+
|
28
|
+
|
21
29
|
## [3.7.0] - 2020-05-29
|
22
30
|
|
23
31
|
### Added
|
@@ -457,8 +465,9 @@ And today is not April Fools' Day
|
|
457
465
|
|
458
466
|
|
459
467
|
|
460
|
-
[Unreleased]: https://github.com/fnando/i18n-js/compare/v3.7.
|
461
|
-
[3.
|
468
|
+
[Unreleased]: https://github.com/fnando/i18n-js/compare/v3.7.1...HEAD
|
469
|
+
[3.7.1]: https://github.com/fnando/i18n-js/compare/v3.7.0...v3.7.1
|
470
|
+
[3.7.0]: https://github.com/fnando/i18n-js/compare/v3.6.0...v3.7.0
|
462
471
|
[3.6.0]: https://github.com/fnando/i18n-js/compare/v3.5.1...v3.6.0
|
463
472
|
[3.5.1]: https://github.com/fnando/i18n-js/compare/v3.5.0...v3.5.1
|
464
473
|
[3.5.0]: https://github.com/fnando/i18n-js/compare/v3.4.2...v3.5.0
|
@@ -679,7 +679,7 @@
|
|
679
679
|
var s = scope.split('.').slice(-1)[0];
|
680
680
|
//replace underscore with space && camelcase with space and lowercase letter
|
681
681
|
return (this.missingTranslationPrefix.length > 0 ? this.missingTranslationPrefix : '') +
|
682
|
-
s.replace(
|
682
|
+
s.replace(/_/g,' ').replace(/([a-z])([A-Z])/g,
|
683
683
|
function(match, p1, p2) {return p1 + ' ' + p2.toLowerCase()} );
|
684
684
|
}
|
685
685
|
|
data/i18n-js.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
|
21
21
|
s.add_dependency "i18n", ">= 0.6.6"
|
22
22
|
|
23
|
-
s.add_development_dependency "appraisal", "~> 2.
|
23
|
+
s.add_development_dependency "appraisal", "~> 2.3"
|
24
24
|
s.add_development_dependency "rspec", "~> 3.0"
|
25
25
|
s.add_development_dependency "rake", "~> 12.0"
|
26
26
|
s.add_development_dependency "gem-release", ">= 0.7"
|
data/lib/i18n/js/version.rb
CHANGED
data/package.json
CHANGED
data/spec/js/translate.spec.js
CHANGED
@@ -48,9 +48,14 @@ describe("Translate", function(){
|
|
48
48
|
|
49
49
|
it("returns guessed translation if missingBehaviour is set to guess", function(){
|
50
50
|
I18n.missingBehaviour = 'guess'
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
|
52
|
+
var actual_1 = I18n.translate("invalid.thisIsAutomaticallyGeneratedTranslation");
|
53
|
+
var expected_1 = 'this is automatically generated translation';
|
54
|
+
expect(actual_1).toEqual(expected_1);
|
55
|
+
|
56
|
+
var actual_2 = I18n.translate("invalid.this_is_automatically_generated_translation");
|
57
|
+
var expected_2 = 'this is automatically generated translation';
|
58
|
+
expect(actual_2).toEqual(expected_2);
|
54
59
|
});
|
55
60
|
|
56
61
|
it("returns guessed translation with prefix if missingBehaviour is set to guess and prefix is also provided", function(){
|
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.7.
|
4
|
+
version: 3.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '2.
|
33
|
+
version: '2.3'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '2.
|
40
|
+
version: '2.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -208,7 +208,7 @@ homepage: http://rubygems.org/gems/i18n-js
|
|
208
208
|
licenses:
|
209
209
|
- MIT
|
210
210
|
metadata: {}
|
211
|
-
post_install_message:
|
211
|
+
post_install_message:
|
212
212
|
rdoc_options: []
|
213
213
|
require_paths:
|
214
214
|
- lib
|
@@ -223,8 +223,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
223
223
|
- !ruby/object:Gem::Version
|
224
224
|
version: '0'
|
225
225
|
requirements: []
|
226
|
-
rubygems_version: 3.1.
|
227
|
-
signing_key:
|
226
|
+
rubygems_version: 3.1.4
|
227
|
+
signing_key:
|
228
228
|
specification_version: 4
|
229
229
|
summary: It's a small library to provide the Rails I18n translations on the Javascript.
|
230
230
|
test_files:
|