PoParser 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/poparser/entry.rb +9 -6
- data/lib/poparser/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6d5eda39bf4fa5c541d80f5cdf99b2954417f13
|
4
|
+
data.tar.gz: 8c9c0cfab8f937b70659d9a035f84f39123a9cc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b916c637294f7324bddeda83f23cefa0e200a920807a388eadddf63a1aa3d2f3c1cafaf37ba13c0e9f5565578ad65064d034a9ec571e79afcb4003f211eeedc5
|
7
|
+
data.tar.gz: 6a27b643f92db3e4b4e1714e01c942298bbbdf7339a49a5e47ece71fe59c0cb1d4464240bdf0c2881be95eef4780ca7435a4239cd260fbdd88901358b131339c
|
data/lib/poparser/entry.rb
CHANGED
@@ -31,8 +31,11 @@ module PoParser
|
|
31
31
|
#
|
32
32
|
# @return [Boolean]
|
33
33
|
def untranslated?
|
34
|
-
return false if cached?
|
35
|
-
@msgstr.
|
34
|
+
return false if cached? || fuzzy?
|
35
|
+
if @msgstr.is_a? Array
|
36
|
+
return @msgstr.map {|ms| ms.str}.join.empty?
|
37
|
+
end
|
38
|
+
@msgstr.nil? || @msgstr.str.empty?
|
36
39
|
end
|
37
40
|
alias_method :incomplete? , :untranslated?
|
38
41
|
|
@@ -40,7 +43,7 @@ module PoParser
|
|
40
43
|
#
|
41
44
|
# @return [Boolean]
|
42
45
|
def translated?
|
43
|
-
return false if cached?
|
46
|
+
return false if cached? || fuzzy?
|
44
47
|
not untranslated?
|
45
48
|
end
|
46
49
|
alias_method :complete? , :translated?
|
@@ -57,7 +60,7 @@ module PoParser
|
|
57
60
|
# @return [Boolean]
|
58
61
|
def fuzzy?
|
59
62
|
return false if cached?
|
60
|
-
@flag.to_s
|
63
|
+
@flag.to_s.match('fuzzy') ? true : false
|
61
64
|
end
|
62
65
|
|
63
66
|
# Flag the entry as Fuzzy
|
@@ -109,8 +112,8 @@ module PoParser
|
|
109
112
|
|
110
113
|
lines.join
|
111
114
|
end
|
112
|
-
|
113
|
-
|
115
|
+
|
116
|
+
private
|
114
117
|
|
115
118
|
def set_instance_variable(name, value)
|
116
119
|
if COMMENTS_LABELS.include? name
|
data/lib/poparser/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: PoParser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arash Mousavi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parslet
|
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
175
|
version: '0'
|
176
176
|
requirements: []
|
177
177
|
rubyforge_project:
|
178
|
-
rubygems_version: 2.2.
|
178
|
+
rubygems_version: 2.2.2
|
179
179
|
signing_key:
|
180
180
|
specification_version: 4
|
181
181
|
summary: A PO file parser, editor and generator.
|
@@ -193,3 +193,4 @@ test_files:
|
|
193
193
|
- spec/poparser/tokenizer_spec.rb
|
194
194
|
- spec/poparser/transformer_spec.rb
|
195
195
|
- spec/spec_helper.rb
|
196
|
+
has_rdoc:
|