konjak 0.0.8 → 0.0.9

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: cdc98142b5ed2a6814a96cf76c8d9c0f7bd2c5d2
4
- data.tar.gz: f286772061e56d381e8f4f227e47ae9bfa259362
3
+ metadata.gz: 9a1dc76b9a5796b66e6c6b50c4400143fd497492
4
+ data.tar.gz: 9ac877e8c999059b43400aad5a59f18109dc331b
5
5
  SHA512:
6
- metadata.gz: ca86d1d1693776a7b3a5e57c687daf199d879cbb2e01c6ad6d806def612d1cc01e1c0938b91cf87b837406cb4bdbeee713a4c5d2043c1319faf3e22fc6798beb
7
- data.tar.gz: 4339756d7df8a10a218d906cb12b85af05389056ebddef23219f9f6ecdd75f6c12f9010a4b5164faed85ee72a7e2a3f80f44151dde99cb51b7c8438ce3b92888
6
+ metadata.gz: 356f541c8ce211f7811061fe0cd61d63cb2f4536506a9f80f5332c0893ab24a9a11d50d37e81c52b0ccefdf9f2f0a1734d9e9a49c0c2b6eac21358fa621d570e
7
+ data.tar.gz: 42f02f58909edb6fcaa884b10c5bfa3c79866fd3eb29686c7be64fed0f2577d3b080466f34c0baa5b925a0e3d9384055c49bab0bbbac6a99b6182a523b483a40
@@ -1,6 +1,12 @@
1
1
  module Konjak
2
2
  class Translator
3
3
  class TranslatedString < String
4
+ attr_accessor :source_str
5
+
6
+ def initialize(str, source_str)
7
+ super(str)
8
+ @source_str = source_str
9
+ end
4
10
  end
5
11
  end
6
12
  end
@@ -25,9 +25,9 @@ module Konjak
25
25
  if format == :gtt_html
26
26
  gtt_tags = source_segment.extract_gtt_tags_from(text)
27
27
  translated_string = target_segment.interpolate_gtt_tags(gtt_tags)
28
- TranslatedString.new(translated_string)
28
+ TranslatedString.new(translated_string, text)
29
29
  else
30
- TranslatedString.new(target_segment.text)
30
+ TranslatedString.new(target_segment.text, text)
31
31
  end
32
32
  end
33
33
  end
@@ -1,3 +1,3 @@
1
1
  module Konjak
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: konjak
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seiei Higa