From 2c1090e9e3a6b5cf0dc4cae622d121390baed5a8 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Wed, 22 Jun 2022 11:30:55 +0800 Subject: [PATCH] PrefUI // +fetchSuggestionsFromUserOverrideModel. --- 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 + Source/UI/PrefUI/suiPrefPaneDictionary.swift | 9 +++++++++ 6 files changed, 14 insertions(+) diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 9fc16468..02bb0993 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -88,6 +88,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."; +"Applying typing suggestions from half-life user override model" = "Applying typing suggestions from half-life user override model"; "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"; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 9fc16468..02bb0993 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -88,6 +88,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."; +"Applying typing suggestions from half-life user override model" = "Applying typing suggestions from half-life user override model"; "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"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 0a2fd83c..3f204d09 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -88,6 +88,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 動態注音キーボード (大千と倚天伝統) を使うには、共通語分析器の配列を大千と設定すべきである。"; +"Applying typing suggestions from half-life user override model" = "入力中で臨時記憶モジュールからお薦めの候補を自動的に選ぶ"; "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" = "入力した繁体字を康熙字体と自動変換"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index d514925c..125d7d85 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -88,6 +88,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 动态注音键盘布局(大千与倚天)要求普通话/国音分析器得配置为大千排列。"; +"Applying typing suggestions from half-life user override model" = "在敲字时自动套用来自半衰记忆模组的建议"; "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" = "自动将繁体中文字转为康熙正体字"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index 95f5f1d9..c15a77f3 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -88,6 +88,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 動態注音鍵盤佈局(大千與倚天)要求普通話/國音分析器得配置為大千排列。"; +"Applying typing suggestions from half-life user override model" = "在敲字時自動套用來自半衰記憶模組的建議"; "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" = "自動將繁體中文字轉為康熙正體字"; diff --git a/Source/UI/PrefUI/suiPrefPaneDictionary.swift b/Source/UI/PrefUI/suiPrefPaneDictionary.swift index 660b1221..666df689 100644 --- a/Source/UI/PrefUI/suiPrefPaneDictionary.swift +++ b/Source/UI/PrefUI/suiPrefPaneDictionary.swift @@ -37,6 +37,8 @@ struct suiPrefPaneDictionary: View { forKey: UserDef.kSymbolInputEnabled) @State private var selAllowBoostingSingleKanjiAsUserPhrase: Bool = UserDefaults.standard.bool( forKey: UserDef.kAllowBoostingSingleKanjiAsUserPhrase) + @State private var selFetchSuggestionsFromUserOverrideModel: Bool = UserDefaults.standard.bool( + forKey: UserDef.kFetchSuggestionsFromUserOverrideModel) private let contentWidth: Double = { switch mgrPrefs.appleLanguages[0] { case "ja": @@ -138,6 +140,13 @@ struct suiPrefPaneDictionary: View { .onChange(of: selAllowBoostingSingleKanjiAsUserPhrase) { value in mgrPrefs.allowBoostingSingleKanjiAsUserPhrase = value } + Toggle( + LocalizedStringKey("Applying typing suggestions from half-life user override model"), + isOn: $selFetchSuggestionsFromUserOverrideModel + ) + .onChange(of: selFetchSuggestionsFromUserOverrideModel) { value in + mgrPrefs.fetchSuggestionsFromUserOverrideModel = value + } } } }