i18n-cocoa 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/i18n/cocoa.rb +2 -2
- data/lib/i18n/cocoa/finder.rb +6 -6
- data/lib/i18n/cocoa/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9833c07efdf3eb6d0dc68d68de54c12b2be6a0e4
|
4
|
+
data.tar.gz: ef2ad20659f3ff2ef9583e763c3a6bad87e2933a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f562b37ea1b9c4923dc0f9f9fb95e18a9b1c13710b94b4e79c2328391a44ed8c21ba85848760a4b9399de8da3c289ec5ae836654c809b86fa8d3bf147c0fd91
|
7
|
+
data.tar.gz: 0f1db9788af647c7907afc230101392c2a190ea8437c453a920cd542a92d38f05a6d279c973bfad0373878a8932ebd886346acbaa47fd4f9c7079803fea10014
|
data/README.md
CHANGED
@@ -42,7 +42,7 @@ success, failure_issues = I18n::Cocoa.health
|
|
42
42
|
```ruby
|
43
43
|
require 'i18n/cocoa'
|
44
44
|
|
45
|
-
attributes = {:
|
45
|
+
attributes = { localized_macro_string: 'LocalizedString', search_path: 'iOSProject'}
|
46
46
|
success, failure_issues = I18n::Cocoa.health attributes
|
47
47
|
```
|
48
48
|
|
data/lib/i18n/cocoa.rb
CHANGED
@@ -11,8 +11,8 @@ module I18n
|
|
11
11
|
#
|
12
12
|
# @param [hash] attributes if you want to change from default attributes
|
13
13
|
# default attributes
|
14
|
-
# :
|
15
|
-
# :
|
14
|
+
# localized_macro_string: 'NSLocalizedString',
|
15
|
+
# search_path: '.'
|
16
16
|
#
|
17
17
|
# @return [bool] true when finish to run with success
|
18
18
|
def self.health attributes = {}
|
data/lib/i18n/cocoa/finder.rb
CHANGED
@@ -67,8 +67,8 @@ module I18n
|
|
67
67
|
private
|
68
68
|
def _default_config
|
69
69
|
{
|
70
|
-
:
|
71
|
-
:
|
70
|
+
localized_macro_string: 'NSLocalizedString',
|
71
|
+
search_path: '.'
|
72
72
|
}
|
73
73
|
end
|
74
74
|
|
@@ -165,10 +165,10 @@ module I18n
|
|
165
165
|
l = Utils.encode l
|
166
166
|
next if l.start_with?("//")
|
167
167
|
|
168
|
-
m = /^"([^"]+)"[ ]*=[ ]*"([^"]+)";[\r\n]*$/.match(l)
|
168
|
+
m = /^"([^"]+)"[ ]*=[ ]*"([^"]+)";[ ]*(\/{2,})?.*[\r\n]*$/.match(l)
|
169
169
|
next if m.nil?
|
170
170
|
|
171
|
-
keys << m[1] if m.size ==
|
171
|
+
keys << m[1] if m.size == 4
|
172
172
|
end
|
173
173
|
end
|
174
174
|
|
@@ -189,8 +189,8 @@ module I18n
|
|
189
189
|
f.readlines.each do |l|
|
190
190
|
needs_copy = true
|
191
191
|
|
192
|
-
match = /^"([^"]+)"[ ]*=[ ]*"([^"]+)";[\r\n]*$/.match(l)
|
193
|
-
if !match.nil? && match.size ==
|
192
|
+
match = /^"([^"]+)"[ ]*=[ ]*"([^"]+)";[ ]*(\/{2,})?.*[\r\n]*$/.match(l)
|
193
|
+
if !match.nil? && match.size == 4
|
194
194
|
needs_copy = false if exclude_keys.include?match[1]
|
195
195
|
end
|
196
196
|
|
data/lib/i18n/cocoa/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n-cocoa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hirohisa Kawasaki
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-02-
|
12
|
+
date: 2015-02-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -96,4 +96,3 @@ summary: Manage translation and localization
|
|
96
96
|
test_files:
|
97
97
|
- spec/i18n/cocoa_spec.rb
|
98
98
|
- spec/spec_helper.rb
|
99
|
-
has_rdoc:
|