From 9d64b414ef75643f0e67914fe9f1c50f05287da3 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 14 Aug 2022 18:20:45 +0800 Subject: [PATCH] PrefUI // +disableShiftTogglingAlphanumericalMode. --- Source/Modules/UIModules/PrefUI/suiPrefPaneDevZone.swift | 8 ++++++++ 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 + 5 files changed, 12 insertions(+) diff --git a/Source/Modules/UIModules/PrefUI/suiPrefPaneDevZone.swift b/Source/Modules/UIModules/PrefUI/suiPrefPaneDevZone.swift index 0de10a9d..c6639bb1 100644 --- a/Source/Modules/UIModules/PrefUI/suiPrefPaneDevZone.swift +++ b/Source/Modules/UIModules/PrefUI/suiPrefPaneDevZone.swift @@ -16,6 +16,8 @@ struct suiPrefPaneDevZone: View { forKey: UserDef.kHandleDefaultCandidateFontsByLangIdentifier.rawValue) @State private var selShouldAlwaysUseShiftKeyAccommodation: Bool = UserDefaults.standard.bool( forKey: UserDef.kShouldAlwaysUseShiftKeyAccommodation.rawValue) + @State private var selDisableShiftTogglingAlphanumericalMode: Bool = UserDefaults.standard.bool( + forKey: UserDef.kDisableShiftTogglingAlphanumericalMode.rawValue) private let contentWidth: Double = { switch mgrPrefs.appleLanguages[0] { case "ja": @@ -70,6 +72,12 @@ struct suiPrefPaneDevZone: View { ) ) .preferenceDescription().fixedSize(horizontal: false, vertical: true) + Toggle( + LocalizedStringKey("Completely disable using Shift key to toggling alphanumerical mode"), + isOn: $selDisableShiftTogglingAlphanumericalMode.onChange { + mgrPrefs.disableShiftTogglingAlphanumericalMode = selDisableShiftTogglingAlphanumericalMode + } + ) } } } diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 31fca715..fcd95979 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -119,6 +119,7 @@ "Choose the phonetic layout for Mandarin parser." = "Choose the phonetic layout for Mandarin parser."; "Choose your desired user data folder path. Will be omitted if invalid." = "Choose your desired user data folder path. Will be omitted if invalid."; "Choose your preferred layout of the candidate window." = "Choose your preferred layout of the candidate window."; +"Completely disable using Shift key to toggling alphanumerical mode" = "Completely disable using Shift key to toggling alphanumerical mode"; "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 008e1ef5..4f4dbf19 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -119,6 +119,7 @@ "Choose the phonetic layout for Mandarin parser." = "共通語分析器の注音配列をご指定ください。"; "Choose your desired user data folder path. Will be omitted if invalid." = "欲しがるユーザー辞書保存先をご指定ください。無効なる保存先設定は省かれる。"; "Choose your preferred layout of the candidate window." = "入力候補陳列の仕様をご指定ください。"; +"Completely disable using Shift key to toggling alphanumerical mode" = "Shift キーの英数入力モードの切り替え機能を徹底的に禁ず"; "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 52da0a10..162326d7 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -119,6 +119,7 @@ "Choose the phonetic layout for Mandarin parser." = "请指定普通话/国音分析器所使用的注音排列。"; "Choose your desired user data folder path. Will be omitted if invalid." = "请在此指定您想指定的使用者语汇档案目录。无效值会被忽略。"; "Choose your preferred layout of the candidate window." = "选择您所偏好的候选字窗布局。"; +"Completely disable using Shift key to toggling alphanumerical mode" = "彻底禁止使用 Shift 键切换英数模式"; "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 702535bf..ad51fd48 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -119,6 +119,7 @@ "Choose the phonetic layout for Mandarin parser." = "請指定普通話/國音分析器所使用的注音排列。"; "Choose your desired user data folder path. Will be omitted if invalid." = "請在此指定您想指定的使用者語彙檔案目錄。無效值會被忽略。"; "Choose your preferred layout of the candidate window." = "選擇您所偏好的候選字窗佈局。"; +"Completely disable using Shift key to toggling alphanumerical mode" = "徹底禁止使用 Shift 鍵切換英數模式"; "Cursor Selection:" = "選字游標:"; "Dachen (Microsoft Standard / Wang / 01, etc.)" = "大千排列 (微軟標準/王安/零壹/仲鼎/國喬)"; "Dachen 26 (libChewing)" = "酷音大千二十六鍵排列";