There is an issue with the spelling of the word “Umschalt” (Shift) in the shortcuts added by plugins (for example, chat and templates). The word is displayed as “UmschAlt” with a capital “A” in the middle.
1 Like
I noticed that “Umschalt” is also weirdly capitalized when I hover over the toolbar of the composer.
1 Like
The issue happens here:
It can unintentionally modify parts of the translated string that contains “ctrl”, “alt”, etc.
Shift
→ Umschalt
Umschalt
→ UmschAlt
I think using the \b
regex to match word boundaries could solve the issue.
string = string
.toLowerCase()
.replace(/\bshift\b/, i18n("shortcut_modifier_key.shift"))
.replace(/\bctrl\b/, i18n("shortcut_modifier_key.ctrl"))
.replace(/\bmeta\b/, i18n("shortcut_modifier_key.ctrl"))
.replace(/\balt\b/, i18n("shortcut_modifier_key.alt"));
4 Likes