tolq-parsers-xliff 0.1.3 → 0.1.4

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: 12ae10800de70b0a8b638c5194303cd76b293819
4
- data.tar.gz: 6a23b3ab885cd7308cc89810c6b51c0701f03f8a
3
+ metadata.gz: 207acef5698ce9b31f042cca0006c6eb637dd23c
4
+ data.tar.gz: 4379620a6c9567e3361db956afe096c65c79a6fe
5
5
  SHA512:
6
- metadata.gz: 05fa2848e34c8d805d7a999e076e778ee2ac82be61a5b23ccce6168daa9315b26e1ebe12b7c5054b9065bc45d779c2e3735fb80fab4c754e8538f25463c10b27
7
- data.tar.gz: cb5be587d2f85120b28d7c8faed1c6755f4d76e4132d6e9f42683ffb60b184c41942d67215e35e660fa7774fed3f48a020ef13855b7088b3e13818101868ee9b
6
+ metadata.gz: 31dd134dcd2c29a6fb75e241f7ec1062662ec3e32c42fa206a0f2931f9ecfd01e48b9d20bc93964405ec234a0cd8b589deb65a122dea92c26057d9cf6bfa4675
7
+ data.tar.gz: 7d30383026764381af1587fb0ccc4ca1f8d00b2fe529745382900a586027719e51c3c7dce5f6495d4de823aa1a5957c914238758be1889ccb0943ce500355145
data/lib/xliff/parser.rb CHANGED
@@ -32,7 +32,10 @@ module Tolq::Parsers::Xliff
32
32
 
33
33
  def extract_request_data_from_file(xliff_file)
34
34
  xliff_file.strings.inject({}) do |acc, string|
35
- acc[string.id] = {"text" => string.source } if string.source && string.source.strip.length > 0
35
+ unless string.source && string.source.strip.length > 0
36
+ next acc
37
+ end
38
+ acc[string.id] = {"text" => string.source }
36
39
  if string.note.length > 0
37
40
  acc[string.id].merge!("translator_message" => string.note)
38
41
  end
data/lib/xliff/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Tolq
2
2
  module Parsers
3
3
  module Xliff
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tolq-parsers-xliff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timon Vonk