diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneCandidates.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneCandidates.swift index 5c5570f0..e9b9067e 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneCandidates.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneCandidates.swift @@ -32,8 +32,8 @@ struct VwrPrefPaneCandidates: View { forKey: UserDef.kConsolidateContextOnCandidateSelection.rawValue) @State private var selUseIMKCandidateWindow: Bool = UserDefaults.standard.bool( forKey: UserDef.kUseIMKCandidateWindow.rawValue) - @State private var selHandleDefaultCandidateFontsByLangIdentifier: Bool = UserDefaults.standard.bool( - forKey: UserDef.kHandleDefaultCandidateFontsByLangIdentifier.rawValue) + @State private var selLegacyCandidateViewTypesettingMethodEnabled: Bool = UserDefaults.standard.bool( + forKey: UserDef.kLegacyCandidateViewTypesettingMethodEnabled.rawValue) @State private var selAllowBoostingSingleKanjiAsUserPhrase: Bool = UserDefaults.standard.bool( forKey: UserDef.kAllowBoostingSingleKanjiAsUserPhrase.rawValue) @@ -80,6 +80,21 @@ struct VwrPrefPaneCandidates: View { + "Tadokoro candidate window shows 4 rows / columns by default, providing similar experiences from Microsoft New Phonetic IME and macOS bult-in Chinese IME (since macOS 10.9). However, for some users who have presbyopia, they prefer giant candidate font sizes, resulting a concern that multiple rows / columns of candidates can make the candidate window looks too big, hence this option. Note that this option will be dismissed if the typing context is vertical, forcing the candidates to be shown in only one row / column. Only one reverse-lookup result can be made available in single row / column mode due to reduced candidate window size.".localized ) .preferenceDescription().prefDescriptionWidthLimited() + Toggle( + LocalizedStringKey("Enable legacy UI typesetting method"), + isOn: $selLegacyCandidateViewTypesettingMethodEnabled.onChange { + PrefMgr.shared.legacyCandidateViewTypesettingMethodEnabled = + selLegacyCandidateViewTypesettingMethodEnabled + } + ) + .controlSize(.small) + .disabled(PrefMgr.shared.useIMKCandidateWindow) + Text( + LocalizedStringKey( + "By checking this, Tadokoro Candidate Window will stop using SwiftUI but using a single NSTextView instead, utilizing one single special NSAttributedString to handle the typesetting of the entire candidate view. This will make the candidate window look “old-school” with no mouse-clicking features, but it renders much faster than SwiftUI on Intel macs. This mode allows Tadokoro candidate window to work in macOS 10.09 - 10.14 versions, accommodating their lack of support for SwiftUI." + ) + ) + .preferenceDescription().prefDescriptionWidthLimited() } SSPreferences.Section(title: "Candidate Size:".localized, bottomDivider: true) { Picker( @@ -188,21 +203,6 @@ struct VwrPrefPaneCandidates: View { ) ) .preferenceDescription().prefDescriptionWidthLimited() - if isMontereyOrAbove { - Toggle( - LocalizedStringKey("Use .langIdentifier to handle UI fonts in candidate window"), - isOn: $selHandleDefaultCandidateFontsByLangIdentifier.onChange { - PrefMgr.shared.handleDefaultCandidateFontsByLangIdentifier = - selHandleDefaultCandidateFontsByLangIdentifier - } - ) - Text( - LocalizedStringKey( - "This only works with Tadokoro candidate window." - ) - ) - .preferenceDescription().prefDescriptionWidthLimited() - } Toggle( LocalizedStringKey("Allow boosting / excluding a candidate of single kanji"), isOn: $selAllowBoostingSingleKanjiAsUserPhrase.onChange { diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 6e997dc4..a589cbf8 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -207,6 +207,7 @@ "Automatically correct reading combinations when typing" = "Automatically correct reading combinations when typing"; "Automatically reload user data files if changes detected" = "Automatically reload user data files if changes detected"; "Basic Keyboard Layout:" = "Basic Keyboard Layout:"; +"By checking this, Tadokoro Candidate Window will stop using SwiftUI but using a single NSTextView instead, utilizing one single special NSAttributedString to handle the typesetting of the entire candidate view. This will make the candidate window look “old-school” with no mouse-clicking features, but it renders much faster than SwiftUI on Intel macs. This mode allows Tadokoro candidate window to work in macOS 10.09 - 10.14 versions, accommodating their lack of support for SwiftUI." = "By checking this, Tadokoro Candidate Window will stop using SwiftUI but using a single NSTextView instead, utilizing one single special NSAttributedString to handle the typesetting of the entire candidate view. This will make the candidate window look “old-school” with no mouse-clicking features, but it renders much faster than SwiftUI on Intel macs. This mode allows Tadokoro candidate window to work in macOS 10.09 - 10.14 versions, accommodating their lack of support for SwiftUI."; "Candidate Layout:" = "Candidate Layout:"; "Candidate Size:" = "Candidate Size:"; "Cassette mode is similar to the CIN support of the Yahoo Kimo IME, allowing users to use their own CIN tables to implement their stroked-based input schema (e.g. Wubi, Cangjie, Boshiamy, etc.) as a plan-B in vChewing IME. However, since vChewing won't compromise its phonabet input mode experience for this cassette mode, users might not feel comfortable enough comparing to their experiences with RIME (recommended) or OpenVanilla (deprecated)." = "Cassette mode is similar to the CIN support of the Yahoo Kimo IME, allowing users to use their own CIN tables to implement their stroked-based input schema (e.g. Wubi, Cangjie, Boshiamy, etc.) as a plan-B in vChewing IME. However, since vChewing won't compromise its phonabet input mode experience for this cassette mode, users might not feel comfortable enough comparing to their experiences with RIME (recommended) or OpenVanilla (deprecated)."; @@ -246,6 +247,7 @@ "Emulating select-candidate-per-character mode" = "Emulating select-candidate-per-character mode"; "Enable cassette mode, suppressing phonabet input" = "Enable cassette mode, suppressing phonabet input"; "Enable CNS11643 Support (2023-01-06)" = "Enable CNS11643 Support (2023-01-06)"; +"Enable legacy UI typesetting method" = "Enable legacy UI typesetting method"; "Enable phrase replacement table" = "Enable phrase replacement table"; "Enable Space key for calling candidate window" = "Enable Space key for calling candidate window"; "Enable symbol input support (incl. certain emoji symbols)" = "Enable symbol input support (incl. certain emoji symbols)"; @@ -331,7 +333,6 @@ "Typing Settings:" = "Typing Settings:"; "UI Language:" = "UI Language:"; "Universal Pinyin with Numeral Intonation" = "Universal Pinyin with Numeral Intonation"; -"Use .langIdentifier to handle UI fonts in candidate window" = "Use .langIdentifier to handle UI fonts in candidate window"; "Use ESC key to clear the entire input buffer" = "Use ESC key to clear the entire input buffer"; "Use IMK Candidate Window instead of Tadokoro" = "Use IMK Candidate Window instead of Tadokoro"; "Use only one row / column in candidate window." = "Use only one row / column in candidate window."; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 6e997dc4..a589cbf8 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -207,6 +207,7 @@ "Automatically correct reading combinations when typing" = "Automatically correct reading combinations when typing"; "Automatically reload user data files if changes detected" = "Automatically reload user data files if changes detected"; "Basic Keyboard Layout:" = "Basic Keyboard Layout:"; +"By checking this, Tadokoro Candidate Window will stop using SwiftUI but using a single NSTextView instead, utilizing one single special NSAttributedString to handle the typesetting of the entire candidate view. This will make the candidate window look “old-school” with no mouse-clicking features, but it renders much faster than SwiftUI on Intel macs. This mode allows Tadokoro candidate window to work in macOS 10.09 - 10.14 versions, accommodating their lack of support for SwiftUI." = "By checking this, Tadokoro Candidate Window will stop using SwiftUI but using a single NSTextView instead, utilizing one single special NSAttributedString to handle the typesetting of the entire candidate view. This will make the candidate window look “old-school” with no mouse-clicking features, but it renders much faster than SwiftUI on Intel macs. This mode allows Tadokoro candidate window to work in macOS 10.09 - 10.14 versions, accommodating their lack of support for SwiftUI."; "Candidate Layout:" = "Candidate Layout:"; "Candidate Size:" = "Candidate Size:"; "Cassette mode is similar to the CIN support of the Yahoo Kimo IME, allowing users to use their own CIN tables to implement their stroked-based input schema (e.g. Wubi, Cangjie, Boshiamy, etc.) as a plan-B in vChewing IME. However, since vChewing won't compromise its phonabet input mode experience for this cassette mode, users might not feel comfortable enough comparing to their experiences with RIME (recommended) or OpenVanilla (deprecated)." = "Cassette mode is similar to the CIN support of the Yahoo Kimo IME, allowing users to use their own CIN tables to implement their stroked-based input schema (e.g. Wubi, Cangjie, Boshiamy, etc.) as a plan-B in vChewing IME. However, since vChewing won't compromise its phonabet input mode experience for this cassette mode, users might not feel comfortable enough comparing to their experiences with RIME (recommended) or OpenVanilla (deprecated)."; @@ -246,6 +247,7 @@ "Emulating select-candidate-per-character mode" = "Emulating select-candidate-per-character mode"; "Enable cassette mode, suppressing phonabet input" = "Enable cassette mode, suppressing phonabet input"; "Enable CNS11643 Support (2023-01-06)" = "Enable CNS11643 Support (2023-01-06)"; +"Enable legacy UI typesetting method" = "Enable legacy UI typesetting method"; "Enable phrase replacement table" = "Enable phrase replacement table"; "Enable Space key for calling candidate window" = "Enable Space key for calling candidate window"; "Enable symbol input support (incl. certain emoji symbols)" = "Enable symbol input support (incl. certain emoji symbols)"; @@ -331,7 +333,6 @@ "Typing Settings:" = "Typing Settings:"; "UI Language:" = "UI Language:"; "Universal Pinyin with Numeral Intonation" = "Universal Pinyin with Numeral Intonation"; -"Use .langIdentifier to handle UI fonts in candidate window" = "Use .langIdentifier to handle UI fonts in candidate window"; "Use ESC key to clear the entire input buffer" = "Use ESC key to clear the entire input buffer"; "Use IMK Candidate Window instead of Tadokoro" = "Use IMK Candidate Window instead of Tadokoro"; "Use only one row / column in candidate window." = "Use only one row / column in candidate window."; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 243114b6..1817f5d9 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -208,6 +208,7 @@ "Automatically correct reading combinations when typing" = "入力中で打ち間違った発音組み合わせを自動的に訂正する"; "Automatically reload user data files if changes detected" = "ユーザー辞書データの変更を自動検出し、自動的に再読込"; "Basic Keyboard Layout:" = "基礎キーボード:"; +"By checking this, Tadokoro Candidate Window will stop using SwiftUI but using a single NSTextView instead, utilizing one single special NSAttributedString to handle the typesetting of the entire candidate view. This will make the candidate window look “old-school” with no mouse-clicking features, but it renders much faster than SwiftUI on Intel macs. This mode allows Tadokoro candidate window to work in macOS 10.09 - 10.14 versions, accommodating their lack of support for SwiftUI." = "このチェックを入れると、田所候補陳列ウィンドウ(TDK)は SwiftUI を使わずに、代わりに1つ NSTextView だけで、1つ特製の NSAttributedString のご利用で、ウィンドウ全体の組版を行います。見た目はなかなか野暮で、さらにマウスクリックの処理もありませんけど、Intel mac での操作反応スピードはこれで保証できます。SwiftUI の利用のないため、これで TDK は macOS 10.09 - 10.14 でも動作可能です。"; "Candidate Layout:" = "候補陳列の仕様"; "Candidate Size:" = "候補文字の字号:"; "Cassette mode is similar to the CIN support of the Yahoo Kimo IME, allowing users to use their own CIN tables to implement their stroked-based input schema (e.g. Wubi, Cangjie, Boshiamy, etc.) as a plan-B in vChewing IME. However, since vChewing won't compromise its phonabet input mode experience for this cassette mode, users might not feel comfortable enough comparing to their experiences with RIME (recommended) or OpenVanilla (deprecated)." = "カセットモードは、CIN ファイルを用いて、(五筆や倉頡や嘸蝦米などのような)筆画入力を機能拡張できるモードである。ですが、単なる予備機能として提供したもののため、使いやすいかどうか、RIME や OpenVanilla などに比べられないかもしれん。"; @@ -247,6 +248,7 @@ "Emulating select-candidate-per-character mode" = "漢字1つづつ全候補選択入力モード"; "Enable cassette mode, suppressing phonabet input" = "カセットモードを起用(注音入力はこのモードで使えぬ)"; "Enable CNS11643 Support (2023-01-06)" = "全字庫モード // 入力可能な漢字数を倍増す (2023-01-06)"; +"Enable legacy UI typesetting method" = "古いUIの組版方法を起用する"; "Enable phrase replacement table" = "言葉置換表を起用"; "Enable Space key for calling candidate window" = "Space キーで入力候補を呼び出す"; "Enable symbol input support (incl. certain emoji symbols)" = "僅かなる絵文字も含む符号入力サポートを起用"; @@ -332,7 +334,6 @@ "Typing Settings:" = "入力設定:"; "UI Language:" = "表示用言語:"; "Universal Pinyin with Numeral Intonation" = "汎用弁音 (ローマ字+数字音調)"; -"Use .langIdentifier to handle UI fonts in candidate window" = "「.langIdentifier」を使って候補陳列ウィンドウのフォントを取り扱う"; "Use ESC key to clear the entire input buffer" = "ESC キーで入力緩衝列を消す"; "Use IMK Candidate Window instead of Tadokoro" = "IMK 候補陳列ウィンドウを起用"; "Use only one row / column in candidate window." = "ただ1つ行・列で文字候補を陳列。"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 4d3d0a92..8c913a0b 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -207,6 +207,7 @@ "Automatically correct reading combinations when typing" = "敲字时自动纠正读音组合"; "Automatically reload user data files if changes detected" = "自动检测并载入使用者语汇档案变更"; "Basic Keyboard Layout:" = "基础键盘布局:"; +"By checking this, Tadokoro Candidate Window will stop using SwiftUI but using a single NSTextView instead, utilizing one single special NSAttributedString to handle the typesetting of the entire candidate view. This will make the candidate window look “old-school” with no mouse-clicking features, but it renders much faster than SwiftUI on Intel macs. This mode allows Tadokoro candidate window to work in macOS 10.09 - 10.14 versions, accommodating their lack of support for SwiftUI." = "若启用该选项,则田所选字窗会弃用 SwiftUI、且改用单个 NSTextView 处理一个特制的 NSAttributedString 的方式来实现自身的介面排版。这会让选字窗的外观美学看上去倒退二十年、且没有滑鼠点击支援,但却能在 Intel mac 电脑上换得更快速的渲染效能。因为该模式不需要 SwiftUI,所以田所选字窗得以借由该模式为 macOS 10.09 - 10.14 系统工作。"; "Candidate Layout:" = "候选字窗布局:"; "Candidate Size:" = "候选字窗字号:"; "Cassette mode is similar to the CIN support of the Yahoo Kimo IME, allowing users to use their own CIN tables to implement their stroked-based input schema (e.g. Wubi, Cangjie, Boshiamy, etc.) as a plan-B in vChewing IME. However, since vChewing won't compromise its phonabet input mode experience for this cassette mode, users might not feel comfortable enough comparing to their experiences with RIME (recommended) or OpenVanilla (deprecated)." = "磁带模式类似于雅虎奇摩输入法的 CIN 支援模式,允许使用者借由 CIN 表格档案扩充自己想要的笔画输入法(比如五笔、仓颉、呒虾米,等)。然而,因为威注音不打算为了这个功能而牺牲注音输入的体验,所以这个磁带模式的体验对于已经习惯 RIME 或者 OpenVanilla 的人群而言可能会稍微麻烦一些。"; @@ -246,6 +247,7 @@ "Emulating select-candidate-per-character mode" = "模拟 90 年代前期注音逐字选字输入风格"; "Enable cassette mode, suppressing phonabet input" = "启用磁带模式,会停用注音输入"; "Enable CNS11643 Support (2023-01-06)" = "启用 CNS11643 全字库支援 (2023-01-06)"; +"Enable legacy UI typesetting method" = "使用古早的介面排版方法"; "Enable phrase replacement table" = "启用语汇置换表"; "Enable Space key for calling candidate window" = "敲空格键以呼出候选字窗"; "Enable symbol input support (incl. certain emoji symbols)" = "启用包括少许绘文字在内的符号输入支援"; @@ -331,7 +333,6 @@ "Typing Settings:" = "敲字设定:"; "UI Language:" = "介面语言:"; "Universal Pinyin with Numeral Intonation" = "通用拼音+数字标调"; -"Use .langIdentifier to handle UI fonts in candidate window" = "使用 .langIdentifier 来管理选字窗的预设介面字型"; "Use ESC key to clear the entire input buffer" = "敲 ESC 键以清空整个组字缓冲区"; "Use IMK Candidate Window instead of Tadokoro" = "启用与 macOS 内建输入法相同的 IMK 选字窗"; "Use only one row / column in candidate window." = "仅以单行/单列来陈列候选字。"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index ea6b870c..55c52564 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -207,6 +207,7 @@ "Automatically correct reading combinations when typing" = "敲字時自動糾正讀音組合"; "Automatically reload user data files if changes detected" = "自動檢測並載入使用者語彙檔案變更"; "Basic Keyboard Layout:" = "基礎鍵盤佈局:"; +"By checking this, Tadokoro Candidate Window will stop using SwiftUI but using a single NSTextView instead, utilizing one single special NSAttributedString to handle the typesetting of the entire candidate view. This will make the candidate window look “old-school” with no mouse-clicking features, but it renders much faster than SwiftUI on Intel macs. This mode allows Tadokoro candidate window to work in macOS 10.09 - 10.14 versions, accommodating their lack of support for SwiftUI." = "若啟用該選項,則田所選字窗會棄用 SwiftUI、且改用單個 NSTextView 處理一個特製的 NSAttributedString 的方式來實現自身的介面排版。這會讓選字窗的外觀美學看上去倒退二十年、且沒有滑鼠點擊支援,但卻能在 Intel mac 電腦上換得更快速的渲染效能。因為該模式不需要 SwiftUI,所以田所選字窗得以藉由該模式為 macOS 10.09 - 10.14 系統工作。"; "Candidate Layout:" = "候選字窗佈局:"; "Candidate Size:" = "候選字窗字號:"; "Cassette mode is similar to the CIN support of the Yahoo Kimo IME, allowing users to use their own CIN tables to implement their stroked-based input schema (e.g. Wubi, Cangjie, Boshiamy, etc.) as a plan-B in vChewing IME. However, since vChewing won't compromise its phonabet input mode experience for this cassette mode, users might not feel comfortable enough comparing to their experiences with RIME (recommended) or OpenVanilla (deprecated)." = "磁帶模式類似於雅虎奇摩輸入法的 CIN 支援模式,允許使用者藉由 CIN 表格檔案擴充自己想要的筆畫輸入法(比如五筆、倉頡、嘸蝦米,等)。然而,因為威注音不打算為了這個功能而犧牲注音輸入的體驗,所以這個磁帶模式的體驗對於已經習慣 RIME 或者 OpenVanilla 的人群而言可能會稍微麻煩一些。"; @@ -246,6 +247,7 @@ "Emulating select-candidate-per-character mode" = "模擬 90 年代前期注音逐字選字輸入風格"; "Enable cassette mode, suppressing phonabet input" = "啟用磁帶模式,會停用注音輸入"; "Enable CNS11643 Support (2023-01-06)" = "啟用 CNS11643 全字庫支援 (2023-01-06)"; +"Enable legacy UI typesetting method" = "使用古早的介面排版方法"; "Enable phrase replacement table" = "啟用語彙置換表"; "Enable Space key for calling candidate window" = "敲空格鍵以呼出候選字窗"; "Enable symbol input support (incl. certain emoji symbols)" = "啟用包括少許繪文字在內的符號輸入支援"; @@ -331,7 +333,6 @@ "Typing Settings:" = "敲字設定:"; "UI Language:" = "介面語言:"; "Universal Pinyin with Numeral Intonation" = "通用拼音+數字標調"; -"Use .langIdentifier to handle UI fonts in candidate window" = "使用 .langIdentifier 來管理選字窗的預設介面字型"; "Use ESC key to clear the entire input buffer" = "敲 ESC 鍵以清空整個組字緩衝區"; "Use IMK Candidate Window instead of Tadokoro" = "啟用與 macOS 內建輸入法相同的 IMK 選字窗"; "Use only one row / column in candidate window." = "僅以單行/單列來陳列候選字。";