bisu 1.2.1 → 1.2.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
  SHA1:
3
- metadata.gz: 26ad7d61670e9ff3ad16fd40743a7d3d9a7543ba
4
- data.tar.gz: 257a0a78ac010b9be31fbf1f4e76676189b50419
3
+ metadata.gz: 79dfbdb96e57af7750371a0330c4ce0321c5879d
4
+ data.tar.gz: 264f49d1d638a22db4eae5574d2e2673520ba675
5
5
  SHA512:
6
- metadata.gz: c2e4b66ceac94f6b4d2274225af7e4780c9c6b85e64a9e38cd403aa447d54f27c078cf7683ecadd86cbd7e2089575ca12e44c296056dc5a1bac848587b9e1acf
7
- data.tar.gz: 81eff7ef5103393fb0fbc7295c70a9c1dedbb9b224491e7a68d18ebdc9b0e9fee1616d080d6809a1c492f7f2d492c4294bc43c0a2d020d35ad00823ee6a3ba6d
6
+ metadata.gz: d240de43faaf9d4b985c0bb94045519475d4d5a4b50c9bc15d219387bf947c68c7f3d9e7bdc47a152fde4f20c3f65967fc64bb09306c103dfd30da87a4667f0f
7
+ data.tar.gz: 19e58723e11624b9fe41ba7eb3087deca81d0621e6e8f415739894e3172763271ec296a17ddda88ddea11f8d024c66aa3eb9c204bbfa1ba10af07c9304b83271
@@ -66,6 +66,7 @@ module Bisu
66
66
  end
67
67
 
68
68
  t.scan(/\$k[^\$]+\$/) { |match| Logger.warn("Could not find translation for #{match} in #{language}") }
69
+ t.scan(/%{[^}]+}/) { |match| Logger.error("Could not find translation param for #{match} in #{language}") }
69
70
 
70
71
  t
71
72
  end
data/lib/bisu/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Bisu
2
- VERSION = '1.2.1'
3
- VERSION_UPDATED_AT = '2015-07-31'
2
+ VERSION = '1.2.2'
3
+ VERSION_UPDATED_AT = '2016-03-03'
4
4
  end
@@ -92,4 +92,24 @@ class BisuTranslatorTest < Minitest::Test
92
92
  assert_equal @tand.send(:localize, "2: $kAndroidKey2$", @lang, @locale), "2: Não sabes nada João das Neves…"
93
93
  assert_equal @tand.send(:localize, "3: $kAndroidKey3$", @lang, @locale), "3: Não sabes nada João das Neves &amp; Pícaros"
94
94
  end
95
+
96
+ def test_missing_translations
97
+ Bisu::Logger.clean_summary
98
+
99
+ assert_equal @tios.send(:localize, "1: $kUnknownKey$.", @lang, @locale), "1: $kUnknownKey$."
100
+
101
+ sum = Bisu::Logger.summary
102
+ assert_equal 1, sum[:warn]
103
+ assert_equal 0, sum[:error]
104
+ end
105
+
106
+ def test_cannot_find_translation_param
107
+ Bisu::Logger.clean_summary
108
+
109
+ assert_equal @tios.send(:localize, "1: $k2ParametersKey$", @lang, @locale), "1: Sabes %{percentage} por cento %{name}."
110
+
111
+ sum = Bisu::Logger.summary
112
+ assert_equal 0, sum[:warn]
113
+ assert_equal 2, sum[:error]
114
+ end
95
115
  end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bisu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - joaoffcosta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-31 00:00:00.000000000 Z
11
+ date: 2016-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: safe_yaml
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: colorize
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0.7'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.7'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: xml-simple
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.1'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: webmock
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.20'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.20'
69
69
  description: Bisu manages your app iOS and Android localization files for you. No
@@ -103,17 +103,17 @@ require_paths:
103
103
  - lib
104
104
  required_ruby_version: !ruby/object:Gem::Requirement
105
105
  requirements:
106
- - - ">="
106
+ - - '>='
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0'
109
109
  required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  requirements:
111
- - - ">="
111
+ - - '>='
112
112
  - !ruby/object:Gem::Version
113
113
  version: '0'
114
114
  requirements: []
115
115
  rubyforge_project:
116
- rubygems_version: 2.2.2
116
+ rubygems_version: 2.0.14
117
117
  signing_key:
118
118
  specification_version: 4
119
119
  summary: A localization automation service