Skip to content

Commit

Permalink
Prevent creating new shortcut localization if Shaka localization key …
Browse files Browse the repository at this point in the history
…has no matching value
  • Loading branch information
kommunarr committed Oct 14, 2024
1 parent 42c3128 commit ad59178
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,11 @@ export default defineComponent({
const shakaControlKeysToShortcutLocalizations = new Map()
Object.entries(shakaControlKeysToShortcuts).forEach(([shakaControlKey, shortcut]) => {
const originalLocalization = localization.resolve(shakaControlKey)
if (originalLocalization === '') {
// e.g., A Shaka localization key in shakaControlKeysToShortcuts has fallen out of date and need to be updated
return
}

const localizationWithShortcut = i18n.t('KeyboardShortcutTemplate', {
label: originalLocalization,
shortcut: shortcut
Expand Down

0 comments on commit ad59178

Please sign in to comment.