From 18a0c243d26675efcbff99fed1b8be86ef43ad7b Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 5 Mar 2023 14:03:59 +0800 Subject: [PATCH] PrefWindow && PrefUI // Fix a description. --- .../PrefUI/VwrPrefPaneCandidates.swift | 14 --- .../PrefUI/VwrPrefPaneDictionary.swift | 17 ++++ .../Resources/Base.lproj/Localizable.strings | 2 +- Source/Resources/en.lproj/Localizable.strings | 2 +- Source/Resources/ja.lproj/Localizable.strings | 2 +- .../zh-Hans.lproj/Localizable.strings | 2 +- .../zh-Hant.lproj/Localizable.strings | 2 +- .../WindowNIBs/Base.lproj/frmPrefWindow.xib | 88 +++++++++---------- .../WindowNIBs/en.lproj/frmPrefWindow.strings | 2 +- .../WindowNIBs/ja.lproj/frmPrefWindow.strings | 2 +- .../zh-Hans.lproj/frmPrefWindow.strings | 2 +- .../zh-Hant.lproj/frmPrefWindow.strings | 2 +- 12 files changed, 70 insertions(+), 67 deletions(-) diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneCandidates.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneCandidates.swift index 9401bb47..1a55e0d8 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneCandidates.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneCandidates.swift @@ -36,8 +36,6 @@ struct VwrPrefPaneCandidates: View { forKey: UserDef.kEnableMouseScrollingForTDKCandidatesCocoa.rawValue) @State private var selEnableSwiftUIForTDKCandidates: Bool = UserDefaults.standard.bool( forKey: UserDef.kEnableSwiftUIForTDKCandidates.rawValue) - @State private var selAllowBoostingSingleKanjiAsUserPhrase: Bool = UserDefaults.standard.bool( - forKey: UserDef.kAllowBoostingSingleKanjiAsUserPhrase.rawValue) var isMontereyOrAbove: Bool = { if #available(macOS 12.0, *) { @@ -208,18 +206,6 @@ struct VwrPrefPaneCandidates: View { "By checking this, Tadokoro Candidate Window will use SwiftUI. SwiftUI was being used in vChewing 3.3.8 and before. However, SwiftUI has unacceptable responsiveness & latency & efficiency problems in rendering the candidate panel UI. That's why a refactored version has been introduced since vChewing 3.3.9 using Cocoa, providing an optimized user experience with blasing-fast operation responsiveness, plus experimental mouse-wheel support.".localized ) .preferenceDescription() - Toggle( - LocalizedStringKey("Allow boosting / excluding a candidate of single kanji"), - isOn: $selAllowBoostingSingleKanjiAsUserPhrase.onChange { - PrefMgr.shared.allowBoostingSingleKanjiAsUserPhrase = selAllowBoostingSingleKanjiAsUserPhrase - } - ) - Text( - LocalizedStringKey( - "⚠︎ This may hinder the walking algorithm from giving appropriate results." - ) - ) - .preferenceDescription() } } } diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift index 4549dc1d..ddec548b 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift @@ -32,6 +32,8 @@ struct VwrPrefPaneDictionary: View { @State private var selPhraseReplacementEnabled: Bool = UserDefaults.standard.bool( forKey: UserDef.kPhraseReplacementEnabled.rawValue ) + @State private var selAllowBoostingSingleKanjiAsUserPhrase: Bool = UserDefaults.standard.bool( + forKey: UserDef.kAllowBoostingSingleKanjiAsUserPhrase.rawValue) private static let dlgOpenPath = NSOpenPanel() private static let dlgOpenFile = NSOpenPanel() @@ -167,6 +169,21 @@ struct VwrPrefPaneDictionary: View { ) Text("This will batch-replace specified candidates.".localized).preferenceDescription() } + Divider() + Group { + Toggle( + LocalizedStringKey("Allow boosting / excluding a candidate of single kanji when marking"), + isOn: $selAllowBoostingSingleKanjiAsUserPhrase.onChange { + PrefMgr.shared.allowBoostingSingleKanjiAsUserPhrase = selAllowBoostingSingleKanjiAsUserPhrase + } + ) + Text( + LocalizedStringKey( + "⚠︎ This may hinder the walking algorithm from giving appropriate results." + ) + ) + .preferenceDescription() + } } } } diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 90c63448..44c4d579 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -189,7 +189,7 @@ "⚠︎ This will reboot the vChewing IME." = "⚠︎ This will reboot the vChewing IME."; "All strokes in the composition buffer will be shown as ASCII keyboard characters unless this option is enabled. Stroke is definable in the “%keyname” section of the CIN file." = "All strokes in the composition buffer will be shown as ASCII keyboard characters unless this option is enabled. Stroke is definable in the “%keyname” section of the CIN file."; "Allow backspace-editing miscomposed readings" = "Allow backspace-editing miscomposed readings"; -"Allow boosting / excluding a candidate of single kanji" = "Allow boosting / excluding a candidate of single kanji"; +"Allow boosting / excluding a candidate of single kanji when marking" = "Allow boosting / excluding a candidate of single kanji when marking"; "Allow using Enter key to confirm associated candidate selection" = "Allow using Enter key to confirm associated candidate selection"; "Alphanumerical Layout:" = "Alphanumerical Layout:"; "Also use “\\” or “¥” key for Hanin Keyboard Symbol Input" = "Also use “\\” or “¥” key for Hanin Keyboard Symbol Input"; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 90c63448..44c4d579 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -189,7 +189,7 @@ "⚠︎ This will reboot the vChewing IME." = "⚠︎ This will reboot the vChewing IME."; "All strokes in the composition buffer will be shown as ASCII keyboard characters unless this option is enabled. Stroke is definable in the “%keyname” section of the CIN file." = "All strokes in the composition buffer will be shown as ASCII keyboard characters unless this option is enabled. Stroke is definable in the “%keyname” section of the CIN file."; "Allow backspace-editing miscomposed readings" = "Allow backspace-editing miscomposed readings"; -"Allow boosting / excluding a candidate of single kanji" = "Allow boosting / excluding a candidate of single kanji"; +"Allow boosting / excluding a candidate of single kanji when marking" = "Allow boosting / excluding a candidate of single kanji when marking"; "Allow using Enter key to confirm associated candidate selection" = "Allow using Enter key to confirm associated candidate selection"; "Alphanumerical Layout:" = "Alphanumerical Layout:"; "Also use “\\” or “¥” key for Hanin Keyboard Symbol Input" = "Also use “\\” or “¥” key for Hanin Keyboard Symbol Input"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 9a91e277..e067e080 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -190,7 +190,7 @@ "⚠︎ This will reboot the vChewing IME." = "⚠︎ これで威注音入力アプリを再起動。"; "All strokes in the composition buffer will be shown as ASCII keyboard characters unless this option is enabled. Stroke is definable in the “%keyname” section of the CIN file." = "これをチェックしないと、全ての筆画は ASCII キーネームで入力緩衝列で表示してしまうことになる。CIN ファイルの「%keyname」というところで筆画の定義はできる。"; "Allow backspace-editing miscomposed readings" = "効かぬ音読みを BackSpace で再編集"; -"Allow boosting / excluding a candidate of single kanji" = "即排除/即最優先にできる候補の文字数の最低限は1字とする"; +"Allow boosting / excluding a candidate of single kanji when marking" = "マーキングモードで即排除/即最優先にできる候補の文字数の最低限は1字とする"; "Allow using Enter key to confirm associated candidate selection" = "Enter キーを連想語彙候補の確認のために使う"; "Alphanumerical Layout:" = "英数キーボード:"; "Also use “\\” or “¥” key for Hanin Keyboard Symbol Input" = "「\\」・「¥」キーでも漢音キーボード符号入力"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index a1d0fbcc..a538cdd6 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -189,7 +189,7 @@ "⚠︎ This will reboot the vChewing IME." = "⚠︎ 这将重启威注音输入法。"; "All strokes in the composition buffer will be shown as ASCII keyboard characters unless this option is enabled. Stroke is definable in the “%keyname” section of the CIN file." = "不启用该选项的话,在组字区内的字根将会以原始键盘按键名称来显示。所有关于字根的定义,均请洽 CIN 磁带档案内的「%keyname」章节。"; "Allow backspace-editing miscomposed readings" = "允许对无效的读音使用 BackSpace 编辑"; -"Allow boosting / excluding a candidate of single kanji" = "将可以就地升权/排除的候选字词的最短词长设为单个汉字"; +"Allow boosting / excluding a candidate of single kanji when marking" = "允许借由标记模式将可以就地升权/排除的候选字词的最短词长设为单个汉字"; "Allow using Enter key to confirm associated candidate selection" = "允许使用 Enter 确认当前选中的联想词"; "Alphanumerical Layout:" = "英数键盘布局:"; "Also use “\\” or “¥” key for Hanin Keyboard Symbol Input" = "亦使用「\\」或「¥」键启用汉音键盘符号模式"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index a038e8d1..e34207af 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -189,7 +189,7 @@ "⚠︎ This will reboot the vChewing IME." = "⚠︎ 這將重啟威注音輸入法。"; "All strokes in the composition buffer will be shown as ASCII keyboard characters unless this option is enabled. Stroke is definable in the “%keyname” section of the CIN file." = "不啟用該選項的話,在組字區內的字根將會以原始鍵盤按鍵名稱來顯示。所有關於字根的定義,均請洽 CIN 磁帶檔案內的「%keyname」章節。"; "Allow backspace-editing miscomposed readings" = "允許對無效的讀音使用 BackSpace 編輯"; -"Allow boosting / excluding a candidate of single kanji" = "將可以就地升權/排除的候選字詞的最短詞長設為單個漢字"; +"Allow boosting / excluding a candidate of single kanji when marking" = "允許藉由標記模式將可以就地升權/排除的候選字詞的最短詞長設為單個漢字"; "Allow using Enter key to confirm associated candidate selection" = "允許使用 Enter 確認當前選中的聯想詞"; "Alphanumerical Layout:" = "英數鍵盤佈局:"; "Also use “\\” or “¥” key for Hanin Keyboard Symbol Input" = "亦使用「\\」或「¥」鍵啟用漢音鍵盤符號模式"; diff --git a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index fcdf372d..20939d26 100644 --- a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -442,14 +442,14 @@ - + - + - + @@ -522,13 +522,13 @@ - + - + @@ -628,13 +628,13 @@ - + - + @@ -701,13 +701,13 @@ - + - + @@ -768,16 +768,16 @@ - + - + - - - @@ -893,7 +878,7 @@ - + @@ -1251,14 +1236,14 @@ - + - + - + @@ -1266,7 +1251,7 @@ - + @@ -1328,10 +1313,10 @@ - + + @@ -1435,6 +1433,7 @@ + @@ -1444,6 +1443,7 @@ + @@ -1463,7 +1463,7 @@ - + diff --git a/Source/WindowNIBs/en.lproj/frmPrefWindow.strings b/Source/WindowNIBs/en.lproj/frmPrefWindow.strings index 9fd71953..ca38a85b 100644 --- a/Source/WindowNIBs/en.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/en.lproj/frmPrefWindow.strings @@ -44,7 +44,7 @@ "BSK-bH-Gct.title" = "Auto-convert traditional Chinese glyphs to KangXi characters"; "cBw-gz-TXe.title" = "Only enforce conversion in Traditional Chinese mode"; "cf2-se-PDO.title" = "Dictionary and Language Models"; -"chkAllowBoostingSingleKanjiAsUserPhrase.title" = "Allow boosting / excluding a candidate of single kanji"; +"chkAllowBoostingSingleKanjiAsUserPhrase.title" = "Allow boosting / excluding a candidate of single kanji when marking"; "chkAlsoConfirmAssociatedCandidatesByEnter.title" = "Allow using Enter key to confirm associated candidate selection"; "chkAutoCorrectReadingCombination.title" = "Automatically correct reading combinations when typing"; "chkConsolidateContextOnCandidateSelection.title" = "Consolidate the context on confirming candidate selection"; diff --git a/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings b/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings index bb44bd0c..df6b1ab7 100644 --- a/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings @@ -44,7 +44,7 @@ "BSK-bH-Gct.title" = "入力した繁体字を康熙字体と自動変換"; "cBw-gz-TXe.title" = "繁体モードだけの場合、カセットモードの漢字出力転換を"; "cf2-se-PDO.title" = "辞書と言語モデル"; -"chkAllowBoostingSingleKanjiAsUserPhrase.title" = "即排除/即最優先にできる候補の文字数の最低限は1字とする"; +"chkAllowBoostingSingleKanjiAsUserPhrase.title" = "マーキングモードで即排除/即最優先にできる候補の文字数の最低限は1字とする"; "chkAlsoConfirmAssociatedCandidatesByEnter.title" = "Enter キーを連想語彙候補の確認のために使う"; "chkAutoCorrectReadingCombination.title" = "入力中で打ち間違った発音組み合わせを自動的に訂正する"; "chkConsolidateContextOnCandidateSelection.title" = "候補陳列ウィンドウで候補を選ぶ時に文脈を強固する"; diff --git a/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings b/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings index 6c660342..834440bb 100644 --- a/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings @@ -44,7 +44,7 @@ "BSK-bH-Gct.title" = "自动将繁体中文字转换为康熙正体字"; "cBw-gz-TXe.title" = "仅在繁体模式转换至繁体"; "cf2-se-PDO.title" = "辞典&語言模型"; -"chkAllowBoostingSingleKanjiAsUserPhrase.title" = "将可以就地升权/排除的候选字词的最短词长设为单个汉字"; +"chkAllowBoostingSingleKanjiAsUserPhrase.title" = "允许借由标记模式将可以就地升权/排除的候选字词的最短词长设为单个汉字"; "chkAlsoConfirmAssociatedCandidatesByEnter.title" = "允许使用 Enter 确认当前选中的联想词"; "chkAutoCorrectReadingCombination.title" = "敲字时自动纠正读音组合"; "chkConsolidateContextOnCandidateSelection.title" = "在使用选字窗选字时,自动巩固上下文"; diff --git a/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings b/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings index 72bf3388..d299dc38 100644 --- a/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings @@ -44,7 +44,7 @@ "BSK-bH-Gct.title" = "自動將繁體中文字轉換為康熙正體字"; "cBw-gz-TXe.title" = "僅在繁體模式轉換至繁體"; "cf2-se-PDO.title" = "辭典&語言模型"; -"chkAllowBoostingSingleKanjiAsUserPhrase.title" = "將可以就地升權/排除的候選字詞的最短詞長設為單個漢字"; +"chkAllowBoostingSingleKanjiAsUserPhrase.title" = "允許藉由標記模式將可以就地升權/排除的候選字詞的最短詞長設為單個漢字"; "chkAlsoConfirmAssociatedCandidatesByEnter.title" = "允許使用 Enter 確認當前選中的聯想詞"; "chkAutoCorrectReadingCombination.title" = "敲字時自動糾正讀音組合"; "chkConsolidateContextOnCandidateSelection.title" = "在使用選字窗選字時,自動鞏固上下文";