You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-13 00:10:37 +02:00
Desktop: Fixes #5927: Update menu item labels when the language changes
This commit is contained in:
@ -97,8 +97,8 @@ export default class MenuUtils {
|
||||
});
|
||||
}
|
||||
|
||||
public commandsToMenuItems(commandNames: string[], onClick: Function): MenuItems {
|
||||
const key: string = `${this.keymapService.lastSaveTime}_${commandNames.join('_')}`;
|
||||
public commandsToMenuItems(commandNames: string[], onClick: Function, locale: string): MenuItems {
|
||||
const key: string = `${this.keymapService.lastSaveTime}_${commandNames.join('_')}_${locale}`;
|
||||
if (this.menuItemCache_[key]) return this.menuItemCache_[key];
|
||||
|
||||
const output: MenuItems = {};
|
||||
@ -107,7 +107,9 @@ export default class MenuUtils {
|
||||
output[commandName] = this.commandToMenuItem(commandName, onClick);
|
||||
}
|
||||
|
||||
this.menuItemCache_[key] = output;
|
||||
this.menuItemCache_ = {
|
||||
[key]: output,
|
||||
};
|
||||
|
||||
return output;
|
||||
}
|
||||
|
Reference in New Issue
Block a user