🌐(frontend) localize SR modifier labels
Replace hardcoded 'Alt' and 'Shift' in the SR shortcut
This commit is contained in:
@@ -19,6 +19,7 @@ and this project adheres to
|
||||
- 💄(frontend) add focus ring to reaction emoji buttons
|
||||
- ✨(frontend) introduce a shortcut settings tab #975
|
||||
- 🚚(frontend) rename "wellknown" directory to "well-known" #1009
|
||||
- 🌐(frontend) localize SR modifier labels #1010
|
||||
|
||||
## [1.8.0] - 2026-02-20
|
||||
|
||||
|
||||
@@ -20,11 +20,15 @@ export const formatShortcutLabelForSR = (
|
||||
{
|
||||
controlLabel,
|
||||
commandLabel,
|
||||
altLabel,
|
||||
shiftLabel,
|
||||
plusLabel,
|
||||
noShortcutLabel,
|
||||
}: {
|
||||
controlLabel: string
|
||||
commandLabel: string
|
||||
altLabel: string
|
||||
shiftLabel: string
|
||||
plusLabel: string
|
||||
noShortcutLabel: string
|
||||
}
|
||||
@@ -35,8 +39,8 @@ export const formatShortcutLabelForSR = (
|
||||
const ctrlWord = isMacintosh() ? commandLabel : controlLabel
|
||||
const parts: string[] = []
|
||||
if (shortcut.ctrlKey) parts.push(ctrlWord)
|
||||
if (shortcut.altKey) parts.push('Alt')
|
||||
if (shortcut.shiftKey) parts.push('Shift')
|
||||
if (shortcut.altKey) parts.push(altLabel)
|
||||
if (shortcut.shiftKey) parts.push(shiftLabel)
|
||||
parts.push(key)
|
||||
return parts.join(` ${plusLabel} `)
|
||||
}
|
||||
|
||||
@@ -37,6 +37,8 @@ export const useShortcutFormatting = () => {
|
||||
return formatShortcutLabelForSR(shortcut, {
|
||||
controlLabel: t('shortcutsPanel.sr.control'),
|
||||
commandLabel: t('shortcutsPanel.sr.command'),
|
||||
altLabel: t('shortcutsPanel.sr.alt'),
|
||||
shiftLabel: t('shortcutsPanel.sr.shift'),
|
||||
plusLabel: t('shortcutsPanel.sr.plus'),
|
||||
noShortcutLabel: t('shortcutsPanel.sr.noShortcut'),
|
||||
})
|
||||
|
||||
@@ -619,6 +619,8 @@
|
||||
"sr": {
|
||||
"control": "Steuerung",
|
||||
"command": "Befehl",
|
||||
"alt": "Alt",
|
||||
"shift": "Umschalt",
|
||||
"plus": "plus",
|
||||
"hold": "Halte {{key}} gedrückt",
|
||||
"noShortcut": "Kein Tastenkürzel"
|
||||
|
||||
@@ -619,6 +619,8 @@
|
||||
"sr": {
|
||||
"control": "Control",
|
||||
"command": "Command",
|
||||
"alt": "Alt",
|
||||
"shift": "Shift",
|
||||
"plus": "plus",
|
||||
"hold": "Hold {{key}}",
|
||||
"noShortcut": "No shortcut"
|
||||
|
||||
@@ -619,6 +619,8 @@
|
||||
"sr": {
|
||||
"control": "Contrôle",
|
||||
"command": "Commande",
|
||||
"alt": "Alt",
|
||||
"shift": "Majuscule",
|
||||
"plus": "plus",
|
||||
"hold": "Maintenir {{key}}",
|
||||
"noShortcut": "Aucun raccourci"
|
||||
|
||||
@@ -619,6 +619,8 @@
|
||||
"sr": {
|
||||
"control": "Control",
|
||||
"command": "Command",
|
||||
"alt": "Alt",
|
||||
"shift": "Shift",
|
||||
"plus": "plus",
|
||||
"hold": "Houd {{key}} ingedrukt",
|
||||
"noShortcut": "Geen sneltoets"
|
||||
|
||||
Reference in New Issue
Block a user