From d5fbcf5e2c64f459b501a1762c40e054f2505e41 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sat, 22 Oct 2022 11:27:09 +0800 Subject: [PATCH] Repo // Comment updates. --- .../Sources/LangModelAssembly/LMInstantiator.swift | 2 +- Source/Modules/InputHandler_Core.swift | 4 ++-- Source/Modules/InputHandler_HandleCandidate.swift | 2 +- Source/Modules/InputHandler_HandleEvent.swift | 2 +- Source/Modules/InputHandler_HandleInput.swift | 4 ++-- Source/Modules/InputHandler_States.swift | 2 +- Source/Modules/SessionCtl_Core.swift | 4 ++-- Source/Modules/SessionCtl_HandleStates.swift | 4 +++- 8 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Packages/vChewing_LangModelAssembly/Sources/LangModelAssembly/LMInstantiator.swift b/Packages/vChewing_LangModelAssembly/Sources/LangModelAssembly/LMInstantiator.swift index 622f597c..a9b82d69 100644 --- a/Packages/vChewing_LangModelAssembly/Sources/LangModelAssembly/LMInstantiator.swift +++ b/Packages/vChewing_LangModelAssembly/Sources/LangModelAssembly/LMInstantiator.swift @@ -15,7 +15,7 @@ extension vChewingLM { /// 的 LangModelProtocol 協定的模組、統籌且整理來自其它子模組的資料(包括使 /// 用者語彙、繪文字模組、語彙濾除表、原廠語言模組等)。 /// - /// LMI 型別為與輸入法按鍵調度模組直接溝通之唯一語言模組。當組字器開始根據給定的 + /// LMI 型別為與輸入法輸入調度模組直接溝通之唯一語言模組。當組字器開始根據給定的 /// 讀音鏈構築語句時,LMI 會接收來自組字器的讀音、輪流檢查自身是否有可以匹配到的 /// 單元圖結果,然後將結果整理為陣列、再回饋給組字器。 /// diff --git a/Source/Modules/InputHandler_Core.swift b/Source/Modules/InputHandler_Core.swift index fd894794..5f3d064d 100644 --- a/Source/Modules/InputHandler_Core.swift +++ b/Source/Modules/InputHandler_Core.swift @@ -11,7 +11,7 @@ import Megrez import Shared import Tekkon -/// 該檔案乃按鍵調度模組的核心部分,主要承接型別初期化內容、協定內容、以及 +/// 該檔案乃輸入調度模組的核心部分,主要承接型別初期化內容、協定內容、以及 /// 被封裝的「與 Megrez 組字引擎和 Tekkon 注拼引擎對接的」各種工具函式。 /// 注意:不要把 composer 注拼槽與 compositor 組字器這兩個概念搞混。 @@ -48,7 +48,7 @@ public protocol InputHandlerDelegate { // MARK: - 核心 (Kernel). -/// InputHandler 按鍵調度模組。 +/// InputHandler 輸入調度模組。 public class InputHandler: InputHandlerProtocol { /// 委任物件 (SessionCtl),以便呼叫其中的函式。 public var delegate: InputHandlerDelegate? diff --git a/Source/Modules/InputHandler_HandleCandidate.swift b/Source/Modules/InputHandler_HandleCandidate.swift index 4ea784cc..72f33fb0 100644 --- a/Source/Modules/InputHandler_HandleCandidate.swift +++ b/Source/Modules/InputHandler_HandleCandidate.swift @@ -6,7 +6,7 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -/// 該檔案乃按鍵調度模組當中「用來規定在選字窗出現時的按鍵行為」的部分。 +/// 該檔案乃輸入調度模組當中「用來規定在選字窗出現時的按鍵行為」的部分。 import CandidateWindow import CocoaExtension diff --git a/Source/Modules/InputHandler_HandleEvent.swift b/Source/Modules/InputHandler_HandleEvent.swift index 1fee8a68..742c65a4 100644 --- a/Source/Modules/InputHandler_HandleEvent.swift +++ b/Source/Modules/InputHandler_HandleEvent.swift @@ -6,7 +6,7 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -/// 該檔案乃按鍵調度模組當中用來預處理 NSEvent 的模組。 +/// 該檔案乃輸入調度模組當中用來預處理 NSEvent 的模組。 import InputMethodKit import Shared diff --git a/Source/Modules/InputHandler_HandleInput.swift b/Source/Modules/InputHandler_HandleInput.swift index b7eef1d7..656e3a55 100644 --- a/Source/Modules/InputHandler_HandleInput.swift +++ b/Source/Modules/InputHandler_HandleInput.swift @@ -6,8 +6,8 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -/// 該檔案乃按鍵調度模組當中「用來規定當 IMK 接受按鍵訊號時且首次交給按鍵調度模組處理時、 -/// 按鍵調度模組要率先處理」的部分。據此判斷是否需要將按鍵處理委派給其它成員函式。 +/// 該檔案乃輸入調度模組當中「用來規定當 IMK 接受按鍵訊號時且首次交給輸入調度模組處理時、 +/// 輸入調度模組要率先處理」的部分。據此判斷是否需要將按鍵處理委派給其它成員函式。 import CocoaExtension import IMKUtils diff --git a/Source/Modules/InputHandler_States.swift b/Source/Modules/InputHandler_States.swift index 9610ed4c..ca1f65d1 100644 --- a/Source/Modules/InputHandler_States.swift +++ b/Source/Modules/InputHandler_States.swift @@ -6,7 +6,7 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -/// 該檔案乃按鍵調度模組的用以承載「根據按鍵行為來調控模式」的各種成員函式的部分。 +/// 該檔案乃輸入調度模組的用以承載「根據按鍵行為來調控模式」的各種成員函式的部分。 import Megrez import Shared diff --git a/Source/Modules/SessionCtl_Core.swift b/Source/Modules/SessionCtl_Core.swift index 2534fdf2..4abee057 100644 --- a/Source/Modules/SessionCtl_Core.swift +++ b/Source/Modules/SessionCtl_Core.swift @@ -61,7 +61,7 @@ public class SessionCtl: IMKInputController { } } - /// 按鍵調度模組的副本。 + /// 輸入調度模組的副本。 var inputHandler: InputHandlerProtocol = InputHandler( lm: LMMgr.currentLM(), uom: LMMgr.currentUOM(), pref: PrefMgr.shared ) @@ -165,7 +165,7 @@ extension SessionCtl { } } - /// 重設按鍵調度模組,會將當前尚未遞交的內容遞交出去。 + /// 重設輸入調度模組,會將當前尚未遞交的內容遞交出去。 public func resetInputHandler() { // 過濾掉尚未完成拼寫的注音。 if state.type == .ofInputting, PrefMgr.shared.trimUnfinishedReadingsOnCommit { diff --git a/Source/Modules/SessionCtl_HandleStates.swift b/Source/Modules/SessionCtl_HandleStates.swift index 61cc395e..72f57460 100644 --- a/Source/Modules/SessionCtl_HandleStates.swift +++ b/Source/Modules/SessionCtl_HandleStates.swift @@ -34,7 +34,9 @@ extension SessionCtl { /// 針對某一個客體的 deactivateServer() 可能會在使用者切換到另一個客體應用 /// 且開始敲字之後才會執行。這個過程會使得不同的 SessionCtl 副本之間出現 /// 不必要的互相干涉、打斷彼此的工作。 - /// - Parameter newState: 新狀態。 + /// - Parameters: + /// - newState: 新狀態。 + /// - replace: 是否取代現有狀態。 public func handle(state newState: IMEStateProtocol, replace: Bool) { var previous = state if replace { state = newState }