diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index a39e8b80..77feb523 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -89,6 +89,7 @@ "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 a39e8b80..77feb523 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -89,6 +89,7 @@ "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 180e54a4..812521c2 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -89,6 +89,7 @@ "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 5d844616..928d130e 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -89,6 +89,7 @@ "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 cd1edbe9..faa80a99 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -89,6 +89,7 @@ "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 e8376b3e..2f8dd746 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 selUseScoreBalancing: Bool = UserDefaults.standard.bool( + forKey: UserDef.kUseScoreBalancing) private let contentWidth: Double = { switch mgrPrefs.appleLanguages[0] { case "ja": @@ -126,6 +128,13 @@ 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 + } } } }