mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-17 22:36:01 +00:00
translation-db object
This commit is contained in:
@@ -446,8 +446,7 @@ await dbgateApi.executeQuery(${JSON.stringify(
|
||||
driver?.databaseEngineTypes?.includes('document') && {
|
||||
onClick: handleNewCollection,
|
||||
text: _t('database.newCollection', {
|
||||
defaultMessage: 'New {collectionLabel}',
|
||||
values: { collectionLabel: driver?.collectionSingularLabel ?? 'collection/container' },
|
||||
defaultMessage: 'New collection/container'
|
||||
}),
|
||||
},
|
||||
hasPermission(`dbops/query`) &&
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts" context="module">
|
||||
import { copyTextToClipboard } from '../utility/clipboard';
|
||||
import { _t, _val } from '../translations';
|
||||
|
||||
export const extractKey = ({ schemaName, pureName }) => (schemaName ? `${schemaName}.${pureName}` : pureName);
|
||||
export const createMatcher =
|
||||
@@ -69,13 +70,13 @@
|
||||
|
||||
function createScriptTemplatesSubmenu(objectTypeField) {
|
||||
return {
|
||||
label: 'SQL template',
|
||||
label: _t('dbObject.sqlTemplate', { defaultMessage: 'SQL template' }),
|
||||
submenu: getSupportedScriptTemplates(objectTypeField),
|
||||
};
|
||||
}
|
||||
|
||||
interface DbObjMenuItem {
|
||||
label?: string;
|
||||
label?: string | (() => string);
|
||||
tab?: string;
|
||||
forceNewTab?: boolean;
|
||||
initialData?: any;
|
||||
@@ -113,19 +114,19 @@
|
||||
divider: true,
|
||||
},
|
||||
isProApp() && {
|
||||
label: 'Design query',
|
||||
label: _t('dbObject.designQuery', { defaultMessage: 'Design query' }),
|
||||
isQueryDesigner: true,
|
||||
requiresWriteAccess: true,
|
||||
},
|
||||
isProApp() && {
|
||||
label: 'Design perspective query',
|
||||
label: _t('dbObject.designPerspectiveQuery', { defaultMessage: 'Design perspective query' }),
|
||||
tab: 'PerspectiveTab',
|
||||
forceNewTab: true,
|
||||
icon: 'img perspective',
|
||||
},
|
||||
createScriptTemplatesSubmenu('tables'),
|
||||
{
|
||||
label: 'SQL generator',
|
||||
label: _t('dbObject.sqlGenerator', { defaultMessage: 'SQL generator' }),
|
||||
submenu: [
|
||||
{
|
||||
label: 'CREATE TABLE',
|
||||
@@ -154,33 +155,33 @@
|
||||
divider: true,
|
||||
},
|
||||
hasPermission('dbops/model/edit') && {
|
||||
label: 'Drop table',
|
||||
label: _t('dbObject.dropTable', { defaultMessage: 'Drop table' }),
|
||||
isDrop: true,
|
||||
requiresWriteAccess: true,
|
||||
},
|
||||
hasPermission('dbops/table/rename') &&
|
||||
!driver?.dialect.disableRenameTable && {
|
||||
label: 'Rename table',
|
||||
label: _t('dbObject.renameTable', { defaultMessage: 'Rename table' }),
|
||||
isRename: true,
|
||||
requiresWriteAccess: true,
|
||||
},
|
||||
hasPermission('dbops/table/truncate') && {
|
||||
label: 'Truncate table',
|
||||
label: _t('dbObject.truncateTable', { defaultMessage: 'Truncate table' }),
|
||||
isTruncate: true,
|
||||
requiresWriteAccess: true,
|
||||
},
|
||||
{
|
||||
label: 'Copy table name',
|
||||
label: _t('dbObject.copyTableName', { defaultMessage: 'Copy table name' }),
|
||||
isCopyTableName: true,
|
||||
requiresWriteAccess: false,
|
||||
},
|
||||
hasPermission('dbops/table/backup') && {
|
||||
label: 'Create table backup',
|
||||
label: _t('dbObject.createTableBackup', { defaultMessage: 'Create table backup' }),
|
||||
isDuplicateTable: true,
|
||||
requiresWriteAccess: true,
|
||||
},
|
||||
hasPermission('dbops/model/view') && {
|
||||
label: 'Show diagram',
|
||||
label: _t('dbObject.showDiagram', { defaultMessage: 'Show diagram' }),
|
||||
isDiagram: true,
|
||||
},
|
||||
{
|
||||
@@ -204,18 +205,18 @@
|
||||
divider: true,
|
||||
},
|
||||
isProApp() && {
|
||||
label: 'Design query',
|
||||
label: _t('dbObject.designQuery', { defaultMessage: 'Design query' }),
|
||||
isQueryDesigner: true,
|
||||
},
|
||||
isProApp() && {
|
||||
label: 'Design perspective query',
|
||||
label: _t('dbObject.designPerspectiveQuery', { defaultMessage: 'Design perspective query' }),
|
||||
tab: 'PerspectiveTab',
|
||||
forceNewTab: true,
|
||||
icon: 'img perspective',
|
||||
},
|
||||
createScriptTemplatesSubmenu('views'),
|
||||
{
|
||||
label: 'SQL generator',
|
||||
label: _t('dbObject.sqlGenerator', { defaultMessage: 'SQL generator' }),
|
||||
submenu: [
|
||||
{
|
||||
label: 'CREATE VIEW',
|
||||
@@ -235,12 +236,12 @@
|
||||
divider: true,
|
||||
},
|
||||
hasPermission('dbops/model/edit') && {
|
||||
label: 'Drop view',
|
||||
label: _t('dbObject.dropView', { defaultMessage: 'Drop view' }),
|
||||
isDrop: true,
|
||||
requiresWriteAccess: true,
|
||||
},
|
||||
hasPermission('dbops/model/edit') && {
|
||||
label: 'Rename view',
|
||||
label: _t('dbObject.renameView', { defaultMessage: 'Rename view' }),
|
||||
isRename: true,
|
||||
requiresWriteAccess: true,
|
||||
},
|
||||
@@ -260,12 +261,12 @@
|
||||
divider: true,
|
||||
},
|
||||
hasPermission('dbops/model/edit') && {
|
||||
label: 'Drop view',
|
||||
label: _t('dbObject.dropView', { defaultMessage: 'Drop view' }),
|
||||
isDrop: true,
|
||||
requiresWriteAccess: true,
|
||||
},
|
||||
hasPermission('dbops/model/edit') && {
|
||||
label: 'Rename view',
|
||||
label: _t('dbObject.renameView', { defaultMessage: 'Rename view' }),
|
||||
isRename: true,
|
||||
requiresWriteAccess: true,
|
||||
},
|
||||
@@ -273,12 +274,12 @@
|
||||
divider: true,
|
||||
},
|
||||
{
|
||||
label: 'Query designer',
|
||||
label: _t('dbObject.queryDesigner', { defaultMessage: 'Query designer' }),
|
||||
isQueryDesigner: true,
|
||||
},
|
||||
createScriptTemplatesSubmenu('matviews'),
|
||||
{
|
||||
label: 'SQL generator',
|
||||
label: _t('dbObject.sqlGenerator', { defaultMessage: 'SQL generator' }),
|
||||
submenu: [
|
||||
{
|
||||
label: 'CREATE MATERIALIZED VIEW',
|
||||
@@ -306,7 +307,7 @@
|
||||
case 'queries':
|
||||
return [
|
||||
{
|
||||
label: 'Open data',
|
||||
label: _t('dbObject.openData', { defaultMessage: 'Open data' }),
|
||||
tab: 'QueryDataTab',
|
||||
forceNewTab: true,
|
||||
},
|
||||
@@ -318,18 +319,18 @@
|
||||
divider: true,
|
||||
},
|
||||
hasPermission('dbops/model/edit') && {
|
||||
label: 'Drop procedure',
|
||||
label: _t('dbObject.dropProcedure', { defaultMessage: 'Drop procedure' }),
|
||||
isDrop: true,
|
||||
requiresWriteAccess: true,
|
||||
},
|
||||
hasPermission('dbops/model/edit') && {
|
||||
label: 'Rename procedure',
|
||||
label: _t('dbObject.renameProcedure', { defaultMessage: 'Rename procedure' }),
|
||||
isRename: true,
|
||||
requiresWriteAccess: true,
|
||||
},
|
||||
createScriptTemplatesSubmenu('procedures'),
|
||||
{
|
||||
label: 'SQL generator',
|
||||
label: _t('dbObject.sqlGenerator', { defaultMessage: 'SQL generator' }),
|
||||
submenu: [
|
||||
{
|
||||
label: 'CREATE PROCEDURE',
|
||||
@@ -352,7 +353,7 @@
|
||||
return [
|
||||
...defaultDatabaseObjectAppObjectActions['triggers'],
|
||||
hasPermission('dbops/model/edit') && {
|
||||
label: 'Drop trigger',
|
||||
label: _t('dbObject.dropTrigger', { defaultMessage: 'Drop trigger' }),
|
||||
isDrop: true,
|
||||
requiresWriteAccess: true,
|
||||
},
|
||||
@@ -360,7 +361,7 @@
|
||||
divider: true,
|
||||
},
|
||||
{
|
||||
label: 'SQL generator',
|
||||
label: _t('dbObject.sqlGenerator', { defaultMessage: 'SQL generator' }),
|
||||
submenu: [
|
||||
{
|
||||
label: 'CREATE TRIGGER',
|
||||
@@ -384,7 +385,7 @@
|
||||
divider: true,
|
||||
},
|
||||
isProApp() && {
|
||||
label: 'Design perspective query',
|
||||
label: _t('dbObject.designPerspectiveQuery', { defaultMessage: 'Design perspective query' }),
|
||||
tab: 'PerspectiveTab',
|
||||
forceNewTab: true,
|
||||
icon: 'img perspective',
|
||||
@@ -395,17 +396,17 @@
|
||||
functionName: 'tableReader',
|
||||
},
|
||||
hasPermission('dbops/model/edit') && {
|
||||
label: `Drop ${driver?.collectionSingularLabel ?? 'collection/container'}`,
|
||||
label: _t('dbObject.dropCollection', { defaultMessage: 'Drop collection/container'}),
|
||||
isDropCollection: true,
|
||||
requiresWriteAccess: true,
|
||||
},
|
||||
hasPermission('dbops/table/rename') && {
|
||||
label: `Rename ${driver?.collectionSingularLabel ?? 'collection/container'}`,
|
||||
label: _t('dbObject.renameCollection', { defaultMessage: 'Rename collection/container'}),
|
||||
isRenameCollection: true,
|
||||
requiresWriteAccess: true,
|
||||
},
|
||||
hasPermission('dbops/table/backup') && {
|
||||
label: `Create ${driver?.collectionSingularLabel ?? 'collection/container'} backup`,
|
||||
label: _t('dbObject.createCollectionBackup', { defaultMessage: 'Create collection/container backup'}),
|
||||
isDuplicateCollection: true,
|
||||
requiresWriteAccess: true,
|
||||
},
|
||||
@@ -418,7 +419,7 @@
|
||||
const menu: DbObjMenuItem[] = [
|
||||
...defaultDatabaseObjectAppObjectActions['schedulerEvents'],
|
||||
hasPermission('dbops/model/edit') && {
|
||||
label: 'Drop event',
|
||||
label: _t('dbObject.dropEvent', { defaultMessage: 'Drop event' }),
|
||||
isDrop: true,
|
||||
requiresWriteAccess: true,
|
||||
},
|
||||
@@ -426,12 +427,12 @@
|
||||
|
||||
if (data?.status === 'ENABLED') {
|
||||
menu.push({
|
||||
label: 'Disable',
|
||||
label: _t('dbObject.disable', { defaultMessage: 'Disable' }),
|
||||
isDisableEvent: true,
|
||||
});
|
||||
} else {
|
||||
menu.push({
|
||||
label: 'Enable',
|
||||
label: _t('dbObject.enable', { defaultMessage: 'Enable' }),
|
||||
isEnableEvent: true,
|
||||
});
|
||||
}
|
||||
@@ -441,7 +442,7 @@
|
||||
divider: true,
|
||||
},
|
||||
{
|
||||
label: 'SQL generator',
|
||||
label: _t('dbObject.sqlGenerator', { defaultMessage: 'SQL generator' }),
|
||||
submenu: [
|
||||
{
|
||||
label: 'CREATE SCHEDULER EVENT',
|
||||
@@ -474,7 +475,7 @@
|
||||
if (menu.isQueryDesigner) {
|
||||
openNewTab(
|
||||
{
|
||||
title: 'Query #',
|
||||
title: _t('dbObject.query', { defaultMessage: 'Query #' }),
|
||||
icon: 'img query-design',
|
||||
tabComponent: 'QueryDesignTab',
|
||||
focused: true,
|
||||
@@ -499,7 +500,7 @@
|
||||
} else if (menu.isDiagram) {
|
||||
openNewTab(
|
||||
{
|
||||
title: 'Diagram #',
|
||||
title: _t('dbObject.diagram', { defaultMessage: 'Diagram #' }),
|
||||
icon: 'img diagram',
|
||||
tabComponent: 'DiagramTab',
|
||||
props: {
|
||||
@@ -589,7 +590,7 @@
|
||||
});
|
||||
} else if (menu.isDropCollection) {
|
||||
showModal(ConfirmModal, {
|
||||
message: `Really drop collection ${data.pureName}?`,
|
||||
message: _t('dbObject.confirmDropCollection', { defaultMessage: 'Really drop collection {name}?', values: { name: data.pureName } }),
|
||||
onConfirm: async () => {
|
||||
const dbid = _.pick(data, ['conid', 'database']);
|
||||
runOperationOnDatabase(dbid, {
|
||||
@@ -603,8 +604,8 @@
|
||||
} else if (menu.isRenameCollection) {
|
||||
const driver = await getDriver();
|
||||
showModal(InputTextModal, {
|
||||
label: `New ${driver?.collectionSingularLabel ?? 'collection/container'} name`,
|
||||
header: `Rename ${driver?.collectionSingularLabel ?? 'collection/container'}`,
|
||||
label: _t('dbObject.newCollectionName', { defaultMessage: 'New collection/container name' }),
|
||||
header: _t('dbObject.renameCollection', { defaultMessage: 'Rename collection/container' }),
|
||||
value: data.pureName,
|
||||
onConfirm: async newName => {
|
||||
const dbid = _.pick(data, ['conid', 'database']);
|
||||
@@ -620,7 +621,7 @@
|
||||
const driver = await getDriver();
|
||||
|
||||
showModal(ConfirmModal, {
|
||||
message: `Really create ${driver?.collectionSingularLabel ?? 'collection/container'} copy named ${newName}?`,
|
||||
message: _t('dbObject.confirmCloneCollection', { defaultMessage: 'Really create collection/container copy named {name}?', values: { name: newName } }),
|
||||
onConfirm: async () => {
|
||||
const dbid = _.pick(data, ['conid', 'database']);
|
||||
runOperationOnDatabase(dbid, {
|
||||
@@ -718,7 +719,7 @@
|
||||
|
||||
const filteredSumenus = coreMenus.map(item => {
|
||||
if (!item.submenu) {
|
||||
return item;
|
||||
return { ...item , label: _val(item.label)};
|
||||
}
|
||||
return {
|
||||
...item,
|
||||
@@ -768,7 +769,7 @@
|
||||
openNewTab(
|
||||
{
|
||||
// title: getObjectTitle(connection, schemaName, pureName),
|
||||
title: tabComponent ? getObjectTitle(connection, schemaName, pureName) : 'Query #',
|
||||
title: tabComponent ? getObjectTitle(connection, schemaName, pureName) : _t('dbObject.query', { defaultMessage: 'Query #' }),
|
||||
focused: tabComponent == null,
|
||||
tooltip,
|
||||
icon:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { __t } from '../translations';
|
||||
export function matchDatabaseObjectAppObject(obj1, obj2) {
|
||||
return (
|
||||
obj1?.objectTypeField == obj2?.objectTypeField &&
|
||||
@@ -11,12 +12,12 @@ export function matchDatabaseObjectAppObject(obj1, obj2) {
|
||||
function getTableLikeActions(dataTab) {
|
||||
return [
|
||||
{
|
||||
label: 'Open data',
|
||||
label: __t('dbObject.openData', { defaultMessage: 'Open data' }),
|
||||
tab: dataTab,
|
||||
defaultActionId: 'openTable',
|
||||
},
|
||||
{
|
||||
label: 'Open raw data',
|
||||
label: __t('dbObject.openRawData', { defaultMessage: 'Open raw data' }),
|
||||
tab: dataTab,
|
||||
defaultActionId: 'openRawTable',
|
||||
isRawMode: true,
|
||||
@@ -33,13 +34,13 @@ function getTableLikeActions(dataTab) {
|
||||
// defaultActionId: 'openForm',
|
||||
// },
|
||||
{
|
||||
label: 'Open structure',
|
||||
label: __t('dbObject.openStructure', { defaultMessage: 'Open structure' }),
|
||||
tab: 'TableStructureTab',
|
||||
icon: 'img table-structure',
|
||||
defaultActionId: 'openStructure',
|
||||
},
|
||||
{
|
||||
label: 'Show SQL',
|
||||
label: __t('dbObject.showSql', { defaultMessage: 'Show SQL' }),
|
||||
tab: 'SqlObjectTab',
|
||||
defaultActionId: 'showSql',
|
||||
icon: 'img sql-file',
|
||||
@@ -53,7 +54,7 @@ export const defaultDatabaseObjectAppObjectActions = {
|
||||
matviews: getTableLikeActions('ViewDataTab'),
|
||||
procedures: [
|
||||
{
|
||||
label: 'Show SQL',
|
||||
label: __t('dbObject.showSql', { defaultMessage: 'Show SQL' }),
|
||||
tab: 'SqlObjectTab',
|
||||
defaultActionId: 'showSql',
|
||||
icon: 'img sql-file',
|
||||
@@ -61,7 +62,7 @@ export const defaultDatabaseObjectAppObjectActions = {
|
||||
],
|
||||
functions: [
|
||||
{
|
||||
label: 'Show SQL',
|
||||
label: __t('dbObject.showSql', { defaultMessage: 'Show SQL' }),
|
||||
tab: 'SqlObjectTab',
|
||||
defaultActionId: 'showSql',
|
||||
icon: 'img sql-file',
|
||||
@@ -69,7 +70,7 @@ export const defaultDatabaseObjectAppObjectActions = {
|
||||
],
|
||||
triggers: [
|
||||
{
|
||||
label: 'Show SQL',
|
||||
label: __t('dbObject.showSql', { defaultMessage: 'Show SQL' }),
|
||||
tab: 'SqlObjectTab',
|
||||
defaultActionId: 'showSql',
|
||||
icon: 'img sql-file',
|
||||
@@ -77,12 +78,12 @@ export const defaultDatabaseObjectAppObjectActions = {
|
||||
],
|
||||
collections: [
|
||||
{
|
||||
label: 'Open data',
|
||||
label: __t('dbObject.openData', { defaultMessage: 'Open data' }),
|
||||
tab: 'CollectionDataTab',
|
||||
defaultActionId: 'openTable',
|
||||
},
|
||||
{
|
||||
label: 'Open JSON',
|
||||
label: __t('dbObject.openJson', { defaultMessage: 'Open JSON' }),
|
||||
tab: 'CollectionDataTab',
|
||||
defaultActionId: 'openJson',
|
||||
initialData: {
|
||||
@@ -94,7 +95,7 @@ export const defaultDatabaseObjectAppObjectActions = {
|
||||
],
|
||||
schedulerEvents: [
|
||||
{
|
||||
label: 'Show SQL',
|
||||
label: __t('dbObject.showSql', { defaultMessage: 'Show SQL' }),
|
||||
tab: 'SqlObjectTab',
|
||||
defaultActionId: 'showSql',
|
||||
icon: 'img sql-file',
|
||||
@@ -102,7 +103,7 @@ export const defaultDatabaseObjectAppObjectActions = {
|
||||
],
|
||||
queries: [
|
||||
{
|
||||
label: 'Show query',
|
||||
label: __t('dbObject.showQuery', { defaultMessage: 'Show query' }),
|
||||
tab: 'QueryDataTab',
|
||||
defaultActionId: 'showAppQuery',
|
||||
icon: 'img app-query',
|
||||
|
||||
@@ -52,6 +52,7 @@ import { openWebLink } from '../utility/simpleTools';
|
||||
import { _t } from '../translations';
|
||||
import ExportImportConnectionsModal from '../modals/ExportImportConnectionsModal.svelte';
|
||||
import { getBoolSettingsValue } from '../settings/settingsTools';
|
||||
import { __t } from '../translations';
|
||||
|
||||
// function themeCommand(theme: ThemeDefinition) {
|
||||
// return {
|
||||
@@ -359,7 +360,7 @@ registerCommand({
|
||||
icon: 'icon table',
|
||||
name: 'Collection',
|
||||
toolbar: true,
|
||||
toolbarName: 'New collection/container',
|
||||
toolbarName: __t('command.new.collectionToolbar', { defaultMessage: 'New collection/container' }),
|
||||
testEnabled: () => {
|
||||
const driver = findEngineDriver(get(currentDatabase)?.connection, getExtensions());
|
||||
return !!get(currentDatabase) && driver?.databaseEngineTypes?.includes('document');
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
{/if}
|
||||
|
||||
{#if dependencies.length > 0}
|
||||
<div class="bold nowrap ml-1">Dependent tables ({dependencies.length})</div>
|
||||
<div class="bold nowrap ml-1">{_t('dataGrid.dependentTables', { defaultMessage: 'Dependent tables' })} ({dependencies.length})</div>
|
||||
{#each dependencies.filter(fk => filterName(filter, fk.pureName)) as fk}
|
||||
<div
|
||||
class="link"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
import ErrorMessageModal from './ErrorMessageModal.svelte';
|
||||
import ModalBase from './ModalBase.svelte';
|
||||
import { closeCurrentModal, showModal } from './modalTools';
|
||||
import { _t } from '../translations';
|
||||
|
||||
export let driver;
|
||||
export let dbid;
|
||||
@@ -44,14 +45,14 @@
|
||||
<FormProvider initialValues={{ name: '' }}>
|
||||
<ModalBase {...$$restProps}>
|
||||
<svelte:fragment slot="header">
|
||||
Create {driver?.collectionSingularLabel ?? 'collection/container'}
|
||||
{_t('dbObject.createCollection', { defaultMessage: 'Create collection/container'})}
|
||||
</svelte:fragment>
|
||||
|
||||
<FormArgumentList args={driver?.newCollectionFormParams} />
|
||||
|
||||
<svelte:fragment slot="footer">
|
||||
<FormSubmit value="OK" on:click={e => handleSubmit(e.detail)} disabled={isSaving} />
|
||||
<FormStyledButton type="button" value="Cancel" on:click={closeCurrentModal} />
|
||||
<FormStyledButton type="button" value={_t('common.cancel', { defaultMessage: 'Cancel' })} on:click={closeCurrentModal} />
|
||||
</svelte:fragment>
|
||||
</ModalBase>
|
||||
</FormProvider>
|
||||
|
||||
@@ -3,6 +3,7 @@ import { currentDatabase, getExtensions, getOpenedTabs, loadingSchemaLists, open
|
||||
import _ from 'lodash';
|
||||
import { getSchemaList } from './metadataLoaders';
|
||||
import { showSnackbarError } from './snackbar';
|
||||
import { _t } from '../translations';
|
||||
|
||||
export class LoadingToken {
|
||||
isCanceled = false;
|
||||
@@ -57,8 +58,14 @@ export function setSelectedTab(tabid) {
|
||||
}
|
||||
|
||||
export function getObjectTypeFieldLabel(objectTypeField, driver?) {
|
||||
if (objectTypeField == 'matviews') return 'Materialized Views';
|
||||
if (objectTypeField == 'collections') return _.startCase(driver?.collectionPluralLabel) ?? 'Collections/Containers';
|
||||
if (objectTypeField == 'tables') return _t('dbObject.tables', { defaultMessage: 'Tables' });
|
||||
if (objectTypeField == 'views') return _t('dbObject.views', { defaultMessage: 'Views' });
|
||||
if (objectTypeField == 'procedures') return _t('dbObject.procedures', { defaultMessage: 'Procedures' });
|
||||
if (objectTypeField == 'functions') return _t('dbObject.functions', { defaultMessage: 'Functions' });
|
||||
if (objectTypeField == 'triggers') return _t('dbObject.triggers', { defaultMessage: 'Triggers' });
|
||||
if (objectTypeField == 'schedulerEvents') return _t('dbObject.schedulerEvents', { defaultMessage: 'Scheduler Events' });
|
||||
if (objectTypeField == 'matviews') return _t('dbObject.matviews', { defaultMessage: 'Materialized Views' });
|
||||
if (objectTypeField == 'collections') return _t('dbObject.collections', { defaultMessage: 'Collections/Containers' });
|
||||
return _.startCase(objectTypeField);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
<WidgetColumnBarItem
|
||||
title={driver?.databaseEngineTypes?.includes('document')
|
||||
? (driver?.collectionPluralLabel ?? 'Collections/containers')
|
||||
? _t('widget.collectionsContainers', { defaultMessage: 'Collections/containers' })
|
||||
: _t('widget.tablesViewsFunctions', { defaultMessage: 'Tables, views, functions' })}
|
||||
name="dbObjects"
|
||||
storageName="dbObjectsWidget"
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
{#if driver?.databaseEngineTypes?.includes('document')}
|
||||
<div class="m-1" />
|
||||
<InlineButton on:click={() => runCommand('new.collection')}
|
||||
>New {driver?.collectionSingularLabel ?? 'collection/container'}</InlineButton
|
||||
>{_t('sqlObject.newCollection', { defaultMessage: 'New collection/container'})}</InlineButton
|
||||
>
|
||||
{/if}
|
||||
</WidgetsInnerContainer>
|
||||
|
||||
@@ -106,6 +106,7 @@
|
||||
"command.datagrid.viewJsonValue": "Zobrazit buňku jako JSON dokument",
|
||||
"command.datagrid.witchToTable": "Přepnout na tabulku",
|
||||
"command.datgrid.hideColumn": "Skrýt sloupec",
|
||||
"command.new.collectionToolbar": "Nová kolekce/kontejner",
|
||||
"command.new.duckdbDatabase": "Nová DuckDB databáze",
|
||||
"command.new.sqliteDatabase": "Nová SQLite databáze",
|
||||
"command.openQuery": "Otevřít dotaz",
|
||||
@@ -267,6 +268,7 @@
|
||||
"dataGrid.codeHighlighting": "Zvýraznění kódu:",
|
||||
"dataGrid.codeHighlighting.none": "Žádné (neformátovaný text)",
|
||||
"dataGrid.columns": "Sloupce",
|
||||
"dataGrid.dependentTables": "Závislé tabulky",
|
||||
"dataGrid.editCellValue": "Upravit hodnotu buňky",
|
||||
"dataGrid.filters": "Filtry",
|
||||
"dataGrid.formatJson": "Formátovat JSON",
|
||||
@@ -300,7 +302,7 @@
|
||||
"database.exportDbModel": "Export DB model",
|
||||
"database.generateScript": "Vygenerovat skript",
|
||||
"database.import": "Import",
|
||||
"database.newCollection": "Nová {collectionLabel}",
|
||||
"database.newCollection": "Nová kolekce/kontejner",
|
||||
"database.newQuery": "Nový dotaz",
|
||||
"database.newTable": "Nová tabulka",
|
||||
"database.perspective": "Perspektiva #",
|
||||
@@ -379,6 +381,48 @@
|
||||
"datagrid.searchMacros": "Hledat makra",
|
||||
"datagrid.setFormat": "Nastavit formát: ",
|
||||
"datagrid.structure": "Struktura",
|
||||
"dbObject.collections": "Kolekce/Kontejnery",
|
||||
"dbObject.confirmCloneCollection": "Opravdu vytvořit kopii kolekce/kontejneru s názvem {name}?",
|
||||
"dbObject.confirmDropCollection": "Opravdu odstranit kolekci {name}?",
|
||||
"dbObject.copyTableName": "Kopírovat název tabulky",
|
||||
"dbObject.createCollection": "Vytvořit kolekci/kontejner",
|
||||
"dbObject.createCollectionBackup": "Vytvořit zálohu kolekce/kontejneru",
|
||||
"dbObject.createTableBackup": "Vytvořit zálohu tabulky",
|
||||
"dbObject.designPerspectiveQuery": "Návrh perspektivního dotazu",
|
||||
"dbObject.designQuery": "Návrh dotazu",
|
||||
"dbObject.diagram": "Diagram #",
|
||||
"dbObject.disable": "Zakázat",
|
||||
"dbObject.dropCollection": "Odstranit kolekci/kontejner",
|
||||
"dbObject.dropEvent": "Odstranit událost",
|
||||
"dbObject.dropProcedure": "Odstranit proceduru",
|
||||
"dbObject.dropTable": "Odstranit tabulku",
|
||||
"dbObject.dropTrigger": "Odstranit trigger",
|
||||
"dbObject.dropView": "Odstranit pohled",
|
||||
"dbObject.enable": "Povolit",
|
||||
"dbObject.functions": "Funkce",
|
||||
"dbObject.matviews": "Materializované pohledy",
|
||||
"dbObject.newCollectionName": "Nový název kolekce/kontejneru",
|
||||
"dbObject.openData": "Otevřít data",
|
||||
"dbObject.openJson": "Otevřít JSON",
|
||||
"dbObject.openRawData": "Otevřít surová data",
|
||||
"dbObject.openStructure": "Otevřít strukturu",
|
||||
"dbObject.procedures": "Procedury",
|
||||
"dbObject.query": "Dotaz #",
|
||||
"dbObject.queryDesigner": "Návrhář dotazů",
|
||||
"dbObject.renameCollection": "Přejmenovat kolekci/kontejner",
|
||||
"dbObject.renameProcedure": "Přejmenovat proceduru",
|
||||
"dbObject.renameTable": "Přejmenovat tabulku",
|
||||
"dbObject.renameView": "Přejmenovat pohled",
|
||||
"dbObject.schedulerEvents": "Události plánovače",
|
||||
"dbObject.showDiagram": "Zobrazit diagram",
|
||||
"dbObject.showQuery": "Zobrazit dotaz",
|
||||
"dbObject.showSql": "Zobrazit SQL",
|
||||
"dbObject.sqlGenerator": "SQL generátor",
|
||||
"dbObject.sqlTemplate": "SQL šablona",
|
||||
"dbObject.tables": "Tabulky",
|
||||
"dbObject.triggers": "Triggery",
|
||||
"dbObject.truncateTable": "Oříznout tabulku",
|
||||
"dbObject.views": "Pohledy",
|
||||
"error.driverNotFound": "Neplatné připojení k databázi, ovladač nebyl nalezen",
|
||||
"error.selectedCloudConnection": "Vybrané připojení je z DbGate cloudu",
|
||||
"error.selectedNotCloudConnection": "Vybrané připojení není z DbGate cloudu",
|
||||
@@ -617,6 +661,7 @@
|
||||
"sqlObject.columnName": "Název sloupce",
|
||||
"sqlObject.databaseEmpty": "Databáze {database} je prázdná nebo struktura není načtena, stiskněte tlačítko Obnovit pro znovunačtení struktury",
|
||||
"sqlObject.loadingStructure": "Načítání struktury databáze",
|
||||
"sqlObject.newCollection": "Nová kolekce/kontejner",
|
||||
"sqlObject.schemaName": "Schéma",
|
||||
"sqlObject.search.placeholder": "Hledat v tabulkách, pohledech, procedurách",
|
||||
"sqlObject.searchBy": "Hledat podle:",
|
||||
@@ -684,6 +729,10 @@
|
||||
"tableEditor.yes": "ANO",
|
||||
"tableStructure.alter": "Upravit tabulku",
|
||||
"tableStructure.create": "Vytvořit tabulku",
|
||||
"translations.dbObject.collectionContainer": "kolekci/kontejner",
|
||||
"translations.dbObject.collectionPlural": "kolekce",
|
||||
"translations.dbObject.collectionSingular": "kolekci",
|
||||
"widget.collectionsContainers": "Kolekce/kontejnery",
|
||||
"widget.databaseContent": "Obsah databáze",
|
||||
"widget.databases": "Databáze",
|
||||
"widget.keys": "Klíče",
|
||||
|
||||
@@ -106,6 +106,7 @@
|
||||
"command.datagrid.viewJsonValue": "View cell as JSON document",
|
||||
"command.datagrid.witchToTable": "Switch to table",
|
||||
"command.datgrid.hideColumn": "Hide column",
|
||||
"command.new.collectionToolbar": "New collection/container",
|
||||
"command.new.duckdbDatabase": "New DuckDB database",
|
||||
"command.new.sqliteDatabase": "New SQLite database",
|
||||
"command.openQuery": "Open query",
|
||||
@@ -267,6 +268,7 @@
|
||||
"dataGrid.codeHighlighting": "Code highlighting:",
|
||||
"dataGrid.codeHighlighting.none": "None (raw text)",
|
||||
"dataGrid.columns": "Columns",
|
||||
"dataGrid.dependentTables": "Dependent tables",
|
||||
"dataGrid.editCellValue": "Edit cell value",
|
||||
"dataGrid.filters": "Filters",
|
||||
"dataGrid.formatJson": "Format JSON",
|
||||
@@ -300,7 +302,7 @@
|
||||
"database.exportDbModel": "Export DB model",
|
||||
"database.generateScript": "Generate script",
|
||||
"database.import": "Import",
|
||||
"database.newCollection": "New {collectionLabel}",
|
||||
"database.newCollection": "New collection/container",
|
||||
"database.newQuery": "New query",
|
||||
"database.newTable": "New table",
|
||||
"database.perspective": "Perspective #",
|
||||
@@ -379,6 +381,48 @@
|
||||
"datagrid.searchMacros": "Search macros",
|
||||
"datagrid.setFormat": "Set format: ",
|
||||
"datagrid.structure": "Structure",
|
||||
"dbObject.collections": "Collections/Containers",
|
||||
"dbObject.confirmCloneCollection": "Really create collection/container copy named {name}?",
|
||||
"dbObject.confirmDropCollection": "Really drop collection {name}?",
|
||||
"dbObject.copyTableName": "Copy table name",
|
||||
"dbObject.createCollection": "Create collection/container",
|
||||
"dbObject.createCollectionBackup": "Create collection/container backup",
|
||||
"dbObject.createTableBackup": "Create table backup",
|
||||
"dbObject.designPerspectiveQuery": "Design perspective query",
|
||||
"dbObject.designQuery": "Design query",
|
||||
"dbObject.diagram": "Diagram #",
|
||||
"dbObject.disable": "Disable",
|
||||
"dbObject.dropCollection": "Drop collection/container",
|
||||
"dbObject.dropEvent": "Drop event",
|
||||
"dbObject.dropProcedure": "Drop procedure",
|
||||
"dbObject.dropTable": "Drop table",
|
||||
"dbObject.dropTrigger": "Drop trigger",
|
||||
"dbObject.dropView": "Drop view",
|
||||
"dbObject.enable": "Enable",
|
||||
"dbObject.functions": "Functions",
|
||||
"dbObject.matviews": "Materialized Views",
|
||||
"dbObject.newCollectionName": "New collection/container name",
|
||||
"dbObject.openData": "Open data",
|
||||
"dbObject.openJson": "Open JSON",
|
||||
"dbObject.openRawData": "Open raw data",
|
||||
"dbObject.openStructure": "Open structure",
|
||||
"dbObject.procedures": "Procedures",
|
||||
"dbObject.query": "Query #",
|
||||
"dbObject.queryDesigner": "Query designer",
|
||||
"dbObject.renameCollection": "Rename collection/container",
|
||||
"dbObject.renameProcedure": "Rename procedure",
|
||||
"dbObject.renameTable": "Rename table",
|
||||
"dbObject.renameView": "Rename view",
|
||||
"dbObject.schedulerEvents": "Scheduler Events",
|
||||
"dbObject.showDiagram": "Show diagram",
|
||||
"dbObject.showQuery": "Show query",
|
||||
"dbObject.showSql": "Show SQL",
|
||||
"dbObject.sqlGenerator": "SQL generator",
|
||||
"dbObject.sqlTemplate": "SQL template",
|
||||
"dbObject.tables": "Tables",
|
||||
"dbObject.triggers": "Triggers",
|
||||
"dbObject.truncateTable": "Truncate table",
|
||||
"dbObject.views": "Views",
|
||||
"error.driverNotFound": "Invalid database connection, driver not found",
|
||||
"error.selectedCloudConnection": "Selected connection is from DbGate cloud",
|
||||
"error.selectedNotCloudConnection": "Selected connection is not from DbGate cloud",
|
||||
@@ -617,6 +661,7 @@
|
||||
"sqlObject.columnName": "Column name",
|
||||
"sqlObject.databaseEmpty": "Database {database} is empty or structure is not loaded, press Refresh button to reload structure",
|
||||
"sqlObject.loadingStructure": "Loading database structure",
|
||||
"sqlObject.newCollection": "New collection/container",
|
||||
"sqlObject.schemaName": "Schema",
|
||||
"sqlObject.search.placeholder": "Search in tables, views, procedures",
|
||||
"sqlObject.searchBy": "Search by:",
|
||||
@@ -684,6 +729,10 @@
|
||||
"tableEditor.yes": "YES",
|
||||
"tableStructure.alter": "Alter table",
|
||||
"tableStructure.create": "Create table",
|
||||
"translations.dbObject.collectionContainer": "collection/container",
|
||||
"translations.dbObject.collectionPlural": "collections",
|
||||
"translations.dbObject.collectionSingular": "collection",
|
||||
"widget.collectionsContainers": "Collections/containers",
|
||||
"widget.databaseContent": "Database content",
|
||||
"widget.databases": "Databases",
|
||||
"widget.keys": "Keys",
|
||||
|
||||
@@ -106,6 +106,7 @@
|
||||
"command.datagrid.viewJsonValue": "Zobraziť bunku ako JSON dokument",
|
||||
"command.datagrid.witchToTable": "Prepnúť na tabuľku",
|
||||
"command.datgrid.hideColumn": "Skryť stĺpec",
|
||||
"command.new.collectionToolbar": "Nová kolekcia/kontajner",
|
||||
"command.new.duckdbDatabase": "Nová DuckDB databáza",
|
||||
"command.new.sqliteDatabase": "Nová SQLite databáza",
|
||||
"command.openQuery": "Otvoriť dotaz",
|
||||
@@ -267,6 +268,7 @@
|
||||
"dataGrid.codeHighlighting": "Zvýraznenie kódu:",
|
||||
"dataGrid.codeHighlighting.none": "Žiadne (neformátovaný text)",
|
||||
"dataGrid.columns": "Stĺpce",
|
||||
"dataGrid.dependentTables": "Závislé tabuľky",
|
||||
"dataGrid.editCellValue": "Upraviť hodnotu bunky",
|
||||
"dataGrid.filters": "Filtre",
|
||||
"dataGrid.formatJson": "Formátovať JSON",
|
||||
@@ -300,7 +302,7 @@
|
||||
"database.exportDbModel": "Exportovať DB model",
|
||||
"database.generateScript": "Generovať skript",
|
||||
"database.import": "Importovať",
|
||||
"database.newCollection": "Nová {collectionLabel}",
|
||||
"database.newCollection": "Nová kolekcia/kontajner",
|
||||
"database.newQuery": "Nový dotaz",
|
||||
"database.newTable": "Nová tabuľka",
|
||||
"database.perspective": "Perspektíva #",
|
||||
@@ -379,6 +381,48 @@
|
||||
"datagrid.searchMacros": "Vyhľadať makrá",
|
||||
"datagrid.setFormat": "Nastaviť formát: ",
|
||||
"datagrid.structure": "Štruktúra",
|
||||
"dbObject.collections": "Kolekcie/Kontajnery",
|
||||
"dbObject.confirmCloneCollection": "Naozaj vytvoriť kópiu kolekcie/kontajnera s názvom {name}?",
|
||||
"dbObject.confirmDropCollection": "Naozaj odstrániť kolekciu/kontajner {name}?",
|
||||
"dbObject.copyTableName": "Kopírovať názov tabuľky",
|
||||
"dbObject.createCollection": "Vytvoriť kolekciu/kontajner",
|
||||
"dbObject.createCollectionBackup": "Vytvoriť zálohu kolekcie/kontajnera",
|
||||
"dbObject.createTableBackup": "Vytvoriť zálohu tabuľky",
|
||||
"dbObject.designPerspectiveQuery": "Návrh perspektívneho dotazu",
|
||||
"dbObject.designQuery": "Návrh dotazu",
|
||||
"dbObject.diagram": "Diagram #",
|
||||
"dbObject.disable": "Zakázať",
|
||||
"dbObject.dropCollection": "Odstrániť kolekciu/kontajner",
|
||||
"dbObject.dropEvent": "Odstrániť udalosť",
|
||||
"dbObject.dropProcedure": "Odstrániť procedúru",
|
||||
"dbObject.dropTable": "Odstrániť tabuľku",
|
||||
"dbObject.dropTrigger": "Odstrániť trigger",
|
||||
"dbObject.dropView": "Odstrániť pohľad",
|
||||
"dbObject.enable": "Povoliť",
|
||||
"dbObject.functions": "Funkcie",
|
||||
"dbObject.matviews": "Materializované pohľady",
|
||||
"dbObject.newCollectionName": "Nový názov kolekcie/kontajnera",
|
||||
"dbObject.openData": "Otvoriť dáta",
|
||||
"dbObject.openJson": "Otvoriť JSON",
|
||||
"dbObject.openRawData": "Otvoriť surové dáta",
|
||||
"dbObject.openStructure": "Otvoriť štruktúru",
|
||||
"dbObject.procedures": "Procedúry",
|
||||
"dbObject.query": "Dotaz #",
|
||||
"dbObject.queryDesigner": "Návrhár dotazu",
|
||||
"dbObject.renameCollection": "Premenovať kolekciu/kontajner",
|
||||
"dbObject.renameProcedure": "Premenovať procedúru",
|
||||
"dbObject.renameTable": "Premenovať tabuľku",
|
||||
"dbObject.renameView": "Premenovať pohľad",
|
||||
"dbObject.schedulerEvents": "Plánované Udalosti",
|
||||
"dbObject.showDiagram": "Zobraziť diagram",
|
||||
"dbObject.showQuery": "Zobraziť dotaz",
|
||||
"dbObject.showSql": "Zobraziť SQL",
|
||||
"dbObject.sqlGenerator": "SQL generátor",
|
||||
"dbObject.sqlTemplate": "SQL šablóna",
|
||||
"dbObject.tables": "Tabuľky",
|
||||
"dbObject.triggers": "Triggery",
|
||||
"dbObject.truncateTable": "Orezanie tabuľky",
|
||||
"dbObject.views": "Pohľady",
|
||||
"error.driverNotFound": "Neplatné pripojenie k databáze, ovládač nenájdený",
|
||||
"error.selectedCloudConnection": "Vybrané pripojenie je z DbGate cloudu",
|
||||
"error.selectedNotCloudConnection": "Vybrané pripojenie nie je z DbGate cloudu",
|
||||
@@ -617,6 +661,7 @@
|
||||
"sqlObject.columnName": "Názov stĺpca",
|
||||
"sqlObject.databaseEmpty": "Databáza {database} je prázdna alebo štruktúra nie je načítaná, stlačte tlačidlo Obnoviť pre opätovné načítanie štruktúry",
|
||||
"sqlObject.loadingStructure": "Načítavanie štruktúry databázy",
|
||||
"sqlObject.newCollection": "Nová kolekcia/kontajner",
|
||||
"sqlObject.schemaName": "Schéma",
|
||||
"sqlObject.search.placeholder": "Hľadať v tabuľkách, pohľadoch, procedúrach",
|
||||
"sqlObject.searchBy": "Hľadať podľa:",
|
||||
@@ -684,6 +729,10 @@
|
||||
"tableEditor.yes": "ÁNO",
|
||||
"tableStructure.alter": "Úprava tabuľky",
|
||||
"tableStructure.create": "Vytvoriť tabuľku",
|
||||
"translations.dbObject.collectionContainer": "kolekcia/kontajner",
|
||||
"translations.dbObject.collectionPlural": "kolekcie",
|
||||
"translations.dbObject.collectionSingular": "kolekciu",
|
||||
"widget.collectionsContainers": "Kolekcie/kontajnery",
|
||||
"widget.databaseContent": "Obsah databázy",
|
||||
"widget.databases": "Databázy",
|
||||
"widget.keys": "Kľúče",
|
||||
|
||||
Reference in New Issue
Block a user