mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-24 22:16:00 +00:00
translated electron menu
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
import Link from '../elements/Link.svelte';
|
||||
import { focusedConnectionOrDatabase } from '../stores';
|
||||
import { tick } from 'svelte';
|
||||
import { _val } from '../translations';
|
||||
import { _tval } from '../translations';
|
||||
|
||||
export let list;
|
||||
export let module;
|
||||
@@ -41,12 +41,12 @@
|
||||
|
||||
$: listTranslated = (list || []).map(data => ({
|
||||
...data,
|
||||
group: data?.group && _val(data.group),
|
||||
title: data?.title && _val(data.title),
|
||||
description: data?.description && _val(data.description),
|
||||
group: data?.group && _tval(data.group),
|
||||
title: data?.title && _tval(data.title),
|
||||
description: data?.description && _tval(data.description),
|
||||
args: (data?.args || []).map(x => ({
|
||||
...x,
|
||||
label: x?.label && _val(x.label),
|
||||
label: x?.label && _tval(x.label),
|
||||
})),
|
||||
}));
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" context="module">
|
||||
import { copyTextToClipboard } from '../utility/clipboard';
|
||||
import { _t, _val } from '../translations';
|
||||
import { _t, _tval, DefferedTranslationResult } from '../translations';
|
||||
|
||||
export const extractKey = ({ schemaName, pureName }) => (schemaName ? `${schemaName}.${pureName}` : pureName);
|
||||
export const createMatcher =
|
||||
@@ -76,7 +76,7 @@
|
||||
}
|
||||
|
||||
interface DbObjMenuItem {
|
||||
label?: string | (() => string);
|
||||
label?: string | DefferedTranslationResult;
|
||||
tab?: string;
|
||||
forceNewTab?: boolean;
|
||||
initialData?: any;
|
||||
@@ -722,7 +722,7 @@
|
||||
if (!item) return item;
|
||||
|
||||
return {...item,
|
||||
label: _val(item.label)
|
||||
label: _tval(item.label)
|
||||
};
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user