[logaling-commit] logaling/logaling-command [import-tmx] improve to get note

Back to archive index

null+****@clear***** null+****@clear*****
Thu Apr 26 17:09:09 JST 2012


SUZUKI Miho	2012-04-26 17:09:09 +0900 (Thu, 26 Apr 2012)

  New Revision: 5f107156a84b53174a1fef1897b150b5e6bbba74

  Log:
    improve to get note

  Modified files:
    lib/logaling/external_glossaries/tmx.rb

  Modified: lib/logaling/external_glossaries/tmx.rb (+4 -1)
===================================================================
--- lib/logaling/external_glossaries/tmx.rb    2012-04-26 16:41:43 +0900 (99f302e)
+++ lib/logaling/external_glossaries/tmx.rb    2012-04-26 17:09:09 +0900 (b9294fc)
@@ -29,21 +29,24 @@ module Logaling
       tu_nodes.each do |tu|
         original = ""
         translation = ""
+        note = ""
         tu.children.each do |tuv|
           if tuv.name == "tuv"
             lang = tuv["lang"].downcase.sub(/\-.*/, "")
             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"
               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"
               end
             end
           end
         end
-        csv << [original, translation]
+        csv << [original, translation, note]
       end
     end
   end




More information about the logaling-commit mailing list
Back to archive index