null+****@clear*****
null+****@clear*****
Mon Jun 18 11:51:25 JST 2012
SUZUKI Miho 2012-06-18 11:51:25 +0900 (Mon, 18 Jun 2012) New Revision: 8e00afa8f1bf75396b05ea8afdb0acfe9ffa3684 https://github.com/logaling/logaling-command/commit/8e00afa8f1bf75396b05ea8afdb0acfe9ffa3684 Log: Add GlossaryDB#deindex_glossary_source Modified files: lib/logaling/glossary_db.rb Modified: lib/logaling/glossary_db.rb (+6 -2) =================================================================== --- lib/logaling/glossary_db.rb 2012-06-18 11:40:05 +0900 (b112cde) +++ lib/logaling/glossary_db.rb 2012-06-18 11:51:25 +0900 (162fd20) @@ -67,14 +67,18 @@ module Logaling delete_glossary_source(glossary_source) end + def deindex_glossary_source(glossary_source) + delete_translations_by_glossary_source(glossary_source.source_path) + delete_glossary_source(glossary_source.source_path) + end + def index_glossary_source(glossary_source) delete_terms if offline_index? glossary = glossary_source.glossary - deindex_glossary(glossary.name, glossary_source.source_path) + deindex_glossary_source(glossary_source) add_glossary_source(glossary_source.source_path, File.mtime(glossary_source.source_path)) - add_glossary(glossary.name) glossary_source.load.each do |term| source_term = term['source_term'] target_term = term['target_term'] -------------- next part -------------- An HTML attachment was scrubbed... ダウンロード