SessionCtl // Fix a format mistake in Caps Lock notification text.

This commit is contained in:
ShikiSuen 2023-03-08 22:54:00 +08:00
parent f9bc0a3642
commit 44dc2ee267
1 changed files with 6 additions and 7 deletions

View File

@ -48,13 +48,12 @@ public extension SessionCtl {
DispatchQueue.main.async {
let isCapsLockTurnedOn = event.modifierFlags.intersection(.deviceIndependentFlagsMask).contains(.capsLock)
let status = NSLocalizedString("NotificationSwitchASCII", comment: "")
if PrefMgr.shared.showNotificationsWhenTogglingCapsLock {
guard PrefMgr.shared.showNotificationsWhenTogglingCapsLock else { return }
Notifier.notify(
message: isCapsLockTurnedOn
? "Caps Lock" + NSLocalizedString("Alphanumerical Input Mode", comment: "") + "\n" + status
: NSLocalizedString("Chinese Input Mode", comment: "") + "\n" + status
? "Caps Lock " + "Alphanumerical Input Mode".localized + "\n" + status
: "Chinese Input Mode".localized + "\n" + status
)
}
self.isASCIIMode = isCapsLockTurnedOn
}
}