From c35e839d6f3fec009c84581286cf0be8f1c22370 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Fri, 27 May 2022 20:27:23 +0800 Subject: [PATCH 01/36] KeyHandler // Add "_alt_ctrl_punctuation_". Update KeyHandler_HandleInput.swift --- .../ControllerModules/KeyHandler_HandleCandidate.swift | 6 ++++-- .../Modules/ControllerModules/KeyHandler_HandleInput.swift | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Source/Modules/ControllerModules/KeyHandler_HandleCandidate.swift b/Source/Modules/ControllerModules/KeyHandler_HandleCandidate.swift index 0c73494b..7c631905 100644 --- a/Source/Modules/ControllerModules/KeyHandler_HandleCandidate.swift +++ b/Source/Modules/ControllerModules/KeyHandler_HandleCandidate.swift @@ -310,10 +310,12 @@ extension KeyHandler { if mgrPrefs.useSCPCTypingMode { var punctuationNamePrefix = "" - if input.isOptionHold { + if input.isOptionHold && !input.isControlHold { punctuationNamePrefix = "_alt_punctuation_" - } else if input.isControlHold { + } else if input.isControlHold && !input.isOptionHold { punctuationNamePrefix = "_ctrl_punctuation_" + } else if input.isControlHold && input.isOptionHold { + punctuationNamePrefix = "_alt_ctrl_punctuation_" } else if mgrPrefs.halfWidthPunctuationEnabled { punctuationNamePrefix = "_half_punctuation_" } else { diff --git a/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift b/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift index dbf50d43..a78b0055 100644 --- a/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift +++ b/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift @@ -382,10 +382,12 @@ extension KeyHandler { var punctuationNamePrefix = "" - if input.isOptionHold { + if input.isOptionHold && !input.isControlHold { punctuationNamePrefix = "_alt_punctuation_" - } else if input.isControlHold { + } else if input.isControlHold && !input.isOptionHold { punctuationNamePrefix = "_ctrl_punctuation_" + } else if input.isControlHold && input.isOptionHold { + punctuationNamePrefix = "_alt_ctrl_punctuation_" } else if mgrPrefs.halfWidthPunctuationEnabled { punctuationNamePrefix = "_half_punctuation_" } else { From bca5855313d59023b1a186dc05860ed078d21080 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Fri, 27 May 2022 21:17:23 +0800 Subject: [PATCH 02/36] Data // Add Alt-Ctrl Punctuations. --- Source/Data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Data b/Source/Data index 5560b6d2..66ba5a24 160000 --- a/Source/Data +++ b/Source/Data @@ -1 +1 @@ -Subproject commit 5560b6d252259f624cd614dfec84b1cfe2e83ec4 +Subproject commit 66ba5a24330a25fbf23226e6f6b56172ba4be5cb From 116360a05daa6ff98678e8e9f17c83d5109e2c14 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Fri, 27 May 2022 22:13:25 +0800 Subject: [PATCH 03/36] mgrPrefs // Add options for keyboard hotkeys. --- Source/Modules/IMEModules/mgrPrefs.swift | 74 +++++++++++------------- 1 file changed, 34 insertions(+), 40 deletions(-) diff --git a/Source/Modules/IMEModules/mgrPrefs.swift b/Source/Modules/IMEModules/mgrPrefs.swift index 7d86f399..ec346d79 100644 --- a/Source/Modules/IMEModules/mgrPrefs.swift +++ b/Source/Modules/IMEModules/mgrPrefs.swift @@ -63,6 +63,13 @@ struct UserDef { static let kAssociatedPhrasesEnabled = "AssociatedPhrasesEnabled" static let kPhraseReplacementEnabled = "PhraseReplacementEnabled" + + static let kUsingHotKeySCPC = "UsingHotKeySCPC" + static let kUsingHotKeyAssociates = "UsingHotKeyAssociates" + static let kUsingHotKeyCNS = "UsingHotKeyCNS" + static let kUsingHotKeyKangXi = "UsingHotKeyKangXi" + static let kUsingHotKeyJIS = "UsingHotKeyJIS" + static let kUsingHotKeyHalfWidthASCII = "UsingHotKeyHalfWidthASCII" } private let kDefaultCandidateListTextSize: CGFloat = 18 @@ -217,46 +224,6 @@ enum MandarinParser: Int { // MARK: - public enum mgrPrefs { - static var allKeys: [String] { - [ - UserDef.kIsDebugModeEnabled, - UserDef.kUseScoreBalancing, - UserDef.kMostRecentInputMode, - UserDef.kUserDataFolderSpecified, - UserDef.kMandarinParser, - UserDef.kBasicKeyboardLayout, - UserDef.kShowPageButtonsInCandidateWindow, - UserDef.kCandidateListTextSize, - UserDef.kAppleLanguages, - UserDef.kShouldAutoReloadUserDataFiles, - UserDef.kSetRearCursorMode, - UserDef.kUseHorizontalCandidateList, - UserDef.kComposingBufferSize, - UserDef.kChooseCandidateUsingSpace, - UserDef.kCNS11643Enabled, - UserDef.kSymbolInputEnabled, - UserDef.kChineseConversionEnabled, - UserDef.kShiftJISShinjitaiOutputEnabled, - UserDef.kHalfWidthPunctuationEnabled, - UserDef.kSpecifyShiftTabKeyBehavior, - UserDef.kSpecifyShiftSpaceKeyBehavior, - UserDef.kEscToCleanInputBuffer, - UserDef.kCandidateTextFontName, - UserDef.kCandidateKeyLabelFontName, - UserDef.kCandidateKeys, - UserDef.kMoveCursorAfterSelectingCandidate, - UserDef.kPhraseReplacementEnabled, - UserDef.kUseSCPCTypingMode, - UserDef.kMaxCandidateLength, - UserDef.kShouldNotFartInLieuOfBeep, - UserDef.kShowHanyuPinyinInCompositionBuffer, - UserDef.kInlineDumpPinyinInLieuOfZhuyin, - UserDef.kAssociatedPhrasesEnabled, - ] - } - - // MARK: - 既然 Preferences Module 的預設屬性不自動寫入 plist,那這邊就先寫入了。 - public static func setMissingDefaults() { UserDefaults.standard.setDefault(mgrPrefs.isDebugModeEnabled, forKey: UserDef.kIsDebugModeEnabled) UserDefaults.standard.setDefault(mgrPrefs.useScoreBalancing, forKey: UserDef.kUseScoreBalancing) @@ -302,6 +269,13 @@ public enum mgrPrefs { mgrPrefs.inlineDumpPinyinInLieuOfZhuyin, forKey: UserDef.kInlineDumpPinyinInLieuOfZhuyin ) + UserDefaults.standard.setDefault(mgrPrefs.usingHotKeySCPC, forKey: UserDef.kUsingHotKeySCPC) + UserDefaults.standard.setDefault(mgrPrefs.usingHotKeyAssociates, forKey: UserDef.kUsingHotKeyAssociates) + UserDefaults.standard.setDefault(mgrPrefs.usingHotKeyCNS, forKey: UserDef.kUsingHotKeyCNS) + UserDefaults.standard.setDefault(mgrPrefs.usingHotKeyKangXi, forKey: UserDef.kUsingHotKeyKangXi) + UserDefaults.standard.setDefault(mgrPrefs.usingHotKeyJIS, forKey: UserDef.kUsingHotKeyJIS) + UserDefaults.standard.setDefault(mgrPrefs.usingHotKeyHalfWidthASCII, forKey: UserDef.kUsingHotKeyHalfWidthASCII) + UserDefaults.standard.synchronize() } @@ -554,4 +528,24 @@ public enum mgrPrefs { UserDefaults.standard.set(associatedPhrasesEnabled, forKey: UserDef.kAssociatedPhrasesEnabled) return associatedPhrasesEnabled } + + // MARK: - Keyboard HotKey Enable / Disable + + @UserDefault(key: UserDef.kUsingHotKeySCPC, defaultValue: true) + static var usingHotKeySCPC: Bool + + @UserDefault(key: UserDef.kUsingHotKeyAssociates, defaultValue: true) + static var usingHotKeyAssociates: Bool + + @UserDefault(key: UserDef.kUsingHotKeyCNS, defaultValue: true) + static var usingHotKeyCNS: Bool + + @UserDefault(key: UserDef.kUsingHotKeyKangXi, defaultValue: true) + static var usingHotKeyKangXi: Bool + + @UserDefault(key: UserDef.kUsingHotKeyJIS, defaultValue: true) + static var usingHotKeyJIS: Bool + + @UserDefault(key: UserDef.kUsingHotKeyHalfWidthASCII, defaultValue: true) + static var usingHotKeyHalfWidthASCII: Bool } From 60b4c935a98cef48f55572d829848b3100bcbd46 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Fri, 27 May 2022 22:27:20 +0800 Subject: [PATCH 04/36] PrefUI // Add options for keyboard hotkeys. --- .../Resources/Base.lproj/Localizable.strings | 1 + Source/Resources/en.lproj/Localizable.strings | 1 + Source/Resources/ja.lproj/Localizable.strings | 1 + .../zh-Hans.lproj/Localizable.strings | 3 +- .../zh-Hant.lproj/Localizable.strings | 3 +- Source/UI/PrefUI/suiPrefPaneKeyboard.swift | 53 +++++++++++++++++++ 6 files changed, 60 insertions(+), 2 deletions(-) diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 77feb523..0438965e 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -130,6 +130,7 @@ "in front of the phrase (like macOS built-in Zhuyin IME)" = "in front of the phrase (like macOS built-in Zhuyin IME)"; "Japanese" = "Japanese"; "Keyboard" = "Keyboard"; +"Keyboard Shortcuts:" = "Keyboard Shortcuts:"; "Misc Settings:" = "Misc Settings:"; "MiTAC" = "MiTAC"; "Non-QWERTY alphanumeral keyboard layouts are for Hanyu Pinyin parser only." = "Non-QWERTY alphanumeral keyboard layouts are for Hanyu Pinyin parser only."; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 77feb523..0438965e 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -130,6 +130,7 @@ "in front of the phrase (like macOS built-in Zhuyin IME)" = "in front of the phrase (like macOS built-in Zhuyin IME)"; "Japanese" = "Japanese"; "Keyboard" = "Keyboard"; +"Keyboard Shortcuts:" = "Keyboard Shortcuts:"; "Misc Settings:" = "Misc Settings:"; "MiTAC" = "MiTAC"; "Non-QWERTY alphanumeral keyboard layouts are for Hanyu Pinyin parser only." = "Non-QWERTY alphanumeral keyboard layouts are for Hanyu Pinyin parser only."; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 812521c2..d3d58d5b 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -130,6 +130,7 @@ "in front of the phrase (like macOS built-in Zhuyin IME)" = "単語の前で // macOS 内蔵注音入力のやり方"; "Japanese" = "和語"; "Keyboard" = "配列設定"; +"Keyboard Shortcuts:" = "ショートカット:"; "Misc Settings:" = "他の設定:"; "MiTAC" = "神通配列"; "Non-QWERTY alphanumeral keyboard layouts are for Hanyu Pinyin parser only." = "QWERTY 以外の英数キーボードは漢語弁音以外の配列に不適用。"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 928d130e..c8ef2517 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -15,7 +15,7 @@ "Not Now" = "以后再说"; "Visit Website" = "前往网站"; "You're currently using vChewing %@ (%@), a new version %@ (%@) is now available. Do you want to visit vChewing's website to download the version?%@" = "目前使用的威注音官方版本是 %1$@ (%2$@),网路上有更新版本 %3$@ (%4$@) 可供下载。是否要前往威注音网站下载新版来安装?%5$@"; -"Force KangXi Writing" = "康熙繁体字模式"; +"Force KangXi Writing" = "康熙正体字模式"; "NotificationSwitchON" = "✔ 已启用"; "NotificationSwitchOFF" = "✘ 已停用"; "Edit User Phrases…" = "编辑自订语汇…"; @@ -131,6 +131,7 @@ "in front of the phrase (like macOS built-in Zhuyin IME)" = "将游标置于词语前方 // macOS 内建注音风格"; "Japanese" = "和语"; "Keyboard" = "键盘"; +"Keyboard Shortcuts:" = "键盘快捷键:"; "Misc Settings:" = "杂项:"; "MiTAC" = "神通排列"; "Non-QWERTY alphanumeral keyboard layouts are for Hanyu Pinyin parser only." = "QWERTY 以外的英数布局是为了汉语拼音排列使用者而准备的。"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index faa80a99..3a1579cd 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -15,7 +15,7 @@ "Not Now" = "以後再說"; "Visit Website" = "前往網站"; "You're currently using vChewing %@ (%@), a new version %@ (%@) is now available. Do you want to visit vChewing's website to download the version?%@" = "目前使用的威注音官方版本是 %1$@ (%2$@),網路上有更新版本 %3$@ (%4$@) 可供下載。是否要前往威注音網站下載新版來安裝?%5$@"; -"Force KangXi Writing" = "康熙繁體字模式"; +"Force KangXi Writing" = "康熙正體字模式"; "NotificationSwitchON" = "✔ 已啟用"; "NotificationSwitchOFF" = "✘ 已停用"; "Edit User Phrases…" = "編輯自訂語彙…"; @@ -130,6 +130,7 @@ "in front of the phrase (like macOS built-in Zhuyin IME)" = "將游標置於詞語前方 // macOS 內建注音風格"; "Japanese" = "和語"; "Keyboard" = "鍵盤"; +"Keyboard Shortcuts:" = "鍵盤快速鍵:"; "Misc Settings:" = "雜項:"; "MiTAC" = "神通排列"; "Non-QWERTY alphanumeral keyboard layouts are for Hanyu Pinyin parser only." = "QWERTY 以外的英數佈局是為了漢語拼音排列使用者而準備的。"; diff --git a/Source/UI/PrefUI/suiPrefPaneKeyboard.swift b/Source/UI/PrefUI/suiPrefPaneKeyboard.swift index edeed2b8..27fbae6e 100644 --- a/Source/UI/PrefUI/suiPrefPaneKeyboard.swift +++ b/Source/UI/PrefUI/suiPrefPaneKeyboard.swift @@ -29,6 +29,15 @@ struct suiPrefPaneKeyboard: View { @State private var selMandarinParser = UserDefaults.standard.integer(forKey: UserDef.kMandarinParser) @State private var selBasicKeyboardLayout: String = UserDefaults.standard.string(forKey: UserDef.kBasicKeyboardLayout) ?? mgrPrefs.basicKeyboardLayout + + @State private var selUsingHotKeySCPC = UserDefaults.standard.bool(forKey: UserDef.kUsingHotKeySCPC) + @State private var selUsingHotKeyAssociates = UserDefaults.standard.bool(forKey: UserDef.kUsingHotKeyAssociates) + @State private var selUsingHotKeyCNS = UserDefaults.standard.bool(forKey: UserDef.kUsingHotKeyCNS) + @State private var selUsingHotKeyKangXi = UserDefaults.standard.bool(forKey: UserDef.kUsingHotKeyKangXi) + @State private var selUsingHotKeyJIS = UserDefaults.standard.bool(forKey: UserDef.kUsingHotKeyJIS) + @State private var selUsingHotKeyHalfWidthASCII = UserDefaults.standard.bool( + forKey: UserDef.kUsingHotKeyHalfWidthASCII) + private let contentWidth: Double = { switch mgrPrefs.appleLanguages[0] { case "ja": @@ -122,6 +131,50 @@ struct suiPrefPaneKeyboard: View { Text(LocalizedStringKey("Choose the macOS-level basic keyboard layout.")) .preferenceDescription() } + Preferences.Section(bottomDivider: true, label: { Text(LocalizedStringKey("Keyboard Shortcuts:")) }) { + Toggle( + LocalizedStringKey("Per-Char Select Mode"), + isOn: $selUsingHotKeySCPC + ).onChange(of: selUsingHotKeySCPC) { value in + mgrPrefs.usingHotKeySCPC = value + selUsingHotKeySCPC = value + } + Toggle( + LocalizedStringKey("Per-Char Associated Phrases"), + isOn: $selUsingHotKeyAssociates + ).onChange(of: selUsingHotKeyAssociates) { value in + mgrPrefs.usingHotKeyAssociates = value + selUsingHotKeyAssociates = value + } + Toggle( + LocalizedStringKey("CNS11643 Mode"), + isOn: $selUsingHotKeyCNS + ).onChange(of: selUsingHotKeyCNS) { value in + mgrPrefs.usingHotKeyCNS = value + selUsingHotKeyCNS = value + } + Toggle( + LocalizedStringKey("Force KangXi Writing"), + isOn: $selUsingHotKeyKangXi + ).onChange(of: selUsingHotKeyKangXi) { value in + mgrPrefs.usingHotKeyKangXi = value + selUsingHotKeyKangXi = value + } + Toggle( + LocalizedStringKey("JIS Shinjitai Output"), + isOn: $selUsingHotKeyJIS + ).onChange(of: selUsingHotKeyJIS) { value in + mgrPrefs.usingHotKeyJIS = value + selUsingHotKeyJIS = value + } + Toggle( + LocalizedStringKey("Half-Width Punctuation Mode"), + isOn: $selUsingHotKeyHalfWidthASCII + ).onChange(of: selUsingHotKeyHalfWidthASCII) { value in + mgrPrefs.usingHotKeyHalfWidthASCII = value + selUsingHotKeyHalfWidthASCII = value + } + } } Divider() Preferences.Container(contentWidth: contentWidth) { From b665175edff73c334c760b57497a28791d492540 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Fri, 27 May 2022 22:45:04 +0800 Subject: [PATCH 05/36] PrefWindow // Add options for keyboard hotkeys. --- .../WindowNIBs/Base.lproj/frmPrefWindow.xib | 114 ++++++++++++++++-- .../WindowNIBs/en.lproj/frmPrefWindow.strings | 8 ++ .../WindowNIBs/ja.lproj/frmPrefWindow.strings | 8 ++ .../zh-Hans.lproj/frmPrefWindow.strings | 8 ++ .../zh-Hant.lproj/frmPrefWindow.strings | 8 ++ 5 files changed, 137 insertions(+), 9 deletions(-) diff --git a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index 5ae27bfc..25997702 100644 --- a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -748,13 +748,13 @@ - + - + - + @@ -765,7 +765,7 @@ - + @@ -777,7 +777,7 @@ - + @@ -789,7 +789,7 @@ - + @@ -820,7 +820,7 @@ - + @@ -834,7 +834,7 @@ - + @@ -864,9 +864,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/Source/WindowNIBs/en.lproj/frmPrefWindow.strings b/Source/WindowNIBs/en.lproj/frmPrefWindow.strings index bedd40a6..eaa55fa4 100644 --- a/Source/WindowNIBs/en.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/en.lproj/frmPrefWindow.strings @@ -250,3 +250,11 @@ /* Class = "NSButtonCell"; title = "Balance the score according to candidate length"; ObjectID = "Wh1-iz-pwM"; */ "Wh1-iz-pwM.title" = "Balance the score according to candidate length"; + +"xibKeyboardShortcuts.title" = "Keyboard Shortcuts"; +"xibUsingHotKeySCPC.title" = "Per-Char Select Mode"; +"xibUsingHotKeyAssociates.title" = "Per-Char Associated Phrases"; +"xibUsingHotKeyCNS.title" = "CNS11643 Mode"; +"xibUsingHotKeyKangXi.title" = "Force KangXi Writing"; +"xibUsingHotKeyJIS.title" = "JIS Shinjitai Output"; +"xibUsingHotKeyHalfWidthASCII.title" = "Half-Width Punctuation Mode"; diff --git a/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings b/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings index 3e03d3f2..825335c4 100644 --- a/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings @@ -250,3 +250,11 @@ /* Class = "NSButtonCell"; title = "Balance the score according to candidate length"; ObjectID = "Wh1-iz-pwM"; */ "Wh1-iz-pwM.title" = "候補文字の長さによる重みの調整"; + +"xibKeyboardShortcuts.title" = "ショートカット"; +"xibUsingHotKeySCPC.title" = "全候補入力モード"; +"xibUsingHotKeyAssociates.title" = "全候補入力で連想語彙"; +"xibUsingHotKeyCNS.title" = "全字庫モード"; +"xibUsingHotKeyKangXi.title" = "康熙文字変換モード"; +"xibUsingHotKeyJIS.title" = "JIS 新字体モード"; +"xibUsingHotKeyHalfWidthASCII.title" = "半角句読モード"; diff --git a/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings b/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings index b18b0a94..62b23bc0 100644 --- a/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings @@ -250,3 +250,11 @@ /* Class = "NSButtonCell"; title = "Balance the score according to candidate length"; ObjectID = "Wh1-iz-pwM"; */ "Wh1-iz-pwM.title" = "按候选字词的长度调整权重"; + +"xibKeyboardShortcuts.title" = "键盘快捷键"; +"xibUsingHotKeySCPC.title" = "模拟逐字选字输入"; +"xibUsingHotKeyAssociates.title" = "逐字选字联想模式"; +"xibUsingHotKeyCNS.title" = "全字库模式"; +"xibUsingHotKeyKangXi.title" = "康熙正体字模式"; +"xibUsingHotKeyJIS.title" = "JIS 新字体模式"; +"xibUsingHotKeyHalfWidthASCII.title" = "半形标点模式"; diff --git a/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings b/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings index db47c17e..ca8a618a 100644 --- a/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings @@ -250,3 +250,11 @@ /* Class = "NSButtonCell"; title = "Balance the score according to candidate length"; ObjectID = "Wh1-iz-pwM"; */ "Wh1-iz-pwM.title" = "按候選字詞的長度調整權重"; + +"xibKeyboardShortcuts.title" = "鍵盤快速鍵"; +"xibUsingHotKeySCPC.title" = "模擬逐字選字輸入"; +"xibUsingHotKeyAssociates.title" = "逐字選字聯想模式"; +"xibUsingHotKeyCNS.title" = "全字庫模式"; +"xibUsingHotKeyKangXi.title" = "康熙正體字模式"; +"xibUsingHotKeyJIS.title" = "JIS 新字體模式"; +"xibUsingHotKeyHalfWidthASCII.title" = "半形標點模式"; From e7f569cb5f485ae2e372d2c6de301a377dbfd6b1 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Fri, 27 May 2022 23:14:02 +0800 Subject: [PATCH 06/36] PrefWindow // Remove comments from i18n files. --- .../WindowNIBs/Base.lproj/frmPrefWindow.xib | 6 - .../WindowNIBs/en.lproj/frmPrefWindow.strings | 169 ------------------ .../WindowNIBs/ja.lproj/frmPrefWindow.strings | 169 ------------------ .../zh-Hans.lproj/frmPrefWindow.strings | 169 ------------------ .../zh-Hant.lproj/frmPrefWindow.strings | 169 ------------------ 5 files changed, 682 deletions(-) diff --git a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index 25997702..d646b15a 100644 --- a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -878,7 +878,6 @@ - @@ -889,7 +888,6 @@ - @@ -900,7 +898,6 @@ - @@ -911,7 +908,6 @@ - @@ -922,7 +918,6 @@ - @@ -933,7 +928,6 @@ - diff --git a/Source/WindowNIBs/en.lproj/frmPrefWindow.strings b/Source/WindowNIBs/en.lproj/frmPrefWindow.strings index eaa55fa4..473a47e8 100644 --- a/Source/WindowNIBs/en.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/en.lproj/frmPrefWindow.strings @@ -1,256 +1,87 @@ - -/* Class = "NSWindow"; title = "vChewing Preferences"; ObjectID = "1"; */ "1.title" = "vChewing Preferences"; - -/* Class = "NSButtonCell"; title = "Debug Mode"; ObjectID = "sZx-18-8dO"; */ "sZx-18-8dO.title" = "Debug Mode"; - -/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "5"; */ "5.title" = "OtherViews"; - -/* Class = "NSMenuItem"; title = "Standard"; ObjectID = "6"; */ "6.title" = "Microsoft, Dachen, Wang, etc."; - -/* Class = "NSMenuItem"; title = "ETen"; ObjectID = "7"; */ "7.title" = "ETen"; - -/* Class = "NSMenuItem"; title = "Hsu"; ObjectID = "8"; */ "8.title" = "Hsu"; - -/* Class = "NSMenuItem"; title = "ETen26"; ObjectID = "9"; */ "9.title" = "ETen26"; - -/* Class = "NSMenuItem"; title = "Hanyu Pinyin with Numeral Intonation"; ObjectID = "10"; */ "10.title" = "Hanyu Pinyin with Numeral Intonation"; - -/* Class = "NSTextFieldCell"; title = "BPMF Parser:"; ObjectID = "12"; */ "12.title" = "BPMF Parser:"; - -/* Class = "NSTextFieldCell"; title = "Choose the cursor position where you want to list possible candidates."; ObjectID = "14"; */ "14.title" = "Choose the cursor position where you want to list possible candidates."; - -/* Class = "NSButtonCell"; title = "Cursor in front of the phrase (like macOS built-in Zhuyin IME)"; ObjectID = "16"; */ "16.title" = "Cursor in front of the phrase (like macOS built-in Zhuyin IME)"; - -/* Class = "NSButtonCell"; title = "Cursor at anyplace else (like Windows Yahoo KeyKey)"; ObjectID = "17"; */ "17.title" = "Cursor at anyplace else (like Windows Yahoo KeyKey)"; - -/* Class = "NSButtonCell"; title = "Radio"; ObjectID = "18"; */ "18.title" = "Radio"; - -/* Class = "NSButtonCell"; title = "Radio"; ObjectID = "20"; */ "20.title" = "Radio"; - -/* Class = "NSButtonCell"; title = "Horizontal"; ObjectID = "21"; */ "21.title" = "Horizontal"; - -/* Class = "NSButtonCell"; title = "Vertical"; ObjectID = "22"; */ "22.title" = "Vertical"; - -/* Class = "NSButtonCell"; title = "Show page buttons in candidate list"; ObjectID = "shc-Nu-UsM"; */ "shc-Nu-UsM.title" = "Show page buttons in candidate list"; - -/* Class = "NSTextFieldCell"; title = "Candidate List Layout:"; ObjectID = "24"; */ "24.title" = "Candidate List Layout:"; - -/* Class = "NSTextFieldCell"; title = "Candidate UI font size:"; ObjectID = "29"; */ "29.title" = "Candidate UI font size:"; - -/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "92"; */ "92.title" = "OtherViews"; - -/* Class = "NSMenuItem"; title = "12"; ObjectID = "93"; */ "93.title" = "12"; - -/* Class = "NSMenuItem"; title = "14"; ObjectID = "94"; */ "94.title" = "14"; - -/* Class = "NSMenuItem"; title = "16"; ObjectID = "95"; */ "95.title" = "16"; - -/* Class = "NSMenuItem"; title = "18"; ObjectID = "96"; */ "96.title" = "18"; - -/* Class = "NSMenuItem"; title = "24"; ObjectID = "98"; */ "98.title" = "24"; - -/* Class = "NSMenuItem"; title = "32"; ObjectID = "99"; */ "99.title" = "32"; - -/* Class = "NSMenuItem"; title = "64"; ObjectID = "100"; */ "100.title" = "64"; - -/* Class = "NSMenuItem"; title = "96"; ObjectID = "101"; */ "101.title" = "96"; - -/* Class = "NSButtonCell"; title = "Enable Space key for calling candidate window"; ObjectID = "110"; */ "110.title" = "Enable Space key for calling candidate window"; - -/* Class = "NSTextFieldCell"; title = "Basic Layout:"; ObjectID = "126"; */ "126.title" = "Basic Layout:"; - -/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "128"; */ "128.title" = "OtherViews"; - -/* Class = "NSMenuItem"; title = "IBM"; ObjectID = "137"; */ "137.title" = "IBM"; - -/* Class = "NSMenuItem"; title = "MiTAC"; ObjectID = "7fV-x8-WHQ"; */ "7fV-x8-WHQ.title" = "MiTAC"; - -/* Class = "NSMenuItem"; title = "Fake Seigyou"; ObjectID = "27F-8T-FkQ"; */ "27F-8T-FkQ.title" = "Fake Seigyou (similar to JinYei)"; - -/* Class = "NSTabViewItem"; label = "Keyboard"; ObjectID = "1AW-xf-c2f"; */ "1AW-xf-c2f.label" = "Keyboard"; - -/* Class = "NSBox"; title = "General Settings"; ObjectID = "2Y6-Am-WM1"; */ "2Y6-Am-WM1.title" = "General Settings"; - -/* Class = "NSTextFieldCell"; title = "Choose which keys you prefer for selecting candidates."; ObjectID = "2pS-nv-te4"; */ "2pS-nv-te4.title" = "Choose which keys you prefer for selecting candidates."; - -/* Class = "NSButtonCell"; title = "Stop farting (when typed phonetic combination is invalid, etc.)"; ObjectID = "62u-jY-BRh"; */ "62u-jY-BRh.title" = "Stop farting (when typed phonetic combination is invalid, etc.)"; - -/* Class = "NSTextFieldCell"; title = "UI language setting:"; ObjectID = "9DS-Rc-TXq"; */ "9DS-Rc-TXq.title" = "UI language setting:"; - -/* Class = "NSButtonCell"; title = "Emulating select-candidate-per-character mode"; ObjectID = "ArK-Vk-OoT"; */ "ArK-Vk-OoT.title" = "Emulating select-candidate-per-character mode"; - -/* Class = "NSButtonCell"; title = "Auto-convert traditional Chinese glyphs to KangXi characters"; ObjectID = "BSK-bH-Gct"; */ "BSK-bH-Gct.title" = "Auto-convert traditional Chinese glyphs to KangXi characters"; - -/* Class = "NSButtonCell"; title = "Auto-convert traditional Chinese glyphs to KangXi characters"; ObjectID = "eia-1F-Do0"; */ "eia-1F-Do0.title" = "Auto-convert traditional Chinese glyphs to JIS Shinjitai characters"; - -/* Class = "NSBox"; title = "Advanced Settings"; ObjectID = "E1l-m8-xgb"; */ "E1l-m8-xgb.title" = "Advanced Settings"; - -/* Class = "NSMenuItem"; title = "English"; ObjectID = "FSG-lN-CJO"; */ "FSG-lN-CJO.title" = "English"; - -/* Class = "NSTextFieldCell"; title = "Selection Keys:"; ObjectID = "FnD-oH-El5"; */ "FnD-oH-El5.title" = "Selection Keys:"; - -/* Class = "NSMenuItem"; title = "Auto-Select"; ObjectID = "GlJ-Ns-9eE"; */ "GlJ-Ns-9eE.title" = "Auto-Select"; - -/* Class = "NSTabViewItem"; label = "General"; ObjectID = "QUQ-oY-4Hc"; */ "QUQ-oY-4Hc.label" = "General"; - -/* Class = "NSTextFieldCell"; title = "Choose your preferred keyboard layout and phonetic parser."; ObjectID = "RQ6-MS-m4C"; */ "RQ6-MS-m4C.title" = "Choose your preferred keyboard layout and phonetic parser."; - -/* Class = "NSButtonCell"; title = "Push the cursor in front of the phrase after selection"; ObjectID = "RUG-ls-KyA"; */ "RUG-ls-KyA.title" = "Push the cursor in front of the phrase after selection"; - -/* Class = "NSMenuItem"; title = "Traditional Chinese"; ObjectID = "TXr-FF-ehw"; */ "TXr-FF-ehw.title" = "Traditional Chinese"; - -/* Class = "NSBox"; title = "Output Settings"; ObjectID = "Uyz-xL-TVN"; */ "Uyz-xL-TVN.title" = "Output Settings"; - -/* Class = "NSButtonCell"; title = "Enable CNS11643 Support (2022-04-27)"; ObjectID = "W24-T4-cg0"; */ "W24-T4-cg0.title" = "Enable CNS11643 Support (2022-04-27)"; - -/* Class = "NSBox"; title = "Keyboard Layout"; ObjectID = "Wvt-HE-LOv"; */ "Wvt-HE-LOv.title" = "Keyboard Layout"; - -/* Class = "NSButtonCell"; title = "Check for updates automatically"; ObjectID = "Z9t-P0-BLF"; */ "Z9t-P0-BLF.title" = "Check for updates automatically"; - -/* Class = "NSTextFieldCell"; title = "Change user interface language (will reboot the IME)."; ObjectID = "ZEv-Q2-mYL"; */ "ZEv-Q2-mYL.title" = "Change user interface language (will reboot the IME)."; - -/* Class = "NSMenuItem"; title = "Simplified Chinese"; ObjectID = "akC-2g-ybz"; */ "akC-2g-ybz.title" = "Simplified Chinese"; - -/* Class = "NSButtonCell"; title = "Use ESC key to clear the entire input buffer"; ObjectID = "f2j-xD-4xK"; */ "f2j-xD-4xK.title" = "Use ESC key to clear the entire input buffer"; - -/* Class = "NSButtonCell"; title = "Automatically reload user data files if changes detected"; ObjectID = "f8i-69-zxm"; */ "f8i-69-zxm.title" = "Automatically reload user data files if changes detected"; - -/* Class = "NSTextFieldCell"; title = "Change UI font size of candidate window for a better visual clarity."; ObjectID = "iRg-wx-Nx2"; */ "iRg-wx-Nx2.title" = "Change UI font size of candidate window for a better visual clarity."; - -/* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[0] = "Item 1"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[0]" = "Item 1"; - -/* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[1] = "Item 2"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[1]" = "Item 2"; - -/* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[2] = "Item 3"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[2]" = "Item 3"; - -/* Class = "NSMenuItem"; title = "Japanese"; ObjectID = "rVQ-Hx-cGi"; */ "rVQ-Hx-cGi.title" = "Japanese"; - -/* Class = "NSBox"; title = "Dictionary and Language Models"; ObjectID = "cf2-se-PDO"; */ "cf2-se-PDO.title" = "Dictionary and Language Models"; - -/* Class = "NSTextFieldCell"; title = "Choose your preferred layout of the candidate window."; ObjectID = "xC5-yV-1W1"; */ "xC5-yV-1W1.title" = "Choose your preferred layout of the candidate window."; - -/* Class = "NSTabViewItem"; label = "Advanced"; ObjectID = "xrE-8T-WKO"; */ "xrE-8T-WKO.label" = "Advanced"; - -/* Class = "NSTabViewItem"; label = "Dictionary"; ObjectID = "2iG-Ic-gbl"; */ "2iG-Ic-gbl.label" = "Dictionary"; - -/* Class = "NSTextFieldCell"; title = "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional."; ObjectID = "wQ9-px-b07"; */ "wQ9-px-b07.title" = "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional."; - -/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Tab key in the candidate window."; ObjectID = "ueU-Rz-a1C"; */ "ueU-Rz-a1C.title" = "Choose the behavior of (Shift+)Tab key in the candidate window."; - -/* Class = "NSButtonCell"; title = "Cycling Pages"; ObjectID = "s7u-Fm-dVg"; */ "s7u-Fm-dVg.title" = "Cycling Pages"; - -/* Class = "NSButtonCell"; title = "Cycling Candidates"; ObjectID = "FVC-br-H57"; */ "FVC-br-H57.title" = "Cycling Candidates"; - -/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Space key in the candidate window."; ObjectID = "Pg5-G9-pY5"; */ "Pg5-G9-pY5.title" = "Choose the behavior of (Shift+)Space key in the candidate window."; - -/* Class = "NSButtonCell"; title = "Space to +cycle pages, Shift+Space to +cycle candidates"; ObjectID = "XqL-rf-X6d"; */ "XqL-rf-X6d.title" = "Space to +cycle pages, Shift+Space to +cycle candidates"; - -/* Class = "NSButtonCell"; title = "Space to +cycle candidates, Shift+Space to +cycle pages"; ObjectID = "dIN-TZ-67g"; */ "dIN-TZ-67g.title" = "Space to +cycle candidates, Shift+Space to +cycle pages"; - -/* Class = "NSButtonCell"; title = "Enable symbol input support (incl. certain emoji symbols)"; ObjectID = "hSv-LJ-Cq3"; */ "hSv-LJ-Cq3.title" = "Enable symbol input support (incl. certain emoji symbols)"; - -/* Class = "NSTextFieldCell"; title = "Choose your desired user data folder path. Will be omitted if invalid."; ObjectID = "wN3-k3-b2a"; */ "wN3-k3-b2a.title" = "Choose your desired user data folder path. Will be omitted if invalid."; - -/* Class = "NSButtonCell"; title = "Show Hanyu-Pinyin in the inline composition buffer"; ObjectID = "wFR-zX-M8H"; */ "wFR-zX-M8H.title" = "Show Hanyu-Pinyin in the inline composition buffer"; - -/* Class = "NSButtonCell"; title = "Output Hanyu-Pinyin in lieu of Zhuyin when Ctrl(+Alt)+CMD+Enter"; ObjectID = "iWy-Nw-QKB"; */ "iWy-Nw-QKB.title" = "Output Hanyu-Pinyin in lieu of Zhuyin when Ctrl(+Alt)+CMD+Enter"; - -/* Class = "NSMenuItem"; title = "Dachen 26 (libChewing)"; ObjectID = "xjP-r7-GaK"; */ "xjP-r7-GaK.title" = "Dachen 26 (libChewing)"; - -/* Class = "NSMenuItem"; title = "Secondary Pinyin with Numeral Intonation"; ObjectID = "Parser11"; */ "Parser11.title" = "Secondary Pinyin with Numeral Intonation"; - -/* Class = "NSMenuItem"; title = "Yale Pinyin with Numeral Intonation"; ObjectID = "Parser12"; */ "Parser12.title" = "Yale Pinyin with Numeral Intonation"; - -/* Class = "NSMenuItem"; title = "Hualuo Pinyin with Numeral Intonation"; ObjectID = "Parser13"; */ "Parser13.title" = "Hualuo Pinyin with Numeral Intonation"; - -/* Class = "NSMenuItem"; title = "Universal Pinyin with Numeral Intonation"; ObjectID = "Parser14"; */ "Parser14.title" = "Universal Pinyin with Numeral Intonation"; - -/* Class = "NSButtonCell"; title = "Balance the score according to candidate length"; ObjectID = "Wh1-iz-pwM"; */ "Wh1-iz-pwM.title" = "Balance the score according to candidate length"; - "xibKeyboardShortcuts.title" = "Keyboard Shortcuts"; "xibUsingHotKeySCPC.title" = "Per-Char Select Mode"; "xibUsingHotKeyAssociates.title" = "Per-Char Associated Phrases"; diff --git a/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings b/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings index 825335c4..3e660660 100644 --- a/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings @@ -1,256 +1,87 @@ - -/* Class = "NSWindow"; title = "vChewing Preferences"; ObjectID = "1"; */ "1.title" = "威注音アプリ機能設定"; - -/* Class = "NSButtonCell"; title = "Debug Mode"; ObjectID = "sZx-18-8dO"; */ "sZx-18-8dO.title" = "欠陥辿着モード"; - -/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "5"; */ "5.title" = "OtherViews"; - -/* Class = "NSMenuItem"; title = "Standard"; ObjectID = "6"; */ "6.title" = "大千配列(Microsoft 標準・王安など)"; - -/* Class = "NSMenuItem"; title = "ETen"; ObjectID = "7"; */ "7.title" = "倚天伝統配列"; - -/* Class = "NSMenuItem"; title = "Hsu"; ObjectID = "8"; */ "8.title" = "許氏国音自然配列"; - -/* Class = "NSMenuItem"; title = "ETen26"; ObjectID = "9"; */ "9.title" = "倚天形忘れ配列 (26キー)"; - -/* Class = "NSMenuItem"; title = "Hanyu Pinyin with Numeral Intonation"; ObjectID = "10"; */ "10.title" = "漢語弁音(ローマ字+数字音調)"; - -/* Class = "NSTextFieldCell"; title = "BPMF Parser:"; ObjectID = "12"; */ "12.title" = "注音配列:"; - -/* Class = "NSTextFieldCell"; title = "Choose the cursor position where you want to list possible candidates."; ObjectID = "14"; */ "14.title" = "カーソルはどこで入力候補を呼び出すかとご選択ください:"; - -/* Class = "NSButtonCell"; title = "Cursor in front of the phrase (like macOS built-in Zhuyin IME)"; ObjectID = "16"; */ "16.title" = "単語の前で // macOS 内蔵注音入力の入力スタイル"; - -/* Class = "NSButtonCell"; title = "Cursor at anyplace else (like Windows Yahoo KeyKey)"; ObjectID = "17"; */ "17.title" = "単語の中・後で // Windows Yahoo KeyKey の入力スタイル"; - -/* Class = "NSButtonCell"; title = "Radio"; ObjectID = "18"; */ "18.title" = "Radio"; - -/* Class = "NSButtonCell"; title = "Radio"; ObjectID = "20"; */ "20.title" = "Radio"; - -/* Class = "NSButtonCell"; title = "Horizontal"; ObjectID = "21"; */ "21.title" = "横型陳列"; - -/* Class = "NSButtonCell"; title = "Vertical"; ObjectID = "22"; */ "22.title" = "縦型陳列"; - -/* Class = "NSButtonCell"; title = "Show page buttons in candidate list"; ObjectID = "shc-Nu-UsM"; */ "shc-Nu-UsM.title" = "ページボタンを表示"; - -/* Class = "NSTextFieldCell"; title = "Candidate List Layout:"; ObjectID = "24"; */ "24.title" = "入力候補陳列の仕様:"; - -/* Class = "NSTextFieldCell"; title = "Candidate UI font size:"; ObjectID = "29"; */ "29.title" = "候補文字の字号:"; - -/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "92"; */ "92.title" = "OtherViews"; - -/* Class = "NSMenuItem"; title = "12"; ObjectID = "93"; */ "93.title" = "12"; - -/* Class = "NSMenuItem"; title = "14"; ObjectID = "94"; */ "94.title" = "14"; - -/* Class = "NSMenuItem"; title = "16"; ObjectID = "95"; */ "95.title" = "16"; - -/* Class = "NSMenuItem"; title = "18"; ObjectID = "96"; */ "96.title" = "18"; - -/* Class = "NSMenuItem"; title = "24"; ObjectID = "98"; */ "98.title" = "24"; - -/* Class = "NSMenuItem"; title = "32"; ObjectID = "99"; */ "99.title" = "32"; - -/* Class = "NSMenuItem"; title = "64"; ObjectID = "100"; */ "100.title" = "64"; - -/* Class = "NSMenuItem"; title = "96"; ObjectID = "101"; */ "101.title" = "96"; - -/* Class = "NSButtonCell"; title = "Enable Space key for calling candidate window"; ObjectID = "110"; */ "110.title" = "Space キーで入力候補を呼び出す"; - -/* Class = "NSTextFieldCell"; title = "Basic Layout:"; ObjectID = "126"; */ "126.title" = "基礎キーボード:"; - -/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "128"; */ "128.title" = "OtherViews"; - -/* Class = "NSMenuItem"; title = "IBM"; ObjectID = "137"; */ "137.title" = "IBM 配列"; - -/* Class = "NSMenuItem"; title = "MiTAC"; ObjectID = "7fV-x8-WHQ"; */ "7fV-x8-WHQ.title" = "神通配列"; - -/* Class = "NSMenuItem"; title = "Fake Seigyou"; ObjectID = "27F-8T-FkQ"; */ "27F-8T-FkQ.title" = "偽精業配列"; - -/* Class = "NSTabViewItem"; label = "Keyboard"; ObjectID = "1AW-xf-c2f"; */ "1AW-xf-c2f.label" = "キーボード"; - -/* Class = "NSBox"; title = "General Settings"; ObjectID = "2Y6-Am-WM1"; */ "2Y6-Am-WM1.title" = "全般設定"; - -/* Class = "NSTextFieldCell"; title = "Choose which keys you prefer for selecting candidates."; ObjectID = "2pS-nv-te4"; */ "2pS-nv-te4.title" = "お好きなる言選り用キー陣列をお選びください。"; - -/* Class = "NSButtonCell"; title = "Stop farting (when typed phonetic combination is invalid, etc.)"; ObjectID = "62u-jY-BRh"; */ "62u-jY-BRh.title" = "マナーモード // 外すと入力間違の時に変な音が出る"; - -/* Class = "NSTextFieldCell"; title = "UI language setting:"; ObjectID = "9DS-Rc-TXq"; */ "9DS-Rc-TXq.title" = "アプリ表示用言語:"; - -/* Class = "NSButtonCell"; title = "Emulating select-candidate-per-character mode"; ObjectID = "ArK-Vk-OoT"; */ "ArK-Vk-OoT.title" = "漢字1つづつ全候補選択入力モード"; - -/* Class = "NSButtonCell"; title = "Auto-convert traditional Chinese glyphs to KangXi characters"; ObjectID = "BSK-bH-Gct"; */ "BSK-bH-Gct.title" = "入力した繁体字を康熙字体と自動変換"; - -/* Class = "NSButtonCell"; title = "Auto-convert traditional Chinese glyphs to KangXi characters"; ObjectID = "eia-1F-Do0"; */ "eia-1F-Do0.title" = "入力した繁体字を日文 JIS 新字体と自動変換"; - -/* Class = "NSBox"; title = "Advanced Settings"; ObjectID = "E1l-m8-xgb"; */ "E1l-m8-xgb.title" = "詳細設定"; - -/* Class = "NSMenuItem"; title = "English"; ObjectID = "FSG-lN-CJO"; */ "FSG-lN-CJO.title" = "英語"; - -/* Class = "NSTextFieldCell"; title = "Selection Keys:"; ObjectID = "FnD-oH-El5"; */ "FnD-oH-El5.title" = "言選り用キー:"; - -/* Class = "NSMenuItem"; title = "Auto-Select"; ObjectID = "GlJ-Ns-9eE"; */ "GlJ-Ns-9eE.title" = "システム設定に準ずる"; - -/* Class = "NSTabViewItem"; label = "General"; ObjectID = "QUQ-oY-4Hc"; */ "QUQ-oY-4Hc.label" = "全般"; - -/* Class = "NSTextFieldCell"; title = "Choose your preferred keyboard layout and phonetic parser."; ObjectID = "RQ6-MS-m4C"; */ "RQ6-MS-m4C.title" = "お好きなるキーボードとそれに相応しい注音配列をお選びください。"; - -/* Class = "NSButtonCell"; title = "Push the cursor in front of the phrase after selection"; ObjectID = "RUG-ls-KyA"; */ "RUG-ls-KyA.title" = "候補選択の直後、すぐカーソルを単語の向こうに推す"; - -/* Class = "NSMenuItem"; title = "Traditional Chinese"; ObjectID = "TXr-FF-ehw"; */ "TXr-FF-ehw.title" = "繁体中国語"; - -/* Class = "NSBox"; title = "Output Settings"; ObjectID = "Uyz-xL-TVN"; */ "Uyz-xL-TVN.title" = "出力設定"; - -/* Class = "NSButtonCell"; title = "Enable CNS11643 Support (2022-04-27)"; ObjectID = "W24-T4-cg0"; */ "W24-T4-cg0.title" = "全字庫モード // 入力可能の漢字数倍増 (2022-04-27)"; - -/* Class = "NSBox"; title = "Keyboard Layout"; ObjectID = "Wvt-HE-LOv"; */ "Wvt-HE-LOv.title" = "キーボード"; - -/* Class = "NSButtonCell"; title = "Check for updates automatically"; ObjectID = "Z9t-P0-BLF"; */ "Z9t-P0-BLF.title" = "アプリの更新通知を受く"; - -/* Class = "NSTextFieldCell"; title = "Change user interface language (will reboot the IME)."; ObjectID = "ZEv-Q2-mYL"; */ "ZEv-Q2-mYL.title" = "アプリ表示用言語をご指定ください、そして入力アプリは自動的に再起動。"; - -/* Class = "NSMenuItem"; title = "Simplified Chinese"; ObjectID = "akC-2g-ybz"; */ "akC-2g-ybz.title" = "簡体中国語"; - -/* Class = "NSButtonCell"; title = "Use ESC key to clear entire input buffer"; ObjectID = "f2j-xD-4xK"; */ "f2j-xD-4xK.title" = "ESC キーで入力緩衝列を消す"; - -/* Class = "NSButtonCell"; title = "Automatically reload user data files if changes detected"; ObjectID = "f8i-69-zxm"; */ "f8i-69-zxm.title" = "変更されたユーザー辞書データを自動的に再読込"; - -/* Class = "NSTextFieldCell"; title = "Change UI font size of candidate window for a better visual clarity."; ObjectID = "iRg-wx-Nx2"; */ "iRg-wx-Nx2.title" = "入力候補陣列の候補文字の字号をご指定ください。"; - -/* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[0] = "Item 1"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[0]" = "Item 1"; - -/* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[1] = "Item 2"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[1]" = "Item 2"; - -/* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[2] = "Item 3"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[2]" = "Item 3"; - -/* Class = "NSMenuItem"; title = "Japanese"; ObjectID = "rVQ-Hx-cGi"; */ "rVQ-Hx-cGi.title" = "和語"; - -/* Class = "NSBox"; title = "Dictionary and Language Models"; ObjectID = "cf2-se-PDO"; */ "cf2-se-PDO.title" = "辞書と言語モデル"; - -/* Class = "NSTextFieldCell"; title = "Choose your preferred layout of the candidate window."; ObjectID = "xC5-yV-1W1"; */ "xC5-yV-1W1.title" = "入力候補陳列の仕様をご指定ください。"; - -/* Class = "NSTabViewItem"; label = "Advanced"; ObjectID = "xrE-8T-WKO"; */ "xrE-8T-WKO.label" = "詳細"; - -/* Class = "NSTabViewItem"; label = "Dictionary"; ObjectID = "2iG-Ic-gbl"; */ "2iG-Ic-gbl.label" = "辞書"; - -/* Class = "NSTextFieldCell"; title = "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional."; ObjectID = "wQ9-px-b07"; */ "wQ9-px-b07.title" = "Apple 動態注音キーボード (大千と倚天伝統) を使うには、共通語分析器の注音配列を大千と設定すべきである。"; - -/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Tab key in the candidate window."; ObjectID = "ueU-Rz-a1C"; */ "ueU-Rz-a1C.title" = "入力候補陳列での (Shift+)Tab キーの輪番切替対象をご指定ください。"; - -/* Class = "NSButtonCell"; title = "Cycling Pages"; ObjectID = "s7u-Fm-dVg"; */ "s7u-Fm-dVg.title" = "ページ"; - -/* Class = "NSButtonCell"; title = "Cycling Candidates"; ObjectID = "FVC-br-H57"; */ "FVC-br-H57.title" = "候補文字そのもの"; - -/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Space key in the candidate window."; ObjectID = "Pg5-G9-pY5"; */ "Pg5-G9-pY5.title" = "入力候補陳列での (Shift+)Space キーの輪番切替対象をご指定ください。"; - -/* Class = "NSButtonCell"; title = "Space to +cycle pages, Shift+Space to +cycle candidates"; ObjectID = "XqL-rf-X6d"; */ "XqL-rf-X6d.title" = "Space で次のページ、Shift+Space で次の候補文字を"; - -/* Class = "NSButtonCell"; title = "Space to +cycle candidates, Shift+Space to +cycle pages"; ObjectID = "dIN-TZ-67g"; */ "dIN-TZ-67g.title" = "Shift+Space で次のページ、Space で次の候補文字を"; - -/* Class = "NSButtonCell"; title = "Enable symbol input support (incl. certain emoji symbols)"; ObjectID = "hSv-LJ-Cq3"; */ "hSv-LJ-Cq3.title" = "僅かなる絵文字も含む符号入力サポートを起用"; - -/* Class = "NSTextFieldCell"; title = "Choose your desired user data folder path. Will be omitted if invalid."; ObjectID = "wN3-k3-b2a"; */ "wN3-k3-b2a.title" = "欲しがるユーザー辞書保存先をご指定ください。無効の保存先設定は効かぬ。"; - -/* Class = "NSButtonCell"; title = "Show Hanyu-Pinyin in the inline composition buffer"; ObjectID = "wFR-zX-M8H"; */ "wFR-zX-M8H.title" = "弁音合併入力(入力緩衝列で代わりに漢語弁音の音読み)"; - -/* Class = "NSButtonCell"; title = "Output Hanyu-Pinyin in lieu of Zhuyin when Ctrl(+Alt)+CMD+Enter"; ObjectID = "iWy-Nw-QKB"; */ "iWy-Nw-QKB.title" = "Ctrl(+Alt)+CMD+Enter で出すのを漢語弁音と変換"; - -/* Class = "NSMenuItem"; title = "Dachen 26 (libChewing)"; ObjectID = "xjP-r7-GaK"; */ "xjP-r7-GaK.title" = "酷音大千 26 キー配列"; - -/* Class = "NSMenuItem"; title = "Secondary Pinyin with Numeral Intonation"; ObjectID = "Parser11"; */ "Parser11.title" = "国音二式 (ローマ字+数字音調)"; - -/* Class = "NSMenuItem"; title = "Yale Pinyin with Numeral Intonation"; ObjectID = "Parser12"; */ "Parser12.title" = "イェール弁音 (ローマ字+数字音調)"; - -/* Class = "NSMenuItem"; title = "Hualuo Pinyin with Numeral Intonation"; ObjectID = "Parser13"; */ "Parser13.title" = "中華ローマ弁音 (ローマ字+数字音調)"; - -/* Class = "NSMenuItem"; title = "Universal Pinyin with Numeral Intonation"; ObjectID = "Parser14"; */ "Parser14.title" = "汎用弁音 (ローマ字+数字音調)"; - -/* Class = "NSButtonCell"; title = "Balance the score according to candidate length"; ObjectID = "Wh1-iz-pwM"; */ "Wh1-iz-pwM.title" = "候補文字の長さによる重みの調整"; - "xibKeyboardShortcuts.title" = "ショートカット"; "xibUsingHotKeySCPC.title" = "全候補入力モード"; "xibUsingHotKeyAssociates.title" = "全候補入力で連想語彙"; diff --git a/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings b/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings index 62b23bc0..c9025cd7 100644 --- a/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings @@ -1,256 +1,87 @@ - -/* Class = "NSWindow"; title = "vChewing Preferences"; ObjectID = "1"; */ "1.title" = "威注音偏好设定"; - -/* Class = "NSButtonCell"; title = "Debug Mode"; ObjectID = "sZx-18-8dO"; */ "sZx-18-8dO.title" = "侦错模式"; - -/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "5"; */ "5.title" = "OtherViews"; - -/* Class = "NSMenuItem"; title = "Standard"; ObjectID = "6"; */ "6.title" = "微软/大千/王安/国乔/零壹/仲鼎"; - -/* Class = "NSMenuItem"; title = "ETen"; ObjectID = "7"; */ "7.title" = "倚天传统"; - -/* Class = "NSMenuItem"; title = "Hsu"; ObjectID = "8"; */ "8.title" = "许氏(国音&自然)"; - -/* Class = "NSMenuItem"; title = "ETen26"; ObjectID = "9"; */ "9.title" = "倚天二十六键"; - -/* Class = "NSMenuItem"; title = "Hanyu Pinyin with Numeral Intonation"; ObjectID = "10"; */ "10.title" = "汉语拼音+数字标调"; - -/* Class = "NSTextFieldCell"; title = "BPMF Parser:"; ObjectID = "12"; */ "12.title" = "基础键盘布局:"; - -/* Class = "NSTextFieldCell"; title = "Choose the cursor position where you want to list possible candidates."; ObjectID = "14"; */ "14.title" = "用以触发选字的光标相对位置:"; - -/* Class = "NSButtonCell"; title = "Cursor in front of the phrase (like macOS built-in Zhuyin IME)"; ObjectID = "16"; */ "16.title" = "光标置于词语前方 // macOS 内建注音风格"; - -/* Class = "NSButtonCell"; title = "Cursor at anyplace else (like Windows Yahoo KeyKey)"; ObjectID = "17"; */ "17.title" = "光标置于词语中后方 // Windows 奇摩注音风格"; - -/* Class = "NSButtonCell"; title = "Radio"; ObjectID = "18"; */ "18.title" = "Radio"; - -/* Class = "NSButtonCell"; title = "Radio"; ObjectID = "20"; */ "20.title" = "Radio"; - -/* Class = "NSButtonCell"; title = "Horizontal"; ObjectID = "21"; */ "21.title" = "横向布局"; - -/* Class = "NSButtonCell"; title = "Vertical"; ObjectID = "22"; */ "22.title" = "纵向布局"; - -/* Class = "NSButtonCell"; title = "Show page buttons in candidate list"; ObjectID = "shc-Nu-UsM"; */ "shc-Nu-UsM.title" = "在选字窗内显示翻页按钮"; - -/* Class = "NSTextFieldCell"; title = "Candidate List Layout:"; ObjectID = "24"; */ "24.title" = "候选字窗布局:"; - -/* Class = "NSTextFieldCell"; title = "Candidate UI font size:"; ObjectID = "29"; */ "29.title" = "字型大小设定:"; - -/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "92"; */ "92.title" = "OtherViews"; - -/* Class = "NSMenuItem"; title = "12"; ObjectID = "93"; */ "93.title" = "12"; - -/* Class = "NSMenuItem"; title = "14"; ObjectID = "94"; */ "94.title" = "14"; - -/* Class = "NSMenuItem"; title = "16"; ObjectID = "95"; */ "95.title" = "16"; - -/* Class = "NSMenuItem"; title = "18"; ObjectID = "96"; */ "96.title" = "18"; - -/* Class = "NSMenuItem"; title = "24"; ObjectID = "98"; */ "98.title" = "24"; - -/* Class = "NSMenuItem"; title = "32"; ObjectID = "99"; */ "99.title" = "32"; - -/* Class = "NSMenuItem"; title = "64"; ObjectID = "100"; */ "100.title" = "64"; - -/* Class = "NSMenuItem"; title = "96"; ObjectID = "101"; */ "101.title" = "96"; - -/* Class = "NSButtonCell"; title = "Enable Space key for calling candidate window"; ObjectID = "110"; */ "110.title" = "敲空格键以选字"; - -/* Class = "NSTextFieldCell"; title = "Basic Layout:"; ObjectID = "126"; */ "126.title" = "英数键盘布局:"; - -/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "128"; */ "128.title" = "OtherViews"; - -/* Class = "NSMenuItem"; title = "IBM"; ObjectID = "137"; */ "137.title" = "IBM"; - -/* Class = "NSMenuItem"; title = "MiTAC"; ObjectID = "7fV-x8-WHQ"; */ "7fV-x8-WHQ.title" = "神通"; - -/* Class = "NSMenuItem"; title = "Fake Seigyou"; ObjectID = "27F-8T-FkQ"; */ "27F-8T-FkQ.title" = "伪精业"; - -/* Class = "NSTabViewItem"; label = "Keyboard"; ObjectID = "1AW-xf-c2f"; */ "1AW-xf-c2f.label" = "键盘"; - -/* Class = "NSBox"; title = "General Settings"; ObjectID = "2Y6-Am-WM1"; */ "2Y6-Am-WM1.title" = "一般设定"; - -/* Class = "NSTextFieldCell"; title = "Choose which keys you prefer for selecting candidates."; ObjectID = "2pS-nv-te4"; */ "2pS-nv-te4.title" = "选择您所偏好的用来选字的按键组合。"; - -/* Class = "NSButtonCell"; title = "Stop farting (when typed phonetic combination is invalid, etc.)"; ObjectID = "62u-jY-BRh"; */ "62u-jY-BRh.title" = "廉耻模式 // 取消勾选的话,敲错字时会有异音"; - -/* Class = "NSTextFieldCell"; title = "UI language setting:"; ObjectID = "9DS-Rc-TXq"; */ "9DS-Rc-TXq.title" = "接口语言设定:"; - -/* Class = "NSButtonCell"; title = "Emulating select-candidate-per-character mode"; ObjectID = "ArK-Vk-OoT"; */ "ArK-Vk-OoT.title" = "仿真 90 年代前期注音逐字选字输入风格"; - -/* Class = "NSButtonCell"; title = "Auto-convert traditional Chinese glyphs to KangXi characters"; ObjectID = "BSK-bH-Gct"; */ "BSK-bH-Gct.title" = "自动将繁体中文字转换为康熙正体字"; - -/* Class = "NSButtonCell"; title = "Auto-convert traditional Chinese glyphs to KangXi characters"; ObjectID = "eia-1F-Do0"; */ "eia-1F-Do0.title" = "自动将繁体中文字转换为日本简化字(JIS 新字体)"; - -/* Class = "NSBox"; title = "Advanced Settings"; ObjectID = "E1l-m8-xgb"; */ "E1l-m8-xgb.title" = "进阶设定"; - -/* Class = "NSMenuItem"; title = "English"; ObjectID = "FSG-lN-CJO"; */ "FSG-lN-CJO.title" = "英文"; - -/* Class = "NSTextFieldCell"; title = "Selection Keys:"; ObjectID = "FnD-oH-El5"; */ "FnD-oH-El5.title" = "选字键:"; - -/* Class = "NSMenuItem"; title = "Auto-Select"; ObjectID = "GlJ-Ns-9eE"; */ "GlJ-Ns-9eE.title" = "自动选择"; - -/* Class = "NSTabViewItem"; label = "General"; ObjectID = "QUQ-oY-4Hc"; */ "QUQ-oY-4Hc.label" = "一般"; - -/* Class = "NSTextFieldCell"; title = "Choose your preferred keyboard layout and phonetic parser."; ObjectID = "RQ6-MS-m4C"; */ "RQ6-MS-m4C.title" = "选择您所偏好的系统键盘布局与注音分析器排列。"; - -/* Class = "NSButtonCell"; title = "Push the cursor in front of the phrase after selection"; ObjectID = "RUG-ls-KyA"; */ "RUG-ls-KyA.title" = "在选字后将光标置于该字词的前方"; - -/* Class = "NSMenuItem"; title = "Traditional Chinese"; ObjectID = "TXr-FF-ehw"; */ "TXr-FF-ehw.title" = "繁体中文"; - -/* Class = "NSBox"; title = "Output Settings"; ObjectID = "Uyz-xL-TVN"; */ "Uyz-xL-TVN.title" = "输出设定"; - -/* Class = "NSButtonCell"; title = "Enable CNS11643 Support (2022-04-27)"; ObjectID = "W24-T4-cg0"; */ "W24-T4-cg0.title" = "启用 CNS11643 全字库支援 (2022-04-27)"; - -/* Class = "NSBox"; title = "Keyboard Layout"; ObjectID = "Wvt-HE-LOv"; */ "Wvt-HE-LOv.title" = "键盘布局"; - -/* Class = "NSButtonCell"; title = "Check for updates automatically"; ObjectID = "Z9t-P0-BLF"; */ "Z9t-P0-BLF.title" = "自动检查软件更新"; - -/* Class = "NSTextFieldCell"; title = "Change user interface language (will reboot the IME)."; ObjectID = "ZEv-Q2-mYL"; */ "ZEv-Q2-mYL.title" = "变更使用者接口语言,会自动重新启动输入法。"; - -/* Class = "NSMenuItem"; title = "Simplified Chinese"; ObjectID = "akC-2g-ybz"; */ "akC-2g-ybz.title" = "简体中文"; - -/* Class = "NSButtonCell"; title = "Use ESC key to clear entire input buffer"; ObjectID = "f2j-xD-4xK"; */ "f2j-xD-4xK.title" = "敲 ESC 键以清空整个输入缓冲区"; - -/* Class = "NSButtonCell"; title = "Automatically reload user data files if changes detected"; ObjectID = "f8i-69-zxm"; */ "f8i-69-zxm.title" = "自动重新加载变更过的使用者资料内容"; - -/* Class = "NSTextFieldCell"; title = "Change UI font size of candidate window for a better visual clarity."; ObjectID = "iRg-wx-Nx2"; */ "iRg-wx-Nx2.title" = "变更候选字窗的字型大小。"; - -/* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[0] = "Item 1"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[0]" = "Item 1"; - -/* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[1] = "Item 2"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[1]" = "Item 2"; - -/* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[2] = "Item 3"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[2]" = "Item 3"; - -/* Class = "NSMenuItem"; title = "Japanese"; ObjectID = "rVQ-Hx-cGi"; */ "rVQ-Hx-cGi.title" = "和语"; - -/* Class = "NSBox"; title = "Dictionary and Language Models"; ObjectID = "cf2-se-PDO"; */ "cf2-se-PDO.title" = "辞典&語言模型"; - -/* Class = "NSTextFieldCell"; title = "Choose your preferred layout of the candidate window."; ObjectID = "xC5-yV-1W1"; */ "xC5-yV-1W1.title" = "选择您所偏好的候选字窗布局。"; - -/* Class = "NSTabViewItem"; label = "Advanced"; ObjectID = "xrE-8T-WKO"; */ "xrE-8T-WKO.label" = "进阶"; - -/* Class = "NSTabViewItem"; label = "Dictionary"; ObjectID = "2iG-Ic-gbl"; */ "2iG-Ic-gbl.label" = "辞典"; - -/* Class = "NSTextFieldCell"; title = "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional."; ObjectID = "wQ9-px-b07"; */ "wQ9-px-b07.title" = "Apple 动态注音键盘布局(大千与倚天)要求普通话/国音分析器的注音排列得配置为大千排列。"; - -/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Tab key in the candidate window."; ObjectID = "ueU-Rz-a1C"; */ "ueU-Rz-a1C.title" = "指定 (Shift+)Tab 热键在选字窗内的轮替操作对象。"; - -/* Class = "NSButtonCell"; title = "Cycling Pages"; ObjectID = "s7u-Fm-dVg"; */ "s7u-Fm-dVg.title" = "轮替页面"; - -/* Class = "NSButtonCell"; title = "Cycling Candidates"; ObjectID = "FVC-br-H57"; */ "FVC-br-H57.title" = "轮替候选字"; - -/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Space key in the candidate window."; ObjectID = "Pg5-G9-pY5"; */ "Pg5-G9-pY5.title" = "指定 (Shift+)Space 热键在选字窗内的轮替操作对象。"; - -/* Class = "NSButtonCell"; title = "Space to +cycle pages, Shift+Space to +cycle candidates"; ObjectID = "XqL-rf-X6d"; */ "XqL-rf-X6d.title" = "Space 换下一页,Shift+Space 换选下一个候选字。"; - -/* Class = "NSButtonCell"; title = "Space to +cycle candidates, Shift+Space to +cycle pages"; ObjectID = "dIN-TZ-67g"; */ "dIN-TZ-67g.title" = "Shift+Space 换下一页,Space 换选下一个候选字。"; - -/* Class = "NSButtonCell"; title = "Enable symbol input support (incl. certain emoji symbols)"; ObjectID = "hSv-LJ-Cq3"; */ "hSv-LJ-Cq3.title" = "启用包括少许绘文字在内的符号输入支援"; - -/* Class = "NSTextFieldCell"; title = "Choose your desired user data folder path. Will be omitted if invalid."; ObjectID = "wN3-k3-b2a"; */ "wN3-k3-b2a.title" = "请在此指定您想指定的使用者语汇档案目录。无效值会被忽略。"; - -/* Class = "NSButtonCell"; title = "Show Hanyu-Pinyin in the inline composition buffer"; ObjectID = "wFR-zX-M8H"; */ "wFR-zX-M8H.title" = "拼音并击模式(组字区内看到的是汉语拼音)"; - -/* Class = "NSButtonCell"; title = "Output Hanyu-Pinyin in lieu of Zhuyin when Ctrl(+Alt)+CMD+Enter"; ObjectID = "iWy-Nw-QKB"; */ "iWy-Nw-QKB.title" = "Ctrl(+Alt)+CMD+Enter 输出汉语拼音而非注音"; - -/* Class = "NSMenuItem"; title = "Dachen 26 (libChewing)"; ObjectID = "xjP-r7-GaK"; */ "xjP-r7-GaK.title" = "酷音大千二十六键"; - -/* Class = "NSMenuItem"; title = "Secondary Pinyin with Numeral Intonation"; ObjectID = "Parser11"; */ "Parser11.title" = "国音二式+数字标调"; - -/* Class = "NSMenuItem"; title = "Yale Pinyin with Numeral Intonation"; ObjectID = "Parser12"; */ "Parser12.title" = "耶鲁拼音+数字标调"; - -/* Class = "NSMenuItem"; title = "Hualuo Pinyin with Numeral Intonation"; ObjectID = "Parser13"; */ "Parser13.title" = "华罗拼音+数字标调"; - -/* Class = "NSMenuItem"; title = "Universal Pinyin with Numeral Intonation"; ObjectID = "Parser14"; */ "Parser14.title" = "通用拼音+数字标调"; - -/* Class = "NSButtonCell"; title = "Balance the score according to candidate length"; ObjectID = "Wh1-iz-pwM"; */ "Wh1-iz-pwM.title" = "按候选字词的长度调整权重"; - "xibKeyboardShortcuts.title" = "键盘快捷键"; "xibUsingHotKeySCPC.title" = "模拟逐字选字输入"; "xibUsingHotKeyAssociates.title" = "逐字选字联想模式"; diff --git a/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings b/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings index ca8a618a..9812557b 100644 --- a/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings @@ -1,256 +1,87 @@ - -/* Class = "NSWindow"; title = "vChewing Preferences"; ObjectID = "1"; */ "1.title" = "威注音偏好設定"; - -/* Class = "NSButtonCell"; title = "Debug Mode"; ObjectID = "sZx-18-8dO"; */ "sZx-18-8dO.title" = "偵錯模式"; - -/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "5"; */ "5.title" = "OtherViews"; - -/* Class = "NSMenuItem"; title = "Standard"; ObjectID = "6"; */ "6.title" = "微軟/大千/王安/國喬/零壹/仲鼎"; - -/* Class = "NSMenuItem"; title = "ETen"; ObjectID = "7"; */ "7.title" = "倚天傳統"; - -/* Class = "NSMenuItem"; title = "Hsu"; ObjectID = "8"; */ "8.title" = "許氏(國音&自然)"; - -/* Class = "NSMenuItem"; title = "ETen26"; ObjectID = "9"; */ "9.title" = "倚天二十六鍵"; - -/* Class = "NSMenuItem"; title = "Hanyu Pinyin with Numeral Intonation"; ObjectID = "10"; */ "10.title" = "漢語拼音+數字標調"; - -/* Class = "NSTextFieldCell"; title = "BPMF Parser:"; ObjectID = "12"; */ "12.title" = "注音排列:"; - -/* Class = "NSTextFieldCell"; title = "Choose the cursor position where you want to list possible candidates."; ObjectID = "14"; */ "14.title" = "用以觸發選字的游標相對位置:"; - -/* Class = "NSButtonCell"; title = "Cursor in front of the phrase (like macOS built-in Zhuyin IME)"; ObjectID = "16"; */ "16.title" = "游標置於詞語前方 // macOS 內建注音風格"; - -/* Class = "NSButtonCell"; title = "Cursor at anyplace else (like Windows Yahoo KeyKey)"; ObjectID = "17"; */ "17.title" = "游標置於詞語中後方 // Windows 奇摩注音風格"; - -/* Class = "NSButtonCell"; title = "Radio"; ObjectID = "18"; */ "18.title" = "Radio"; - -/* Class = "NSButtonCell"; title = "Radio"; ObjectID = "20"; */ "20.title" = "Radio"; - -/* Class = "NSButtonCell"; title = "Horizontal"; ObjectID = "21"; */ "21.title" = "橫向佈局"; - -/* Class = "NSButtonCell"; title = "Vertical"; ObjectID = "22"; */ "22.title" = "縱向佈局"; - -/* Class = "NSButtonCell"; title = "Show page buttons in candidate list"; ObjectID = "shc-Nu-UsM"; */ "shc-Nu-UsM.title" = "在選字窗內顯示翻頁按鈕"; - -/* Class = "NSTextFieldCell"; title = "Candidate List Layout:"; ObjectID = "24"; */ "24.title" = "候選字窗佈局:"; - -/* Class = "NSTextFieldCell"; title = "Candidate UI font size:"; ObjectID = "29"; */ "29.title" = "字型大小設定:"; - -/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "92"; */ "92.title" = "OtherViews"; - -/* Class = "NSMenuItem"; title = "12"; ObjectID = "93"; */ "93.title" = "12"; - -/* Class = "NSMenuItem"; title = "14"; ObjectID = "94"; */ "94.title" = "14"; - -/* Class = "NSMenuItem"; title = "16"; ObjectID = "95"; */ "95.title" = "16"; - -/* Class = "NSMenuItem"; title = "18"; ObjectID = "96"; */ "96.title" = "18"; - -/* Class = "NSMenuItem"; title = "24"; ObjectID = "98"; */ "98.title" = "24"; - -/* Class = "NSMenuItem"; title = "32"; ObjectID = "99"; */ "99.title" = "32"; - -/* Class = "NSMenuItem"; title = "64"; ObjectID = "100"; */ "100.title" = "64"; - -/* Class = "NSMenuItem"; title = "96"; ObjectID = "101"; */ "101.title" = "96"; - -/* Class = "NSButtonCell"; title = "Enable Space key for calling candidate window"; ObjectID = "110"; */ "110.title" = "敲空格鍵以選字"; - -/* Class = "NSTextFieldCell"; title = "Basic Layout:"; ObjectID = "126"; */ "126.title" = "基礎鍵盤佈局:"; - -/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "128"; */ "128.title" = "OtherViews"; - -/* Class = "NSMenuItem"; title = "IBM"; ObjectID = "137"; */ "137.title" = "IBM"; - -/* Class = "NSMenuItem"; title = "MiTAC"; ObjectID = "7fV-x8-WHQ"; */ "7fV-x8-WHQ.title" = "神通"; - -/* Class = "NSMenuItem"; title = "Fake Seigyou"; ObjectID = "27F-8T-FkQ"; */ "27F-8T-FkQ.title" = "偽精業"; - -/* Class = "NSTabViewItem"; label = "Keyboard"; ObjectID = "1AW-xf-c2f"; */ "1AW-xf-c2f.label" = "鍵盤"; - -/* Class = "NSBox"; title = "General Settings"; ObjectID = "2Y6-Am-WM1"; */ "2Y6-Am-WM1.title" = "一般設定"; - -/* Class = "NSTextFieldCell"; title = "Choose which keys you prefer for selecting candidates."; ObjectID = "2pS-nv-te4"; */ "2pS-nv-te4.title" = "選擇您所偏好的用來選字的按鍵組合。"; - -/* Class = "NSButtonCell"; title = "Stop farting (when typed phonetic combination is invalid, etc.)"; ObjectID = "62u-jY-BRh"; */ "62u-jY-BRh.title" = "廉恥模式 // 取消勾選的話,敲錯字時會有異音"; - -/* Class = "NSTextFieldCell"; title = "UI language setting:"; ObjectID = "9DS-Rc-TXq"; */ "9DS-Rc-TXq.title" = "介面語言設定:"; - -/* Class = "NSButtonCell"; title = "Emulating select-candidate-per-character mode"; ObjectID = "ArK-Vk-OoT"; */ "ArK-Vk-OoT.title" = "模擬 90 年代前期注音逐字選字輸入風格"; - -/* Class = "NSButtonCell"; title = "Auto-convert traditional Chinese glyphs to KangXi characters"; ObjectID = "BSK-bH-Gct"; */ "BSK-bH-Gct.title" = "自動將繁體中文字轉換為康熙正體字"; - -/* Class = "NSButtonCell"; title = "Auto-convert traditional Chinese glyphs to KangXi characters"; ObjectID = "eia-1F-Do0"; */ "eia-1F-Do0.title" = "自動將繁體中文字轉換為日本簡化字(JIS 新字體)"; - -/* Class = "NSBox"; title = "Advanced Settings"; ObjectID = "E1l-m8-xgb"; */ "E1l-m8-xgb.title" = "進階設定"; - -/* Class = "NSMenuItem"; title = "English"; ObjectID = "FSG-lN-CJO"; */ "FSG-lN-CJO.title" = "英文"; - -/* Class = "NSTextFieldCell"; title = "Selection Keys:"; ObjectID = "FnD-oH-El5"; */ "FnD-oH-El5.title" = "選字鍵:"; - -/* Class = "NSMenuItem"; title = "Auto-Select"; ObjectID = "GlJ-Ns-9eE"; */ "GlJ-Ns-9eE.title" = "自動選擇"; - -/* Class = "NSTabViewItem"; label = "General"; ObjectID = "QUQ-oY-4Hc"; */ "QUQ-oY-4Hc.label" = "一般"; - -/* Class = "NSTextFieldCell"; title = "Choose your preferred keyboard layout and phonetic parser."; ObjectID = "RQ6-MS-m4C"; */ "RQ6-MS-m4C.title" = "選擇您所偏好的系統鍵盤佈局與注音分析器排列。"; - -/* Class = "NSButtonCell"; title = "Push the cursor in front of the phrase after selection"; ObjectID = "RUG-ls-KyA"; */ "RUG-ls-KyA.title" = "在選字後將游標置於該字詞的前方"; - -/* Class = "NSMenuItem"; title = "Traditional Chinese"; ObjectID = "TXr-FF-ehw"; */ "TXr-FF-ehw.title" = "繁體中文"; - -/* Class = "NSBox"; title = "Output Settings"; ObjectID = "Uyz-xL-TVN"; */ "Uyz-xL-TVN.title" = "輸出設定"; - -/* Class = "NSButtonCell"; title = "Enable CNS11643 Support (2022-04-27)"; ObjectID = "W24-T4-cg0"; */ "W24-T4-cg0.title" = "啟用 CNS11643 全字庫支援 (2022-04-27)"; - -/* Class = "NSBox"; title = "Keyboard Layout"; ObjectID = "Wvt-HE-LOv"; */ "Wvt-HE-LOv.title" = "鍵盤佈局"; - -/* Class = "NSButtonCell"; title = "Check for updates automatically"; ObjectID = "Z9t-P0-BLF"; */ "Z9t-P0-BLF.title" = "自動檢查軟體更新"; - -/* Class = "NSTextFieldCell"; title = "Change user interface language (will reboot the IME)."; ObjectID = "ZEv-Q2-mYL"; */ "ZEv-Q2-mYL.title" = "變更使用者介面語言,會自動重新啟動輸入法。"; - -/* Class = "NSMenuItem"; title = "Simplified Chinese"; ObjectID = "akC-2g-ybz"; */ "akC-2g-ybz.title" = "簡體中文"; - -/* Class = "NSButtonCell"; title = "Use ESC key to clear entire input buffer"; ObjectID = "f2j-xD-4xK"; */ "f2j-xD-4xK.title" = "敲 ESC 鍵以清空整個輸入緩衝區"; - -/* Class = "NSButtonCell"; title = "Automatically reload user data files if changes detected"; ObjectID = "f8i-69-zxm"; */ "f8i-69-zxm.title" = "自動重新載入變更過的使用者數據內容"; - -/* Class = "NSTextFieldCell"; title = "Change UI font size of candidate window for a better visual clarity."; ObjectID = "iRg-wx-Nx2"; */ "iRg-wx-Nx2.title" = "變更候選字窗的字型大小。"; - -/* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[0] = "Item 1"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[0]" = "Item 1"; - -/* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[1] = "Item 2"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[1]" = "Item 2"; - -/* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[2] = "Item 3"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[2]" = "Item 3"; - -/* Class = "NSMenuItem"; title = "Japanese"; ObjectID = "rVQ-Hx-cGi"; */ "rVQ-Hx-cGi.title" = "和語"; - -/* Class = "NSBox"; title = "Dictionary and Language Models"; ObjectID = "cf2-se-PDO"; */ "cf2-se-PDO.title" = "辭典&語言模型"; - -/* Class = "NSTextFieldCell"; title = "Choose your preferred layout of the candidate window."; ObjectID = "xC5-yV-1W1"; */ "xC5-yV-1W1.title" = "選擇您所偏好的候選字窗佈局。"; - -/* Class = "NSTabViewItem"; label = "Advanced"; ObjectID = "xrE-8T-WKO"; */ "xrE-8T-WKO.label" = "進階"; - -/* Class = "NSTabViewItem"; label = "Dictionary"; ObjectID = "2iG-Ic-gbl"; */ "2iG-Ic-gbl.label" = "辭典"; - -/* Class = "NSTextFieldCell"; title = "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional."; ObjectID = "wQ9-px-b07"; */ "wQ9-px-b07.title" = "Apple 動態注音鍵盤佈局(大千與倚天)要求普通話/國音分析器的注音排列得配置為大千排列。"; - -/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Tab key in the candidate window."; ObjectID = "ueU-Rz-a1C"; */ "ueU-Rz-a1C.title" = "指定 (Shift+)Tab 熱鍵在選字窗內的輪替操作對象。"; - -/* Class = "NSButtonCell"; title = "Cycling Pages"; ObjectID = "s7u-Fm-dVg"; */ "s7u-Fm-dVg.title" = "輪替頁面"; - -/* Class = "NSButtonCell"; title = "Cycling Candidates"; ObjectID = "FVC-br-H57"; */ "FVC-br-H57.title" = "輪替候選字"; - -/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Space key in the candidate window."; ObjectID = "Pg5-G9-pY5"; */ "Pg5-G9-pY5.title" = "指定 (Shift+)Space 熱鍵在選字窗內的輪替操作對象。"; - -/* Class = "NSButtonCell"; title = "Space to +cycle pages, Shift+Space to +cycle candidates"; ObjectID = "XqL-rf-X6d"; */ "XqL-rf-X6d.title" = "Space 換下一頁,Shift+Space 換選下一個候選字"; - -/* Class = "NSButtonCell"; title = "Space to +cycle candidates, Shift+Space to +cycle pages"; ObjectID = "dIN-TZ-67g"; */ "dIN-TZ-67g.title" = "Shift+Space 換下一頁,Space 換選下一個候選字"; - -/* Class = "NSButtonCell"; title = "Enable symbol input support (incl. certain emoji symbols)"; ObjectID = "hSv-LJ-Cq3"; */ "hSv-LJ-Cq3.title" = "啟用包括少許繪文字在內的符號輸入支援"; - -/* Class = "NSTextFieldCell"; title = "Choose your desired user data folder path. Will be omitted if invalid."; ObjectID = "wN3-k3-b2a"; */ "wN3-k3-b2a.title" = "請在此指定您想指定的使用者語彙檔案目錄。無效值會被忽略。"; - -/* Class = "NSButtonCell"; title = "Show Hanyu-Pinyin in the inline composition buffer"; ObjectID = "wFR-zX-M8H"; */ "wFR-zX-M8H.title" = "拼音並擊模式(組字區內看到的是漢語拼音)"; - -/* Class = "NSButtonCell"; title = "Output Hanyu-Pinyin in lieu of Zhuyin when Ctrl(+Alt)+CMD+Enter"; ObjectID = "iWy-Nw-QKB"; */ "iWy-Nw-QKB.title" = "Ctrl(+Alt)+CMD+Enter 輸出漢語拼音而非注音"; - -/* Class = "NSMenuItem"; title = "Dachen 26 (libChewing)"; ObjectID = "xjP-r7-GaK"; */ "xjP-r7-GaK.title" = "酷音大千二十六鍵"; - -/* Class = "NSMenuItem"; title = "Secondary Pinyin with Numeral Intonation"; ObjectID = "Parser11"; */ "Parser11.title" = "國音二式+數字標調"; - -/* Class = "NSMenuItem"; title = "Yale Pinyin with Numeral Intonation"; ObjectID = "Parser12"; */ "Parser12.title" = "耶魯拼音+數字標調"; - -/* Class = "NSMenuItem"; title = "Hualuo Pinyin with Numeral Intonation"; ObjectID = "Parser13"; */ "Parser13.title" = "華羅拼音+數字標調"; - -/* Class = "NSMenuItem"; title = "Universal Pinyin with Numeral Intonation"; ObjectID = "Parser14"; */ "Parser14.title" = "通用拼音+數字標調"; - -/* Class = "NSButtonCell"; title = "Balance the score according to candidate length"; ObjectID = "Wh1-iz-pwM"; */ "Wh1-iz-pwM.title" = "按候選字詞的長度調整權重"; - "xibKeyboardShortcuts.title" = "鍵盤快速鍵"; "xibUsingHotKeySCPC.title" = "模擬逐字選字輸入"; "xibUsingHotKeyAssociates.title" = "逐字選字聯想模式"; From 03151d4d47683fadd51b48543b17876abbabcde6 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Fri, 27 May 2022 23:21:43 +0800 Subject: [PATCH 07/36] ctlIME // Bind options for keyboard hotkeys. --- Source/Modules/IMEModules/ctlInputMethod_Menu.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/Modules/IMEModules/ctlInputMethod_Menu.swift b/Source/Modules/IMEModules/ctlInputMethod_Menu.swift index 9f83bc33..9cee83ab 100644 --- a/Source/Modules/IMEModules/ctlInputMethod_Menu.swift +++ b/Source/Modules/IMEModules/ctlInputMethod_Menu.swift @@ -44,21 +44,21 @@ extension ctlInputMethod { let useSCPCTypingModeItem = menu.addItem( withTitle: NSLocalizedString("Per-Char Select Mode", comment: ""), - action: #selector(toggleSCPCTypingMode(_:)), keyEquivalent: "P" + action: #selector(toggleSCPCTypingMode(_:)), keyEquivalent: mgrPrefs.usingHotKeySCPC ? "P" : "" ) useSCPCTypingModeItem.keyEquivalentModifierMask = [.command, .control] useSCPCTypingModeItem.state = mgrPrefs.useSCPCTypingMode.state let userAssociatedPhrasesItem = menu.addItem( withTitle: NSLocalizedString("Per-Char Associated Phrases", comment: ""), - action: #selector(toggleAssociatedPhrasesEnabled(_:)), keyEquivalent: "O" + action: #selector(toggleAssociatedPhrasesEnabled(_:)), keyEquivalent: mgrPrefs.usingHotKeyAssociates ? "O" : "" ) userAssociatedPhrasesItem.keyEquivalentModifierMask = [.command, .control] userAssociatedPhrasesItem.state = mgrPrefs.associatedPhrasesEnabled.state let useCNS11643SupportItem = menu.addItem( withTitle: NSLocalizedString("CNS11643 Mode", comment: ""), - action: #selector(toggleCNS11643Enabled(_:)), keyEquivalent: "L" + action: #selector(toggleCNS11643Enabled(_:)), keyEquivalent: mgrPrefs.usingHotKeyCNS ? "L" : "" ) useCNS11643SupportItem.keyEquivalentModifierMask = [.command, .control] useCNS11643SupportItem.state = mgrPrefs.cns11643Enabled.state @@ -66,14 +66,14 @@ extension ctlInputMethod { if IME.getInputMode() == InputMode.imeModeCHT { let chineseConversionItem = menu.addItem( withTitle: NSLocalizedString("Force KangXi Writing", comment: ""), - action: #selector(toggleChineseConverter(_:)), keyEquivalent: "K" + action: #selector(toggleChineseConverter(_:)), keyEquivalent: mgrPrefs.usingHotKeyKangXi ? "K" : "" ) chineseConversionItem.keyEquivalentModifierMask = [.command, .control] chineseConversionItem.state = mgrPrefs.chineseConversionEnabled.state let shiftJISConversionItem = menu.addItem( withTitle: NSLocalizedString("JIS Shinjitai Output", comment: ""), - action: #selector(toggleShiftJISShinjitaiOutput(_:)), keyEquivalent: "J" + action: #selector(toggleShiftJISShinjitaiOutput(_:)), keyEquivalent: mgrPrefs.usingHotKeyJIS ? "J" : "" ) shiftJISConversionItem.keyEquivalentModifierMask = [.command, .control] shiftJISConversionItem.state = mgrPrefs.shiftJISShinjitaiOutputEnabled.state @@ -81,7 +81,7 @@ extension ctlInputMethod { let halfWidthPunctuationItem = menu.addItem( withTitle: NSLocalizedString("Half-Width Punctuation Mode", comment: ""), - action: #selector(toggleHalfWidthPunctuation(_:)), keyEquivalent: "H" + action: #selector(toggleHalfWidthPunctuation(_:)), keyEquivalent: mgrPrefs.usingHotKeyHalfWidthASCII ? "H" : "" ) halfWidthPunctuationItem.keyEquivalentModifierMask = [.command, .control] halfWidthPunctuationItem.state = mgrPrefs.halfWidthPunctuationEnabled.state From a6ddfd500ba8a77ea947f9dd566fa2d66d321328 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sat, 28 May 2022 21:58:06 +0800 Subject: [PATCH 08/36] Voltaire // Beep when recycling pages (each round), etc. --- .../CandidateUI/ctlCandidateHorizontal.swift | 18 ++++++++++-------- .../UI/CandidateUI/ctlCandidateVertical.swift | 18 ++++++++++-------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Source/UI/CandidateUI/ctlCandidateHorizontal.swift b/Source/UI/CandidateUI/ctlCandidateHorizontal.swift index 1d3b20f1..bfcb0953 100644 --- a/Source/UI/CandidateUI/ctlCandidateHorizontal.swift +++ b/Source/UI/CandidateUI/ctlCandidateHorizontal.swift @@ -248,7 +248,7 @@ public class ctlCandidateHorizontal: ctlCandidate { private var candidateView: HorizontalCandidateView private var prevPageButton: NSButton private var nextPageButton: NSButton - private var currentPage: UInt = 0 + private var currentPageIndex: UInt = 0 public init() { var contentRect = NSRect(x: 128.0, y: 128.0, width: 0.0, height: 0.0) @@ -325,14 +325,15 @@ public class ctlCandidateHorizontal: ctlCandidate { override public func reloadData() { candidateView.highlightedIndex = 0 - currentPage = 0 + currentPageIndex = 0 layoutCandidateView() } override public func showNextPage() -> Bool { guard delegate != nil else { return false } if pageCount == 1 { return highlightNextCandidate() } - currentPage = (currentPage + 1 >= pageCount) ? 0 : currentPage + 1 + if currentPageIndex + 1 >= pageCount { clsSFX.beep() } + currentPageIndex = (currentPageIndex + 1 >= pageCount) ? 0 : currentPageIndex + 1 candidateView.highlightedIndex = 0 layoutCandidateView() return true @@ -341,7 +342,8 @@ public class ctlCandidateHorizontal: ctlCandidate { override public func showPreviousPage() -> Bool { guard delegate != nil else { return false } if pageCount == 1 { return highlightPreviousCandidate() } - currentPage = (currentPage == 0) ? pageCount - 1 : currentPage - 1 + if currentPageIndex == 0 { clsSFX.beep() } + currentPageIndex = (currentPageIndex == 0) ? pageCount - 1 : currentPageIndex - 1 candidateView.highlightedIndex = 0 layoutCandidateView() return true @@ -368,13 +370,13 @@ public class ctlCandidateHorizontal: ctlCandidate { return UInt.max } - let result = currentPage * UInt(keyLabels.count) + index + let result = currentPageIndex * UInt(keyLabels.count) + index return result < delegate.candidateCountForController(self) ? result : UInt.max } override public var selectedCandidateIndex: UInt { get { - currentPage * UInt(keyLabels.count) + candidateView.highlightedIndex + currentPageIndex * UInt(keyLabels.count) + candidateView.highlightedIndex } set { guard let delegate = delegate else { @@ -382,7 +384,7 @@ public class ctlCandidateHorizontal: ctlCandidate { } let keyLabelCount = UInt(keyLabels.count) if newValue < delegate.candidateCountForController(self) { - currentPage = newValue / keyLabelCount + currentPageIndex = newValue / keyLabelCount candidateView.highlightedIndex = newValue % keyLabelCount layoutCandidateView() } @@ -410,7 +412,7 @@ extension ctlCandidateHorizontal { let count = delegate.candidateCountForController(self) let keyLabelCount = UInt(keyLabels.count) - let begin = currentPage * keyLabelCount + let begin = currentPageIndex * keyLabelCount for index in begin.. Bool { guard delegate != nil else { return false } if pageCount == 1 { return highlightNextCandidate() } - currentPage = (currentPage + 1 >= pageCount) ? 0 : currentPage + 1 + if currentPageIndex + 1 >= pageCount { clsSFX.beep() } + currentPageIndex = (currentPageIndex + 1 >= pageCount) ? 0 : currentPageIndex + 1 candidateView.highlightedIndex = 0 layoutCandidateView() return true @@ -345,7 +346,8 @@ public class ctlCandidateVertical: ctlCandidate { override public func showPreviousPage() -> Bool { guard delegate != nil else { return false } if pageCount == 1 { return highlightPreviousCandidate() } - currentPage = (currentPage == 0) ? pageCount - 1 : currentPage - 1 + if currentPageIndex == 0 { clsSFX.beep() } + currentPageIndex = (currentPageIndex == 0) ? pageCount - 1 : currentPageIndex - 1 candidateView.highlightedIndex = 0 layoutCandidateView() return true @@ -372,13 +374,13 @@ public class ctlCandidateVertical: ctlCandidate { return UInt.max } - let result = currentPage * UInt(keyLabels.count) + index + let result = currentPageIndex * UInt(keyLabels.count) + index return result < delegate.candidateCountForController(self) ? result : UInt.max } override public var selectedCandidateIndex: UInt { get { - currentPage * UInt(keyLabels.count) + candidateView.highlightedIndex + currentPageIndex * UInt(keyLabels.count) + candidateView.highlightedIndex } set { guard let delegate = delegate else { @@ -386,7 +388,7 @@ public class ctlCandidateVertical: ctlCandidate { } let keyLabelCount = UInt(keyLabels.count) if newValue < delegate.candidateCountForController(self) { - currentPage = newValue / keyLabelCount + currentPageIndex = newValue / keyLabelCount candidateView.highlightedIndex = newValue % keyLabelCount layoutCandidateView() } @@ -414,7 +416,7 @@ extension ctlCandidateVertical { let count = delegate.candidateCountForController(self) let keyLabelCount = UInt(keyLabels.count) - let begin = currentPage * keyLabelCount + let begin = currentPageIndex * keyLabelCount for index in begin.. Date: Sun, 29 May 2022 09:37:40 +0800 Subject: [PATCH 09/36] Voltaire // Weaken the border color for less visual distraction. --- Source/UI/CandidateUI/ctlCandidateHorizontal.swift | 2 +- Source/UI/CandidateUI/ctlCandidateVertical.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/UI/CandidateUI/ctlCandidateHorizontal.swift b/Source/UI/CandidateUI/ctlCandidateHorizontal.swift index bfcb0953..4d411030 100644 --- a/Source/UI/CandidateUI/ctlCandidateHorizontal.swift +++ b/Source/UI/CandidateUI/ctlCandidateHorizontal.swift @@ -266,7 +266,7 @@ public class ctlCandidateHorizontal: ctlCandidate { candidateView.wantsLayer = true candidateView.layer?.borderColor = - NSColor.selectedMenuItemTextColor.withAlphaComponent(0.30).cgColor + NSColor.selectedMenuItemTextColor.withAlphaComponent(0.10).cgColor candidateView.layer?.borderWidth = 1.0 if #available(macOS 10.13, *) { candidateView.layer?.cornerRadius = 6.0 diff --git a/Source/UI/CandidateUI/ctlCandidateVertical.swift b/Source/UI/CandidateUI/ctlCandidateVertical.swift index 935d43a1..98986b7e 100644 --- a/Source/UI/CandidateUI/ctlCandidateVertical.swift +++ b/Source/UI/CandidateUI/ctlCandidateVertical.swift @@ -270,7 +270,7 @@ public class ctlCandidateVertical: ctlCandidate { candidateView.wantsLayer = true candidateView.layer?.borderColor = - NSColor.selectedMenuItemTextColor.withAlphaComponent(0.30).cgColor + NSColor.selectedMenuItemTextColor.withAlphaComponent(0.10).cgColor candidateView.layer?.borderWidth = 1.0 if #available(macOS 10.13, *) { candidateView.layer?.cornerRadius = 6.0 From acfe46daef95731ad90a0946bf2fdfdbd71cffa6 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 29 May 2022 09:48:09 +0800 Subject: [PATCH 10/36] Voltaire // Use Swift-specific iterators in certain context. --- Source/UI/CandidateUI/ctlCandidateHorizontal.swift | 8 ++++---- Source/UI/CandidateUI/ctlCandidateVertical.swift | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/UI/CandidateUI/ctlCandidateHorizontal.swift b/Source/UI/CandidateUI/ctlCandidateHorizontal.swift index 4d411030..d2c9b581 100644 --- a/Source/UI/CandidateUI/ctlCandidateHorizontal.swift +++ b/Source/UI/CandidateUI/ctlCandidateHorizontal.swift @@ -129,8 +129,8 @@ private class HorizontalCandidateView: NSView { ) var accuWidth: CGFloat = 0 - for index in 0..= accuWidth, location.x <= accuWidth + currentWidth { return UInt(index) diff --git a/Source/UI/CandidateUI/ctlCandidateVertical.swift b/Source/UI/CandidateUI/ctlCandidateVertical.swift index 98986b7e..ae73d505 100644 --- a/Source/UI/CandidateUI/ctlCandidateVertical.swift +++ b/Source/UI/CandidateUI/ctlCandidateVertical.swift @@ -135,8 +135,8 @@ private class VerticalCandidateView: NSView { ) var accuHeight: CGFloat = 0 - for index in 0..= accuHeight, location.y <= accuHeight + currentHeight { return UInt(index) From 7823ba2af7c6967ebac3c1847e57e67a8fd82646 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 29 May 2022 09:51:05 +0800 Subject: [PATCH 11/36] Voltaire // Round windowWidth in ctlCandidateVertical. --- Source/UI/CandidateUI/ctlCandidateVertical.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/UI/CandidateUI/ctlCandidateVertical.swift b/Source/UI/CandidateUI/ctlCandidateVertical.swift index ae73d505..9477b5db 100644 --- a/Source/UI/CandidateUI/ctlCandidateVertical.swift +++ b/Source/UI/CandidateUI/ctlCandidateVertical.swift @@ -86,7 +86,7 @@ private class VerticalCandidateView: NSView { } elementWidths = newWidths elementHeights = newHeights - windowWidth = calculatedWindowWidth + cellPadding + windowWidth = round(calculatedWindowWidth + cellPadding) // 防止邊框粗細不一 } @objc(setKeyLabelFont:candidateFont:) From 9ad145df35a8c7436cf0836bbf511f4053f059da Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 29 May 2022 15:19:30 +0800 Subject: [PATCH 12/36] Voltaire // Round windowWidth in ctlCandidateHorizontal. --- Source/UI/CandidateUI/ctlCandidateHorizontal.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/UI/CandidateUI/ctlCandidateHorizontal.swift b/Source/UI/CandidateUI/ctlCandidateHorizontal.swift index d2c9b581..b46869a8 100644 --- a/Source/UI/CandidateUI/ctlCandidateHorizontal.swift +++ b/Source/UI/CandidateUI/ctlCandidateHorizontal.swift @@ -52,8 +52,7 @@ private class HorizontalCandidateView: NSView { var result = NSSize.zero if !elementWidths.isEmpty { - result.width = elementWidths.reduce(0, +) - result.width += CGFloat(elementWidths.count) + result.width = elementWidths.reduce(0, +) + CGFloat(elementWidths.count) result.height = candidateTextHeight + cellPadding } return result @@ -78,7 +77,7 @@ private class HorizontalCandidateView: NSView { if cellWidth < cellHeight * 1.35 { cellWidth = cellHeight * 1.35 } - newWidths.append(cellWidth) + newWidths.append(round(cellWidth)) } elementWidths = newWidths } From 427af014d69f7ad11089e31fb609d8cf1e14c1ac Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 29 May 2022 15:21:41 +0800 Subject: [PATCH 13/36] Voltaire // Recalculate cellPadding. --- Source/UI/CandidateUI/ctlCandidateHorizontal.swift | 2 +- Source/UI/CandidateUI/ctlCandidateVertical.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/UI/CandidateUI/ctlCandidateHorizontal.swift b/Source/UI/CandidateUI/ctlCandidateHorizontal.swift index b46869a8..fa19f9a7 100644 --- a/Source/UI/CandidateUI/ctlCandidateHorizontal.swift +++ b/Source/UI/CandidateUI/ctlCandidateHorizontal.swift @@ -112,7 +112,7 @@ private class HorizontalCandidateView: NSView { keyLabelWidth = ceil(labelFontSize) keyLabelHeight = ceil(labelFontSize * 2) candidateTextHeight = ceil(candidateFontSize * 1.20) - cellPadding = ceil(biggestSize / 2.0) + cellPadding = ceil(biggestSize / 4.0) * 2 } override func draw(_: NSRect) { diff --git a/Source/UI/CandidateUI/ctlCandidateVertical.swift b/Source/UI/CandidateUI/ctlCandidateVertical.swift index 9477b5db..12eed454 100644 --- a/Source/UI/CandidateUI/ctlCandidateVertical.swift +++ b/Source/UI/CandidateUI/ctlCandidateVertical.swift @@ -119,7 +119,7 @@ private class VerticalCandidateView: NSView { keyLabelWidth = ceil(labelFontSize) keyLabelHeight = ceil(labelFontSize * 2) candidateTextHeight = ceil(candidateFontSize * 1.20) - cellPadding = ceil(biggestSize / 2.0) + cellPadding = ceil(biggestSize / 4.0) * 2 } override func draw(_: NSRect) { From 322d2512aee1a831cfa5c42bdbb34a1d9a72e871 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 29 May 2022 15:25:15 +0800 Subject: [PATCH 14/36] Voltaire // Unify the y of rctCandidatePhrase. --- Source/UI/CandidateUI/ctlCandidateHorizontal.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/UI/CandidateUI/ctlCandidateHorizontal.swift b/Source/UI/CandidateUI/ctlCandidateHorizontal.swift index fa19f9a7..17245e60 100644 --- a/Source/UI/CandidateUI/ctlCandidateHorizontal.swift +++ b/Source/UI/CandidateUI/ctlCandidateHorizontal.swift @@ -139,7 +139,7 @@ private class HorizontalCandidateView: NSView { height: keyLabelHeight * 2.0 ) let rctCandidatePhrase = NSRect( - x: accuWidth + keyLabelWidth - 1, y: cellPadding / 2, + x: accuWidth + keyLabelWidth - 1, y: cellPadding / 2 - 1, width: currentWidth - keyLabelWidth, height: candidateTextHeight ) From 33292cd32c0d84d21ad2c5d20c3e9059bbf63ef4 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 29 May 2022 11:28:38 +0800 Subject: [PATCH 15/36] LMs // Remove consolidation process from LMCoreNS. --- Source/Modules/LangModelRelated/SubLMs/lmCoreNS.swift | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Source/Modules/LangModelRelated/SubLMs/lmCoreNS.swift b/Source/Modules/LangModelRelated/SubLMs/lmCoreNS.swift index 74a7eb26..631cc710 100644 --- a/Source/Modules/LangModelRelated/SubLMs/lmCoreNS.swift +++ b/Source/Modules/LangModelRelated/SubLMs/lmCoreNS.swift @@ -80,11 +80,6 @@ extension vChewing { return false } - if allowConsolidation { - LMConsolidator.fixEOF(path: path) - LMConsolidator.consolidate(path: path, pragma: true) - } - do { let rawData = try Data(contentsOf: URL(fileURLWithPath: path)) let rawPlist = try PropertyListSerialization.propertyList(from: rawData, format: nil) as! [String: [Data]] From 5d942978093e56be44a5cab37c2db8200a8d4c1f Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 29 May 2022 11:55:57 +0800 Subject: [PATCH 16/36] LMUserOverride // Content clean-up. --- .../SubLMs/lmUserOverride.swift | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/Source/Modules/LangModelRelated/SubLMs/lmUserOverride.swift b/Source/Modules/LangModelRelated/SubLMs/lmUserOverride.swift index 45b2fdd0..cedc44f2 100644 --- a/Source/Modules/LangModelRelated/SubLMs/lmUserOverride.swift +++ b/Source/Modules/LangModelRelated/SubLMs/lmUserOverride.swift @@ -47,20 +47,9 @@ extension vChewing { } } - struct KeyObservationPair: Equatable { + struct KeyObservationPair { var key: String var observation: Observation - - var hashValue: Int { key.hashValue } - - init(key: String, observation: Observation) { - self.key = key - self.observation = observation - } - - static func == (lhs: KeyObservationPair, rhs: KeyObservationPair) -> Bool { - lhs.key == rhs.key - } } // MARK: - Main @@ -72,10 +61,7 @@ extension vChewing { let kDecayThreshold: Double = 1.0 / 1_048_576.0 public init(capacity: Int = 500, decayConstant: Double = 5400.0) { - mutCapacity = abs(capacity) // Ensures that this value is always > 0. - if mutCapacity == 0 { - mutCapacity = 1 - } + mutCapacity = max(capacity, 1) // Ensures that this integer value is always > 0. mutDecayExponent = log(0.5) / decayConstant } @@ -157,10 +143,7 @@ extension vChewing { lambda: Double ) -> Double { let decay = exp((timestamp - eventTimestamp) * lambda) - if decay < kDecayThreshold { - return 0.0 - } - + if decay < kDecayThreshold { return 0.0 } let prob = Double(eventCount) / Double(totalCount) return prob * decay } From 7aca829f031b20b7b4d6857e1f51f3def1f99fa4 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 29 May 2022 13:38:13 +0800 Subject: [PATCH 17/36] =?UTF-8?q?Tekkon=20v1.1.4=20//=20Add=20support=20of?= =?UTF-8?q?=20"=E3=84=9B+intonation"=20for=20Hsu=20arrange.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/Modules/ControllerModules/SyllableComposer.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Modules/ControllerModules/SyllableComposer.swift b/Source/Modules/ControllerModules/SyllableComposer.swift index 70065a43..4e088921 100644 --- a/Source/Modules/ControllerModules/SyllableComposer.swift +++ b/Source/Modules/ControllerModules/SyllableComposer.swift @@ -719,6 +719,10 @@ public struct Tekkon { consonant.selfReplace("ㄒ", "ㄕ") } if vowel == "ㄜ", semivowel.isEmpty { consonant.selfReplace("ㄑ", "ㄔ") } + if consonant == "ㄏ", semivowel.isEmpty, vowel.isEmpty { + consonant = "" + vowel = "ㄛ" + } } // 後置修正 From 69be62bb69c8da32e19a07fd22a0fc613ef927b0 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 29 May 2022 13:48:58 +0800 Subject: [PATCH 18/36] clsSFX // FadeOut previous articulation when machine-gun-triggering. --- Source/Modules/SFX/clsSFX.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/Modules/SFX/clsSFX.swift b/Source/Modules/SFX/clsSFX.swift index 77fee8f3..3fc43f7b 100644 --- a/Source/Modules/SFX/clsSFX.swift +++ b/Source/Modules/SFX/clsSFX.swift @@ -34,10 +34,16 @@ public class clsSFX: NSObject, NSSoundDelegate { private var currentBeep: NSSound? private func beep() { + let defaultVolume: Float = 0.4 // Stop existing beep if let beep = currentBeep { if beep.isPlaying { + for i in 1..<30 { + beep.volume = (defaultVolume / Float(i)) + usleep(1000) + } beep.stop() + beep.volume = defaultVolume } } // Create a new beep sound if possible @@ -54,7 +60,7 @@ public class clsSFX: NSObject, NSSoundDelegate { return } beep.delegate = self - beep.volume = 0.4 + beep.volume = defaultVolume beep.play() currentBeep = beep } From 87e39bf943f356e786ffd760051f617405cc5132 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 30 May 2022 15:38:19 +0800 Subject: [PATCH 19/36] Megrez v1.1.8 // Add nodesBeginningAt(). --- .../Megrez/1_BlockReadingBuilder.swift | 217 +++++++++++------- .../LanguageParsers/Megrez/2_Grid.swift | 59 ++++- .../LanguageParsers/Megrez/3_NodeAnchor.swift | 16 +- .../LanguageParsers/Megrez/3_Span.swift | 4 +- .../LanguageParsers/Megrez/4_Node.swift | 6 +- 5 files changed, 198 insertions(+), 104 deletions(-) diff --git a/Source/Modules/LanguageParsers/Megrez/1_BlockReadingBuilder.swift b/Source/Modules/LanguageParsers/Megrez/1_BlockReadingBuilder.swift index 992aa068..c8f5f1e4 100644 --- a/Source/Modules/LanguageParsers/Megrez/1_BlockReadingBuilder.swift +++ b/Source/Modules/LanguageParsers/Megrez/1_BlockReadingBuilder.swift @@ -26,8 +26,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. extension Megrez { /// 分節讀音槽。 public class BlockReadingBuilder { - /// 該分節讀音曹內可以允許的最大詞長。 - private var mutMaximumBuildSpanLength = 10 + /// 給被丟掉的節點路徑施加的負權重。 + private let kDroppedPathScore: Double = -999 /// 該分節讀音槽的游標位置。 private var mutCursorIndex: Int = 0 /// 該分節讀音槽的讀音陣列。 @@ -37,6 +37,8 @@ extension Megrez { /// 該分節讀音槽所使用的語言模型。 private var mutLM: LanguageModel + /// 公開該分節讀音槽內可以允許的最大詞長。 + public var maxBuildSpanLength: Int { mutGrid.maxBuildSpanLength } /// 公開:多字讀音鍵當中用以分割漢字讀音的記號,預設為空。 public var joinSeparator: String = "" /// 公開:該分節讀音槽的游標位置。 @@ -55,11 +57,11 @@ extension Megrez { /// 分節讀音槽。 /// - Parameters: /// - lm: 語言模型。可以是任何基於 Megrez.LanguageModel 的衍生型別。 - /// - length: 指定該分節讀音曹內可以允許的最大詞長,預設為 10 字。 + /// - length: 指定該分節讀音槽內可以允許的最大詞長,預設為 10 字。 /// - separator: 多字讀音鍵當中用以分割漢字讀音的記號,預設為空。 public init(lm: LanguageModel, length: Int = 10, separator: String = "") { mutLM = lm - mutMaximumBuildSpanLength = length + mutGrid = .init(spanLength: abs(length)) // 防呆 joinSeparator = separator } @@ -112,6 +114,7 @@ extension Megrez { /// 用於輸入法組字區長度上限處理: /// 將該位置要溢出的敲字內容遞交之後、再執行這個函數。 @discardableResult public func removeHeadReadings(count: Int) -> Bool { + let count = abs(count) // 防呆 if count > length { return false } @@ -120,8 +123,10 @@ extension Megrez { if mutCursorIndex > 0 { mutCursorIndex -= 1 } - mutReadings.removeFirst() - mutGrid.shrinkGridByOneAt(location: 0) + if !mutReadings.isEmpty { + mutReadings.removeFirst() + mutGrid.shrinkGridByOneAt(location: 0) + } build() } @@ -131,23 +136,22 @@ extension Megrez { // MARK: - Walker /// 對已給定的軌格按照給定的位置與條件進行正向爬軌。 - /// - /// 其實就是將反向爬軌的結果顛倒順序再給出來而已,省得使用者自己再顛倒一遍。 /// - Parameters: /// - at: 開始爬軌的位置。 /// - score: 給定累計權重,非必填參數。預設值為 0。 - /// - nodesLimit: 限定最多只爬多少個節點。 - /// - balanced: 啟用平衡權重,在節點權重的基礎上根據節點幅位長度來加權。 + /// - joinedPhrase: 用以統計累計長詞的內部參數,請勿主動使用。 + /// - longPhrases: 用以統計累計長詞的內部參數,請勿主動使用。 public func walk( - at location: Int, + at location: Int = 0, score accumulatedScore: Double = 0.0, - nodesLimit: Int = 0, - balanced: Bool = false + joinedPhrase: String = "", + longPhrases: [String] = .init() ) -> [NodeAnchor] { - Array( + let newLocation = (mutGrid.width) - abs(location) // 防呆 + return Array( reverseWalk( - at: location, score: accumulatedScore, - nodesLimit: nodesLimit, balanced: balanced + at: newLocation, score: accumulatedScore, + joinedPhrase: joinedPhrase, longPhrases: longPhrases ).reversed()) } @@ -155,91 +159,125 @@ extension Megrez { /// - Parameters: /// - at: 開始爬軌的位置。 /// - score: 給定累計權重,非必填參數。預設值為 0。 - /// - nodesLimit: 限定最多只爬多少個節點。 - /// - balanced: 啟用平衡權重,在節點權重的基礎上根據節點幅位長度來加權。 + /// - joinedPhrase: 用以統計累計長詞的內部參數,請勿主動使用。 + /// - longPhrases: 用以統計累計長詞的內部參數,請勿主動使用。 public func reverseWalk( at location: Int, score accumulatedScore: Double = 0.0, - nodesLimit: Int = 0, - balanced: Bool = false + joinedPhrase: String = "", + longPhrases: [String] = .init() ) -> [NodeAnchor] { + let location = abs(location) // 防呆 if location == 0 || location > mutGrid.width { - return [] as [NodeAnchor] + return .init() } - var paths: [[NodeAnchor]] = [] - var nodes: [NodeAnchor] = mutGrid.nodesEndingAt(location: location) + var paths = [[NodeAnchor]]() + var nodes = mutGrid.nodesEndingAt(location: location) - if balanced { - nodes.sort { - $0.balancedScore > $1.balancedScore - } + nodes = nodes.stableSorted { + $0.scoreForSort > $1.scoreForSort } - for (i, n) in nodes.enumerated() { - // 只檢查前 X 個 NodeAnchor 是否有 node。 - // 這裡有 abs 是為了防止有白癡填負數。 - if abs(nodesLimit) > 0, i == abs(nodesLimit) { - break - } - - var n = n - guard let nNode = n.node else { - continue - } - - n.accumulatedScore = accumulatedScore + nNode.score - - // 利用幅位長度來決定權重。 - // 這樣一來,例:「再見」比「在」與「見」的權重更高。 - if balanced { - n.accumulatedScore += n.additionalWeights - } - - var path: [NodeAnchor] = reverseWalk( - at: location - n.spanningLength, - score: n.accumulatedScore - ) - - path.insert(n, at: 0) - + if let nodeOfNodeZero = nodes[0].node, nodeOfNodeZero.score >= nodeOfNodeZero.kSelectedCandidateScore { + // 在使用者有選過候選字詞的情況下,摒棄非依此據而成的節點路徑。 + var nodeZero = nodes[0] + nodeZero.accumulatedScore = accumulatedScore + nodeOfNodeZero.score + var path: [NodeAnchor] = reverseWalk(at: location - nodeZero.spanningLength, score: nodeZero.accumulatedScore) + path.insert(nodeZero, at: 0) paths.append(path) - - // 始終使用固定的候選字詞 - if balanced, nNode.score >= 0 { - break - } - } - - if !paths.isEmpty { - if var result = paths.first { - for value in paths { - if let vLast = value.last, let rLast = result.last { - if vLast.accumulatedScore > rLast.accumulatedScore { - result = value - } - } + } else if !longPhrases.isEmpty { + var path = [NodeAnchor]() + for theAnchor in nodes { + guard let theNode = theAnchor.node else { continue } + var theAnchor = theAnchor + let joinedValue = theNode.currentKeyValue.value + joinedPhrase + // 如果只是一堆單漢字的節點組成了同樣的長詞的話,直接棄用這個節點路徑。 + // 打比方說「八/月/中/秋/山/林/涼」與「八月/中秋/山林/涼」在使用者來看 + // 是「結果等價」的,那就扔掉前者。 + if longPhrases.contains(joinedValue) { + theAnchor.accumulatedScore = kDroppedPathScore + path.insert(theAnchor, at: 0) + paths.append(path) + continue } - return result + theAnchor.accumulatedScore = accumulatedScore + theNode.score + if joinedValue.count >= longPhrases[0].count { + path = reverseWalk( + at: location - theAnchor.spanningLength, score: theAnchor.accumulatedScore, joinedPhrase: "", + longPhrases: .init() + ) + } else { + path = reverseWalk( + at: location - theAnchor.spanningLength, score: theAnchor.accumulatedScore, joinedPhrase: joinedValue, + longPhrases: longPhrases + ) + } + path.insert(theAnchor, at: 0) + paths.append(path) + } + } else { + // 看看當前格位有沒有更長的候選字詞。 + var longPhrases = [String]() + for theAnchor in nodes { + guard let theNode = theAnchor.node else { continue } + if theAnchor.spanningLength > 1 { + longPhrases.append(theNode.currentKeyValue.value) + } + } + + longPhrases = longPhrases.stableSorted { + $0.count > $1.count + } + for theAnchor in nodes { + var theAnchor = theAnchor + guard let theNode = theAnchor.node else { continue } + theAnchor.accumulatedScore = accumulatedScore + theNode.score + var path = [NodeAnchor]() + if theAnchor.spanningLength > 1 { + path = reverseWalk( + at: location - theAnchor.spanningLength, score: theAnchor.accumulatedScore, joinedPhrase: "", + longPhrases: .init() + ) + } else { + path = reverseWalk( + at: location - theAnchor.spanningLength, score: theAnchor.accumulatedScore, + joinedPhrase: theNode.currentKeyValue.value, longPhrases: longPhrases + ) + } + path.insert(theAnchor, at: 0) + paths.append(path) } } - return [] as [NodeAnchor] + + guard !paths.isEmpty else { + return .init() + } + + var result: [NodeAnchor] = paths[0] + for neta in paths { + if neta.last!.accumulatedScore > result.last!.accumulatedScore { + result = neta + } + } + + return result } // MARK: - Private functions private func build() { let itrBegin: Int = - (mutCursorIndex < mutMaximumBuildSpanLength) ? 0 : mutCursorIndex - mutMaximumBuildSpanLength - let itrEnd: Int = min(mutCursorIndex + mutMaximumBuildSpanLength, mutReadings.count) + (mutCursorIndex < maxBuildSpanLength) ? 0 : mutCursorIndex - maxBuildSpanLength + let itrEnd: Int = min(mutCursorIndex + maxBuildSpanLength, mutReadings.count) for p in itrBegin.. itrEnd { break } - let strSlice = mutReadings[p..<(p + q)] - let combinedReading: String = join(slice: strSlice, separator: joinSeparator) + let arrSlice = mutReadings[p..<(p + q)] + let combinedReading: String = join(slice: arrSlice, separator: joinSeparator) if !mutGrid.hasMatchedNode(location: p, spanningLength: q, key: combinedReading) { let unigrams: [Unigram] = mutLM.unigramsFor(key: combinedReading) @@ -252,12 +290,35 @@ extension Megrez { } } - private func join(slice strSlice: ArraySlice, separator: String) -> String { + private func join(slice arrSlice: ArraySlice, separator: String) -> String { var arrResult: [String] = [] - for value in strSlice { + for value in arrSlice { arrResult.append(value) } return arrResult.joined(separator: separator) } } } + +// MARK: - Stable Sort Extension + +// Reference: https://stackoverflow.com/a/50545761/4162914 + +extension Sequence { + /// Return a stable-sorted collection. + /// + /// - Parameter areInIncreasingOrder: Return nil when two element are equal. + /// - Returns: The sorted collection. + func stableSorted( + by areInIncreasingOrder: (Element, Element) throws -> Bool + ) + rethrows -> [Element] + { + try enumerated() + .sorted { a, b -> Bool in + try areInIncreasingOrder(a.element, b.element) + || (a.offset < b.offset && !areInIncreasingOrder(b.element, a.element)) + } + .map(\.element) + } +} diff --git a/Source/Modules/LanguageParsers/Megrez/2_Grid.swift b/Source/Modules/LanguageParsers/Megrez/2_Grid.swift index 61410e8f..3eec69ba 100644 --- a/Source/Modules/LanguageParsers/Megrez/2_Grid.swift +++ b/Source/Modules/LanguageParsers/Megrez/2_Grid.swift @@ -29,16 +29,23 @@ extension Megrez { /// 幅位陣列。 private var mutSpans: [Megrez.Span] + /// 該幅位內可以允許的最大詞長。 + private var mutMaxBuildSpanLength = 10 + + /// 公開:該幅位內可以允許的最大詞長。 + public var maxBuildSpanLength: Int { mutMaxBuildSpanLength } + /// 軌格的寬度,也就是其內的幅位陣列當中的幅位數量。 var width: Int { mutSpans.count } - public init() { + public init(spanLength: Int = 10) { + mutMaxBuildSpanLength = spanLength mutSpans = [Megrez.Span]() } /// 自我清空該軌格的內容。 public func clear() { - mutSpans = [Megrez.Span]() + mutSpans.removeAll() } /// 往該軌格的指定位置插入指定幅位長度的指定節點。 @@ -47,6 +54,8 @@ extension Megrez { /// - location: 位置。 /// - spanningLength: 給定的幅位長度。 public func insertNode(node: Node, location: Int, spanningLength: Int) { + let location = abs(location) // 防呆 + let spanningLength = abs(spanningLength) // 防呆 if location >= mutSpans.count { let diff = location - mutSpans.count + 1 for _ in 0.. Bool { + let location = abs(location) // 防呆 + let spanningLength = abs(spanningLength) // 防呆 if location > mutSpans.count { return false } let n = mutSpans[location].node(length: spanningLength) - return n == nil ? false : key == n?.key + return n != nil && key == n?.key } /// 在該軌格的指定位置擴增一個幅位。 /// - Parameters: /// - location: 位置。 public func expandGridByOneAt(location: Int) { - // 這裡加入 abs 完全是一個防呆設計 - mutSpans.insert(Span(), at: abs(location)) - if location != 0, abs(location) != mutSpans.count { - for i in 0..= mutSpans.count { return } @@ -99,11 +111,35 @@ extension Megrez { } } + /// 給定位置,枚舉出所有在這個位置開始的節點。 + /// - Parameters: + /// - location: 位置。 + public func nodesBeginningAt(location: Int) -> [NodeAnchor] { + let location = abs(location) // 防呆 + var results = [NodeAnchor]() + if location < mutSpans.count { // 此時 mutSpans 必然不為空 + let span = mutSpans[location] + for i in 1...maxBuildSpanLength { + if let np = span.node(length: i) { + results.append( + NodeAnchor( + node: np, + location: location, + spanningLength: i + ) + ) + } + } + } + return results + } + /// 給定位置,枚舉出所有在這個位置結尾的節點。 /// - Parameters: /// - location: 位置。 public func nodesEndingAt(location: Int) -> [NodeAnchor] { - var results: [NodeAnchor] = [] + let location = abs(location) // 防呆 + var results = [NodeAnchor]() if !mutSpans.isEmpty, location <= mutSpans.count { for i in 0.. [NodeAnchor] { - var results: [NodeAnchor] = [] + let location = abs(location) // 防呆 + var results = [NodeAnchor]() if !mutSpans.isEmpty, location <= mutSpans.count { for i in 0.. NodeAnchor { + let location = abs(location) // 防呆 var node = NodeAnchor() for nodeAnchor in nodesCrossingOrEndingAt(location: location) { guard let theNode = nodeAnchor.node else { @@ -182,6 +220,7 @@ extension Megrez { /// - value: 給定字串。 /// - overridingScore: 給定權重數值。 public func overrideNodeScoreForSelectedCandidate(location: Int, value: String, overridingScore: Double) { + let location = abs(location) // 防呆 for nodeAnchor in nodesCrossingOrEndingAt(location: location) { guard let theNode = nodeAnchor.node else { continue diff --git a/Source/Modules/LanguageParsers/Megrez/3_NodeAnchor.swift b/Source/Modules/LanguageParsers/Megrez/3_NodeAnchor.swift index 11b47258..4cdaa64b 100644 --- a/Source/Modules/LanguageParsers/Megrez/3_NodeAnchor.swift +++ b/Source/Modules/LanguageParsers/Megrez/3_NodeAnchor.swift @@ -52,19 +52,9 @@ extension Megrez { return stream } - /// 獲取加權量。 - public var additionalWeights: Double { - (Double(spanningLength) - 1) * 0.75 - } - - /// 獲取平衡權重。 - public var balancedScore: Double { - (node?.score ?? 0) + additionalWeights - } - - /// 獲取平衡累計權重。 - public var balancedAccumulatedScore: Double { - accumulatedScore + additionalWeights + /// 獲取用來比較的權重。 + public var scoreForSort: Double { + node?.score ?? 0 } } } diff --git a/Source/Modules/LanguageParsers/Megrez/3_Span.swift b/Source/Modules/LanguageParsers/Megrez/3_Span.swift index d99238ad..6ea9d45a 100644 --- a/Source/Modules/LanguageParsers/Megrez/3_Span.swift +++ b/Source/Modules/LanguageParsers/Megrez/3_Span.swift @@ -47,6 +47,7 @@ extension Megrez { /// - node: 節點。 /// - length: 給定的節點長度。 mutating func insert(node: Node, length: Int) { + let length = abs(length) // 防呆 mutLengthNodeMap[length] = node if length > mutMaximumLength { mutMaximumLength = length @@ -57,6 +58,7 @@ extension Megrez { /// - Parameters: /// - length: 給定的節點長度。 mutating func removeNodeOfLengthGreaterThan(_ length: Int) { + let length = abs(length) // 防呆 if length > mutMaximumLength { return } var max = 0 var removalList: [Int: Megrez.Node] = [:] @@ -79,7 +81,7 @@ extension Megrez { /// - Parameters: /// - length: 給定的節點長度。 public func node(length: Int) -> Node? { - mutLengthNodeMap[length] + mutLengthNodeMap[abs(length)] // 防呆 } } } diff --git a/Source/Modules/LanguageParsers/Megrez/4_Node.swift b/Source/Modules/LanguageParsers/Megrez/4_Node.swift index 01f6c6d9..813cc30c 100644 --- a/Source/Modules/LanguageParsers/Megrez/4_Node.swift +++ b/Source/Modules/LanguageParsers/Megrez/4_Node.swift @@ -47,7 +47,7 @@ extension Megrez { /// 用來登記「當前選中的單元圖」的索引值的變數。 private var mutSelectedUnigramIndex: Int = 0 /// 用來登記要施加給「『被標記為選中狀態』的候選字詞」的複寫權重的數值。 - private let kSelectedCandidateScore: Double = 99 + public let kSelectedCandidateScore: Double = 99 /// 將當前節點列印成一個字串。 public var description: String { "(node,key:\(mutKey),fixed:\(mutCandidateFixed ? "true" : "false"),selected:\(mutSelectedUnigramIndex),\(mutUnigrams))" @@ -84,7 +84,7 @@ extension Megrez { $0.score > $1.score } - if mutUnigrams.count > 0 { + if !mutUnigrams.isEmpty { mutScore = mutUnigrams[0].score } @@ -133,6 +133,7 @@ extension Megrez { /// - index: 索引位置。 /// - fix: 是否將當前解點標記為「候選詞已鎖定」的狀態。 public func selectCandidateAt(index: Int = 0, fix: Bool = false) { + let index = abs(index) mutSelectedUnigramIndex = index >= mutUnigrams.count ? 0 : index mutCandidateFixed = fix mutScore = kSelectedCandidateScore @@ -152,6 +153,7 @@ extension Megrez { /// - index: 索引位置。 /// - score: 給定權重條件。 public func selectFloatingCandidateAt(index: Int, score: Double) { + let index = abs(index) // 防呆 mutSelectedUnigramIndex = index >= mutUnigrams.count ? 0 : index mutCandidateFixed = false mutScore = score From 5800ddea912c24eda145e05c4afe2bec4b7485c3 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 30 May 2022 15:39:25 +0800 Subject: [PATCH 20/36] KeyHandler // Cope with changes introduced in Megrez v1.1.8 update. - Also use dumpDOT when debug mode is enabled. --- .../ControllerModules/KeyHandler_Core.swift | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Source/Modules/ControllerModules/KeyHandler_Core.swift b/Source/Modules/ControllerModules/KeyHandler_Core.swift index 161b0455..82789d2f 100644 --- a/Source/Modules/ControllerModules/KeyHandler_Core.swift +++ b/Source/Modules/ControllerModules/KeyHandler_Core.swift @@ -48,6 +48,7 @@ protocol KeyHandlerDelegate { class KeyHandler { let kEpsilon: Double = 0.000001 + let kMaxComposingBufferNeedsToWalkSize: Int = 10 var _composer: Tekkon.Composer = .init() var _inputMode: String = "" var _languageModel: vChewing.LMInstantiator = .init() @@ -111,10 +112,21 @@ class KeyHandler { // Retrieve the most likely grid, i.e. a Maximum Likelihood Estimation // of the best possible Mandarin characters given the input syllables, // using the Viterbi algorithm implemented in the Megrez library. - // The walk() traces the grid to the end, hence no need to use .reversed() here. - _walkedNodes = _builder.walk( - at: _builder.grid.width, nodesLimit: 10, balanced: mgrPrefs.useScoreBalancing - ) + // The walk() traces the grid to the end. + _walkedNodes = _builder.walk() + + // if DEBUG mode is enabled, a GraphViz file is written to kGraphVizOutputfile. + if mgrPrefs.isDebugModeEnabled { + let result = _builder.grid.dumpDOT + do { + try result.write( + toFile: "/private/var/tmp/vChewing-visualization.dot", + atomically: true, encoding: .utf8 + ) + } catch { + IME.prtDebugIntel("Failed from writing dumpDOT results.") + } + } } var popOverflowComposingTextAndWalk: String { From 46a58e9e46afc038faa6c4d238da7cf29a44de06 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 30 May 2022 16:07:40 +0800 Subject: [PATCH 21/36] KeyHandler // Change the condition whether Tab can call candidate list. --- Source/Modules/ControllerModules/KeyHandler_HandleInput.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift b/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift index a78b0055..d5662a6a 100644 --- a/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift +++ b/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift @@ -237,11 +237,11 @@ extension KeyHandler { return true } - // MARK: Calling candidate window using Space or Down or PageUp / PageDn. + // MARK: Calling candidate window using Up / Down or PageUp / PageDn. if let currentState = state as? InputState.NotEmpty, _composer.isEmpty, input.isExtraChooseCandidateKey || input.isExtraChooseCandidateKeyReverse || input.isSpace - || input.isPageDown || input.isPageUp || input.isTab + || input.isPageDown || input.isPageUp || (input.isTab && mgrPrefs.specifyShiftTabKeyBehavior) || (input.useVerticalMode && (input.isVerticalModeOnlyChooseCandidateKey)) { if input.isSpace { From 2967109116742710d0d34ed4d88c10ab245c354f Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 30 May 2022 16:43:10 +0800 Subject: [PATCH 22/36] KeyHandler // +respectCursorPushing to fixNode(). --- Source/Modules/ControllerModules/KeyHandler_Core.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Modules/ControllerModules/KeyHandler_Core.swift b/Source/Modules/ControllerModules/KeyHandler_Core.swift index 82789d2f..4b4dfeb1 100644 --- a/Source/Modules/ControllerModules/KeyHandler_Core.swift +++ b/Source/Modules/ControllerModules/KeyHandler_Core.swift @@ -160,7 +160,7 @@ class KeyHandler { return arrResult } - func fixNode(value: String) { + func fixNode(value: String, respectCursorPushing: Bool = true) { let cursorIndex: Int = actualCandidateCursorIndex let selectedNode: Megrez.NodeAnchor = _builder.grid.fixNodeSelectedCandidate( location: cursorIndex, value: value @@ -194,7 +194,7 @@ class KeyHandler { } walk() - if mgrPrefs.moveCursorAfterSelectingCandidate { + if mgrPrefs.moveCursorAfterSelectingCandidate, respectCursorPushing { var nextPosition = 0 for node in _walkedNodes { if nextPosition >= cursorIndex { break } From 68b82164db8f2c9c76b65b6b28b74c0a3b9d60c9 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 30 May 2022 17:03:59 +0800 Subject: [PATCH 23/36] KeyHandler // Add Tab key handling with states. --- .../KeyHandler_HandleInput.swift | 9 ++ .../ControllerModules/KeyHandler_States.swift | 100 +++++++++++++++++- .../Modules/IMEModules/ctlInputMethod.swift | 2 +- 3 files changed, 109 insertions(+), 2 deletions(-) diff --git a/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift b/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift index d5662a6a..acb9633f 100644 --- a/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift +++ b/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift @@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ import Cocoa +import SwiftUI // MARK: - § Handle Input with States. @@ -275,6 +276,14 @@ extension KeyHandler { if input.isESC { return handleEsc(state: state, stateCallback: stateCallback, errorCallback: errorCallback) } + // MARK: Tab + + if input.isTab { + return handleTab( + state: state, isShiftHold: input.isShiftHold, stateCallback: stateCallback, errorCallback: errorCallback + ) + } + // MARK: Cursor backward if input.isCursorBackward || input.emacsKey == vChewingEmacsKey.backward { diff --git a/Source/Modules/ControllerModules/KeyHandler_States.swift b/Source/Modules/ControllerModules/KeyHandler_States.swift index 0f96f902..e0f7de2a 100644 --- a/Source/Modules/ControllerModules/KeyHandler_States.swift +++ b/Source/Modules/ControllerModules/KeyHandler_States.swift @@ -94,7 +94,7 @@ extension KeyHandler { func buildCandidate( state currentState: InputState.NotEmpty, - useVerticalMode: Bool + useVerticalMode: Bool = false ) -> InputState.ChoosingCandidate { InputState.ChoosingCandidate( composingBuffer: currentState.composingBuffer, @@ -590,4 +590,102 @@ extension KeyHandler { return true } + + // MARK: - 處理 Tab 按鍵行為 + + func handleTab( + state: InputState, + isShiftHold: Bool, + stateCallback: @escaping (InputState) -> Void, + errorCallback: @escaping () -> Void + ) -> Bool { + guard let state = state as? InputState.Inputting else { + guard state is InputState.Empty else { + IME.prtDebugIntel("6044F081") + errorCallback() + return true + } + // 不妨礙使用者平時輸入 Tab 的需求。 + return false + } + + guard _composer.isEmpty else { + IME.prtDebugIntel("A2DAF7BC") + errorCallback() + return true + } + + // 此處僅借用該函數生成結果內的某個物件,不用糾結「是否縱排輸入」。 + let candidates = buildCandidate(state: state).candidates + guard !candidates.isEmpty else { + IME.prtDebugIntel("3378A6DF") + errorCallback() + return true + } + + var length = 0 + var currentAnchor = Megrez.NodeAnchor() + for anchor in _walkedNodes { + length += anchor.spanningLength + if length >= actualCandidateCursorIndex { + currentAnchor = anchor + break + } + } + + guard let currentNode = currentAnchor.node else { + IME.prtDebugIntel("4F2DEC2F") + errorCallback() + return true + } + + let currentValue = currentNode.currentKeyValue.value + + var currentIndex = 0 + if currentNode.score < currentNode.kSelectedCandidateScore { + // Once the user never select a candidate for the node, + // we start from the first candidate, so the user has a + // chance to use the unigram with two or more characters + // when type the tab key for the first time. + // + // In other words, if a user type two BPMF readings, + // but the score of seeing them as two unigrams is higher + // than a phrase with two characters, the user can just + // use the longer phrase by tapping the tab key. + if candidates[0] == currentValue { + // If the first candidate is the value of the + // current node, we use next one. + if isShiftHold { + currentIndex = candidates.count - 1 + } else { + currentIndex = 1 + } + } + } else { + for candidate in candidates { + if candidate == currentValue { + if isShiftHold { + if currentIndex == 0 { + currentIndex = candidates.count - 1 + } else { + currentIndex -= 1 + } + } else { + currentIndex += 1 + } + break + } + currentIndex += 1 + } + } + + if currentIndex >= candidates.count { + currentIndex = 0 + } + + fixNode(value: candidates[currentIndex], respectCursorPushing: false) + + stateCallback(buildInputtingState) + return true + } } diff --git a/Source/Modules/IMEModules/ctlInputMethod.swift b/Source/Modules/IMEModules/ctlInputMethod.swift index 54b6654a..d6ad6e05 100644 --- a/Source/Modules/IMEModules/ctlInputMethod.swift +++ b/Source/Modules/IMEModules/ctlInputMethod.swift @@ -694,7 +694,7 @@ extension ctlInputMethod: ctlCandidateDelegate { if let state = state as? InputState.ChoosingCandidate { let selectedValue = state.candidates[Int(index)] - keyHandler.fixNode(value: selectedValue) + keyHandler.fixNode(value: selectedValue, respectCursorPushing: true) let inputting = keyHandler.buildInputtingState From 528c82e904ffa98008e75c1cd485166f90f98cf9 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 30 May 2022 17:53:40 +0800 Subject: [PATCH 24/36] i18n // Update UI terms reflecting recent changes of Tab key handling. --- Source/Resources/Base.lproj/Localizable.strings | 2 +- Source/Resources/en.lproj/Localizable.strings | 2 +- Source/Resources/ja.lproj/Localizable.strings | 2 +- Source/Resources/zh-Hans.lproj/Localizable.strings | 2 +- Source/Resources/zh-Hant.lproj/Localizable.strings | 2 +- Source/UI/PrefUI/suiPrefPaneExperience.swift | 2 +- Source/WindowNIBs/Base.lproj/frmPrefWindow.xib | 2 +- Source/WindowNIBs/en.lproj/frmPrefWindow.strings | 2 +- Source/WindowNIBs/ja.lproj/frmPrefWindow.strings | 2 +- Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings | 2 +- Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 0438965e..5abfeb50 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -97,7 +97,7 @@ "Check for updates automatically" = "Check for updates automatically"; "Choose candidate font size for better visual clarity." = "Choose candidate font size for better visual clarity."; "Choose or hit Enter to confim your prefered keys for selecting candidates." = "Choose or hit Enter to confim your prefered keys for selecting candidates."; -"Choose the behavior of (Shift+)Space key in the candidate window." = "Choose the behavior of (Shift+)Space key in the candidate window."; +"Choose the behavior of (Shift+)Space key with candidates." = "Choose the behavior of (Shift+)Space key with candidates."; "Choose the behavior of (Shift+)Tab key in the candidate window." = "Choose the behavior of (Shift+)Tab key in the candidate window."; "Choose the cursor position where you want to list possible candidates." = "Choose the cursor position where you want to list possible candidates."; "Choose the macOS-level basic keyboard layout." = "Choose the macOS-level basic keyboard layout."; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 0438965e..5abfeb50 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -97,7 +97,7 @@ "Check for updates automatically" = "Check for updates automatically"; "Choose candidate font size for better visual clarity." = "Choose candidate font size for better visual clarity."; "Choose or hit Enter to confim your prefered keys for selecting candidates." = "Choose or hit Enter to confim your prefered keys for selecting candidates."; -"Choose the behavior of (Shift+)Space key in the candidate window." = "Choose the behavior of (Shift+)Space key in the candidate window."; +"Choose the behavior of (Shift+)Space key with candidates." = "Choose the behavior of (Shift+)Space key with candidates."; "Choose the behavior of (Shift+)Tab key in the candidate window." = "Choose the behavior of (Shift+)Tab key in the candidate window."; "Choose the cursor position where you want to list possible candidates." = "Choose the cursor position where you want to list possible candidates."; "Choose the macOS-level basic keyboard layout." = "Choose the macOS-level basic keyboard layout."; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index d3d58d5b..32818ba4 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -97,7 +97,7 @@ "Check for updates automatically" = "アプリの更新通知を受く"; "Choose candidate font size for better visual clarity." = "入力候補陳列の候補文字の字号をご指定ください。"; "Choose or hit Enter to confim your prefered keys for selecting candidates." = "お好きなる言選り用キー陣列をご指定ください。新しい組み合わせは Enter で効かす。"; -"Choose the behavior of (Shift+)Space key in the candidate window." = "入力候補陳列での (Shift+)Space キーの輪番切替対象をご指定ください。"; +"Choose the behavior of (Shift+)Space key with candidates." = "入力候補についての (Shift+)Space キーの輪番切替対象をご指定ください。"; "Choose the behavior of (Shift+)Tab key in the candidate window." = "入力候補陳列での (Shift+)Tab キーの輪番切替対象をご指定ください。"; "Choose the cursor position where you want to list possible candidates." = "カーソルはどこで入力候補を呼び出すかとご指定ださい。"; "Choose the macOS-level basic keyboard layout." = "macOS 基礎キーボード配置をご指定ください。"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index c8ef2517..620b83cf 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -97,7 +97,7 @@ "Check for updates automatically" = "自动检查软体更新"; "Choose candidate font size for better visual clarity." = "变更候选字窗的字型大小。"; "Choose or hit Enter to confim your prefered keys for selecting candidates." = "请选择您所偏好的用来选字的按键组合。自订组合需敲 Enter 键生效。"; -"Choose the behavior of (Shift+)Space key in the candidate window." = "指定 (Shift+)空格键 在选字窗内的轮替操作对象。"; +"Choose the behavior of (Shift+)Space key with candidates." = "指定 (Shift+)空格键 对候选字词而言的轮替操作对象。"; "Choose the behavior of (Shift+)Tab key in the candidate window." = "指定 (Shift+)Tab 在选字窗内的轮替操作对象。"; "Choose the cursor position where you want to list possible candidates." = "请选择用以触发选字的游标相对位置。"; "Choose the macOS-level basic keyboard layout." = "请选择 macOS 基础键盘布局。"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index 3a1579cd..6144d7f6 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -97,7 +97,7 @@ "Check for updates automatically" = "自動檢查軟體更新"; "Choose candidate font size for better visual clarity." = "變更候選字窗的字型大小。"; "Choose or hit Enter to confim your prefered keys for selecting candidates." = "請選擇您所偏好的用來選字的按鍵組合。自訂組合需敲 Enter 鍵生效。"; -"Choose the behavior of (Shift+)Space key in the candidate window." = "指定 (Shift+)空格鍵 在選字窗內的輪替操作對象。"; +"Choose the behavior of (Shift+)Space key with candidates." = "指定 (Shift+)空格鍵 對候選字詞而言的輪替操作對象。"; "Choose the behavior of (Shift+)Tab key in the candidate window." = "指定 (Shift+)Tab 在選字窗內的輪替操作對象。"; "Choose the cursor position where you want to list possible candidates." = "請選擇用以觸發選字的游標相對位置。"; "Choose the macOS-level basic keyboard layout." = "請選擇 macOS 基礎鍵盤佈局。"; diff --git a/Source/UI/PrefUI/suiPrefPaneExperience.swift b/Source/UI/PrefUI/suiPrefPaneExperience.swift index 076feea6..ffe717e0 100644 --- a/Source/UI/PrefUI/suiPrefPaneExperience.swift +++ b/Source/UI/PrefUI/suiPrefPaneExperience.swift @@ -128,7 +128,7 @@ struct suiPrefPaneExperience: View { } .labelsHidden() .pickerStyle(RadioGroupPickerStyle()) - Text(LocalizedStringKey("Choose the behavior of (Shift+)Space key in the candidate window.")) + Text(LocalizedStringKey("Choose the behavior of (Shift+)Space key with candidates.")) .preferenceDescription() } Preferences.Section(bottomDivider: true, label: { Text(LocalizedStringKey("Space & ESC Key:")) }) { diff --git a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index d646b15a..eb921673 100644 --- a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -494,7 +494,7 @@ - + diff --git a/Source/WindowNIBs/en.lproj/frmPrefWindow.strings b/Source/WindowNIBs/en.lproj/frmPrefWindow.strings index 473a47e8..01690704 100644 --- a/Source/WindowNIBs/en.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/en.lproj/frmPrefWindow.strings @@ -69,7 +69,7 @@ "ueU-Rz-a1C.title" = "Choose the behavior of (Shift+)Tab key in the candidate window."; "s7u-Fm-dVg.title" = "Cycling Pages"; "FVC-br-H57.title" = "Cycling Candidates"; -"Pg5-G9-pY5.title" = "Choose the behavior of (Shift+)Space key in the candidate window."; +"Pg5-G9-pY5.title" = "Choose the behavior of (Shift+)Space key with candidates."; "XqL-rf-X6d.title" = "Space to +cycle pages, Shift+Space to +cycle candidates"; "dIN-TZ-67g.title" = "Space to +cycle candidates, Shift+Space to +cycle pages"; "hSv-LJ-Cq3.title" = "Enable symbol input support (incl. certain emoji symbols)"; diff --git a/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings b/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings index 3e660660..2b4602f5 100644 --- a/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings @@ -69,7 +69,7 @@ "ueU-Rz-a1C.title" = "入力候補陳列での (Shift+)Tab キーの輪番切替対象をご指定ください。"; "s7u-Fm-dVg.title" = "ページ"; "FVC-br-H57.title" = "候補文字そのもの"; -"Pg5-G9-pY5.title" = "入力候補陳列での (Shift+)Space キーの輪番切替対象をご指定ください。"; +"Pg5-G9-pY5.title" = "入力候補についての (Shift+)Space キーの輪番切替対象をご指定ください。"; "XqL-rf-X6d.title" = "Space で次のページ、Shift+Space で次の候補文字を"; "dIN-TZ-67g.title" = "Shift+Space で次のページ、Space で次の候補文字を"; "hSv-LJ-Cq3.title" = "僅かなる絵文字も含む符号入力サポートを起用"; diff --git a/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings b/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings index c9025cd7..b65350d4 100644 --- a/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings @@ -69,7 +69,7 @@ "ueU-Rz-a1C.title" = "指定 (Shift+)Tab 热键在选字窗内的轮替操作对象。"; "s7u-Fm-dVg.title" = "轮替页面"; "FVC-br-H57.title" = "轮替候选字"; -"Pg5-G9-pY5.title" = "指定 (Shift+)Space 热键在选字窗内的轮替操作对象。"; +"Pg5-G9-pY5.title" = "指定 (Shift+)Space 热键对候选字词而言的轮替操作对象。"; "XqL-rf-X6d.title" = "Space 换下一页,Shift+Space 换选下一个候选字。"; "dIN-TZ-67g.title" = "Shift+Space 换下一页,Space 换选下一个候选字。"; "hSv-LJ-Cq3.title" = "启用包括少许绘文字在内的符号输入支援"; diff --git a/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings b/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings index 9812557b..e35bed29 100644 --- a/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings @@ -69,7 +69,7 @@ "ueU-Rz-a1C.title" = "指定 (Shift+)Tab 熱鍵在選字窗內的輪替操作對象。"; "s7u-Fm-dVg.title" = "輪替頁面"; "FVC-br-H57.title" = "輪替候選字"; -"Pg5-G9-pY5.title" = "指定 (Shift+)Space 熱鍵在選字窗內的輪替操作對象。"; +"Pg5-G9-pY5.title" = "指定 (Shift+)Space 熱鍵對候選字詞而言的輪替操作對象。"; "XqL-rf-X6d.title" = "Space 換下一頁,Shift+Space 換選下一個候選字"; "dIN-TZ-67g.title" = "Shift+Space 換下一頁,Space 換選下一個候選字"; "hSv-LJ-Cq3.title" = "啟用包括少許繪文字在內的符號輸入支援"; From 7af88abc63928f22113d6de92beaaacee5712902 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 30 May 2022 15:43:42 +0800 Subject: [PATCH 25/36] mgrPrefs, etc. // Remove "useScoreBalancing" from the repo. --- Source/Modules/IMEModules/mgrPrefs.swift | 5 ----- Source/Resources/Base.lproj/Localizable.strings | 1 - Source/Resources/en.lproj/Localizable.strings | 1 - Source/Resources/ja.lproj/Localizable.strings | 1 - .../Resources/zh-Hans.lproj/Localizable.strings | 1 - .../Resources/zh-Hant.lproj/Localizable.strings | 1 - Source/UI/PrefUI/suiPrefPaneDictionary.swift | 9 --------- Source/WindowNIBs/Base.lproj/frmPrefWindow.xib | 17 ----------------- .../WindowNIBs/en.lproj/frmPrefWindow.strings | 1 - .../WindowNIBs/ja.lproj/frmPrefWindow.strings | 1 - .../zh-Hans.lproj/frmPrefWindow.strings | 1 - .../zh-Hant.lproj/frmPrefWindow.strings | 1 - 12 files changed, 40 deletions(-) diff --git a/Source/Modules/IMEModules/mgrPrefs.swift b/Source/Modules/IMEModules/mgrPrefs.swift index ec346d79..1ff64f84 100644 --- a/Source/Modules/IMEModules/mgrPrefs.swift +++ b/Source/Modules/IMEModules/mgrPrefs.swift @@ -28,7 +28,6 @@ import Cocoa struct UserDef { static let kIsDebugModeEnabled = "_DebugMode" - static let kUseScoreBalancing = "UseScoreBalancing" static let kMostRecentInputMode = "MostRecentInputMode" static let kUserDataFolderSpecified = "UserDataFolderSpecified" static let kCheckUpdateAutomatically = "CheckUpdateAutomatically" @@ -226,7 +225,6 @@ enum MandarinParser: Int { public enum mgrPrefs { public static func setMissingDefaults() { UserDefaults.standard.setDefault(mgrPrefs.isDebugModeEnabled, forKey: UserDef.kIsDebugModeEnabled) - UserDefaults.standard.setDefault(mgrPrefs.useScoreBalancing, forKey: UserDef.kUseScoreBalancing) UserDefaults.standard.setDefault(mgrPrefs.mostRecentInputMode, forKey: UserDef.kMostRecentInputMode) UserDefaults.standard.setDefault(mgrPrefs.checkUpdateAutomatically, forKey: UserDef.kCheckUpdateAutomatically) UserDefaults.standard.setDefault( @@ -282,9 +280,6 @@ public enum mgrPrefs { @UserDefault(key: UserDef.kIsDebugModeEnabled, defaultValue: false) static var isDebugModeEnabled: Bool - @UserDefault(key: UserDef.kUseScoreBalancing, defaultValue: false) - static var useScoreBalancing: Bool - @UserDefault(key: UserDef.kMostRecentInputMode, defaultValue: "") static var mostRecentInputMode: String diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 5abfeb50..2b29cada 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -89,7 +89,6 @@ "Auto-convert traditional Chinese glyphs to JIS Shinjitai characters" = "Auto-convert traditional Chinese glyphs to JIS Shinjitai characters"; "Auto-convert traditional Chinese glyphs to KangXi characters" = "Auto-convert traditional Chinese glyphs to KangXi characters"; "Automatically reload user data files if changes detected" = "Automatically reload user data files if changes detected"; -"Balance the score according to candidate length" = "Balance the score according to candidate length"; "Basic Keyboard Layout:" = "Basic Keyboard Layout:"; "Candidate Layout:" = "Candidate Layout:"; "Candidate Size:" = "Candidate Size:"; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 5abfeb50..2b29cada 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -89,7 +89,6 @@ "Auto-convert traditional Chinese glyphs to JIS Shinjitai characters" = "Auto-convert traditional Chinese glyphs to JIS Shinjitai characters"; "Auto-convert traditional Chinese glyphs to KangXi characters" = "Auto-convert traditional Chinese glyphs to KangXi characters"; "Automatically reload user data files if changes detected" = "Automatically reload user data files if changes detected"; -"Balance the score according to candidate length" = "Balance the score according to candidate length"; "Basic Keyboard Layout:" = "Basic Keyboard Layout:"; "Candidate Layout:" = "Candidate Layout:"; "Candidate Size:" = "Candidate Size:"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 32818ba4..a6a283f8 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -89,7 +89,6 @@ "Auto-convert traditional Chinese glyphs to JIS Shinjitai characters" = "入力した繁体字を日文 JIS 新字体と自動変換"; "Auto-convert traditional Chinese glyphs to KangXi characters" = "入力した繁体字を康熙字体と自動変換"; "Automatically reload user data files if changes detected" = "ユーザー辞書データの変更を自動検出し、自動的に再読込"; -"Balance the score according to candidate length" = "候補文字の長さによる重みの調整"; "Basic Keyboard Layout:" = "基礎キーボード:"; "Candidate Layout:" = "入力候補陳列の仕様"; "Candidate Size:" = "候補文字の字号:"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 620b83cf..252b8c5e 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -89,7 +89,6 @@ "Auto-convert traditional Chinese glyphs to JIS Shinjitai characters" = "自动将繁体中文字转为日文 JIS 新字体"; "Auto-convert traditional Chinese glyphs to KangXi characters" = "自动将繁体中文字转为康熙正体字"; "Automatically reload user data files if changes detected" = "自动检测并载入使用者语汇档案变更"; -"Balance the score according to candidate length" = "按候选字词的长度调整权重"; "Basic Keyboard Layout:" = "基础键盘布局:"; "Candidate Layout:" = "候选字窗布局:"; "Candidate Size:" = "候选字窗字号:"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index 6144d7f6..12935856 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -89,7 +89,6 @@ "Auto-convert traditional Chinese glyphs to JIS Shinjitai characters" = "自動將繁體中文字轉為日文 JIS 新字體"; "Auto-convert traditional Chinese glyphs to KangXi characters" = "自動將繁體中文字轉為康熙正體字"; "Automatically reload user data files if changes detected" = "自動檢測並載入使用者語彙檔案變更"; -"Balance the score according to candidate length" = "按候選字詞的長度調整權重"; "Basic Keyboard Layout:" = "基礎鍵盤佈局:"; "Candidate Layout:" = "候選字窗佈局:"; "Candidate Size:" = "候選字窗字號:"; diff --git a/Source/UI/PrefUI/suiPrefPaneDictionary.swift b/Source/UI/PrefUI/suiPrefPaneDictionary.swift index 2f8dd746..e8376b3e 100644 --- a/Source/UI/PrefUI/suiPrefPaneDictionary.swift +++ b/Source/UI/PrefUI/suiPrefPaneDictionary.swift @@ -35,8 +35,6 @@ struct suiPrefPaneDictionary: View { @State private var selEnableCNS11643: Bool = UserDefaults.standard.bool(forKey: UserDef.kCNS11643Enabled) @State private var selEnableSymbolInputSupport: Bool = UserDefaults.standard.bool( forKey: UserDef.kSymbolInputEnabled) - @State private var selUseScoreBalancing: Bool = UserDefaults.standard.bool( - forKey: UserDef.kUseScoreBalancing) private let contentWidth: Double = { switch mgrPrefs.appleLanguages[0] { case "ja": @@ -128,13 +126,6 @@ struct suiPrefPaneDictionary: View { mgrPrefs.symbolInputEnabled = value mgrLangModel.setSymbolEnabled(value) } - Toggle( - LocalizedStringKey("Balance the score according to candidate length"), - isOn: $selUseScoreBalancing - ) - .onChange(of: selUseScoreBalancing) { value in - mgrPrefs.useScoreBalancing = value - } } } } diff --git a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index eb921673..55d4f2a7 100644 --- a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -691,25 +691,10 @@ - - @@ -721,11 +706,9 @@ - - diff --git a/Source/WindowNIBs/en.lproj/frmPrefWindow.strings b/Source/WindowNIBs/en.lproj/frmPrefWindow.strings index 01690704..1685e471 100644 --- a/Source/WindowNIBs/en.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/en.lproj/frmPrefWindow.strings @@ -81,7 +81,6 @@ "Parser12.title" = "Yale Pinyin with Numeral Intonation"; "Parser13.title" = "Hualuo Pinyin with Numeral Intonation"; "Parser14.title" = "Universal Pinyin with Numeral Intonation"; -"Wh1-iz-pwM.title" = "Balance the score according to candidate length"; "xibKeyboardShortcuts.title" = "Keyboard Shortcuts"; "xibUsingHotKeySCPC.title" = "Per-Char Select Mode"; "xibUsingHotKeyAssociates.title" = "Per-Char Associated Phrases"; diff --git a/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings b/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings index 2b4602f5..09732095 100644 --- a/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings @@ -81,7 +81,6 @@ "Parser12.title" = "イェール弁音 (ローマ字+数字音調)"; "Parser13.title" = "中華ローマ弁音 (ローマ字+数字音調)"; "Parser14.title" = "汎用弁音 (ローマ字+数字音調)"; -"Wh1-iz-pwM.title" = "候補文字の長さによる重みの調整"; "xibKeyboardShortcuts.title" = "ショートカット"; "xibUsingHotKeySCPC.title" = "全候補入力モード"; "xibUsingHotKeyAssociates.title" = "全候補入力で連想語彙"; diff --git a/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings b/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings index b65350d4..24ae1a41 100644 --- a/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings @@ -81,7 +81,6 @@ "Parser12.title" = "耶鲁拼音+数字标调"; "Parser13.title" = "华罗拼音+数字标调"; "Parser14.title" = "通用拼音+数字标调"; -"Wh1-iz-pwM.title" = "按候选字词的长度调整权重"; "xibKeyboardShortcuts.title" = "键盘快捷键"; "xibUsingHotKeySCPC.title" = "模拟逐字选字输入"; "xibUsingHotKeyAssociates.title" = "逐字选字联想模式"; diff --git a/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings b/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings index e35bed29..cccd1a02 100644 --- a/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings @@ -81,7 +81,6 @@ "Parser12.title" = "耶魯拼音+數字標調"; "Parser13.title" = "華羅拼音+數字標調"; "Parser14.title" = "通用拼音+數字標調"; -"Wh1-iz-pwM.title" = "按候選字詞的長度調整權重"; "xibKeyboardShortcuts.title" = "鍵盤快速鍵"; "xibUsingHotKeySCPC.title" = "模擬逐字選字輸入"; "xibUsingHotKeyAssociates.title" = "逐字選字聯想模式"; From 4fa4de6e4d2fb10ef73b73c6f989362ee4fd074c Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 30 May 2022 18:05:25 +0800 Subject: [PATCH 26/36] mgrPrefs // Change min / max size of the composing buffer. --- Source/Modules/IMEModules/mgrPrefs.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Modules/IMEModules/mgrPrefs.swift b/Source/Modules/IMEModules/mgrPrefs.swift index 1ff64f84..5257c6c2 100644 --- a/Source/Modules/IMEModules/mgrPrefs.swift +++ b/Source/Modules/IMEModules/mgrPrefs.swift @@ -82,8 +82,8 @@ private let kMaxCandidateListTextSize: CGFloat = 196 // will start to sputter beyond 12 such is the algorithmatic complexity // of the Viterbi algorithm used in the builder library (at O(N^2)) private let kDefaultComposingBufferSize = 20 -private let kMinComposingBufferSize = 4 -private let kMaxComposingBufferSize = 30 +private let kMinComposingBufferSize = 10 +private let kMaxComposingBufferSize = 40 private let kDefaultKeys = "123456789" From c89c34584ae006d8c0815754e9fb7fca66c811fc Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 30 May 2022 19:06:14 +0800 Subject: [PATCH 27/36] PrefUI // Allow users to choose composition buffer size. --- .../Resources/Base.lproj/Localizable.strings | 2 ++ Source/Resources/en.lproj/Localizable.strings | 2 ++ Source/Resources/ja.lproj/Localizable.strings | 2 ++ .../zh-Hans.lproj/Localizable.strings | 2 ++ .../zh-Hant.lproj/Localizable.strings | 2 ++ Source/UI/PrefUI/suiPrefPaneExperience.swift | 19 +++++++++++++++++++ 6 files changed, 29 insertions(+) diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 2b29cada..bcc0dfc5 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -90,6 +90,7 @@ "Auto-convert traditional Chinese glyphs to KangXi characters" = "Auto-convert traditional Chinese glyphs to KangXi characters"; "Automatically reload user data files if changes detected" = "Automatically reload user data files if changes detected"; "Basic Keyboard Layout:" = "Basic Keyboard Layout:"; +"Buffer Limit:" = "Buffer Limit:"; "Candidate Layout:" = "Candidate Layout:"; "Candidate Size:" = "Candidate Size:"; "Change user interface language (will reboot the IME)." = "Change user interface language (will reboot the IME)."; @@ -145,6 +146,7 @@ "Space & ESC Key:" = "Space & ESC Key:"; "Space to +cycle candidates, Shift+Space to +cycle pages" = "Space to +cycle candidates, Shift+Space to +cycle pages"; "Space to +cycle pages, Shift+Space to +cycle candidates" = "Space to +cycle pages, Shift+Space to +cycle candidates"; +"Specify the maximum characters allowed in the composition buffer." = "Specify the maximum characters allowed in the composition buffer."; "Stop farting (when typed phonetic combination is invalid, etc.)" = "Stop farting (when typed phonetic combination is invalid, etc.)"; "Traditional Chinese" = "Traditional Chinese"; "Typing Style:" = "Typing Style:"; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 2b29cada..bcc0dfc5 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -90,6 +90,7 @@ "Auto-convert traditional Chinese glyphs to KangXi characters" = "Auto-convert traditional Chinese glyphs to KangXi characters"; "Automatically reload user data files if changes detected" = "Automatically reload user data files if changes detected"; "Basic Keyboard Layout:" = "Basic Keyboard Layout:"; +"Buffer Limit:" = "Buffer Limit:"; "Candidate Layout:" = "Candidate Layout:"; "Candidate Size:" = "Candidate Size:"; "Change user interface language (will reboot the IME)." = "Change user interface language (will reboot the IME)."; @@ -145,6 +146,7 @@ "Space & ESC Key:" = "Space & ESC Key:"; "Space to +cycle candidates, Shift+Space to +cycle pages" = "Space to +cycle candidates, Shift+Space to +cycle pages"; "Space to +cycle pages, Shift+Space to +cycle candidates" = "Space to +cycle pages, Shift+Space to +cycle candidates"; +"Specify the maximum characters allowed in the composition buffer." = "Specify the maximum characters allowed in the composition buffer."; "Stop farting (when typed phonetic combination is invalid, etc.)" = "Stop farting (when typed phonetic combination is invalid, etc.)"; "Traditional Chinese" = "Traditional Chinese"; "Typing Style:" = "Typing Style:"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index a6a283f8..9cc3ecbe 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -90,6 +90,7 @@ "Auto-convert traditional Chinese glyphs to KangXi characters" = "入力した繁体字を康熙字体と自動変換"; "Automatically reload user data files if changes detected" = "ユーザー辞書データの変更を自動検出し、自動的に再読込"; "Basic Keyboard Layout:" = "基礎キーボード:"; +"Buffer Limit:" = "緩衝列の容量:"; "Candidate Layout:" = "入力候補陳列の仕様"; "Candidate Size:" = "候補文字の字号:"; "Change user interface language (will reboot the IME)." = "アプリ表示用言語をご指定下さい、そして入力アプリは自動的に再起動。"; @@ -145,6 +146,7 @@ "Space & ESC Key:" = "ESC と Space:"; "Space to +cycle candidates, Shift+Space to +cycle pages" = "Shift+Space で次のページ、Space で次の候補文字を"; "Space to +cycle pages, Shift+Space to +cycle candidates" = "Space で次のページ、Shift+Space で次の候補文字を"; +"Specify the maximum characters allowed in the composition buffer." = "緩衝列に入れる文字の数の上限をご指定ください。"; "Stop farting (when typed phonetic combination is invalid, etc.)" = "マナーモード // 外すと入力間違った時に変な声が出る"; "Traditional Chinese" = "繁体中国語"; "Typing Style:" = "入力習慣:"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 252b8c5e..89b07c38 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -90,6 +90,7 @@ "Auto-convert traditional Chinese glyphs to KangXi characters" = "自动将繁体中文字转为康熙正体字"; "Automatically reload user data files if changes detected" = "自动检测并载入使用者语汇档案变更"; "Basic Keyboard Layout:" = "基础键盘布局:"; +"Buffer Limit:" = "组字区容量:"; "Candidate Layout:" = "候选字窗布局:"; "Candidate Size:" = "候选字窗字号:"; "Change user interface language (will reboot the IME)." = "变更输入法介面语言,会自动重启输入法。"; @@ -146,6 +147,7 @@ "Space & ESC Key:" = "ESC 与空格键:"; "Space to +cycle candidates, Shift+Space to +cycle pages" = "Shift+空格键 换下一页,空格键 换选下一个后选字"; "Space to +cycle pages, Shift+Space to +cycle candidates" = "空格键 换下一页,Shift+空格键 换选下一个后选字"; +"Specify the maximum characters allowed in the composition buffer." = "请指定组字缓冲区内的文字数的上限。"; "Stop farting (when typed phonetic combination is invalid, etc.)" = "廉耻模式 // 取消勾选的话,敲错字时会有异音"; "Traditional Chinese" = "繁体中文"; "Typing Style:" = "输入风格:"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index 12935856..6ce9f89e 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -90,6 +90,7 @@ "Auto-convert traditional Chinese glyphs to KangXi characters" = "自動將繁體中文字轉為康熙正體字"; "Automatically reload user data files if changes detected" = "自動檢測並載入使用者語彙檔案變更"; "Basic Keyboard Layout:" = "基礎鍵盤佈局:"; +"Buffer Limit:" = "組字區容量:"; "Candidate Layout:" = "候選字窗佈局:"; "Candidate Size:" = "候選字窗字號:"; "Change user interface language (will reboot the IME)." = "變更輸入法介面語言,會自動重啟輸入法。"; @@ -145,6 +146,7 @@ "Space & ESC Key:" = "ESC 與空格鍵:"; "Space to +cycle candidates, Shift+Space to +cycle pages" = "Shift+空格鍵 換下一頁,空格鍵 換選下一個後選字"; "Space to +cycle pages, Shift+Space to +cycle candidates" = "空格鍵 換下一頁,Shift+空格鍵 換選下一個後選字"; +"Specify the maximum characters allowed in the composition buffer." = "請指定組字緩衝區內的文字數的上限。"; "Stop farting (when typed phonetic combination is invalid, etc.)" = "廉恥模式 // 取消勾選的話,敲錯字時會有異音"; "Traditional Chinese" = "繁體中文"; "Typing Style:" = "輸入風格:"; diff --git a/Source/UI/PrefUI/suiPrefPaneExperience.swift b/Source/UI/PrefUI/suiPrefPaneExperience.swift index ffe717e0..a66b7085 100644 --- a/Source/UI/PrefUI/suiPrefPaneExperience.swift +++ b/Source/UI/PrefUI/suiPrefPaneExperience.swift @@ -45,6 +45,7 @@ struct suiPrefPaneExperience: View { @State private var selKeyBehaviorESCForClearingTheBuffer = UserDefaults.standard.bool( forKey: UserDef.kEscToCleanInputBuffer) @State private var selEnableSCPCTypingMode = UserDefaults.standard.bool(forKey: UserDef.kUseSCPCTypingMode) + @State private var selComposingBufferSize = UserDefaults.standard.integer(forKey: UserDef.kComposingBufferSize) private let contentWidth: Double = { switch mgrPrefs.appleLanguages[0] { case "ja": @@ -88,6 +89,24 @@ struct suiPrefPaneExperience: View { ) .preferenceDescription() } + Preferences.Section(bottomDivider: true, label: { Text(LocalizedStringKey("Buffer Limit:")) }) { + Picker("", selection: $selComposingBufferSize) { + Text("10").tag(10) + Text("15").tag(15) + Text("20").tag(20) + Text("25").tag(25) + Text("30").tag(30) + Text("35").tag(35) + Text("40").tag(40) + }.onChange(of: selComposingBufferSize) { value in + mgrPrefs.composingBufferSize = value + } + .labelsHidden() + .horizontalRadioGroupLayout() + .pickerStyle(RadioGroupPickerStyle()) + Text(LocalizedStringKey("Specify the maximum characters allowed in the composition buffer.")) + .preferenceDescription() + } Preferences.Section(bottomDivider: true, label: { Text(LocalizedStringKey("Cursor Selection:")) }) { Picker("", selection: $selCursorPosition) { Text(LocalizedStringKey("in front of the phrase (like macOS built-in Zhuyin IME)")).tag(0) From 910a047a5b189547fdecee1e9180fd846c3ab59d Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 30 May 2022 20:22:54 +0800 Subject: [PATCH 28/36] PrefWindow // Allow users to choose composition buffer size. --- .../WindowNIBs/Base.lproj/frmPrefWindow.xib | 190 ++++++++++++------ .../WindowNIBs/en.lproj/frmPrefWindow.strings | 1 + .../WindowNIBs/ja.lproj/frmPrefWindow.strings | 1 + .../zh-Hans.lproj/frmPrefWindow.strings | 1 + .../zh-Hant.lproj/frmPrefWindow.strings | 1 + 5 files changed, 128 insertions(+), 66 deletions(-) diff --git a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index 55d4f2a7..8d9ed92e 100644 --- a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -351,10 +351,7 @@ - - - - + @@ -362,9 +359,9 @@ - + - + @@ -381,7 +378,7 @@ - + @@ -389,7 +386,7 @@ - + @@ -397,7 +394,7 @@ - + @@ -422,10 +419,7 @@ - + - + @@ -449,6 +443,8 @@ + + @@ -460,7 +456,7 @@ - + @@ -468,7 +464,7 @@ - + @@ -493,7 +489,7 @@ - + @@ -501,10 +497,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + diff --git a/Source/WindowNIBs/en.lproj/frmPrefWindow.strings b/Source/WindowNIBs/en.lproj/frmPrefWindow.strings index 1685e471..162d6968 100644 --- a/Source/WindowNIBs/en.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/en.lproj/frmPrefWindow.strings @@ -88,3 +88,4 @@ "xibUsingHotKeyKangXi.title" = "Force KangXi Writing"; "xibUsingHotKeyJIS.title" = "JIS Shinjitai Output"; "xibUsingHotKeyHalfWidthASCII.title" = "Half-Width Punctuation Mode"; +"xibLabelBufferLimit.title" = "Buffer Limit:"; diff --git a/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings b/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings index 09732095..e4ec19c7 100644 --- a/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings @@ -88,3 +88,4 @@ "xibUsingHotKeyKangXi.title" = "康熙文字変換モード"; "xibUsingHotKeyJIS.title" = "JIS 新字体モード"; "xibUsingHotKeyHalfWidthASCII.title" = "半角句読モード"; +"xibLabelBufferLimit.title" = "緩衝列の容量:"; diff --git a/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings b/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings index 24ae1a41..1ca2fa3a 100644 --- a/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings @@ -88,3 +88,4 @@ "xibUsingHotKeyKangXi.title" = "康熙正体字模式"; "xibUsingHotKeyJIS.title" = "JIS 新字体模式"; "xibUsingHotKeyHalfWidthASCII.title" = "半形标点模式"; +"xibLabelBufferLimit.title" = "组字区容量:"; diff --git a/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings b/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings index cccd1a02..3509e48f 100644 --- a/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings @@ -88,3 +88,4 @@ "xibUsingHotKeyKangXi.title" = "康熙正體字模式"; "xibUsingHotKeyJIS.title" = "JIS 新字體模式"; "xibUsingHotKeyHalfWidthASCII.title" = "半形標點模式"; +"xibLabelBufferLimit.title" = "組字區容量:"; From 13d2569919daa3ecebeb17ed92feb8d74c7693b7 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 31 May 2022 14:28:33 +0800 Subject: [PATCH 29/36] InputState // Recognize EmptyIgnoringPreviousState as Empty. - The only difference is that EmptyIgnoringPreviousState doesn't commit the contents of the previous state. --- Source/Modules/ControllerModules/InputState.swift | 8 ++------ Source/Modules/IMEModules/ctlInputMethod.swift | 4 +++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Source/Modules/ControllerModules/InputState.swift b/Source/Modules/ControllerModules/InputState.swift index 02a54025..50044dbc 100644 --- a/Source/Modules/ControllerModules/InputState.swift +++ b/Source/Modules/ControllerModules/InputState.swift @@ -83,12 +83,8 @@ class InputState { // MARK: - /// Represents that the composing buffer is empty. - class EmptyIgnoringPreviousState: InputState { - var composingBuffer: String { - "" - } - - var description: String { + class EmptyIgnoringPreviousState: Empty { + override var description: String { "" } } diff --git a/Source/Modules/IMEModules/ctlInputMethod.swift b/Source/Modules/IMEModules/ctlInputMethod.swift index d6ad6e05..88dab5e0 100644 --- a/Source/Modules/IMEModules/ctlInputMethod.swift +++ b/Source/Modules/IMEModules/ctlInputMethod.swift @@ -308,7 +308,9 @@ extension ctlInputMethod { return } - if let previous = previous as? InputState.NotEmpty { + if let previous = previous as? InputState.NotEmpty, + !(state is InputState.EmptyIgnoringPreviousState) + { commit(text: previous.composingBuffer, client: client) } client.setMarkedText( From dd70417aab20b8b82db6d2d62fb01389cc9a6dfe Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 31 May 2022 12:43:52 +0800 Subject: [PATCH 30/36] KeyHandler // Implementing MS-New-Phonetic style rear-cursor mode. --- .../ControllerModules/KeyHandler_Core.swift | 9 +++-- .../ControllerModules/KeyHandler_Misc.swift | 34 ++++++++++++------- .../ControllerModules/KeyHandler_States.swift | 5 ++- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/Source/Modules/ControllerModules/KeyHandler_Core.swift b/Source/Modules/ControllerModules/KeyHandler_Core.swift index 4b4dfeb1..62332f68 100644 --- a/Source/Modules/ControllerModules/KeyHandler_Core.swift +++ b/Source/Modules/ControllerModules/KeyHandler_Core.swift @@ -161,7 +161,7 @@ class KeyHandler { } func fixNode(value: String, respectCursorPushing: Bool = true) { - let cursorIndex: Int = actualCandidateCursorIndex + let cursorIndex = min(actualCandidateCursorIndex + (mgrPrefs.setRearCursorMode ? 1 : 0), builderLength) let selectedNode: Megrez.NodeAnchor = _builder.grid.fixNodeSelectedCandidate( location: cursorIndex, value: value ) @@ -244,7 +244,7 @@ class KeyHandler { IME.prtDebugIntel( "UOM: Suggestion retrieved, overriding the node score of the selected candidate.") _builder.grid.overrideNodeScoreForSelectedCandidate( - location: actualCandidateCursorIndex, + location: min(actualCandidateCursorIndex + (mgrPrefs.setRearCursorMode ? 1 : 0), builderLength), value: overrideValue, overridingScore: findHighestScore(nodes: rawNodes, epsilon: kEpsilon) ) @@ -309,10 +309,9 @@ class KeyHandler { var rawNodes: [Megrez.NodeAnchor] { /// 警告:不要對游標前置風格使用 nodesCrossing,否則會導致游標行為與 macOS 內建注音輸入法不一致。 - /// 微軟新注音輸入法的游標後置風格也是不允許 nodeCrossing 的,但目前 Megrez 暫時缺乏對該特性的支援。 - /// 所以暫時只能將威注音的游標後置風格描述成「跟 Windows 版雅虎奇摩注音一致」。 + /// 微軟新注音輸入法的游標後置風格也是不允許 nodeCrossing 的。 mgrPrefs.setRearCursorMode - ? _builder.grid.nodesCrossingOrEndingAt(location: actualCandidateCursorIndex) + ? _builder.grid.nodesBeginningAt(location: actualCandidateCursorIndex) : _builder.grid.nodesEndingAt(location: actualCandidateCursorIndex) } diff --git a/Source/Modules/ControllerModules/KeyHandler_Misc.swift b/Source/Modules/ControllerModules/KeyHandler_Misc.swift index e0b7594d..70996a4a 100644 --- a/Source/Modules/ControllerModules/KeyHandler_Misc.swift +++ b/Source/Modules/ControllerModules/KeyHandler_Misc.swift @@ -35,19 +35,27 @@ extension KeyHandler { var actualCandidateCursorIndex: Int { var cursorIndex = builderCursorIndex - // Windows Yahoo Kimo IME style, phrase is *at the rear of* the cursor. - // (i.e. the cursor is always *before* the phrase.) - // This is different from MS Phonetics IME style ... - // ... since Windows Yahoo Kimo allows "node crossing". - if (mgrPrefs.setRearCursorMode - && (cursorIndex < builderLength)) - || cursorIndex == 0 - { - if cursorIndex == 0, !mgrPrefs.setRearCursorMode { - cursorIndex += keyLengthAtIndexZero - } else { - cursorIndex += 1 - } + switch mgrPrefs.setRearCursorMode { + case false: + do { + // macOS built-in Zhuyin style. + // (i.e. the cursor is always in front of the phrase.) + // No crossing. + switch cursorIndex { + case 0: cursorIndex = 1 + default: break + } + } + case true: + do { + // Microsoft new phonetics style. + // (i.e. the cursor is always at the rear of the phrase.) + // No crossing. + switch cursorIndex { + case builderLength: cursorIndex -= 1 + default: break + } + } } return cursorIndex } diff --git a/Source/Modules/ControllerModules/KeyHandler_States.swift b/Source/Modules/ControllerModules/KeyHandler_States.swift index e0f7de2a..752faad0 100644 --- a/Source/Modules/ControllerModules/KeyHandler_States.swift +++ b/Source/Modules/ControllerModules/KeyHandler_States.swift @@ -625,9 +625,12 @@ extension KeyHandler { var length = 0 var currentAnchor = Megrez.NodeAnchor() + let cursorIndex = min( + actualCandidateCursorIndex + (mgrPrefs.useRearCursorMode ? 1 : 0), builderLength + ) for anchor in _walkedNodes { length += anchor.spanningLength - if length >= actualCandidateCursorIndex { + if length >= cursorIndex { currentAnchor = anchor break } From 3b5100a72dc28cd5b8b75f65bbd5096b0ca154a3 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 31 May 2022 14:02:15 +0800 Subject: [PATCH 31/36] PrefUI & PrefWindow // Update descriptions of useRearCursorMode. --- Source/Resources/Base.lproj/Localizable.strings | 2 +- Source/Resources/en.lproj/Localizable.strings | 2 +- Source/Resources/ja.lproj/Localizable.strings | 2 +- Source/Resources/zh-Hans.lproj/Localizable.strings | 2 +- Source/Resources/zh-Hant.lproj/Localizable.strings | 2 +- Source/UI/PrefUI/suiPrefPaneExperience.swift | 2 +- Source/WindowNIBs/Base.lproj/frmPrefWindow.xib | 3 +-- Source/WindowNIBs/en.lproj/frmPrefWindow.strings | 2 +- Source/WindowNIBs/ja.lproj/frmPrefWindow.strings | 4 ++-- Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings | 2 +- Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings | 2 +- 11 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index bcc0dfc5..7c518d3b 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -85,7 +85,7 @@ "Apple Chewing - Dachen" = "Apple Chewing - Dachen"; "Apple Chewing - Eten Traditional" = "Apple Chewing - Eten Traditional"; "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional." = "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional."; -"at anyplace else (like Windows Yahoo KeyKey)" = "at anyplace else (like Windows Yahoo KeyKey)"; +"at the rear of the phrase (like Microsoft New Phonetic)" = "at the rear of the phrase (like Microsoft New Phonetic)"; "Auto-convert traditional Chinese glyphs to JIS Shinjitai characters" = "Auto-convert traditional Chinese glyphs to JIS Shinjitai characters"; "Auto-convert traditional Chinese glyphs to KangXi characters" = "Auto-convert traditional Chinese glyphs to KangXi characters"; "Automatically reload user data files if changes detected" = "Automatically reload user data files if changes detected"; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index bcc0dfc5..7c518d3b 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -85,7 +85,7 @@ "Apple Chewing - Dachen" = "Apple Chewing - Dachen"; "Apple Chewing - Eten Traditional" = "Apple Chewing - Eten Traditional"; "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional." = "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional."; -"at anyplace else (like Windows Yahoo KeyKey)" = "at anyplace else (like Windows Yahoo KeyKey)"; +"at the rear of the phrase (like Microsoft New Phonetic)" = "at the rear of the phrase (like Microsoft New Phonetic)"; "Auto-convert traditional Chinese glyphs to JIS Shinjitai characters" = "Auto-convert traditional Chinese glyphs to JIS Shinjitai characters"; "Auto-convert traditional Chinese glyphs to KangXi characters" = "Auto-convert traditional Chinese glyphs to KangXi characters"; "Automatically reload user data files if changes detected" = "Automatically reload user data files if changes detected"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 9cc3ecbe..36d79218 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -85,7 +85,7 @@ "Apple Chewing - Dachen" = "Apple 大千注音キーボード"; "Apple Chewing - Eten Traditional" = "Apple 倚天傳統キーボード"; "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional." = "Apple 動態注音キーボード (大千と倚天伝統) を使うには、共通語分析器の配列を大千と設定すべきである。"; -"at anyplace else (like Windows Yahoo KeyKey)" = "単語の中・後で // Windows Yahoo KeyKey のやり方"; +"at the rear of the phrase (like Microsoft New Phonetic)" = "単語の後で // Microsoft 新注音入力のやり方"; "Auto-convert traditional Chinese glyphs to JIS Shinjitai characters" = "入力した繁体字を日文 JIS 新字体と自動変換"; "Auto-convert traditional Chinese glyphs to KangXi characters" = "入力した繁体字を康熙字体と自動変換"; "Automatically reload user data files if changes detected" = "ユーザー辞書データの変更を自動検出し、自動的に再読込"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 89b07c38..20e7847c 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -85,7 +85,7 @@ "Apple Chewing - Dachen" = "Apple 大千注音键盘排列"; "Apple Chewing - Eten Traditional" = "Apple 倚天传统键盘排列"; "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional." = "Apple 动态注音键盘布局(大千与倚天)要求普通话/国音分析器得配置为大千排列。"; -"at anyplace else (like Windows Yahoo KeyKey)" = "将游标置于词语中后方 // Windows 奇摩注音风格"; +"at the rear of the phrase (like Microsoft New Phonetic)" = "将游标置于词语后方 // Windows 微软新注音风格"; "Auto-convert traditional Chinese glyphs to JIS Shinjitai characters" = "自动将繁体中文字转为日文 JIS 新字体"; "Auto-convert traditional Chinese glyphs to KangXi characters" = "自动将繁体中文字转为康熙正体字"; "Automatically reload user data files if changes detected" = "自动检测并载入使用者语汇档案变更"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index 6ce9f89e..dd8a587d 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -85,7 +85,7 @@ "Apple Chewing - Dachen" = "Apple 大千注音鍵盤佈局"; "Apple Chewing - Eten Traditional" = "Apple 倚天傳統鍵盤佈局"; "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional." = "Apple 動態注音鍵盤佈局(大千與倚天)要求普通話/國音分析器得配置為大千排列。"; -"at anyplace else (like Windows Yahoo KeyKey)" = "將游標置於詞語中後方 // Windows 奇摩注音風格"; +"at the rear of the phrase (like Microsoft New Phonetic)" = "將游標置於詞語後方 // Windows 微軟新注音風格"; "Auto-convert traditional Chinese glyphs to JIS Shinjitai characters" = "自動將繁體中文字轉為日文 JIS 新字體"; "Auto-convert traditional Chinese glyphs to KangXi characters" = "自動將繁體中文字轉為康熙正體字"; "Automatically reload user data files if changes detected" = "自動檢測並載入使用者語彙檔案變更"; diff --git a/Source/UI/PrefUI/suiPrefPaneExperience.swift b/Source/UI/PrefUI/suiPrefPaneExperience.swift index a66b7085..afcc9ef7 100644 --- a/Source/UI/PrefUI/suiPrefPaneExperience.swift +++ b/Source/UI/PrefUI/suiPrefPaneExperience.swift @@ -110,7 +110,7 @@ struct suiPrefPaneExperience: View { Preferences.Section(bottomDivider: true, label: { Text(LocalizedStringKey("Cursor Selection:")) }) { Picker("", selection: $selCursorPosition) { Text(LocalizedStringKey("in front of the phrase (like macOS built-in Zhuyin IME)")).tag(0) - Text(LocalizedStringKey("at anyplace else (like Windows Yahoo KeyKey)")).tag(1) + Text(LocalizedStringKey("at the rear of the phrase (like Microsoft New Phonetic)")).tag(1) }.onChange(of: selCursorPosition) { value in mgrPrefs.setRearCursorMode = (value == 1) ? true : false } diff --git a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index 8d9ed92e..967fa19f 100644 --- a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -1,7 +1,6 @@ - @@ -408,7 +407,7 @@ - + diff --git a/Source/WindowNIBs/en.lproj/frmPrefWindow.strings b/Source/WindowNIBs/en.lproj/frmPrefWindow.strings index 162d6968..1bb6b7c8 100644 --- a/Source/WindowNIBs/en.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/en.lproj/frmPrefWindow.strings @@ -9,7 +9,7 @@ "12.title" = "BPMF Parser:"; "14.title" = "Choose the cursor position where you want to list possible candidates."; "16.title" = "Cursor in front of the phrase (like macOS built-in Zhuyin IME)"; -"17.title" = "Cursor at anyplace else (like Windows Yahoo KeyKey)"; +"17.title" = "Cursor at the rear of the phrase (like Microsoft New Phonetic)"; "18.title" = "Radio"; "20.title" = "Radio"; "21.title" = "Horizontal"; diff --git a/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings b/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings index e4ec19c7..32a956f3 100644 --- a/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings @@ -8,8 +8,8 @@ "10.title" = "漢語弁音(ローマ字+数字音調)"; "12.title" = "注音配列:"; "14.title" = "カーソルはどこで入力候補を呼び出すかとご選択ください:"; -"16.title" = "単語の前で // macOS 内蔵注音入力の入力スタイル"; -"17.title" = "単語の中・後で // Windows Yahoo KeyKey の入力スタイル"; +"16.title" = "単語の前で // macOS 内蔵注音入力のやり方"; +"17.title" = "単語の後で // Microsoft 新注音入力のやり方"; "18.title" = "Radio"; "20.title" = "Radio"; "21.title" = "横型陳列"; diff --git a/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings b/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings index 1ca2fa3a..f0ce6027 100644 --- a/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings @@ -9,7 +9,7 @@ "12.title" = "基础键盘布局:"; "14.title" = "用以触发选字的光标相对位置:"; "16.title" = "光标置于词语前方 // macOS 内建注音风格"; -"17.title" = "光标置于词语中后方 // Windows 奇摩注音风格"; +"17.title" = "光标置于词语后方 // Windows 微软新注音风格"; "18.title" = "Radio"; "20.title" = "Radio"; "21.title" = "横向布局"; diff --git a/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings b/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings index 3509e48f..dd156cee 100644 --- a/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings @@ -9,7 +9,7 @@ "12.title" = "注音排列:"; "14.title" = "用以觸發選字的游標相對位置:"; "16.title" = "游標置於詞語前方 // macOS 內建注音風格"; -"17.title" = "游標置於詞語中後方 // Windows 奇摩注音風格"; +"17.title" = "游標置於詞語後方 // Windows 微軟新注音風格"; "18.title" = "Radio"; "20.title" = "Radio"; "21.title" = "橫向佈局"; From c0dde5d633d061524d61402922485077dd0e7c01 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 31 May 2022 14:02:53 +0800 Subject: [PATCH 32/36] mgrPrefs // setRearCursorMode -> useRearCursorMode. --- Source/Modules/ControllerModules/KeyHandler_Core.swift | 6 +++--- Source/Modules/ControllerModules/KeyHandler_Misc.swift | 2 +- Source/Modules/IMEModules/mgrPrefs.swift | 8 ++++---- Source/UI/PrefUI/suiPrefPaneExperience.swift | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/Modules/ControllerModules/KeyHandler_Core.swift b/Source/Modules/ControllerModules/KeyHandler_Core.swift index 62332f68..0ad0975e 100644 --- a/Source/Modules/ControllerModules/KeyHandler_Core.swift +++ b/Source/Modules/ControllerModules/KeyHandler_Core.swift @@ -161,7 +161,7 @@ class KeyHandler { } func fixNode(value: String, respectCursorPushing: Bool = true) { - let cursorIndex = min(actualCandidateCursorIndex + (mgrPrefs.setRearCursorMode ? 1 : 0), builderLength) + let cursorIndex = min(actualCandidateCursorIndex + (mgrPrefs.useRearCursorMode ? 1 : 0), builderLength) let selectedNode: Megrez.NodeAnchor = _builder.grid.fixNodeSelectedCandidate( location: cursorIndex, value: value ) @@ -244,7 +244,7 @@ class KeyHandler { IME.prtDebugIntel( "UOM: Suggestion retrieved, overriding the node score of the selected candidate.") _builder.grid.overrideNodeScoreForSelectedCandidate( - location: min(actualCandidateCursorIndex + (mgrPrefs.setRearCursorMode ? 1 : 0), builderLength), + location: min(actualCandidateCursorIndex + (mgrPrefs.useRearCursorMode ? 1 : 0), builderLength), value: overrideValue, overridingScore: findHighestScore(nodes: rawNodes, epsilon: kEpsilon) ) @@ -310,7 +310,7 @@ class KeyHandler { var rawNodes: [Megrez.NodeAnchor] { /// 警告:不要對游標前置風格使用 nodesCrossing,否則會導致游標行為與 macOS 內建注音輸入法不一致。 /// 微軟新注音輸入法的游標後置風格也是不允許 nodeCrossing 的。 - mgrPrefs.setRearCursorMode + mgrPrefs.useRearCursorMode ? _builder.grid.nodesBeginningAt(location: actualCandidateCursorIndex) : _builder.grid.nodesEndingAt(location: actualCandidateCursorIndex) } diff --git a/Source/Modules/ControllerModules/KeyHandler_Misc.swift b/Source/Modules/ControllerModules/KeyHandler_Misc.swift index 70996a4a..e3e0b1a6 100644 --- a/Source/Modules/ControllerModules/KeyHandler_Misc.swift +++ b/Source/Modules/ControllerModules/KeyHandler_Misc.swift @@ -35,7 +35,7 @@ extension KeyHandler { var actualCandidateCursorIndex: Int { var cursorIndex = builderCursorIndex - switch mgrPrefs.setRearCursorMode { + switch mgrPrefs.useRearCursorMode { case false: do { // macOS built-in Zhuyin style. diff --git a/Source/Modules/IMEModules/mgrPrefs.swift b/Source/Modules/IMEModules/mgrPrefs.swift index 5257c6c2..d5cdd12b 100644 --- a/Source/Modules/IMEModules/mgrPrefs.swift +++ b/Source/Modules/IMEModules/mgrPrefs.swift @@ -37,7 +37,7 @@ struct UserDef { static let kCandidateListTextSize = "CandidateListTextSize" static let kAppleLanguages = "AppleLanguages" static let kShouldAutoReloadUserDataFiles = "ShouldAutoReloadUserDataFiles" - static let kSetRearCursorMode = "SetRearCursorMode" + static let kuseRearCursorMode = "useRearCursorMode" static let kUseHorizontalCandidateList = "UseHorizontalCandidateList" static let kComposingBufferSize = "ComposingBufferSize" static let kChooseCandidateUsingSpace = "ChooseCandidateUsingSpace" @@ -245,7 +245,7 @@ public enum mgrPrefs { UserDefaults.standard.setDefault(mgrPrefs.useSCPCTypingMode, forKey: UserDef.kUseSCPCTypingMode) UserDefaults.standard.setDefault(mgrPrefs.associatedPhrasesEnabled, forKey: UserDef.kAssociatedPhrasesEnabled) UserDefaults.standard.setDefault( - mgrPrefs.setRearCursorMode, forKey: UserDef.kSetRearCursorMode + mgrPrefs.useRearCursorMode, forKey: UserDef.kuseRearCursorMode ) UserDefaults.standard.setDefault( mgrPrefs.moveCursorAfterSelectingCandidate, forKey: UserDef.kMoveCursorAfterSelectingCandidate @@ -322,8 +322,8 @@ public enum mgrPrefs { @UserDefault(key: UserDef.kShouldAutoReloadUserDataFiles, defaultValue: true) static var shouldAutoReloadUserDataFiles: Bool - @UserDefault(key: UserDef.kSetRearCursorMode, defaultValue: false) - static var setRearCursorMode: Bool + @UserDefault(key: UserDef.kuseRearCursorMode, defaultValue: false) + static var useRearCursorMode: Bool @UserDefault(key: UserDef.kMoveCursorAfterSelectingCandidate, defaultValue: true) static var moveCursorAfterSelectingCandidate: Bool diff --git a/Source/UI/PrefUI/suiPrefPaneExperience.swift b/Source/UI/PrefUI/suiPrefPaneExperience.swift index afcc9ef7..e288d504 100644 --- a/Source/UI/PrefUI/suiPrefPaneExperience.swift +++ b/Source/UI/PrefUI/suiPrefPaneExperience.swift @@ -32,7 +32,7 @@ struct suiPrefPaneExperience: View { (UserDefaults.standard.string(forKey: UserDef.kCandidateKeys) ?? mgrPrefs.defaultCandidateKeys) as String @State private var selCursorPosition = UserDefaults.standard.bool( - forKey: UserDef.kSetRearCursorMode) ? 1 : 0 + forKey: UserDef.kuseRearCursorMode) ? 1 : 0 @State private var selPushCursorAfterSelection = UserDefaults.standard.bool( forKey: UserDef.kMoveCursorAfterSelectingCandidate) @State private var selKeyBehaviorShiftTab = @@ -112,7 +112,7 @@ struct suiPrefPaneExperience: View { Text(LocalizedStringKey("in front of the phrase (like macOS built-in Zhuyin IME)")).tag(0) Text(LocalizedStringKey("at the rear of the phrase (like Microsoft New Phonetic)")).tag(1) }.onChange(of: selCursorPosition) { value in - mgrPrefs.setRearCursorMode = (value == 1) ? true : false + mgrPrefs.useRearCursorMode = (value == 1) ? true : false } .labelsHidden() .pickerStyle(RadioGroupPickerStyle()) From 4d010e9fc732d2aa81e23c7ca6936801185d78de Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 31 May 2022 22:39:52 +0800 Subject: [PATCH 33/36] KeyHandler // Optimize popOverflowComposingTextAndWalk(). --- Source/Modules/ControllerModules/KeyHandler_Core.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Modules/ControllerModules/KeyHandler_Core.swift b/Source/Modules/ControllerModules/KeyHandler_Core.swift index 0ad0975e..a12349a5 100644 --- a/Source/Modules/ControllerModules/KeyHandler_Core.swift +++ b/Source/Modules/ControllerModules/KeyHandler_Core.swift @@ -140,7 +140,7 @@ class KeyHandler { var poppedText = "" if _builder.grid.width > mgrPrefs.composingBufferSize { - if _walkedNodes.count > 0 { + if !_walkedNodes.isEmpty { let anchor: Megrez.NodeAnchor = _walkedNodes[0] if let theNode = anchor.node { poppedText = theNode.currentKeyValue.value From d0fba52ca86ad003513bd45d941fb80f087c4046 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 31 May 2022 22:50:16 +0800 Subject: [PATCH 34/36] LMCoreNS // Disable forced unwrap. --- Source/Modules/LangModelRelated/SubLMs/lmCoreNS.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Modules/LangModelRelated/SubLMs/lmCoreNS.swift b/Source/Modules/LangModelRelated/SubLMs/lmCoreNS.swift index 631cc710..ac0ab9db 100644 --- a/Source/Modules/LangModelRelated/SubLMs/lmCoreNS.swift +++ b/Source/Modules/LangModelRelated/SubLMs/lmCoreNS.swift @@ -82,7 +82,8 @@ extension vChewing { do { let rawData = try Data(contentsOf: URL(fileURLWithPath: path)) - let rawPlist = try PropertyListSerialization.propertyList(from: rawData, format: nil) as! [String: [Data]] + let rawPlist: [String: [Data]] = + try PropertyListSerialization.propertyList(from: rawData, format: nil) as? [String: [Data]] ?? .init() rangeMap = rawPlist } catch { IME.prtDebugIntel("↑ Exception happened when reading plist file at: \(path).") From 4b1246bee1161aa9fc54a323808d3cfed6cbb06d Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 31 May 2022 14:46:25 +0800 Subject: [PATCH 35/36] Update Data - 20220531 --- Source/Data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Data b/Source/Data index 66ba5a24..924c8f41 160000 --- a/Source/Data +++ b/Source/Data @@ -1 +1 @@ -Subproject commit 66ba5a24330a25fbf23226e6f6b56172ba4be5cb +Subproject commit 924c8f4156edf2f034b45f5f06d488e5e81d351c From 9b7ff0bd4f5ea001ac8b596eabd7b071950775b5 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 30 May 2022 23:30:58 +0800 Subject: [PATCH 36/36] Bump version to 1.6.3 Build 1963. --- Update-Info.plist | 4 ++-- vChewing.pkgproj | 2 +- vChewing.xcodeproj/project.pbxproj | 24 ++++++++++++------------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Update-Info.plist b/Update-Info.plist index 6c77dd16..c7488b69 100644 --- a/Update-Info.plist +++ b/Update-Info.plist @@ -3,9 +3,9 @@ CFBundleShortVersionString - 1.6.2 + 1.6.3 CFBundleVersion - 1962 + 1963 UpdateInfoEndpoint https://gitee.com/vchewing/vChewing-macOS/raw/main/Update-Info.plist UpdateInfoSite diff --git a/vChewing.pkgproj b/vChewing.pkgproj index 42e3dcec..426823d0 100644 --- a/vChewing.pkgproj +++ b/vChewing.pkgproj @@ -726,7 +726,7 @@ USE_HFS+_COMPRESSION VERSION - 1.6.2 + 1.6.3 TYPE 0 diff --git a/vChewing.xcodeproj/project.pbxproj b/vChewing.xcodeproj/project.pbxproj index 022cd864..b5d162ad 100644 --- a/vChewing.xcodeproj/project.pbxproj +++ b/vChewing.xcodeproj/project.pbxproj @@ -1296,7 +1296,7 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1962; + CURRENT_PROJECT_VERSION = 1963; DEBUG_INFORMATION_FORMAT = dwarf; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; @@ -1319,7 +1319,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.11.5; - MARKETING_VERSION = 1.6.2; + MARKETING_VERSION = 1.6.3; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.vChewing.vChewingPhraseEditor; @@ -1352,7 +1352,7 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1962; + CURRENT_PROJECT_VERSION = 1963; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1371,7 +1371,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.11.5; - MARKETING_VERSION = 1.6.2; + MARKETING_VERSION = 1.6.3; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.vChewing.vChewingPhraseEditor; @@ -1486,7 +1486,7 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1962; + CURRENT_PROJECT_VERSION = 1963; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = ""; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -1521,7 +1521,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.11.5; - MARKETING_VERSION = 1.6.2; + MARKETING_VERSION = 1.6.3; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.inputmethod.vChewing; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1553,7 +1553,7 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1962; + CURRENT_PROJECT_VERSION = 1963; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = ""; @@ -1583,7 +1583,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.11.5; - MARKETING_VERSION = 1.6.2; + MARKETING_VERSION = 1.6.3; PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.inputmethod.vChewing; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1666,7 +1666,7 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1962; + CURRENT_PROJECT_VERSION = 1963; DEVELOPMENT_TEAM = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; @@ -1691,7 +1691,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.11.5; - MARKETING_VERSION = 1.6.2; + MARKETING_VERSION = 1.6.3; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = "org.atelierInmu.vChewing.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1718,7 +1718,7 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1962; + CURRENT_PROJECT_VERSION = 1963; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ""; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -1738,7 +1738,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.11.5; - MARKETING_VERSION = 1.6.2; + MARKETING_VERSION = 1.6.3; PRODUCT_BUNDLE_IDENTIFIER = "org.atelierInmu.vChewing.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "";