translation- tabs panel, menu

This commit is contained in:
Stela Augustinova
2025-11-18 10:30:47 +01:00
committed by SPRINX0\prochazka
parent 9b60173b8c
commit d80c368ccb
5 changed files with 52 additions and 21 deletions

View File

@@ -1,5 +1,4 @@
<script lang="ts" context="module">
import { _t } from '../translations';
const getCurrentValueMarker: any = {};
@@ -360,7 +359,7 @@
import NewObjectModal from '../modals/NewObjectModal.svelte';
import { isProApp } from '../utility/proTools';
import { openWebLink } from '../utility/simpleTools';
import { __t } from '../translations';
import { __t, _t } from '../translations';
export let multiTabIndex;
export let shownTab;
@@ -437,27 +436,27 @@
return [
tab.tabPreviewMode && {
text: 'Pin tab',
text: _t('tabsPanel.pinTab', { defaultMessage: 'Pin tab' }),
onClick: () => pinTab(tabid),
},
{
text: 'Close',
text: _t('common.close', { defaultMessage: 'Close' }),
onClick: () => closeTab(tabid),
},
{
text: 'Close all',
text: _t('tabsPanel.closeAll', { defaultMessage: 'Close all' }),
onClick: () => closeAll(multiTabIndex),
},
{
text: 'Close others',
text: _t('tabsPanel.closeOthers', { defaultMessage: 'Close others' }),
onClick: () => closeOthersInMultiTab(multiTabIndex)(tabid),
},
{
text: 'Close to the right',
text: _t('tabsPanel.closeToTheRight', { defaultMessage: 'Close to the right' }),
onClick: () => closeRightTabs(multiTabIndex)(tabid),
},
{
text: 'Duplicate',
text: _t('tabsPanel.duplicate', { defaultMessage: 'Duplicate' }),
onClick: () => duplicateTab(tab),
},
tabComponent &&
@@ -466,7 +465,7 @@
tabs[tabComponent].allowAddToFavorites(props) && [
{ divider: true },
{
text: 'Add to favorites',
text: _t('tabsPanel.addToFavorites', { defaultMessage: 'Add to favorites' }),
onClick: () => showModal(FavoriteModal, { savingTab: tab }),
},
],
@@ -476,7 +475,7 @@
tabs[tabComponent].allowSwitchDatabase(props) && [
{ divider: true },
{
text: 'Switch database',
text: _t('tabsPanel.switchDatabase', { defaultMessage: 'Switch database' }),
onClick: () => showModal(SwitchDatabaseModal, { callingTab: tab }),
},
],
@@ -499,11 +498,11 @@
conid &&
database && [
{
text: `Close tabs with DB ${database}`,
text: _t('tabsPanel.closeTabsWithDb', { defaultMessage: 'Close tabs with DB {database}', values: { database } }),
onClick: () => closeWithSameDb(tabid),
},
{
text: `Close tabs with other DB than ${database}`,
text: _t('tabsPanel.closeTabsWithOtherDb', { defaultMessage: `Close tabs with other DB than {database}`, values: { database } }),
onClick: () => closeWithOtherDb(tabid),
},
],

View File

@@ -23,6 +23,7 @@
import NewObjectModal from '../modals/NewObjectModal.svelte';
import openNewTab from '../utility/openNewTab';
import { useConfig, usePromoWidget } from '../utility/metadataLoaders';
import { _t } from '../translations';
let domSettings;
let domCloudAccount;
@@ -120,14 +121,14 @@
{ command: 'theme.changeTheme' },
hasPermission('settings/change') && { command: 'settings.commands' },
hasPermission('widgets/plugins') && {
text: 'Manage plugins',
text: _t('widgets.managePlugins', { defaultMessage: 'Manage plugins' }),
onClick: () => {
$selectedWidget = 'plugins';
$visibleWidgetSideBar = true;
},
},
hasPermission('application-log') && {
text: 'View application logs',
text: _t('widgets.viewApplicationLogs', { defaultMessage: 'View application logs' }),
onClick: () => {
openNewTab({
title: 'Application log',
@@ -153,7 +154,8 @@
const left = rect.right;
const top = rect.top;
const items = mainMenuDefinition({ editMenu: false });
currentDropDownMenu.set({ left, top, items });
const copy = items.map(x => x && ({ ...x, label: x?.label ? _t(x.label.id, x.label.defaultMessage) : null }));
currentDropDownMenu.set({ left, top, items: copy });
}
async function handleOpenCloudLogin() {

View File

@@ -727,7 +727,6 @@
"settings.appearance.editorTheme.default": "(použít výchozí téma)",
"settings.appearance.fontFamily": "Písmo editoru",
"settings.appearance.fontSize": "Velikost fontu",
"settings.appearance.fontSize.custom": "vlastní",
"settings.appearance.moreThemes": "Více témat je k dispozici jako",
"settings.appearance.useSystemTheme": "Použít systémové téma",
"settings.behaviour": "Chování",
@@ -888,10 +887,21 @@
"tableEditor.yes": "ANO",
"tableStructure.alter": "Upravit tabulku",
"tableStructure.create": "Vytvořit tabulku",
"tabsPanel.addToFavorites": "Přidat do oblíbených",
"tabsPanel.closeAll": "Zavřít vše",
"tabsPanel.closeOthers": "Zavřít ostatní",
"tabsPanel.closeTabsWithDb": "Zavřít karty s DB {database}",
"tabsPanel.closeTabsWithOtherDb": "Zavřít karty s jinou DB než {database}",
"tabsPanel.closeToTheRight": "Zavřít napravo",
"tabsPanel.duplicate": "Duplikovat",
"tabsPanel.pinTab": "Připnout kartu",
"tabsPanel.switchDatabase": "Přepnout databázi",
"widget.collectionsContainers": "Kolekce/kontejnery",
"widget.databaseContent": "Obsah databáze",
"widget.databases": "Databáze",
"widget.keys": "Klíče",
"widget.pinned": "Připnuté",
"widget.tablesViewsFunctions": "Tabulky, pohledy, funkce"
"widget.tablesViewsFunctions": "Tabulky, pohledy, funkce",
"widgets.managePlugins": "Spravovat pluginy",
"widgets.viewApplicationLogs": "Zobrazit aplikační logy"
}

View File

@@ -727,7 +727,6 @@
"settings.appearance.editorTheme.default": "(use theme default)",
"settings.appearance.fontFamily": "Editor font family",
"settings.appearance.fontSize": "Font size",
"settings.appearance.fontSize.custom": "custom",
"settings.appearance.moreThemes": "More themes are available as",
"settings.appearance.useSystemTheme": "Use system theme",
"settings.behaviour": "Behaviour",
@@ -888,10 +887,21 @@
"tableEditor.yes": "YES",
"tableStructure.alter": "Alter table",
"tableStructure.create": "Create table",
"tabsPanel.addToFavorites": "Add to favorites",
"tabsPanel.closeAll": "Close all",
"tabsPanel.closeOthers": "Close others",
"tabsPanel.closeTabsWithDb": "Close tabs with DB {database}",
"tabsPanel.closeTabsWithOtherDb": "Close tabs with other DB than {database}",
"tabsPanel.closeToTheRight": "Close to the right",
"tabsPanel.duplicate": "Duplicate",
"tabsPanel.pinTab": "Pin tab",
"tabsPanel.switchDatabase": "Switch database",
"widget.collectionsContainers": "Collections/containers",
"widget.databaseContent": "Database content",
"widget.databases": "Databases",
"widget.keys": "Keys",
"widget.pinned": "Pinned",
"widget.tablesViewsFunctions": "Tables, views, functions"
"widget.tablesViewsFunctions": "Tables, views, functions",
"widgets.managePlugins": "Manage plugins",
"widgets.viewApplicationLogs": "View application logs"
}

View File

@@ -727,7 +727,6 @@
"settings.appearance.editorTheme.default": "(použiť predvolenú tému)",
"settings.appearance.fontFamily": "Písmo editora",
"settings.appearance.fontSize": "Veľkosť písma",
"settings.appearance.fontSize.custom": "vlastné",
"settings.appearance.moreThemes": "Viac tém je k dispozícii ako",
"settings.appearance.useSystemTheme": "Použiť systémovú tému",
"settings.behaviour": "Správanie",
@@ -888,10 +887,21 @@
"tableEditor.yes": "ÁNO",
"tableStructure.alter": "Úprava tabuľky",
"tableStructure.create": "Vytvoriť tabuľku",
"tabsPanel.addToFavorites": "Pridať do obľúbených",
"tabsPanel.closeAll": "Zavrieť všetko",
"tabsPanel.closeOthers": "Zavrieť ostatné",
"tabsPanel.closeTabsWithDb": "Zavrieť karty s DB {database}",
"tabsPanel.closeTabsWithOtherDb": "Zavrieť karty s inou DB než {database}",
"tabsPanel.closeToTheRight": "Zavrieť napravo",
"tabsPanel.duplicate": "Duplikovať",
"tabsPanel.pinTab": "Pripnúť kartu",
"tabsPanel.switchDatabase": "Prepnúť databázu",
"widget.collectionsContainers": "Kolekcie/kontajnery",
"widget.databaseContent": "Obsah databázy",
"widget.databases": "Databázy",
"widget.keys": "Kľúče",
"widget.pinned": "Pripnuté",
"widget.tablesViewsFunctions": "Tabuľky, pohľady, funkcie"
"widget.tablesViewsFunctions": "Tabuľky, pohľady, funkcie",
"widgets.managePlugins": "Spravovať pluginy",
"widgets.viewApplicationLogs": "Zobraziť aplikačné logy"
}