ctlIME // Update notifications for toggling alphanumerical modes.

This commit is contained in:
ShikiSuen 2022-09-23 21:40:17 +08:00
parent 1f5481a8d4
commit a5874a1cfd
6 changed files with 8 additions and 2 deletions

View File

@ -273,10 +273,11 @@ class ctlInputMethod: IMKInputController {
if #available(macOS 10.15, *) {
if Self.theShiftKeyDetector.check(event), !PrefMgr.shared.disableShiftTogglingAlphanumericalMode {
if !shouldUseShiftToggleHandle || (!rencentKeyHandledByKeyHandlerEtc && shouldUseShiftToggleHandle) {
let status = NSLocalizedString("NotificationSwitchShift", comment: "")
Notifier.notify(
message: isASCIIMode.toggled()
? NSLocalizedString("Alphanumerical Input Mode", comment: "")
: NSLocalizedString("Chinese Input Mode", comment: "")
? NSLocalizedString("Alphanumerical Input Mode", comment: "") + "\n" + status
: NSLocalizedString("Chinese Input Mode", comment: "") + "\n" + status
)
}
if shouldUseShiftToggleHandle {

View File

@ -38,6 +38,7 @@
"Force KangXi Writing" = "Force KangXi Writing";
"NotificationSwitchON" = "✔ ON";
"NotificationSwitchOFF" = "✘ OFF";
"NotificationSwitchShift" = "↺ Switched";
"Edit User Phrases…" = "Edit User Phrases…";
"Reload User Phrases" = "Reload User Phrases";
"Unable to create the user phrase file." = "Unable to create the user phrase file.";

View File

@ -38,6 +38,7 @@
"Force KangXi Writing" = "Force KangXi Writing";
"NotificationSwitchON" = "✔ ON";
"NotificationSwitchOFF" = "✘ OFF";
"NotificationSwitchShift" = "↺ Switched";
"Edit User Phrases…" = "Edit User Phrases…";
"Reload User Phrases" = "Reload User Phrases";
"Unable to create the user phrase file." = "Unable to create the user phrase file.";

View File

@ -38,6 +38,7 @@
"Force KangXi Writing" = "康熙文字変換モード";
"NotificationSwitchON" = "✔ 機能起動";
"NotificationSwitchOFF" = "✘ 機能停止";
"NotificationSwitchShift" = "↺ 切替完了";
"Edit User Phrases…" = "ユーザー辞書を編集…";
"Reload User Phrases" = "ユーザー辞書を再び読込む";
"Unable to create the user phrase file." = "ユーザー辞書ファイルの作成は失敗しました。";

View File

@ -38,6 +38,7 @@
"Force KangXi Writing" = "康熙正体字模式";
"NotificationSwitchON" = "✔ 已启用";
"NotificationSwitchOFF" = "✘ 已停用";
"NotificationSwitchShift" = "↺ 切换完毕";
"Edit User Phrases…" = "编辑自订语汇…";
"Reload User Phrases" = "重载自订语汇";
"Unable to create the user phrase file." = "无法创建自订语汇档案。";

View File

@ -38,6 +38,7 @@
"Force KangXi Writing" = "康熙正體字模式";
"NotificationSwitchON" = "✔ 已啟用";
"NotificationSwitchOFF" = "✘ 已停用";
"NotificationSwitchShift" = "↺ 切換完畢";
"Edit User Phrases…" = "編輯自訂語彙…";
"Reload User Phrases" = "重載自訂語彙";
"Unable to create the user phrase file." = "無法創建自訂語彙檔案。";