From 7af88abc63928f22113d6de92beaaacee5712902 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 30 May 2022 15:43:42 +0800 Subject: [PATCH] mgrPrefs, etc. // Remove "useScoreBalancing" from the repo. --- Source/Modules/IMEModules/mgrPrefs.swift | 5 ----- Source/Resources/Base.lproj/Localizable.strings | 1 - Source/Resources/en.lproj/Localizable.strings | 1 - Source/Resources/ja.lproj/Localizable.strings | 1 - .../Resources/zh-Hans.lproj/Localizable.strings | 1 - .../Resources/zh-Hant.lproj/Localizable.strings | 1 - Source/UI/PrefUI/suiPrefPaneDictionary.swift | 9 --------- Source/WindowNIBs/Base.lproj/frmPrefWindow.xib | 17 ----------------- .../WindowNIBs/en.lproj/frmPrefWindow.strings | 1 - .../WindowNIBs/ja.lproj/frmPrefWindow.strings | 1 - .../zh-Hans.lproj/frmPrefWindow.strings | 1 - .../zh-Hant.lproj/frmPrefWindow.strings | 1 - 12 files changed, 40 deletions(-) diff --git a/Source/Modules/IMEModules/mgrPrefs.swift b/Source/Modules/IMEModules/mgrPrefs.swift index ec346d79..1ff64f84 100644 --- a/Source/Modules/IMEModules/mgrPrefs.swift +++ b/Source/Modules/IMEModules/mgrPrefs.swift @@ -28,7 +28,6 @@ import Cocoa struct UserDef { static let kIsDebugModeEnabled = "_DebugMode" - static let kUseScoreBalancing = "UseScoreBalancing" static let kMostRecentInputMode = "MostRecentInputMode" static let kUserDataFolderSpecified = "UserDataFolderSpecified" static let kCheckUpdateAutomatically = "CheckUpdateAutomatically" @@ -226,7 +225,6 @@ enum MandarinParser: Int { public enum mgrPrefs { public static func setMissingDefaults() { UserDefaults.standard.setDefault(mgrPrefs.isDebugModeEnabled, forKey: UserDef.kIsDebugModeEnabled) - UserDefaults.standard.setDefault(mgrPrefs.useScoreBalancing, forKey: UserDef.kUseScoreBalancing) UserDefaults.standard.setDefault(mgrPrefs.mostRecentInputMode, forKey: UserDef.kMostRecentInputMode) UserDefaults.standard.setDefault(mgrPrefs.checkUpdateAutomatically, forKey: UserDef.kCheckUpdateAutomatically) UserDefaults.standard.setDefault( @@ -282,9 +280,6 @@ public enum mgrPrefs { @UserDefault(key: UserDef.kIsDebugModeEnabled, defaultValue: false) static var isDebugModeEnabled: Bool - @UserDefault(key: UserDef.kUseScoreBalancing, defaultValue: false) - static var useScoreBalancing: Bool - @UserDefault(key: UserDef.kMostRecentInputMode, defaultValue: "") static var mostRecentInputMode: String diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 5abfeb50..2b29cada 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -89,7 +89,6 @@ "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 5abfeb50..2b29cada 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -89,7 +89,6 @@ "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 32818ba4..a6a283f8 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -89,7 +89,6 @@ "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 620b83cf..252b8c5e 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -89,7 +89,6 @@ "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 6144d7f6..12935856 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -89,7 +89,6 @@ "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 2f8dd746..e8376b3e 100644 --- a/Source/UI/PrefUI/suiPrefPaneDictionary.swift +++ b/Source/UI/PrefUI/suiPrefPaneDictionary.swift @@ -35,8 +35,6 @@ 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": @@ -128,13 +126,6 @@ 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 - } } } } diff --git a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index eb921673..55d4f2a7 100644 --- a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -691,25 +691,10 @@ - - @@ -721,11 +706,9 @@ - - diff --git a/Source/WindowNIBs/en.lproj/frmPrefWindow.strings b/Source/WindowNIBs/en.lproj/frmPrefWindow.strings index 01690704..1685e471 100644 --- a/Source/WindowNIBs/en.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/en.lproj/frmPrefWindow.strings @@ -81,7 +81,6 @@ "Parser12.title" = "Yale Pinyin with Numeral Intonation"; "Parser13.title" = "Hualuo Pinyin with Numeral Intonation"; "Parser14.title" = "Universal Pinyin with Numeral Intonation"; -"Wh1-iz-pwM.title" = "Balance the score according to candidate length"; "xibKeyboardShortcuts.title" = "Keyboard Shortcuts"; "xibUsingHotKeySCPC.title" = "Per-Char Select Mode"; "xibUsingHotKeyAssociates.title" = "Per-Char Associated Phrases"; diff --git a/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings b/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings index 2b4602f5..09732095 100644 --- a/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings @@ -81,7 +81,6 @@ "Parser12.title" = "イェール弁音 (ローマ字+数字音調)"; "Parser13.title" = "中華ローマ弁音 (ローマ字+数字音調)"; "Parser14.title" = "汎用弁音 (ローマ字+数字音調)"; -"Wh1-iz-pwM.title" = "候補文字の長さによる重みの調整"; "xibKeyboardShortcuts.title" = "ショートカット"; "xibUsingHotKeySCPC.title" = "全候補入力モード"; "xibUsingHotKeyAssociates.title" = "全候補入力で連想語彙"; diff --git a/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings b/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings index b65350d4..24ae1a41 100644 --- a/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings @@ -81,7 +81,6 @@ "Parser12.title" = "耶鲁拼音+数字标调"; "Parser13.title" = "华罗拼音+数字标调"; "Parser14.title" = "通用拼音+数字标调"; -"Wh1-iz-pwM.title" = "按候选字词的长度调整权重"; "xibKeyboardShortcuts.title" = "键盘快捷键"; "xibUsingHotKeySCPC.title" = "模拟逐字选字输入"; "xibUsingHotKeyAssociates.title" = "逐字选字联想模式"; diff --git a/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings b/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings index e35bed29..cccd1a02 100644 --- a/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings @@ -81,7 +81,6 @@ "Parser12.title" = "耶魯拼音+數字標調"; "Parser13.title" = "華羅拼音+數字標調"; "Parser14.title" = "通用拼音+數字標調"; -"Wh1-iz-pwM.title" = "按候選字詞的長度調整權重"; "xibKeyboardShortcuts.title" = "鍵盤快速鍵"; "xibUsingHotKeySCPC.title" = "模擬逐字選字輸入"; "xibUsingHotKeyAssociates.title" = "逐字選字聯想模式";