From c0d146e5be5fe3abe22a14dd6f899648ecb7fc42 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Fri, 19 Aug 2022 13:56:54 +0800 Subject: [PATCH] PrefUI // Compact the Keyboard tab page & fix descriptions. --- .../PrefUI/suiPrefPaneKeyboard.swift | 51 ++++++++++--------- .../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 +- 6 files changed, 33 insertions(+), 28 deletions(-) diff --git a/Source/Modules/UIModules/PrefUI/suiPrefPaneKeyboard.swift b/Source/Modules/UIModules/PrefUI/suiPrefPaneKeyboard.swift index 5c9190a5..c5576600 100644 --- a/Source/Modules/UIModules/PrefUI/suiPrefPaneKeyboard.swift +++ b/Source/Modules/UIModules/PrefUI/suiPrefPaneKeyboard.swift @@ -139,8 +139,20 @@ struct suiPrefPaneKeyboard: View { } } .frame(width: 380.0) - Text(LocalizedStringKey("Choose the phonetic layout for Mandarin parser.")) - .preferenceDescription() + HStack { + Text( + NSLocalizedString( + "Choose the phonetic layout for Mandarin parser.", + comment: "" + ) + (mgrPrefs.appleLanguages[0].contains("en") ? " " : "") + + NSLocalizedString( + "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional.", + comment: "" + ) + ) + .preferenceDescription().fixedSize(horizontal: false, vertical: true) + Spacer().frame(width: 30) + } } Preferences.Section(bottomDivider: true, label: { Text(LocalizedStringKey("Basic Keyboard Layout:")) }) { HStack { @@ -163,8 +175,20 @@ struct suiPrefPaneKeyboard: View { .labelsHidden() .frame(width: 240.0) } - Text(LocalizedStringKey("Choose the macOS-level basic keyboard layout.")) - .preferenceDescription() + HStack { + Text( + NSLocalizedString( + "Choose the macOS-level basic keyboard layout.", + comment: "" + ) + (mgrPrefs.appleLanguages[0].contains("en") ? " " : "") + + NSLocalizedString( + "Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only.", + comment: "" + ) + ) + .preferenceDescription().fixedSize(horizontal: false, vertical: true) + Spacer().frame(width: 30) + } } Preferences.Section(bottomDivider: true, label: { Text(LocalizedStringKey("Keyboard Shortcuts:")) }) { Toggle( @@ -211,25 +235,6 @@ struct suiPrefPaneKeyboard: View { ) } } - Divider() - Preferences.Container(contentWidth: contentWidth) { - Preferences.Section(title: "") { - VStack(alignment: .leading, spacing: 10) { - Text( - LocalizedStringKey( - "Non-QWERTY alphanumerical keyboard layouts are for Hanyu Pinyin parser only." - ) - ) - .preferenceDescription() - Text( - LocalizedStringKey( - "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional." - ) - ) - .preferenceDescription() - } - } - } }.frame(maxHeight: contentMaxHeight).fixedSize(horizontal: false, vertical: true) } } diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 08e3d66c..548d40aa 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -152,7 +152,7 @@ "Keyboard" = "Keyboard"; "Misc Settings:" = "Misc Settings:"; "MiTAC" = "MiTAC"; -"Non-QWERTY alphanumerical keyboard layouts are for Hanyu Pinyin parser only." = "Non-QWERTY alphanumerical keyboard layouts are for Hanyu Pinyin parser only."; +"Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only." = "Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only."; "Commit Hanyu-Pinyin instead on Ctrl(+Option)+Command+Enter" = "Commit Hanyu-Pinyin instead on Ctrl(+Option)+Command+Enter"; "Output Settings:" = "Output Settings:"; "Phonetic Parser:" = "Phonetic Parser:"; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 4cf096c8..1a19a088 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -153,7 +153,7 @@ "Keyboard" = "Keyboard"; "Misc Settings:" = "Misc Settings:"; "MiTAC" = "MiTAC"; -"Non-QWERTY alphanumerical keyboard layouts are for Hanyu Pinyin parser only." = "Non-QWERTY alphanumerical keyboard layouts are for Hanyu Pinyin parser only."; +"Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only." = "Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only."; "Commit Hanyu-Pinyin instead on Ctrl(+Option)+Command+Enter" = "Commit Hanyu-Pinyin instead on Ctrl(+Option)+Command+Enter"; "Output Settings:" = "Output Settings:"; "Phonetic Parser:" = "Phonetic Parser:"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index c3b953df..a79031bb 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -153,7 +153,7 @@ "Keyboard" = "配列設定"; "Misc Settings:" = "他の設定:"; "MiTAC" = "神通配列"; -"Non-QWERTY alphanumerical keyboard layouts are for Hanyu Pinyin parser only." = "QWERTY 以外の英数キーボードは漢語弁音以外の配列に不適用。"; +"Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only." = "QWERTY 以外の英数キーボードは弁音以外の配列に不適用。"; "Commit Hanyu-Pinyin instead on Ctrl(+Option)+Command+Enter" = "Ctrl(+Option)+Command+Enter で出すのを漢語弁音と変換"; "Output Settings:" = "出力設定:"; "Phonetic Parser:" = "注音配列:"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 8c717ab5..00e6d837 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -153,7 +153,7 @@ "Keyboard" = "键盘设定"; "Misc Settings:" = "杂项:"; "MiTAC" = "神通排列"; -"Non-QWERTY alphanumerical keyboard layouts are for Hanyu Pinyin parser only." = "QWERTY 以外的英数布局是为了汉语拼音排列使用者而准备的。"; +"Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only." = "QWERTY 以外的英数布局是为了拼音排列使用者而准备的。"; "Commit Hanyu-Pinyin instead on Ctrl(+Option)+Command+Enter" = "Ctrl(+Option)+Command+Enter 输出汉语拼音而非注音"; "Output Settings:" = "输出设定:"; "Phonetic Parser:" = "注音排列:"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index 7d0a8ae9..47f437e8 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -153,7 +153,7 @@ "Keyboard" = "鍵盤設定"; "Misc Settings:" = "雜項:"; "MiTAC" = "神通排列"; -"Non-QWERTY alphanumerical keyboard layouts are for Hanyu Pinyin parser only." = "QWERTY 以外的英數佈局是為了漢語拼音排列使用者而準備的。"; +"Non-QWERTY alphanumerical keyboard layouts are for Pinyin parser only." = "QWERTY 以外的英數佈局是為了拼音排列使用者而準備的。"; "Commit Hanyu-Pinyin instead on Ctrl(+Option)+Command+Enter" = "Ctrl(+Option)+Command+Enter 輸出漢語拼音而非注音"; "Output Settings:" = "輸出設定:"; "Phonetic Parser:" = "注音排列:";