diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 55469beb..9fc16468 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -82,6 +82,7 @@ // SwiftUI Preferences "(Shift+)Space:" = "(Shift+)Space:"; +"Allow boosting / excluding a candidate of single kanji" = "Allow boosting / excluding a candidate of single kanji"; "An accomodation for elder computer users." = "An accomodation for elder computer users."; "Apple ABC (equivalent to English US)" = "Apple ABC (equivalent to English US)"; "Apple Chewing - Dachen" = "Apple Chewing - Dachen"; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 55469beb..9fc16468 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -82,6 +82,7 @@ // SwiftUI Preferences "(Shift+)Space:" = "(Shift+)Space:"; +"Allow boosting / excluding a candidate of single kanji" = "Allow boosting / excluding a candidate of single kanji"; "An accomodation for elder computer users." = "An accomodation for elder computer users."; "Apple ABC (equivalent to English US)" = "Apple ABC (equivalent to English US)"; "Apple Chewing - Dachen" = "Apple Chewing - Dachen"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 1d0f6f16..0a2fd83c 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -82,6 +82,7 @@ // SwiftUI Preferences "(Shift+)Space:" = "(Shift+)Space:"; +"Allow boosting / excluding a candidate of single kanji" = "即排除/即最優先にできる候補の文字数の最低限は1字とする"; "An accomodation for elder computer users." = "年配なるユーザーのために提供した機能である。"; "Apple ABC (equivalent to English US)" = "Apple ABC (Apple U.S. キーボードと同じ)"; "Apple Chewing - Dachen" = "Apple 大千注音キーボード"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 89b4c435..d514925c 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -82,6 +82,7 @@ // SwiftUI Preferences "(Shift+)Space:" = "(Shift+)空格键:"; +"Allow boosting / excluding a candidate of single kanji" = "将可以就地升权/排除的候选字词的最短词长设为单个汉字"; "An accomodation for elder computer users." = "针对年长使用者的习惯而提供。"; "Apple ABC (equivalent to English US)" = "Apple ABC (与 Apple 美规键盘等价)"; "Apple Chewing - Dachen" = "Apple 大千注音键盘排列"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index 232da7f1..95f5f1d9 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -82,6 +82,7 @@ // SwiftUI Preferences "(Shift+)Space:" = "(Shift+)空格鍵:"; +"Allow boosting / excluding a candidate of single kanji" = "將可以就地升權/排除的候選字詞的最短詞長設為單個漢字"; "An accomodation for elder computer users." = "針對年長使用者的習慣而提供。"; "Apple ABC (equivalent to English US)" = "Apple ABC (與 Apple 美規鍵盤等價)"; "Apple Chewing - Dachen" = "Apple 大千注音鍵盤佈局"; diff --git a/Source/UI/PrefUI/suiPrefPaneDictionary.swift b/Source/UI/PrefUI/suiPrefPaneDictionary.swift index cb0b1bfd..660b1221 100644 --- a/Source/UI/PrefUI/suiPrefPaneDictionary.swift +++ b/Source/UI/PrefUI/suiPrefPaneDictionary.swift @@ -35,6 +35,8 @@ 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 selAllowBoostingSingleKanjiAsUserPhrase: Bool = UserDefaults.standard.bool( + forKey: UserDef.kAllowBoostingSingleKanjiAsUserPhrase) private let contentWidth: Double = { switch mgrPrefs.appleLanguages[0] { case "ja": @@ -113,11 +115,14 @@ struct suiPrefPaneDictionary: View { mgrPrefs.shouldAutoReloadUserDataFiles = value } Divider() - Toggle(LocalizedStringKey("Enable CNS11643 Support (2022-04-27)"), isOn: $selEnableCNS11643) - .onChange(of: selEnableCNS11643) { value in - mgrPrefs.cns11643Enabled = value - mgrLangModel.setCNSEnabled(value) - } + Toggle( + LocalizedStringKey("Enable CNS11643 Support (2022-04-27)"), + isOn: $selEnableCNS11643 + ) + .onChange(of: selEnableCNS11643) { value in + mgrPrefs.cns11643Enabled = value + mgrLangModel.setCNSEnabled(value) + } Toggle( LocalizedStringKey("Enable symbol input support (incl. certain emoji symbols)"), isOn: $selEnableSymbolInputSupport @@ -126,6 +131,13 @@ struct suiPrefPaneDictionary: View { mgrPrefs.symbolInputEnabled = value mgrLangModel.setSymbolEnabled(value) } + Toggle( + LocalizedStringKey("Allow boosting / excluding a candidate of single kanji"), + isOn: $selAllowBoostingSingleKanjiAsUserPhrase + ) + .onChange(of: selAllowBoostingSingleKanjiAsUserPhrase) { value in + mgrPrefs.allowBoostingSingleKanjiAsUserPhrase = value + } } } }