From b41d1242f8ba4b17d608ea0b9298aac668eb6e84 Mon Sep 17 00:00:00 2001 From: shewer Date: Wed, 5 Jun 2024 06:14:13 +0800 Subject: [PATCH] loading configuration from ticket.schema Signed-off-by: shewer --- src/rime/gear/script_translator.cc | 3 ++- src/rime/gear/table_translator.cc | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rime/gear/script_translator.cc b/src/rime/gear/script_translator.cc index 028b659e58..09e05958ab 100644 --- a/src/rime/gear/script_translator.cc +++ b/src/rime/gear/script_translator.cc @@ -171,7 +171,8 @@ ScriptTranslator::ScriptTranslator(const Ticket& ticket) : Translator(ticket), Memory(ticket), TranslatorOptions(ticket) { if (!engine_) return; - if (Config* config = engine_->schema()->config()) { + if (Config* config = ticket.schema->config()) { + DLOG(INFO) << "loading configuration from schema_id: " << ticket.schema->schema_id(); config->GetInt(name_space_ + "/spelling_hints", &spelling_hints_); config->GetBool(name_space_ + "/always_show_comments", &always_show_comments_); diff --git a/src/rime/gear/table_translator.cc b/src/rime/gear/table_translator.cc index a43a77f939..6ba5f6a82b 100644 --- a/src/rime/gear/table_translator.cc +++ b/src/rime/gear/table_translator.cc @@ -210,7 +210,8 @@ TableTranslator::TableTranslator(const Ticket& ticket) : Translator(ticket), Memory(ticket), TranslatorOptions(ticket) { if (!engine_) return; - if (Config* config = engine_->schema()->config()) { + if (Config* config = ticket.schema->config()) { + DLOG(INFO) << "loading configuration from schema_id: " << ticket.schema->schema_id(); config->GetBool(name_space_ + "/enable_charset_filter", &enable_charset_filter_); config->GetBool(name_space_ + "/enable_sentence", &enable_sentence_);