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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dbf33a6af551aff2ea13db6c39e84c568f426aaaacd78b1a27524917a05cc580
4
- data.tar.gz: a7ba15b0084e0eed0eb8a9f3692131c8786401a3ed257217d0d6ba43cdefd3d3
3
+ metadata.gz: e8b0336b575e1fcbf19bc557cb7fd709db85f8831a842970c03f34517baa90c2
4
+ data.tar.gz: 4f86f0c6d7e05b0aeb4b8f7898d5947b6a06dd402593d34c068f98da28ed09ff
5
5
  SHA512:
6
- metadata.gz: f5bb0487ef02b35454d86e92c9d1634cee3ac9eaa302fcc19044e22c80491682fe4e5c44eef2d6aa90ff91ff0f15db4f2bd7539b4de8e66773be54ba880b193d
7
- data.tar.gz: f6d56fb7550b4cce0d02e25cf98b38be75cfc3d0cb9cfe3ac0ba050621a08363b7ff49abc4ddc5803d8ac3be3f864bbb3187bb3476e18e91479484f8accd0622
6
+ metadata.gz: 20f3d107d1e745c7948ff2fa10173712e84bf58894cab7f1d21f58b5c647bf17fb0a664cc2bb4363d3def74898c0a85dda1a8de6c64161400bd1044663a61cc0
7
+ data.tar.gz: bc0fa3a90ff5ef2a23c4f084845238564b6c66d9deb96abb79478f719e37e065744cd775b3d8de33765f1d72a266325672b8bcfe95fc1dbd9c0aceb507538d5c
@@ -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.0...HEAD
461
- [3.6.0]: https://github.com/fnando/i18n-js/compare/v3.6.0...v3.7.0
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('_',' ').replace(/([a-z])([A-Z])/g,
682
+ s.replace(/_/g,' ').replace(/([a-z])([A-Z])/g,
683
683
  function(match, p1, p2) {return p1 + ' ' + p2.toLowerCase()} );
684
684
  }
685
685
 
@@ -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.0"
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"
@@ -2,6 +2,6 @@
2
2
 
3
3
  module I18n
4
4
  module JS
5
- VERSION = "3.7.0"
5
+ VERSION = "3.7.1"
6
6
  end
7
7
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "i18n-js",
3
- "version": "3.5.1",
3
+ "version": "3.7.1",
4
4
  "description": "A javascript library similar to Ruby on Rails i18n gem",
5
5
  "author": "Nando Vieira",
6
6
  "license": "MIT",
@@ -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
- actual = I18n.translate("invalid.thisIsAutomaticallyGeneratedTranslation");
52
- expected = 'this is automatically generated translation';
53
- expect(actual).toEqual(expected);
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.0
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-05-29 00:00:00.000000000 Z
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.0'
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.0'
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.3
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: