[logaling-commit] logaling/logaling-command [master] Reject term with different target language when checking bilingual pair

Back to archive index

SHIMADA Koji null+****@clear*****
Thu Sep 20 16:31:07 JST 2012


SHIMADA Koji	2012-09-20 16:31:07 +0900 (Thu, 20 Sep 2012)

  New Revision: 9bd61bc97600cf5ae16afd3ddf4b06feea459fd8
  https://github.com/logaling/logaling-command/commit/9bd61bc97600cf5ae16afd3ddf4b06feea459fd8

  Log:
    Reject term with different target language when checking bilingual pair

  Modified files:
    lib/logaling/glossary.rb

  Modified: lib/logaling/glossary.rb (+1 -1)
===================================================================
--- lib/logaling/glossary.rb    2012-09-20 13:51:04 +0900 (485bb6a)
+++ lib/logaling/glossary.rb    2012-09-20 16:31:07 +0900 (0b19a19)
@@ -46,7 +46,7 @@ module Logaling
       Logaling::GlossaryDB.open(@project.glossary_db_path, "utf8") do |db|
         terms = db.get_bilingual_pair(source_term, target_term, @name, note)
       end
-      !terms.empty?
+      !terms.delete_if {|t| t[:target_language] != @target_language.to_sym }.empty?
     end
 
     def add(source_term, target_term, note)
-------------- next part --------------
An HTML attachment was scrubbed...
Download 



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