From 00f91e1f10875e94b696f5940b57bb131bc07438 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sat, 14 May 2022 19:18:37 +0800 Subject: [PATCH] PrefUI // +InlineDumpPinyinInLieuOfZhuyin. --- Source/Resources/Base.lproj/Localizable.strings | 1 + Source/Resources/en.lproj/Localizable.strings | 1 + Source/Resources/ja.lproj/Localizable.strings | 1 + Source/Resources/zh-Hans.lproj/Localizable.strings | 1 + Source/Resources/zh-Hant.lproj/Localizable.strings | 1 + Source/UI/PrefUI/suiPrefPaneGeneral.swift | 9 +++++++++ 6 files changed, 14 insertions(+) diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 6861371e..743c812f 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -128,6 +128,7 @@ "Misc Settings:" = "Misc Settings:"; "MiTAC" = "MiTAC"; "Non-QWERTY alphanumeral keyboard layouts are for Hanyu Pinyin parser only." = "Non-QWERTY alphanumeral keyboard layouts are for Hanyu Pinyin parser only."; +"Output Hanyu-Pinyin in lieu of Zhuyin when Ctrl(+Alt)+CMD+Enter" = "Output Hanyu-Pinyin in lieu of Zhuyin when Ctrl(+Alt)+CMD+Enter"; "Output Settings:" = "Output Settings:"; "Phonetic Parser:" = "Phonetic Parser:"; "Push the cursor in front of the phrase after selection" = "Push the cursor in front of the phrase after selection"; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 6861371e..743c812f 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -128,6 +128,7 @@ "Misc Settings:" = "Misc Settings:"; "MiTAC" = "MiTAC"; "Non-QWERTY alphanumeral keyboard layouts are for Hanyu Pinyin parser only." = "Non-QWERTY alphanumeral keyboard layouts are for Hanyu Pinyin parser only."; +"Output Hanyu-Pinyin in lieu of Zhuyin when Ctrl(+Alt)+CMD+Enter" = "Output Hanyu-Pinyin in lieu of Zhuyin when Ctrl(+Alt)+CMD+Enter"; "Output Settings:" = "Output Settings:"; "Phonetic Parser:" = "Phonetic Parser:"; "Push the cursor in front of the phrase after selection" = "Push the cursor in front of the phrase after selection"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 6efa35c3..65baca8c 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -128,6 +128,7 @@ "Misc Settings:" = "他の設定:"; "MiTAC" = "神通配列"; "Non-QWERTY alphanumeral keyboard layouts are for Hanyu Pinyin parser only." = "QWERTY 以外の英数キーボードは漢語弁音以外の配列に不適用。"; +"Output Hanyu-Pinyin in lieu of Zhuyin when Ctrl(+Alt)+CMD+Enter" = "Ctrl(+Alt)+CMD+Enter で出すのを漢語弁音と変換"; "Output Settings:" = "出力設定:"; "Phonetic Parser:" = "注音配列:"; "Push the cursor in front of the phrase after selection" = "候補選択の直後、すぐカーソルを単語の向こうに推し進める"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 6de43112..8e53b332 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -128,6 +128,7 @@ "Misc Settings:" = "杂项:"; "MiTAC" = "神通排列"; "Non-QWERTY alphanumeral keyboard layouts are for Hanyu Pinyin parser only." = "QWERTY 以外的英数布局是为了汉语拼音排列使用者而准备的。"; +"Output Hanyu-Pinyin in lieu of Zhuyin when Ctrl(+Alt)+CMD+Enter" = "Ctrl(+Alt)+CMD+Enter 输出汉语拼音而非注音"; "Output Settings:" = "输出设定:"; "Phonetic Parser:" = "注音排列:"; "Push the cursor in front of the phrase after selection" = "在选字后将游标置于该字词的前方"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index 69f289a4..bd7d11a4 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -128,6 +128,7 @@ "Misc Settings:" = "雜項:"; "MiTAC" = "神通排列"; "Non-QWERTY alphanumeral keyboard layouts are for Hanyu Pinyin parser only." = "QWERTY 以外的英數佈局是為了漢語拼音排列使用者而準備的。"; +"Output Hanyu-Pinyin in lieu of Zhuyin when Ctrl(+Alt)+CMD+Enter" = "Ctrl(+Alt)+CMD+Enter 輸出漢語拼音而非注音"; "Output Settings:" = "輸出設定:"; "Phonetic Parser:" = "注音排列:"; "Push the cursor in front of the phrase after selection" = "在選字後將游標置於該字詞的前方"; diff --git a/Source/UI/PrefUI/suiPrefPaneGeneral.swift b/Source/UI/PrefUI/suiPrefPaneGeneral.swift index db1a3507..c77cf25c 100644 --- a/Source/UI/PrefUI/suiPrefPaneGeneral.swift +++ b/Source/UI/PrefUI/suiPrefPaneGeneral.swift @@ -45,6 +45,8 @@ struct suiPrefPaneGeneral: View { forKey: UserDef.kShiftJISShinjitaiOutputEnabled) @State private var selShowHanyuPinyinInCompositionBuffer = UserDefaults.standard.bool( forKey: UserDef.kShowHanyuPinyinInCompositionBuffer) + @State private var selInlineDumpPinyinInLieuOfZhuyin = UserDefaults.standard.bool( + forKey: UserDef.kInlineDumpPinyinInLieuOfZhuyin) @State private var selEnableFartSuppressor = UserDefaults.standard.bool(forKey: UserDef.kShouldNotFartInLieuOfBeep) @State private var selEnableAutoUpdateCheck = UserDefaults.standard.bool(forKey: UserDef.kCheckUpdateAutomatically) @State private var selEnableDebugMode = UserDefaults.standard.bool(forKey: UserDef.kIsDebugModeEnabled) @@ -156,6 +158,13 @@ struct suiPrefPaneGeneral: View { mgrPrefs.showHanyuPinyinInCompositionBuffer = value selShowHanyuPinyinInCompositionBuffer = value } + Toggle( + LocalizedStringKey("Output Hanyu-Pinyin in lieu of Zhuyin when Ctrl(+Alt)+CMD+Enter"), + isOn: $selInlineDumpPinyinInLieuOfZhuyin + ).onChange(of: selInlineDumpPinyinInLieuOfZhuyin) { value in + mgrPrefs.inlineDumpPinyinInLieuOfZhuyin = value + selInlineDumpPinyinInLieuOfZhuyin = value + } Toggle( LocalizedStringKey("Stop farting (when typed phonetic combination is invalid, etc.)"), isOn: $selEnableFartSuppressor