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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a310a16fa33cd64c3cb41e3e0c62ffdc2605953
4
- data.tar.gz: 30ecf8f919e4d28e530c7ba3fed2d1f145507ada
3
+ metadata.gz: a6d5eda39bf4fa5c541d80f5cdf99b2954417f13
4
+ data.tar.gz: 8c9c0cfab8f937b70659d9a035f84f39123a9cc9
5
5
  SHA512:
6
- metadata.gz: f087afddd470840a6bcd7a7c7d8c538ca8cfc29aaca6eacef102b7573925d256833157211866b0ae96eab5e78556e33e7346071370a4810cf79ae4db19ef37c1
7
- data.tar.gz: c9c277fe627b1543496387b3cf683ee24b206691daae7656da8235b6a054b12b32d3c144f30c107e85ef2602c8d7d5cf5bc84560805f2e947457e07b96301081
6
+ metadata.gz: b916c637294f7324bddeda83f23cefa0e200a920807a388eadddf63a1aa3d2f3c1cafaf37ba13c0e9f5565578ad65064d034a9ec571e79afcb4003f211eeedc5
7
+ data.tar.gz: 6a27b643f92db3e4b4e1714e01c942298bbbdf7339a49a5e47ece71fe59c0cb1d4464240bdf0c2881be95eef4780ca7435a4239cd260fbdd88901358b131339c
@@ -31,8 +31,11 @@ module PoParser
31
31
  #
32
32
  # @return [Boolean]
33
33
  def untranslated?
34
- return false if cached?
35
- @msgstr.nil? || @msgstr.to_s == ''
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 == 'fuzzy'
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
- private
115
+
116
+ private
114
117
 
115
118
  def set_instance_variable(name, value)
116
119
  if COMMENTS_LABELS.include? name
@@ -1,3 +1,3 @@
1
1
  module PoParser
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
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.1
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-06-04 00:00:00.000000000 Z
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.1
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: