tolq-parsers-xliff 0.1.0 → 0.1.1

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: 024c991a661bf8c6d41da6fb6d191c182305d65a
4
- data.tar.gz: 4947037b715d563dda83289aa56e3ddd980d20a9
3
+ metadata.gz: e08463663182e35b84d2765d9ab48d321bbefe68
4
+ data.tar.gz: d910566af4d15b8a28b646356ecaf9da2f46fb6c
5
5
  SHA512:
6
- metadata.gz: 161d131f4accca1be730f0391cae7d986d90ce5775a905398b1ceb33f49bc921ba487dbbe6c33ac89d7863bfa45c489ac193f5b5cc0e698de7d7a898590293e7
7
- data.tar.gz: bf54f6c354a4e6699612c119ef7b5214eb9be5ecce09a6950fef8ddca2bf766bd3eb905f722de334ec70b58e244669607755de4f95ce47b596d234728dea6893
6
+ metadata.gz: 9c1ed7451147cc820d4579a36ddbd29035c04b4e7cb4481ac52c9397439567b890c2366f7df459aeb340ab4e6a6ab717e2e0500fdf55d4bc5bef533b4c5e4646
7
+ data.tar.gz: 2e5604abde0d51c14b896160973d4856d67df0d30dbd1aef251ef7ee4e777bd27e8b423cee44144336e4df20afe55eabee0ffd3ab0bf50491946d25e539a7fcb
data/lib/xliff/parser.rb CHANGED
@@ -5,8 +5,10 @@ module Tolq::Parsers::Xliff
5
5
  #
6
6
  # @param quality [Symbol] the Tolq quality to order in, one of `:basic`, `:standard`, `:professional` or `:expert`
7
7
  # @return [Tolq::Parsers::Xliff::Parser] a parser ready to parse an xliff text
8
- def initialize(quality:)
8
+ def initialize(quality:, source_language_code: nil, target_language_code: nil)
9
9
  @quality = quality
10
+ @source_language_code = source_language_code
11
+ @target_language_code = target_language_code
10
12
  end
11
13
 
12
14
  # Parses an Xliff text
@@ -20,8 +22,8 @@ module Tolq::Parsers::Xliff
20
22
 
21
23
  {
22
24
  "request" => request_data,
23
- "source_language_code" => strip_region_language(file.source_language),
24
- "target_language_code" => strip_region_language(file.target_language),
25
+ "source_language_code" => @source_language_code || strip_region_language(file.source_language),
26
+ "target_language_code" => @target_language_code || strip_region_language(file.target_language),
25
27
  "quality" => @quality.to_s
26
28
  }
27
29
  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.0"
4
+ VERSION = "0.1.1"
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.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timon Vonk