Refactor to use _val for translation handling across components

This commit is contained in:
Stela Augustinova
2025-11-07 14:40:52 +01:00
parent bda5c4f5dd
commit e694aca70b
7 changed files with 21 additions and 17 deletions

View File

@@ -24,6 +24,7 @@
import ToolStripCommandButton from './ToolStripCommandButton.svelte';
import ToolStripDropDownButton from './ToolStripDropDownButton.svelte';
import _ from 'lodash';
import { _val } from '../translations';
export let quickExportHandlerRef = null;
export let command = 'sqlDataGrid.export';
export let label = 'Export';
@@ -39,7 +40,7 @@
{#if hasPermission('dbops/export')}
{#if quickExportHandlerRef}
<ToolStripDropDownButton menu={getExportMenu} label={_.isFunction(label) ? label() : label} icon="icon export" />
<ToolStripDropDownButton menu={getExportMenu} label={_val(label)} icon="icon export" />
{:else}
<ToolStripCommandButton {command} />
{/if}