null+****@clear*****
null+****@clear*****
Fri Apr 27 16:41:37 JST 2012
SUZUKI Miho 2012-04-27 16:41:37 +0900 (Fri, 27 Apr 2012) New Revision: e5afa24433b3bfedd6c06e86af4de74d70904f6a Merged dc203a9: Merge pull request #58 from logaling/import-tmx Log: add source's note and target's note to note Modified files: lib/logaling/external_glossaries/tmx.rb Modified: lib/logaling/external_glossaries/tmx.rb (+4 -4) =================================================================== --- lib/logaling/external_glossaries/tmx.rb 2012-04-27 15:52:06 +0900 (2e5d130) +++ lib/logaling/external_glossaries/tmx.rb 2012-04-27 16:41:37 +0900 (e31c48f) @@ -29,7 +29,7 @@ module Logaling tu_nodes.each do |tu| original = "" translation = "" - note = "" + note = [] tu.children.each do |tuv| if tuv.name == "tuv" # logaling using ISO 639 codes (two-letter) @@ -37,17 +37,17 @@ module Logaling if lang == glossary_info[:source_language] tuv.children.each do |child| original = child.text.strip if child.name == "seg" - note = child.text.strip if child.name == "note" + note << child.text.strip if child.name == "note" end elsif lang == glossary_info[:target_language] tuv.children.each do |child| translation = child.text.strip if child.name == "seg" - note = child.text.strip if child.name == "note" + note << child.text.strip if child.name == "note" end end end end - csv << [original, translation, note] + csv << [original, translation, note.join(" | ")] end end end