From 56581c0f8bf5ecab2c8762880bdd8ab177d0c814 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Wed, 24 Aug 2022 10:18:15 +0800 Subject: [PATCH] PrefUI // +consolidateContextOnCandidateSelection. --- .../Modules/UIModules/PrefUI/suiPrefPaneDictionary.swift | 8 ++++++++ Source/Resources/Base.lproj/Localizable.strings | 1 + Source/Resources/en.lproj/Localizable.strings | 1 + Source/Resources/ja.lproj/Localizable.strings | 1 + Source/Resources/zh-Hans.lproj/Localizable.strings | 1 + Source/Resources/zh-Hant.lproj/Localizable.strings | 1 + 6 files changed, 13 insertions(+) diff --git a/Source/Modules/UIModules/PrefUI/suiPrefPaneDictionary.swift b/Source/Modules/UIModules/PrefUI/suiPrefPaneDictionary.swift index 7725263d..0355cd98 100644 --- a/Source/Modules/UIModules/PrefUI/suiPrefPaneDictionary.swift +++ b/Source/Modules/UIModules/PrefUI/suiPrefPaneDictionary.swift @@ -25,6 +25,8 @@ struct suiPrefPaneDictionary: View { forKey: UserDef.kFetchSuggestionsFromUserOverrideModel.rawValue) @State private var selUseFixecCandidateOrderOnSelection: Bool = UserDefaults.standard.bool( forKey: UserDef.kUseFixecCandidateOrderOnSelection.rawValue) + @State private var selConsolidateContextOnCandidateSelection: Bool = UserDefaults.standard.bool( + forKey: UserDef.kConsolidateContextOnCandidateSelection.rawValue) private let contentMaxHeight: Double = 430 private let contentWidth: Double = { @@ -143,6 +145,12 @@ struct suiPrefPaneDictionary: View { mgrPrefs.useFixecCandidateOrderOnSelection = selUseFixecCandidateOrderOnSelection } ) + Toggle( + LocalizedStringKey("Consolidate the context on confirming candidate selection"), + isOn: $selConsolidateContextOnCandidateSelection.onChange { + mgrPrefs.consolidateContextOnCandidateSelection = selConsolidateContextOnCandidateSelection + } + ) } } } diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index e8cc397f..1a47cf57 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -122,6 +122,7 @@ "Clear the entire inline composition buffer like Shift+Delete" = "Clear the entire inline composition buffer like Shift+Delete"; "Commit Hanyu-Pinyin instead on Ctrl(+Option)+Command+Enter" = "Commit Hanyu-Pinyin instead on Ctrl(+Option)+Command+Enter"; "Completely disable using Shift key to toggle alphanumerical mode" = "Completely disable using Shift key to toggle alphanumerical mode"; +"Consolidate the context on confirming candidate selection" = "Consolidate the context on confirming candidate selection"; "Cursor Selection:" = "Cursor Selection:"; "Dachen (Microsoft Standard / Wang / 01, etc.)" = "Dachen (Microsoft Standard / Wang / 01, etc.)"; "Dachen 26 (libChewing)" = "Dachen 26 (libChewing)"; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index e8cc397f..1a47cf57 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -122,6 +122,7 @@ "Clear the entire inline composition buffer like Shift+Delete" = "Clear the entire inline composition buffer like Shift+Delete"; "Commit Hanyu-Pinyin instead on Ctrl(+Option)+Command+Enter" = "Commit Hanyu-Pinyin instead on Ctrl(+Option)+Command+Enter"; "Completely disable using Shift key to toggle alphanumerical mode" = "Completely disable using Shift key to toggle alphanumerical mode"; +"Consolidate the context on confirming candidate selection" = "Consolidate the context on confirming candidate selection"; "Cursor Selection:" = "Cursor Selection:"; "Dachen (Microsoft Standard / Wang / 01, etc.)" = "Dachen (Microsoft Standard / Wang / 01, etc.)"; "Dachen 26 (libChewing)" = "Dachen 26 (libChewing)"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 9a22a712..4cd2abef 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -122,6 +122,7 @@ "Clear the entire inline composition buffer like Shift+Delete" = "Shift+Delete のように入力緩衝列を消す"; "Commit Hanyu-Pinyin instead on Ctrl(+Option)+Command+Enter" = "Ctrl(+Option)+Command+Enter で出すのを漢語弁音と変換"; "Completely disable using Shift key to toggle alphanumerical mode" = "Shift キーの英数入力モードの切り替え機能を徹底的に禁ず"; +"Consolidate the context on confirming candidate selection" = "候補陳列ウィンドウで候補を選ぶ時に文脈を強固する"; "Cursor Selection:" = "カーソル候補呼出:"; "Dachen (Microsoft Standard / Wang / 01, etc.)" = "大千配列 (Microsoft 標準・王安・零壹など)"; "Dachen 26 (libChewing)" = "酷音大千 26 キー配列"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 9ee88bcd..8f797b4a 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -122,6 +122,7 @@ "Clear the entire inline composition buffer like Shift+Delete" = "像 Shift+Delete 那样清空当前组字区内容"; "Commit Hanyu-Pinyin instead on Ctrl(+Option)+Command+Enter" = "Ctrl(+Option)+Command+Enter 输出汉语拼音而非注音"; "Completely disable using Shift key to toggle alphanumerical mode" = "彻底禁止使用 Shift 键切换英数模式"; +"Consolidate the context on confirming candidate selection" = "在使用选字窗选字时,自動巩固上下文"; "Cursor Selection:" = "选字游标:"; "Dachen (Microsoft Standard / Wang / 01, etc.)" = "大千排列 (微软标准/王安/零壹/仲鼎/国乔)"; "Dachen 26 (libChewing)" = "酷音大千二十六键排列"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index 0a2d4ba6..64c4cc52 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -122,6 +122,7 @@ "Clear the entire inline composition buffer like Shift+Delete" = "像 Shift+Delete 那樣清空當前組字區內容"; "Commit Hanyu-Pinyin instead on Ctrl(+Option)+Command+Enter" = "Ctrl(+Option)+Command+Enter 輸出漢語拼音而非注音"; "Completely disable using Shift key to toggle alphanumerical mode" = "徹底禁止使用 Shift 鍵切換英數模式"; +"Consolidate the context on confirming candidate selection" = "在使用選字窗選字時,自動鞏固上下文"; "Cursor Selection:" = "選字游標:"; "Dachen (Microsoft Standard / Wang / 01, etc.)" = "大千排列 (微軟標準/王安/零壹/仲鼎/國喬)"; "Dachen 26 (libChewing)" = "酷音大千二十六鍵排列";