Added translation tags for settings, tabs, modals

This commit is contained in:
Stela Augustinova
2025-11-30 19:38:01 +01:00
parent d3322a4a15
commit e14f59256d
26 changed files with 147 additions and 133 deletions

View File

@@ -6,6 +6,7 @@
import FormTextField from '../forms/FormTextField.svelte';
import ModalBase from './ModalBase.svelte';
import { closeCurrentModal } from './modalTools';
import { _t } from '../translations';
export let value;
export let onConfirm;
@@ -18,24 +19,24 @@
<FormProvider initialValues={{ value }}>
<ModalBase {...$$restProps}>
<svelte:fragment slot="header">Rows limit</svelte:fragment>
<svelte:fragment slot="header">{_t('query.rowsLimit', { defaultMessage: 'Rows limit' })}</svelte:fragment>
<FormTextField
label="Return only N rows from query"
label={_t('query.returnOnlyNRows', { defaultMessage: 'Return only N rows from query' })}
name="value"
focused
data-testid="RowsLimitModal_value"
placeholder="(No rows limit)"
placeholder={_t('query.noRowsLimit', { defaultMessage: '(No rows limit)' })}
/>
<svelte:fragment slot="footer">
<FormSubmit
value="OK"
value={_t('common.ok', { defaultMessage: 'OK' })}
on:click={e => handleSubmit(parseInt(e.detail.value) || null)}
data-testid="RowsLimitModal_setLimit"
/>
<FormStyledButton value="Set no limit" on:click={e => handleSubmit(null)} data-testid="RowsLimitModal_setNoLimit" />
<FormStyledButton type="button" value="Cancel" on:click={closeCurrentModal} data-testid="RowsLimitModal_cancel" />
<FormStyledButton value={_t('common.setNoLimit', { defaultMessage: 'Set no limit' })} on:click={e => handleSubmit(null)} data-testid="RowsLimitModal_setNoLimit" />
<FormStyledButton type="button" value={_t('common.cancel', { defaultMessage: 'Cancel' })} on:click={closeCurrentModal} data-testid="RowsLimitModal_cancel" />
</svelte:fragment>
</ModalBase>
</FormProvider>