-
-
+ {
closeCurrentModal();
console.log('onConfirm', e.detail);
onConfirm(e.detail.cloudFolder);
}}
/>
-
+
diff --git a/packages/web/src/modals/ColumnMapModal.svelte b/packages/web/src/modals/ColumnMapModal.svelte
index 996353322..275048ea1 100644
--- a/packages/web/src/modals/ColumnMapModal.svelte
+++ b/packages/web/src/modals/ColumnMapModal.svelte
@@ -11,8 +11,9 @@
import ModalBase from './ModalBase.svelte';
import { closeCurrentModal } from './modalTools';
import _ from 'lodash';
+ import { _t } from '../translations';
- export let header = 'Configure columns';
+ export let header = _t('columnMapModal.configureColumns', { defaultMessage: 'Configure columns' });
export let onConfirm;
export let sourceTableInfo;
@@ -69,7 +70,7 @@
if (!value) return;
if (value.length == 0) return;
if (value.some(x => !x.src || !x.dst)) {
- validationError = 'Source and target columns must be defined';
+ validationError = _t('columnMapModal.sourceAndTargetColumnsMustBeDefined', { defaultMessage: 'Source and target columns must be defined' });
return;
}
const duplicates = _.chain(value.map(x => x.dst))
@@ -78,7 +79,7 @@
.keys()
.value();
if (duplicates.length > 0) {
- validationError = 'Target columns must be unique, duplicates found: ' + duplicates.join(', ');
+ validationError = _t('columnMapModal.targetColumnsMustBeUnique', { defaultMessage: 'Target columns must be unique, duplicates found: ' }) + duplicates.join(', ');
return;
}
}
@@ -95,19 +96,19 @@
{#if resetValue.length == 0}
- When no columns are defined in this mapping, source row is copied to target without any modifications
+ {_t('columnMapModal.noColumnsDefined', { defaultMessage: 'When no columns are defined in this mapping, source row is copied to target without any modifications' })}
{/if}
{
value = [...(value || []), {}];
}}
/>
{
value = resetValue;
diff --git a/packages/web/src/modals/ConfirmModal.svelte b/packages/web/src/modals/ConfirmModal.svelte
index dc5046ffc..e17933a1c 100644
--- a/packages/web/src/modals/ConfirmModal.svelte
+++ b/packages/web/src/modals/ConfirmModal.svelte
@@ -5,17 +5,18 @@
import FormSubmit from '../forms/FormSubmit.svelte';
import ModalBase from './ModalBase.svelte';
import { closeCurrentModal } from './modalTools';
+ import { _t } from '../translations';
export let message;
export let onConfirm;
- export let confirmLabel = 'OK';
+ export let confirmLabel = _t('common.ok', { defaultMessage: 'OK' });
export let header = null;
- {header || 'Confirm'}
+ {header || _t('common.confirm', { defaultMessage: 'Confirm' })}
{message}
@@ -31,7 +32,7 @@
/>
diff --git a/packages/web/src/modals/ConfirmNoSqlModal.svelte b/packages/web/src/modals/ConfirmNoSqlModal.svelte
index fdabe8f6a..5275eaac9 100644
--- a/packages/web/src/modals/ConfirmNoSqlModal.svelte
+++ b/packages/web/src/modals/ConfirmNoSqlModal.svelte
@@ -9,6 +9,7 @@
import ModalBase from './ModalBase.svelte';
import { closeCurrentModal } from './modalTools';
+ import { _t } from '../translations';
export let script;
export let onConfirm;
@@ -19,7 +20,7 @@
-
- This operation is not directly supported by SQL engine. DbGate can emulate it, but
- please check the generated SQL script.
+ {_t('sqlModal.recreateWarning', { defaultMessage: "This operation is not directly supported by SQL engine. DbGate can emulate it, but please check the generated SQL script." })}
@@ -149,7 +149,7 @@
{#if skipConfirmSettingKey}
{
@@ -162,7 +162,7 @@
{
closeCurrentModal();
@@ -172,13 +172,13 @@
/>
{
newQuery({
initialData: currentScript,
diff --git a/packages/web/src/modals/DatabaseLoginModal.svelte b/packages/web/src/modals/DatabaseLoginModal.svelte
index 2eb788f1d..a921fb99c 100644
--- a/packages/web/src/modals/DatabaseLoginModal.svelte
+++ b/packages/web/src/modals/DatabaseLoginModal.svelte
@@ -28,6 +28,7 @@
import { callServerPing } from '../utility/connectionsPinger';
import { getConnectionLabel } from 'dbgate-tools';
import { openedConnections } from '../stores';
+ import { _t } from '../translations';
export let conid;
export let passwordMode;
@@ -125,11 +126,11 @@
- Database Log In ({engineTitle})
+ {_t('databaseLoginModal.header', { defaultMessage: 'Database Log In ({engineTitle})', values: {engineTitle} })}
-
+
- Testing connection
+ {_t('databaseLoginModal.testingConnection', { defaultMessage: 'Testing connection' })}