From 366bf9da2a0ea22c98697a6aefe2dd25fa938189 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Fri, 9 Sep 2022 13:21:36 +0800 Subject: [PATCH] PrefUI // +alwaysShowTooltipTextsHorizontally. --- .../UIModules/PrefUI/suiPrefPaneExperience.swift | 13 +++++++++++++ Source/Resources/Base.lproj/Localizable.strings | 2 ++ Source/Resources/en.lproj/Localizable.strings | 2 ++ Source/Resources/ja.lproj/Localizable.strings | 2 ++ Source/Resources/zh-Hans.lproj/Localizable.strings | 2 ++ Source/Resources/zh-Hant.lproj/Localizable.strings | 2 ++ 6 files changed, 23 insertions(+) diff --git a/Source/Modules/UIModules/PrefUI/suiPrefPaneExperience.swift b/Source/Modules/UIModules/PrefUI/suiPrefPaneExperience.swift index 144d4477..666c563a 100644 --- a/Source/Modules/UIModules/PrefUI/suiPrefPaneExperience.swift +++ b/Source/Modules/UIModules/PrefUI/suiPrefPaneExperience.swift @@ -43,6 +43,8 @@ struct suiPrefPaneExperience: View { forKey: UserDef.kSpecifyShiftBackSpaceKeyBehavior.rawValue) @State private var selTrimUnfinishedReadingsOnCommit = UserDefaults.standard.bool( forKey: UserDef.kTrimUnfinishedReadingsOnCommit.rawValue) + @State private var selAlwaysShowTooltipTextsHorizontally = UserDefaults.standard.bool( + forKey: UserDef.kAlwaysShowTooltipTextsHorizontally.rawValue) private let contentMaxHeight: Double = 432 private let contentWidth: Double = { @@ -236,6 +238,17 @@ struct suiPrefPaneExperience: View { ) Text(LocalizedStringKey("An accommodation for elder computer users.")) .preferenceDescription() + Toggle( + LocalizedStringKey("Always show tooltip texts horizontally"), + isOn: $selAlwaysShowTooltipTextsHorizontally.onChange { + mgrPrefs.alwaysShowTooltipTextsHorizontally = selAlwaysShowTooltipTextsHorizontally + } + ) + Text( + LocalizedStringKey( + "Key names in tooltip will be shown as symbols when the typing direction of the client app is vertical." + ) + ).preferenceDescription() } } } diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 7e39bd61..7747f0f2 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -106,6 +106,7 @@ "Allow using Enter key to confirm associated candidate selection" = "Allow using Enter key to confirm associated candidate selection"; "Also toggle alphanumerical mode with Left-Shift" = "Also toggle alphanumerical mode with Left-Shift"; "Always drop the previous reading" = "Always drop the previous reading"; +"Always show tooltip texts horizontally" = "Always show tooltip texts horizontally"; "Always type intonations to the inline composition buffer" = "Always type intonations to the inline composition buffer"; "Always use fixed listing order in candidate window" = "Always use fixed listing order in candidate window"; "An accommodation for elder computer users." = "An accommodation for elder computer users."; @@ -173,6 +174,7 @@ "in front of the phrase (like macOS built-in Zhuyin IME)" = "in front of the phrase (like macOS built-in Zhuyin IME)"; "Intonation Key:" = "Intonation Key:"; "Japanese" = "Japanese"; +"Key names in tooltip will be shown as symbols when the typing direction of the client app is vertical." = "Key names in tooltip will be shown as symbols when the typing direction of the client app is vertical."; "Keyboard Shortcuts:" = "Keyboard Shortcuts:"; "Keyboard" = "Keyboard"; "Misc Settings:" = "Misc Settings:"; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 7e39bd61..7747f0f2 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -106,6 +106,7 @@ "Allow using Enter key to confirm associated candidate selection" = "Allow using Enter key to confirm associated candidate selection"; "Also toggle alphanumerical mode with Left-Shift" = "Also toggle alphanumerical mode with Left-Shift"; "Always drop the previous reading" = "Always drop the previous reading"; +"Always show tooltip texts horizontally" = "Always show tooltip texts horizontally"; "Always type intonations to the inline composition buffer" = "Always type intonations to the inline composition buffer"; "Always use fixed listing order in candidate window" = "Always use fixed listing order in candidate window"; "An accommodation for elder computer users." = "An accommodation for elder computer users."; @@ -173,6 +174,7 @@ "in front of the phrase (like macOS built-in Zhuyin IME)" = "in front of the phrase (like macOS built-in Zhuyin IME)"; "Intonation Key:" = "Intonation Key:"; "Japanese" = "Japanese"; +"Key names in tooltip will be shown as symbols when the typing direction of the client app is vertical." = "Key names in tooltip will be shown as symbols when the typing direction of the client app is vertical."; "Keyboard Shortcuts:" = "Keyboard Shortcuts:"; "Keyboard" = "Keyboard"; "Misc Settings:" = "Misc Settings:"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index ad06e0f9..6d0b4f7b 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -106,6 +106,7 @@ "Allow using Enter key to confirm associated candidate selection" = "Enter キーを連想語彙候補の確認のために使う"; "Also toggle alphanumerical mode with Left-Shift" = "左側の Shift キーでも英数入力モードの切り替え"; "Always drop the previous reading" = "カーソルの後部の音読みを常に削除する"; +"Always show tooltip texts horizontally" = "ヒントを常に横書きにする"; "Always type intonations to the inline composition buffer" = "常に入力緩衝列に音調を入力する"; "Always use fixed listing order in candidate window" = "候補文字を固定順番で陳列する"; "An accommodation for elder computer users." = "年配なるユーザーのために提供した機能である。"; @@ -173,6 +174,7 @@ "in front of the phrase (like macOS built-in Zhuyin IME)" = "単語の前で // macOS 内蔵注音入力のやり方"; "Intonation Key:" = "音調キー:"; "Japanese" = "和語"; +"Key names in tooltip will be shown as symbols when the typing direction of the client app is vertical." = "縦書き入力の場合、ヒントにはキーの名前は常に符号で表示する。"; "Keyboard Shortcuts:" = "ショートカット:"; "Keyboard" = "配列設定"; "Misc Settings:" = "他の設定:"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 35f70620..c42c896b 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -106,6 +106,7 @@ "Allow using Enter key to confirm associated candidate selection" = "允许使用 Enter 确认当前选中的联想词"; "Also toggle alphanumerical mode with Left-Shift" = "也允许使用左侧的 Shift 键盘切换英数输入模式"; "Always drop the previous reading" = "始终剔除游标正后方的字音"; +"Always show tooltip texts horizontally" = "始终使用横排来显示工具提示视窗"; "Always type intonations to the inline composition buffer" = "始终在内文组字区内键入声调符号"; "Always use fixed listing order in candidate window" = "以固定顺序来陈列选字窗内的候选字"; "An accommodation for elder computer users." = "针对年长使用者的习惯而提供。"; @@ -173,6 +174,7 @@ "in front of the phrase (like macOS built-in Zhuyin IME)" = "将游标置于词语前方 // macOS 内建注音风格"; "Intonation Key:" = "声调键:"; "Japanese" = "和语"; +"Key names in tooltip will be shown as symbols when the typing direction of the client app is vertical." = "纵排输入的情况下,工具提示内的按键名称会以符号显示。"; "Keyboard Shortcuts:" = "键盘快速键:"; "Keyboard" = "键盘设定"; "Misc Settings:" = "杂项:"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index 0bd0a948..188b03ec 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -106,6 +106,7 @@ "Allow using Enter key to confirm associated candidate selection" = "允許使用 Enter 確認當前選中的聯想詞"; "Also toggle alphanumerical mode with Left-Shift" = "也允許使用左側的 Shift 鍵盤切換英數輸入模式"; "Always drop the previous reading" = "始終剔除游標正後方的字音"; +"Always show tooltip texts horizontally" = "始終使用橫排來顯示工具提示視窗"; "Always type intonations to the inline composition buffer" = "始終在內文組字區內鍵入聲調符號"; "Always use fixed listing order in candidate window" = "以固定順序來陳列選字窗內的候選字"; "An accommodation for elder computer users." = "針對年長使用者的習慣而提供。"; @@ -173,6 +174,7 @@ "in front of the phrase (like macOS built-in Zhuyin IME)" = "將游標置於詞語前方 // macOS 內建注音風格"; "Intonation Key:" = "聲調鍵:"; "Japanese" = "和語"; +"Key names in tooltip will be shown as symbols when the typing direction of the client app is vertical." = "縱排輸入的情況下,工具提示內的按鍵名稱會以符號顯示。"; "Keyboard Shortcuts:" = "鍵盤快速鍵:"; "Keyboard" = "鍵盤設定"; "Misc Settings:" = "雜項:";