diff --git a/Packages/vChewing_LangModelAssembly/Sources/LangModelAssembly/LMInstantiator.swift b/Packages/vChewing_LangModelAssembly/Sources/LangModelAssembly/LMInstantiator.swift index e6344f54..62b955a9 100644 --- a/Packages/vChewing_LangModelAssembly/Sources/LangModelAssembly/LMInstantiator.swift +++ b/Packages/vChewing_LangModelAssembly/Sources/LangModelAssembly/LMInstantiator.swift @@ -92,7 +92,7 @@ extension vChewingLM { // MARK: - 工具函式 - public var isLanguageModelLoaded: Bool { lmCore.isLoaded } + public var isCoreLMLoaded: Bool { lmCore.isLoaded } public func loadLanguageModel(path: String) { if FileManager.default.isReadableFile(atPath: path) { lmCore.open(path) @@ -219,8 +219,6 @@ extension vChewingLM { // MARK: - 核心函式(對外) - public var isCoreLoaded: Bool { lmCore.isLoaded } - public func hasAssociatedPhrasesFor(pair: Megrez.Compositor.KeyValuePaired) -> Bool { lmAssociates.hasValuesFor(pair: pair) } diff --git a/Source/Modules/LMMgr.swift b/Source/Modules/LMMgr.swift index 496f1ca7..b947f367 100644 --- a/Source/Modules/LMMgr.swift +++ b/Source/Modules/LMMgr.swift @@ -95,7 +95,7 @@ public class LMMgr { } group.leave() } - if !Self.lmCHT.isLanguageModelLoaded { + if !Self.lmCHT.isCoreLMLoaded { showFinishNotification = true Notifier.notify( message: NSLocalizedString("Loading CHT Core Dict...", comment: "") @@ -106,7 +106,7 @@ public class LMMgr { group.leave() } } - if !Self.lmCHS.isLanguageModelLoaded { + if !Self.lmCHS.isCoreLMLoaded { showFinishNotification = true Notifier.notify( message: NSLocalizedString("Loading CHS Core Dict...", comment: "") @@ -159,7 +159,7 @@ public class LMMgr { } switch mode { case .imeModeCHS: - if !Self.lmCHS.isLanguageModelLoaded { + if !Self.lmCHS.isCoreLMLoaded { showFinishNotification = true Notifier.notify( message: NSLocalizedString("Loading CHS Core Dict...", comment: "") @@ -171,7 +171,7 @@ public class LMMgr { } } case .imeModeCHT: - if !Self.lmCHT.isLanguageModelLoaded { + if !Self.lmCHT.isCoreLMLoaded { showFinishNotification = true Notifier.notify( message: NSLocalizedString("Loading CHT Core Dict...", comment: "") diff --git a/Source/Modules/SessionCtl_HandleEvent.swift b/Source/Modules/SessionCtl_HandleEvent.swift index b6c5fa9e..c7d93006 100644 --- a/Source/Modules/SessionCtl_HandleEvent.swift +++ b/Source/Modules/SessionCtl_HandleEvent.swift @@ -104,7 +104,7 @@ extension SessionCtl { guard let inputHandler = inputHandler, client() != nil else { return false } /// 除非核心辭典有載入,否則一律蜂鳴。 - if !LMMgr.currentLM.isCoreLoaded { + if !LMMgr.currentLM.isCoreLMLoaded { if (event as InputSignalProtocol).isReservedKey { return false } var newState: IMEStateProtocol = IMEState.ofEmpty() newState.tooltip = NSLocalizedString("Factory dictionary not loaded yet.", comment: "") + "  "