mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 18:46:00 +00:00
translation-commands
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
registerCommand({
|
||||
id: 'archiveFile.save',
|
||||
group: 'save',
|
||||
category: 'Archive file',
|
||||
name: 'Save',
|
||||
category: __t('command.archiveFile', { defaultMessage: 'Archive file' }),
|
||||
name: __t('command.archiveFile.save', { defaultMessage: 'Save' }),
|
||||
toolbar: true,
|
||||
isRelatedToTab: true,
|
||||
icon: 'icon save',
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
registerCommand({
|
||||
id: 'archiveFile.saveAs',
|
||||
category: 'Archive file',
|
||||
name: 'Save as',
|
||||
category: __t('command.archiveFile', { defaultMessage: 'Archive file' }),
|
||||
name: __t('command.archiveFile.saveAs', { defaultMessage: 'Save as' }),
|
||||
icon: 'icon save',
|
||||
isRelatedToTab: true,
|
||||
testEnabled: () => getCurrentEditor() != null,
|
||||
@@ -49,6 +49,7 @@
|
||||
import { changeTab, markTabSaved, markTabUnsaved, sleep } from '../utility/common';
|
||||
import createActivator, { getActiveComponent } from '../utility/createActivator';
|
||||
import createUndoReducer from '../utility/createUndoReducer';
|
||||
import { __t } from '../translations';
|
||||
|
||||
export const activator = createActivator('ArchiveFileTab', true);
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
registerCommand({
|
||||
id: 'collectionTable.save',
|
||||
group: 'save',
|
||||
category: 'Collection data',
|
||||
name: 'Save',
|
||||
category: __t('command.collectionData', { defaultMessage: 'Collection data' }),
|
||||
name: __t('command.collectionData.save', { defaultMessage: 'Save' }),
|
||||
// keyText: 'CtrlOrCommand+S',
|
||||
toolbar: true,
|
||||
isRelatedToTab: true,
|
||||
@@ -56,6 +56,7 @@
|
||||
import useEditorData from '../query/useEditorData';
|
||||
import { markTabSaved, markTabUnsaved } from '../utility/common';
|
||||
import { getNumberIcon } from '../icons/FontIcon.svelte';
|
||||
import { __t } from '../translations';
|
||||
|
||||
export let tabid;
|
||||
export let conid;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
registerFileCommands({
|
||||
idPrefix: 'diagram',
|
||||
category: 'Diagram',
|
||||
category: __t('command.diagram', { defaultMessage: 'Diagram' }),
|
||||
getCurrentEditor,
|
||||
folder: 'diagrams',
|
||||
format: 'json',
|
||||
@@ -32,6 +32,7 @@
|
||||
import DiagramSettings from '../designer/DiagramSettings.svelte';
|
||||
import { derived } from 'svelte/store';
|
||||
import { isProApp } from '../utility/proTools';
|
||||
import { __t } from '../translations';
|
||||
|
||||
export let tabid;
|
||||
export let conid;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
registerFileCommands({
|
||||
idPrefix: 'favoriteJsonEditor',
|
||||
category: 'Favorite JSON editor',
|
||||
category: __t('command.favoriteJsonEditor', { defaultMessage: 'Favorite JSON editor' }),
|
||||
getCurrentEditor,
|
||||
folder: null,
|
||||
format: null,
|
||||
@@ -15,15 +15,15 @@
|
||||
registerCommand({
|
||||
id: 'favoriteJsonEditor.save',
|
||||
group: 'save',
|
||||
name: 'Save',
|
||||
category: 'Favorite JSON editor',
|
||||
name: __t('command.favoriteJsonEditor.save', { defaultMessage: 'Save' }),
|
||||
category: __t('command.favoriteJsonEditor', { defaultMessage: 'Favorite JSON editor' }),
|
||||
testEnabled: () => getCurrentEditor() != null,
|
||||
onClick: () => getCurrentEditor().save(),
|
||||
});
|
||||
registerCommand({
|
||||
id: 'favoriteJsonEditor.preview',
|
||||
name: 'Preview',
|
||||
category: 'Favorite JSON editor',
|
||||
name: __t('command.favoriteJsonEditor.preview', { defaultMessage: 'Preview' }),
|
||||
category: __t('command.favoriteJsonEditor', { defaultMessage: 'Favorite JSON editor' }),
|
||||
keyText: 'F5 | CtrlOrCommand+Enter',
|
||||
testEnabled: () => getCurrentEditor() != null,
|
||||
onClick: () => getCurrentEditor().preview(),
|
||||
@@ -43,6 +43,7 @@
|
||||
import { openFavorite } from '../appobj/FavoriteFileAppObject.svelte';
|
||||
import createActivator, { getActiveComponent } from '../utility/createActivator';
|
||||
import { apiCall } from '../utility/api';
|
||||
import { __t } from '../translations';
|
||||
|
||||
export let tabid;
|
||||
export let savedFile;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
id: 'jsonl.save',
|
||||
group: 'save',
|
||||
category: 'JSON Lines editor',
|
||||
name: 'Save',
|
||||
name: __t('command.jsonl.save', { defaultMessage: 'Save' }),
|
||||
toolbar: true,
|
||||
isRelatedToTab: true,
|
||||
icon: 'icon save',
|
||||
@@ -28,7 +28,7 @@
|
||||
registerCommand({
|
||||
id: 'jsonl.preview',
|
||||
category: 'JSON Lines editor',
|
||||
name: 'Preview',
|
||||
name: __t('command.jsonl.preview', { defaultMessage: 'Preview' }),
|
||||
icon: 'icon preview',
|
||||
keyText: 'F5',
|
||||
testEnabled: () => getCurrentEditor() != null,
|
||||
@@ -38,7 +38,7 @@
|
||||
registerCommand({
|
||||
id: 'jsonl.previewNewTab',
|
||||
category: 'JSON Lines editor',
|
||||
name: 'Preview in new tab',
|
||||
name: __t('command.jsonl.previewNewTab', { defaultMessage: 'Preview in new tab' }),
|
||||
icon: 'icon preview',
|
||||
testEnabled: () => getCurrentEditor() != null,
|
||||
onClick: () => getCurrentEditor().previewMewTab(),
|
||||
@@ -47,7 +47,7 @@
|
||||
registerCommand({
|
||||
id: 'jsonl.closePreview',
|
||||
category: 'JSON Lines editor',
|
||||
name: 'Close preview',
|
||||
name: __t('command.jsonl.closePreview', { defaultMessage: 'Close preview' }),
|
||||
icon: 'icon close',
|
||||
testEnabled: () => getCurrentEditor()?.isPreview(),
|
||||
onClick: () => getCurrentEditor().closePreview(),
|
||||
@@ -74,6 +74,7 @@
|
||||
import VerticalSplitter from '../elements/VerticalSplitter.svelte';
|
||||
import JslDataGrid from '../datagrid/JslDataGrid.svelte';
|
||||
import ToolStripCommandSplitButton from '../buttons/ToolStripCommandSplitButton.svelte';
|
||||
import { __t } from '../translations';
|
||||
|
||||
export let tabid;
|
||||
export let archiveFolder;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
registerCommand({
|
||||
id: 'markdown.preview',
|
||||
category: 'Markdown',
|
||||
name: 'Preview',
|
||||
name: __t('command.markdown.preview', { defaultMessage: 'Preview' }),
|
||||
icon: 'icon run',
|
||||
toolbar: true,
|
||||
isRelatedToTab: true,
|
||||
@@ -38,6 +38,7 @@
|
||||
import openNewTab from '../utility/openNewTab';
|
||||
import { setSelectedTab } from '../utility/common';
|
||||
import createActivator, { getActiveComponent } from '../utility/createActivator';
|
||||
import { __t } from '../translations';
|
||||
|
||||
export let tabid;
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
registerCommand({
|
||||
id: 'queryData.stopLoading',
|
||||
category: 'Query data',
|
||||
name: 'Stop loading',
|
||||
category: __t('command.queryData', { defaultMessage: 'Query data' }),
|
||||
name: __t('command.queryData.stopLoading', { defaultMessage: 'Stop loading' }),
|
||||
icon: 'icon stop',
|
||||
testEnabled: () => getCurrentEditor()?.isLoading(),
|
||||
onClick: () => getCurrentEditor().stopLoading(),
|
||||
@@ -32,6 +32,7 @@
|
||||
import yaml from 'js-yaml';
|
||||
import JslChart from '../charts/JslChart.svelte';
|
||||
import ToolStripButton from '../buttons/ToolStripButton.svelte';
|
||||
import { __t } from '../translations';
|
||||
|
||||
export const activator = createActivator('QueryDataTab', true);
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
registerCommand({
|
||||
id: 'serverSummary.refresh',
|
||||
category: 'Server sumnmary',
|
||||
name: _t('common.refresh', { defaultMessage: 'Refresh' }),
|
||||
category: __t('command.serverSummary', { defaultMessage: 'Server summary' }),
|
||||
name: __t('common.refresh', { defaultMessage: 'Refresh' }),
|
||||
keyText: 'F5 | CtrlOrCommand+R',
|
||||
toolbar: true,
|
||||
isRelatedToTab: true,
|
||||
@@ -21,7 +21,7 @@
|
||||
import LoadingInfo from '../elements/LoadingInfo.svelte';
|
||||
import TabControl from '../elements/TabControl.svelte';
|
||||
|
||||
import { _t } from '../translations';
|
||||
import { _t, __t } from '../translations';
|
||||
import { apiCall } from '../utility/api';
|
||||
import createActivator, { getActiveComponent } from '../utility/createActivator';
|
||||
import openNewTab from '../utility/openNewTab';
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
registerCommand({
|
||||
id: 'shell.copyNodeScript',
|
||||
category: 'Shell',
|
||||
name: 'Copy nodejs script',
|
||||
name: __t('command.shell.copyNodeScript', { defaultMessage: 'Copy nodejs script' }),
|
||||
testEnabled: () => getCurrentEditor() != null,
|
||||
onClick: () => getCurrentEditor().copyNodeScript(),
|
||||
});
|
||||
@@ -49,6 +49,7 @@
|
||||
import { showSnackbarError } from '../utility/snackbar';
|
||||
import useEffect from '../utility/useEffect';
|
||||
import useTimerLabel from '../utility/useTimerLabel';
|
||||
import { __t } from '../translations';
|
||||
|
||||
export let tabid;
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
registerCommand({
|
||||
id: 'sqlObject.find',
|
||||
category: 'SQL Object',
|
||||
name: 'Find',
|
||||
category: __t('command.sqlObject', { defaultMessage: 'SQL Object' }),
|
||||
name: __t('command.sqlObject.find', { defaultMessage: 'Find' }),
|
||||
keyText: 'CtrlOrCommand+F',
|
||||
testEnabled: () => getCurrentEditor() != null,
|
||||
onClick: () => getCurrentEditor().find(),
|
||||
@@ -31,6 +31,7 @@
|
||||
import ToolStripButton from '../buttons/ToolStripButton.svelte';
|
||||
import openNewTab from '../utility/openNewTab';
|
||||
import { getBoolSettingsValue } from '../settings/settingsTools';
|
||||
import { __t } from '../translations';
|
||||
|
||||
export let tabid;
|
||||
export let appObjectData;
|
||||
|
||||
Reference in New Issue
Block a user