Skip to content

armgit / meet

Public Imported from GitHub
0

Open source video conferencing app powered by LiveKit. Built with Django and React.

🌐(frontend) localize SR modifier labels

Cyrilfcf08a6dbd01
diff --git a/src/frontend/src/features/shortcuts/formatLabels.ts b/src/frontend/src/features/shortcuts/formatLabels.ts
index 18a0ceea..98123e32 100644
--- a/src/frontend/src/features/shortcuts/formatLabels.ts
+++ b/src/frontend/src/features/shortcuts/formatLabels.ts
@@ -21,6 +21,7 @@ export const formatShortcutLabelForSR = (
controlLabel,
commandLabel,
altLabel,
+ optionLabel,
shiftLabel,
plusLabel,
noShortcutLabel,
@@ -28,6 +29,7 @@ export const formatShortcutLabelForSR = (
controlLabel: string
commandLabel: string
altLabel: string
+ optionLabel: string
shiftLabel: string
plusLabel: string
noShortcutLabel: string
@@ -37,9 +39,10 @@ export const formatShortcutLabelForSR = (
const key = shortcut.key?.toUpperCase()
if (!key) return noShortcutLabel
const ctrlWord = isMacintosh() ? commandLabel : controlLabel
+ const altWord = isMacintosh() ? optionLabel : altLabel
const parts: string[] = []
if (shortcut.ctrlKey) parts.push(ctrlWord)
- if (shortcut.altKey) parts.push(altLabel)
+ if (shortcut.altKey) parts.push(altWord)
if (shortcut.shiftKey) parts.push(shiftLabel)
parts.push(key)
return parts.join(` ${plusLabel} `)
diff --git a/src/frontend/src/features/shortcuts/hooks/useShortcutFormatting.ts b/src/frontend/src/features/shortcuts/hooks/useShortcutFormatting.ts
index ba685ce3..1c747da0 100644
--- a/src/frontend/src/features/shortcuts/hooks/useShortcutFormatting.ts
+++ b/src/frontend/src/features/shortcuts/hooks/useShortcutFormatting.ts
@@ -38,6 +38,7 @@ export const useShortcutFormatting = () => {
controlLabel: t('shortcutsPanel.sr.control'),
commandLabel: t('shortcutsPanel.sr.command'),
altLabel: t('shortcutsPanel.sr.alt'),
+ optionLabel: t('shortcutsPanel.sr.option'),
shiftLabel: t('shortcutsPanel.sr.shift'),
plusLabel: t('shortcutsPanel.sr.plus'),
noShortcutLabel: t('shortcutsPanel.sr.noShortcut'),
diff --git a/src/frontend/src/locales/de/rooms.json b/src/frontend/src/locales/de/rooms.json
index 095a9c80..76bdf8de 100644
--- a/src/frontend/src/locales/de/rooms.json
+++ b/src/frontend/src/locales/de/rooms.json
@@ -620,6 +620,7 @@
"control": "Steuerung",
"command": "Befehl",
"alt": "Alt",
+ "option": "Option",
"shift": "Umschalt",
"plus": "plus",
"hold": "Halte {{key}} gedrückt",
diff --git a/src/frontend/src/locales/en/rooms.json b/src/frontend/src/locales/en/rooms.json
index 4c8e1991..e32fc113 100644
--- a/src/frontend/src/locales/en/rooms.json
+++ b/src/frontend/src/locales/en/rooms.json
@@ -620,6 +620,7 @@
"control": "Control",
"command": "Command",
"alt": "Alt",
+ "option": "Option",
"shift": "Shift",
"plus": "plus",
"hold": "Hold {{key}}",
diff --git a/src/frontend/src/locales/fr/rooms.json b/src/frontend/src/locales/fr/rooms.json
index 78f48e9b..6aaddddd 100644
--- a/src/frontend/src/locales/fr/rooms.json
+++ b/src/frontend/src/locales/fr/rooms.json
@@ -620,6 +620,7 @@
"control": "Contrôle",
"command": "Commande",
"alt": "Alt",
+ "option": "Option",
"shift": "Majuscule",
"plus": "plus",
"hold": "Maintenir {{key}}",
diff --git a/src/frontend/src/locales/nl/rooms.json b/src/frontend/src/locales/nl/rooms.json
index 529e516f..f7e778b7 100644
--- a/src/frontend/src/locales/nl/rooms.json
+++ b/src/frontend/src/locales/nl/rooms.json
@@ -620,6 +620,7 @@
"control": "Control",
"command": "Command",
"alt": "Alt",
+ "option": "Option",
"shift": "Shift",
"plus": "plus",
"hold": "Houd {{key}} ingedrukt",