mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 07:06:00 +00:00
feat: basic translations to ui
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
import { useConfig } from '../utility/metadataLoaders';
|
||||
import ConnectionAdvancedDriverFields from '../settings/ConnectionAdvancedDriverFields.svelte';
|
||||
import DatabaseLoginModal from '../modals/DatabaseLoginModal.svelte';
|
||||
import { _t } from '../translations';
|
||||
|
||||
export let connection;
|
||||
export let tabid;
|
||||
@@ -289,7 +290,11 @@
|
||||
{:else}
|
||||
<FormButton value="Test" on:click={() => handleTest(false)} data-testid="ConnectionTab_buttonTest" />
|
||||
{/if}
|
||||
<FormButton value="Save" on:click={handleSave} data-testid="ConnectionTab_buttonSave" />
|
||||
<FormButton
|
||||
value={_t('common.save', { defaultMessage: 'Save' })}
|
||||
on:click={handleSave}
|
||||
data-testid="ConnectionTab_buttonSave"
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="test-result">
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
import { changeTab } from '../utility/common';
|
||||
import SelectField from '../forms/SelectField.svelte';
|
||||
import DbKeyValueDetail from '../dbkeyvalue/DbKeyValueDetail.svelte';
|
||||
import { _t } from '../translations';
|
||||
|
||||
export let tabid;
|
||||
export let conid;
|
||||
@@ -134,12 +135,16 @@
|
||||
</div>
|
||||
<FormStyledButton value={`TTL:${keyInfo.ttl}`} on:click={() => handleChangeTtl(keyInfo)} />
|
||||
{#if keyInfo.type == 'string'}
|
||||
<FormStyledButton value="Save" on:click={saveString} disabled={!editedValue} />
|
||||
<FormStyledButton
|
||||
value={_t('common.save', { defaultMessage: 'Save' })}
|
||||
on:click={saveString}
|
||||
disabled={!editedValue}
|
||||
/>
|
||||
{/if}
|
||||
{#if keyInfo.keyType?.addMethod && keyInfo.keyType?.showItemList}
|
||||
<FormStyledButton value="Add item" on:click={() => addItem(keyInfo)} />
|
||||
{/if}
|
||||
<FormStyledButton value="Refresh" on:click={refresh} />
|
||||
<FormStyledButton value={_t('common.refresh', { defaultMessage: 'Refresh' })} on:click={refresh} />
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
registerCommand({
|
||||
id: 'serverSummary.refresh',
|
||||
category: 'Server sumnmary',
|
||||
name: 'Refresh',
|
||||
name: _t('common.refresh', { defaultMessage: 'Refresh' }),
|
||||
keyText: 'F5 | CtrlOrCommand+R',
|
||||
toolbar: true,
|
||||
isRelatedToTab: true,
|
||||
@@ -22,6 +22,7 @@
|
||||
import LoadingInfo from '../elements/LoadingInfo.svelte';
|
||||
|
||||
import ObjectListControl from '../elements/ObjectListControl.svelte';
|
||||
import { _t } from '../translations';
|
||||
import { apiCall } from '../utility/api';
|
||||
import createActivator, { getActiveComponent } from '../utility/createActivator';
|
||||
import formatFileSize from '../utility/formatFileSize';
|
||||
|
||||
Reference in New Issue
Block a user