tmx_importer 0.3.0 → 0.4.0

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: 9171f015c2f0e45c3772d64d0f98e53949abf89a
4
- data.tar.gz: f227573b58faf7b215695d9a72ff12df051bd6e9
3
+ metadata.gz: 77a255ff1cd88f6d3edbc6748e2680ec86486abf
4
+ data.tar.gz: 01001fd8f8c612fffcc83e110b77d9738299e046
5
5
  SHA512:
6
- metadata.gz: b9dd9c281a0453d994244f87aeaf466c46aa98336a3bae7a598344df23bb01b66779d235f305533e421f04b1a6ca1a695745a28b7311abb18ed3563b724478a8
7
- data.tar.gz: 8d61b7d51f8b6ed56c21b68639f52aaa3c3f9ed1e6ee158cf1ecfed7669c77cdafb65945e718d36228545d281e9b385ed416639e0413ecfee258ed2922ee43b1
6
+ metadata.gz: da87359b112880242cca91b25005b828017d7563b2915217759576da7a8b222e29cfce2b7df55fd3196075c25ab1168cb3f5de4c4cb73dc25958b1075a9c7a3a
7
+ data.tar.gz: ae1aade7c0e33859dd4f6dcceebb5171d345ef5f7dececcd3e5e57f4657f86162ceb752ce0ebc0511b4d38ebccee0e49810c1b745727ac75b1463ea9aa947c89
@@ -1,3 +1,3 @@
1
1
  module TmxImporter
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
data/lib/tmx_importer.rb CHANGED
@@ -3,6 +3,8 @@ require 'xml'
3
3
  require 'open-uri'
4
4
  require 'pretty_strings'
5
5
 
6
+ Encoding.default_external = Encoding::UTF_8
7
+
6
8
  module TmxImporter
7
9
  class Tmx
8
10
  attr_reader :file_path, :encoding
@@ -112,7 +114,7 @@ module TmxImporter
112
114
  @doc[:language_pairs] << [@doc[:source_language].force_encoding("UTF-8"), @doc[:seg][:lang].force_encoding("UTF-8")]
113
115
  @doc[:seg][:role] = 'source'
114
116
  elsif @doc[:source_language] == '*all*'
115
- @doc[:source_language] = @doc[:seg][:lang]
117
+ @doc[:source_language] = @doc[:seg][:lang].force_encoding("UTF-8")
116
118
  @doc[:seg][:role] = 'source'
117
119
  else
118
120
  @doc[:seg][:role] = 'target'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tmx_importer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias