SessionCtl // Stop receiving inputs until factory dictionary is loaded.

This commit is contained in:
ShikiSuen 2022-12-07 21:18:41 +08:00
parent 0d6a9909d0
commit 7b3509fcdf
6 changed files with 16 additions and 0 deletions

View File

@ -103,6 +103,17 @@ extension SessionCtl {
///
guard let inputHandler = inputHandler, client() != nil else { return false }
///
if !LMMgr.currentLM.isCoreLoaded {
var newState: IMEStateProtocol = IMEState.ofEmpty()
newState.tooltip = NSLocalizedString("Factory dictionary not loaded yet.", comment: "") + "  "
newState.tooltipDuration = 1.85
newState.data.tooltipColorState = .redAlert
switchState(newState)
callError("CoreLM not loaded yet.")
return true
}
var eventToDeal = event
//

View File

@ -16,6 +16,7 @@
"Loading…" = "Loading…";
"Consolidate" = "Consolidate";
"Reload" = "Reload";
"Factory dictionary not loaded yet." = "Factory dictionary not loaded yet.";
"Some features are unavailable for macOS 10.15 and macOS 11 due to API limitations." = "Some features are unavailable for macOS 10.15 and macOS 11 due to API limitations.";
"This editor only: Auto-reload modifications happened outside of this editor" = "This editor only: Auto-reload modifications happened outside of this editor";
"Please select Simplified / Traditional Chinese mode above." = "Please select Simplified / Traditional Chinese mode above.";

View File

@ -16,6 +16,7 @@
"Loading…" = "Loading…";
"Consolidate" = "Consolidate";
"Reload" = "Reload";
"Factory dictionary not loaded yet." = "Factory dictionary not loaded yet.";
"Some features are unavailable for macOS 10.15 and macOS 11 due to API limitations." = "Some features are unavailable for macOS 10.15 and macOS 11 due to API limitations.";
"This editor only: Auto-reload modifications happened outside of this editor" = "This editor only: Auto-reload modifications happened outside of this editor";
"Please select Simplified / Traditional Chinese mode above." = "Please select Simplified / Traditional Chinese mode above.";

View File

@ -16,6 +16,7 @@
"Loading…" = "読み込む中…";
"Consolidate" = "整理";
"Reload" = "再読込";
"Factory dictionary not loaded yet." = "内蔵辞書はまだ読込中。";
"Some features are unavailable for macOS 10.15 and macOS 11 due to API limitations." = "システム API 制限のため、一部の機能は macOS 10.15 と macOS 11 で提供できません。";
"This editor only: Auto-reload modifications happened outside of this editor" = "このエディターの外部からの編集結果をこのエディターに自動的に読み込む";
"Please select Simplified / Traditional Chinese mode above." = "まずは上記のメニューで簡体/繁体中国語モードをお選びください。";

View File

@ -16,6 +16,7 @@
"Loading…" = "正在载入…";
"Consolidate" = "整理";
"Reload" = "重新载入";
"Factory dictionary not loaded yet." = "原厂辞典尚未完成载入。";
"Some features are unavailable for macOS 10.15 and macOS 11 due to API limitations." = "因系统 API 限制,个别功能无法对 macOS 10.15 和 macOS 11 提供。";
"This editor only: Auto-reload modifications happened outside of this editor" = "仅限该编辑器:自动读入来自该编辑器外部的档案内容修改";
"Please select Simplified / Traditional Chinese mode above." = "请先借由上方选单选择简繁模式。";

View File

@ -16,6 +16,7 @@
"Loading…" = "正在載入…";
"Consolidate" = "整理";
"Reload" = "重新載入";
"Factory dictionary not loaded yet." = "原廠辭典尚未完成載入。";
"Some features are unavailable for macOS 10.15 and macOS 11 due to API limitations." = "因系統 API 限制,個別功能無法對 macOS 10.15 和 macOS 11 提供。";
"This editor only: Auto-reload modifications happened outside of this editor" = "僅限該編輯器:自動讀入來自該編輯器外部的檔案內容修改";
"Please select Simplified / Traditional Chinese mode above." = "請先藉由上方選單選擇繁簡模式。";