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 +4 -4
- data/lib/tmx_importer/version.rb +1 -1
- data/lib/tmx_importer.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77a255ff1cd88f6d3edbc6748e2680ec86486abf
|
4
|
+
data.tar.gz: 01001fd8f8c612fffcc83e110b77d9738299e046
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da87359b112880242cca91b25005b828017d7563b2915217759576da7a8b222e29cfce2b7df55fd3196075c25ab1168cb3f5de4c4cb73dc25958b1075a9c7a3a
|
7
|
+
data.tar.gz: ae1aade7c0e33859dd4f6dcceebb5171d345ef5f7dececcd3e5e57f4657f86162ceb752ce0ebc0511b4d38ebccee0e49810c1b745727ac75b1463ea9aa947c89
|
data/lib/tmx_importer/version.rb
CHANGED
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'
|