null+****@clear*****
null+****@clear*****
Fri Apr 27 15:52:06 JST 2012
SUZUKI Miho 2012-04-27 15:52:06 +0900 (Fri, 27 Apr 2012) New Revision: 948a431a034dfcce1b1c65e939f240e25c0283b4 Merged dc203a9: Merge pull request #58 from logaling/import-tmx Log: improve pattern Modified files: lib/logaling/external_glossaries/tmx.rb Modified: lib/logaling/external_glossaries/tmx.rb (+2 -1) =================================================================== --- lib/logaling/external_glossaries/tmx.rb 2012-04-27 15:42:33 +0900 (04a7220) +++ lib/logaling/external_glossaries/tmx.rb 2012-04-27 15:52:06 +0900 (2e5d130) @@ -32,7 +32,8 @@ module Logaling note = "" tu.children.each do |tuv| if tuv.name == "tuv" - lang = tuv["lang"].downcase.sub(/\-.*/, "") + # logaling using ISO 639 codes (two-letter) + lang = tuv["lang"].downcase.sub(/-.*\z/, "") if lang == glossary_info[:source_language] tuv.children.each do |child| original = child.text.strip if child.name == "seg"