Fix translation for keyboard shortcut displaynames (#7758)

This commit is contained in:
Charlie Calendre 2022-02-10 10:11:35 +01:00 committed by GitHub
parent 2f7b26214d
commit 8103e606c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -35,7 +35,8 @@ const getKeyboardShortcutValue = (name: string) => {
};
const getKeyboardShortcutDisplayName = (name: string): string => {
return getKeyboardShortcuts()[name]?.displayName as string;
const keyboardShortcutDisplayName = getKeyboardShortcuts()[name]?.displayName as string;
return keyboardShortcutDisplayName && _t(keyboardShortcutDisplayName);
};
interface IKeyboardKeyProps {