translated electron menu

This commit is contained in:
SPRINX0\prochazka
2025-11-18 12:29:48 +01:00
parent d80c368ccb
commit f047ec787a
13 changed files with 70 additions and 42 deletions

View File

@@ -1,6 +1,6 @@
<script context="module">
function getCommandTitle(command) {
let res = _val(command.text);
let res = _tval(command.text);
if (command.keyText || command.keyTextFromGroup) {
res += ` (${formatKeyText(command.keyText || command.keyTextFromGroup)})`;
}
@@ -13,7 +13,7 @@
import { formatKeyText } from '../utility/common';
import ToolStripButton from './ToolStripButton.svelte';
import _ from 'lodash';
import { _val } from '../translations';
import { _tval } from '../translations';
export let command;
export let component = ToolStripButton;
@@ -34,6 +34,6 @@
{iconAfter}
{...$$restProps}
>
{(_val(buttonLabel) || _val(cmd?.toolbarName) || _val(cmd?.name))}
{(_tval(buttonLabel) || _tval(cmd?.toolbarName) || _tval(cmd?.name))}
</svelte:component>
{/if}