From bd8fa3776dcdfa55a6b8a213f7611dfb4e8e0dce Mon Sep 17 00:00:00 2001 From: "SPRINX0\\prochazka" Date: Tue, 18 Nov 2025 15:22:39 +0100 Subject: [PATCH] es translation + fixed language change --- .../web/src/settings/SettingsModal.svelte | 308 ++++++++++++++---- 1 file changed, 245 insertions(+), 63 deletions(-) diff --git a/packages/web/src/settings/SettingsModal.svelte b/packages/web/src/settings/SettingsModal.svelte index 1b8ba7ab1..73cd894c6 100644 --- a/packages/web/src/settings/SettingsModal.svelte +++ b/packages/web/src/settings/SettingsModal.svelte @@ -110,14 +110,43 @@ ORDER BY maxHeight100 flex1 tabs={[ - hasPermission('settings/change') && { identifier: 'general', label: _t('settings.general', { defaultMessage: 'General' }), slot: 1 }, - isProApp() && electron && { identifier: 'license', label: _t('settings.license', { defaultMessage: 'License' }), slot: 7 }, - hasPermission('settings/change') && { identifier: 'connection', label: _t('settings.connection', { defaultMessage: 'Connection' }), slot: 2 }, + hasPermission('settings/change') && { + identifier: 'general', + label: _t('settings.general', { defaultMessage: 'General' }), + slot: 1, + }, + isProApp() && + electron && { + identifier: 'license', + label: _t('settings.license', { defaultMessage: 'License' }), + slot: 7, + }, + hasPermission('settings/change') && { + identifier: 'connection', + label: _t('settings.connection', { defaultMessage: 'Connection' }), + slot: 2, + }, { identifier: 'theme', label: _t('settings.theme', { defaultMessage: 'Themes' }), slot: 3 }, - hasPermission('settings/change') && { identifier: 'default-actions', label: _t('settings.defaultActions', { defaultMessage: 'Default Actions' }), slot: 4 }, - hasPermission('settings/change') && { identifier: 'behaviour', label: _t('settings.behaviour', { defaultMessage: 'Behaviour' }), slot: 5 }, - hasPermission('settings/change') && { identifier: 'external-tools', label: _t('settings.externalTools', { defaultMessage: 'External tools' }), slot: 8 }, - hasPermission('settings/change') && { identifier: 'other', label: _t('settings.other', { defaultMessage: 'Other' }), slot: 6 }, + hasPermission('settings/change') && { + identifier: 'default-actions', + label: _t('settings.defaultActions', { defaultMessage: 'Default Actions' }), + slot: 4, + }, + hasPermission('settings/change') && { + identifier: 'behaviour', + label: _t('settings.behaviour', { defaultMessage: 'Behaviour' }), + slot: 5, + }, + hasPermission('settings/change') && { + identifier: 'external-tools', + label: _t('settings.externalTools', { defaultMessage: 'External tools' }), + slot: 8, + }, + hasPermission('settings/change') && { + identifier: 'other', + label: _t('settings.other', { defaultMessage: 'Other' }), + slot: 6, + }, isProApp() && hasPermission('settings/change') && { identifier: 'ai', label: 'AI', slot: 9 }, ]} > @@ -126,21 +155,28 @@ ORDER BY
{_t('settings.appearance', { defaultMessage: 'Appearance' })}
{ restartWarning = true; }} /> {#if restartWarning}
- {_t('settings.nativeMenuRestartWarning', { defaultMessage: 'Native menu settings will be applied after app restart' })} + + {_t('settings.nativeMenuRestartWarning', { + defaultMessage: 'Native menu settings will be applied after app restart', + })}
{/if} {/if}
{_t('settings.localization', { defaultMessage: 'Localization' })}
@@ -155,14 +191,15 @@ ORDER BY { value: 'sk', label: 'Slovenčina' }, { value: 'de', label: 'Deutsch' }, { value: 'fr', label: 'Français' }, - { value: 'es', label: 'Español' }, ]} on:change={() => { showModal(ConfirmModal, { - message: _t('settings.localization.reloadWarning', { defaultMessage: 'Application will be reloaded to apply new language settings' }), + message: _t('settings.localization.reloadWarning', { + defaultMessage: 'Application will be reloaded to apply new language settings', + }), onConfirm: () => { setTimeout(() => { - internalRedirectTo('/'); + internalRedirectTo(electron ? '/index.html' : '/'); }, 100); }, }); @@ -172,25 +209,44 @@ ORDER BY
{_t('settings.dataGrid.title', { defaultMessage: 'Data grid' })}
- + - + - + @@ -200,16 +256,31 @@ ORDER BY isNative defaultValue="36" options={[ - { value: '36', label: _t('settings.dataGrid.coloringMode.36', { defaultMessage: 'Every 3rd and 6th row' }) }, - { value: '2-primary', label: _t('settings.dataGrid.coloringMode.2-primary', { defaultMessage: 'Every 2-nd row, primary color' }) }, - { value: '2-secondary', label: _t('settings.dataGrid.coloringMode.2-secondary', { defaultMessage: 'Every 2-nd row, secondary color' }) }, + { + value: '36', + label: _t('settings.dataGrid.coloringMode.36', { defaultMessage: 'Every 3rd and 6th row' }), + }, + { + value: '2-primary', + label: _t('settings.dataGrid.coloringMode.2-primary', { + defaultMessage: 'Every 2-nd row, primary color', + }), + }, + { + value: '2-secondary', + label: _t('settings.dataGrid.coloringMode.2-secondary', { + defaultMessage: 'Every 2-nd row, secondary color', + }), + }, { value: 'none', label: _t('settings.dataGrid.coloringMode.none', { defaultMessage: 'None' }) }, ]} /> @@ -229,7 +300,10 @@ ORDER BY />
- +
- + ($currentEditorWrapEnabled = e.target.checked)} @@ -257,7 +334,9 @@ ORDER BY @@ -269,7 +348,9 @@ ORDER BY @@ -277,7 +358,9 @@ ORDER BY
{_t('settings.connection', { defaultMessage: 'Connection' })}
{ @@ -290,12 +373,16 @@ ORDER BY @@ -314,12 +401,16 @@ ORDER BY
{_t('settings.session', { defaultMessage: 'Query sessions' })}
@@ -360,16 +451,23 @@ ORDER BY
- {_t('settings.appearance.moreThemes', { defaultMessage: 'More themes are available as' })} plugins + {_t('settings.appearance.moreThemes', { defaultMessage: 'More themes are available as' })} + plugins
- {_t('settings.appearance.afterInstalling', { defaultMessage: 'After installing theme plugin (try search "theme" in available extensions) new themes will be available here.' })} + {_t('settings.appearance.afterInstalling', { + defaultMessage: + 'After installing theme plugin (try search "theme" in available extensions) new themes will be available here.', + })}
{_t('settings.appearance.editorTheme', { defaultMessage: 'Editor theme' })}
- +
- +
- + ($currentEditorFontSize = e.target['value'])} @@ -404,7 +508,10 @@ ORDER BY
- +
@@ -421,9 +528,20 @@ ORDER BY isNative defaultValue="connect" options={[ - { value: 'openDetails', label: _t('settings.defaultActions.connectionClick.openDetails', { defaultMessage: 'Edit / open details' }) }, - { value: 'connect', label: _t('settings.defaultActions.connectionClick.connect', { defaultMessage: 'Connect' }) }, - { value: 'none', label: _t('settings.defaultActions.connectionClick.none', { defaultMessage: 'Do nothing' }) }, + { + value: 'openDetails', + label: _t('settings.defaultActions.connectionClick.openDetails', { + defaultMessage: 'Edit / open details', + }), + }, + { + value: 'connect', + label: _t('settings.defaultActions.connectionClick.connect', { defaultMessage: 'Connect' }), + }, + { + value: 'none', + label: _t('settings.defaultActions.connectionClick.none', { defaultMessage: 'Do nothing' }), + }, ]} /> @@ -433,12 +551,22 @@ ORDER BY isNative defaultValue="switch" options={[ - { value: 'switch', label: _t('settings.defaultActions.databaseClick.switch', { defaultMessage: 'Switch database' }) }, - { value: 'none', label: _t('settings.defaultActions.databaseClick.none', { defaultMessage: 'Do nothing' }) }, + { + value: 'switch', + label: _t('settings.defaultActions.databaseClick.switch', { defaultMessage: 'Switch database' }), + }, + { + value: 'none', + label: _t('settings.defaultActions.databaseClick.none', { defaultMessage: 'Do nothing' }), + }, ]} /> - +
{_t('settings.behaviour', { defaultMessage: 'Behaviour' })}
- +
- {_t('settings.behaviour.singleClickPreview', { defaultMessage: 'When you single-click or select a file in the "Tables, Views, Functions" view, it is shown in a preview mode and reuses an existing tab (preview tab). This is useful if you are quickly browsing tables and don\'t want every visited table to have its own tab. When you start editing the table or use double-click to open the table from the "Tables" view, a new tab is dedicated to that table.' })} + + {_t('settings.behaviour.singleClickPreview', { + defaultMessage: + 'When you single-click or select a file in the "Tables, Views, Functions" view, it is shown in a preview mode and reuses an existing tab (preview tab). This is useful if you are quickly browsing tables and don\'t want every visited table to have its own tab. When you start editing the table or use double-click to open the table from the "Tables" view, a new tab is dedicated to that table.', + })}
{_t('settings.confirmations', { defaultMessage: 'Confirmations' })}
- +
{_t('settings.other', { defaultMessage: 'Other' })}
- + {#if isProApp()} {/if} @@ -541,28 +705,39 @@ ORDER BY
{#if licenseKeyCheckResult.status == 'ok'}
- { _t('settings.other.licenseKey.valid', { defaultMessage: 'License key is valid' }) } + + {_t('settings.other.licenseKey.valid', { defaultMessage: 'License key is valid' })}
{#if licenseKeyCheckResult.validTo}
- { _t('settings.other.licenseKey.validTo', { defaultMessage: 'License valid to:' }) } {licenseKeyCheckResult.validTo} + {_t('settings.other.licenseKey.validTo', { defaultMessage: 'License valid to:' })} + {licenseKeyCheckResult.validTo}
{/if} {#if licenseKeyCheckResult.expiration} -
{ _t('settings.other.licenseKey.expiration', { defaultMessage: 'License key expiration:' }) } {safeFormatDate(licenseKeyCheckResult.expiration)}
+
+ {_t('settings.other.licenseKey.expiration', { defaultMessage: 'License key expiration:' })} + {safeFormatDate(licenseKeyCheckResult.expiration)} +
{/if} {:else if licenseKeyCheckResult.status == 'error'}
- {licenseKeyCheckResult.errorMessage ?? _t('settings.other.licenseKey.invalid', { defaultMessage: 'License key is invalid' })} + {licenseKeyCheckResult.errorMessage ?? + _t('settings.other.licenseKey.invalid', { defaultMessage: 'License key is invalid' })} {#if licenseKeyCheckResult.expiration} -
{ _t('settings.other.licenseKey.expiration', { defaultMessage: 'License key expiration:' }) } {safeFormatDate(licenseKeyCheckResult.expiration)}
+
+ {_t('settings.other.licenseKey.expiration', { defaultMessage: 'License key expiration:' })} + {safeFormatDate(licenseKeyCheckResult.expiration)} +
{/if}
{#if licenseKeyCheckResult.isExpired}
{ licenseKeyCheckResult = await apiCall('config/get-new-license', { oldLicenseKey: licenseKey }); @@ -582,7 +757,9 @@ ORDER BY
{_t('settings.externalTools', { defaultMessage: 'External tools' })}