mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 00:56:02 +00:00
SYNC: Merge pull request #18 from dbgate/feature/translation5
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
import ManagerInnerContainer from '../elements/ManagerInnerContainer.svelte';
|
import ManagerInnerContainer from '../elements/ManagerInnerContainer.svelte';
|
||||||
import FontIcon from '../icons/FontIcon.svelte';
|
import FontIcon from '../icons/FontIcon.svelte';
|
||||||
import PerspectiveFiltersColumn from './PerspectiveFiltersColumn.svelte';
|
import PerspectiveFiltersColumn from './PerspectiveFiltersColumn.svelte';
|
||||||
|
import { _t } from '../translations';
|
||||||
|
|
||||||
export let managerSize;
|
export let managerSize;
|
||||||
export let config: PerspectiveConfig;
|
export let config: PerspectiveConfig;
|
||||||
@@ -25,8 +26,8 @@
|
|||||||
<ManagerInnerContainer width={managerSize} isFlex={filterCount == 0}>
|
<ManagerInnerContainer width={managerSize} isFlex={filterCount == 0}>
|
||||||
{#if filterCount == 0}
|
{#if filterCount == 0}
|
||||||
<div class="msg">
|
<div class="msg">
|
||||||
<div class="mb-3 bold">No Filters defined</div>
|
<div class="mb-3 bold">{_t('perspective.noFiltersDefined', { defaultMessage: "No Filters defined" })}</div>
|
||||||
<div><FontIcon icon="img info" /> Use context menu, command "Add to filter" in table or in tree</div>
|
<div><FontIcon icon="img info" /> {_t('perspective.useContextMenuAddToFilter', { defaultMessage: 'Use context menu, command "Add to filter" in table or in tree' })}</div>
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
{#each config.nodes as nodeConfig}
|
{#each config.nodes as nodeConfig}
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
registerCommand({
|
registerCommand({
|
||||||
id: 'perspective.openJson',
|
id: 'perspective.openJson',
|
||||||
category: 'Perspective',
|
category: __t('command.perspective', { defaultMessage: 'Perspective' }),
|
||||||
name: 'Open JSON',
|
name: __t('command.perspective.openJson', { defaultMessage: 'Open JSON' }),
|
||||||
isRelatedToTab: true,
|
isRelatedToTab: true,
|
||||||
testEnabled: () => getCurrentEditor()?.openJsonEnabled(),
|
testEnabled: () => getCurrentEditor()?.openJsonEnabled(),
|
||||||
onClick: () => getCurrentEditor().openJson(),
|
onClick: () => getCurrentEditor().openJson(),
|
||||||
@@ -40,6 +40,7 @@
|
|||||||
import openNewTab from '../utility/openNewTab';
|
import openNewTab from '../utility/openNewTab';
|
||||||
import { getFilterValueExpression } from 'dbgate-filterparser';
|
import { getFilterValueExpression } from 'dbgate-filterparser';
|
||||||
import StatusBarTabItem from '../widgets/StatusBarTabItem.svelte';
|
import StatusBarTabItem from '../widgets/StatusBarTabItem.svelte';
|
||||||
|
import { __t } from '../translations';
|
||||||
|
|
||||||
const TABS_BY_FIELD = {
|
const TABS_BY_FIELD = {
|
||||||
tables: {
|
tables: {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
registerCommand({
|
registerCommand({
|
||||||
id: 'perspective.customJoin',
|
id: 'perspective.customJoin',
|
||||||
category: 'Perspective',
|
category: __t('perspective.category', { defaultMessage: 'Perspective' }),
|
||||||
name: 'Custom join',
|
name: __t('perspective.customJoin', { defaultMessage: 'Custom join' }),
|
||||||
keyText: 'CtrlOrCommand+J',
|
keyText: 'CtrlOrCommand+J',
|
||||||
isRelatedToTab: true,
|
isRelatedToTab: true,
|
||||||
icon: 'icon custom-join',
|
icon: 'icon custom-join',
|
||||||
@@ -65,6 +65,7 @@
|
|||||||
import FontIcon from '../icons/FontIcon.svelte';
|
import FontIcon from '../icons/FontIcon.svelte';
|
||||||
import InlineButton from '../buttons/InlineButton.svelte';
|
import InlineButton from '../buttons/InlineButton.svelte';
|
||||||
import { usePerspectiveDataPatterns } from '../utility/usePerspectiveDataPatterns';
|
import { usePerspectiveDataPatterns } from '../utility/usePerspectiveDataPatterns';
|
||||||
|
import { _t, __t } from '../translations';
|
||||||
|
|
||||||
const dbg = debug('dbgate:PerspectiveView');
|
const dbg = debug('dbgate:PerspectiveView');
|
||||||
|
|
||||||
@@ -168,7 +169,7 @@
|
|||||||
<HorizontalSplitter initialValue={getInitialManagerSize()} bind:size={managerSize} allowCollapseChild1>
|
<HorizontalSplitter initialValue={getInitialManagerSize()} bind:size={managerSize} allowCollapseChild1>
|
||||||
<div class="left" slot="1">
|
<div class="left" slot="1">
|
||||||
<WidgetColumnBar>
|
<WidgetColumnBar>
|
||||||
<WidgetColumnBarItem title="Choose data" name="perspectiveTree" height={'70%'}>
|
<WidgetColumnBarItem title={_t('perspective.chooseData', { defaultMessage: "Choose data" })} name="perspectiveTree" height={'70%'}>
|
||||||
{#if tempRoot && tempRoot != root}
|
{#if tempRoot && tempRoot != root}
|
||||||
<div class="temp-root">
|
<div class="temp-root">
|
||||||
<div>
|
<div>
|
||||||
@@ -184,7 +185,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<SearchBoxWrapper>
|
<SearchBoxWrapper>
|
||||||
<SearchInput placeholder="Search column or table" bind:value={filter} />
|
<SearchInput placeholder={_t('perspective.searchColumnOrTable', { defaultMessage: "Search column or table" })} bind:value={filter} />
|
||||||
<CloseSearchButton bind:filter />
|
<CloseSearchButton bind:filter />
|
||||||
</SearchBoxWrapper>
|
</SearchBoxWrapper>
|
||||||
|
|
||||||
@@ -195,7 +196,7 @@
|
|||||||
</ManagerInnerContainer>
|
</ManagerInnerContainer>
|
||||||
</WidgetColumnBarItem>
|
</WidgetColumnBarItem>
|
||||||
|
|
||||||
<WidgetColumnBarItem title="Filters" name="tableFilters">
|
<WidgetColumnBarItem title={_t('perspective.filters', { defaultMessage: "Filters" })} name="tableFilters">
|
||||||
<PerspectiveFilters {managerSize} {config} {setConfig} {conid} {database} {driver} {root} />
|
<PerspectiveFilters {managerSize} {config} {setConfig} {conid} {database} {driver} {root} />
|
||||||
</WidgetColumnBarItem>
|
</WidgetColumnBarItem>
|
||||||
</WidgetColumnBar>
|
</WidgetColumnBar>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
registerCommand({
|
registerCommand({
|
||||||
id: 'jsonl.save',
|
id: 'jsonl.save',
|
||||||
group: 'save',
|
group: 'save',
|
||||||
category: 'JSON Lines editor',
|
category: __t('command.jsonl', { defaultMessage: 'JSON Lines editor' }),
|
||||||
name: __t('command.jsonl.save', { defaultMessage: 'Save' }),
|
name: __t('command.jsonl.save', { defaultMessage: 'Save' }),
|
||||||
toolbar: true,
|
toolbar: true,
|
||||||
isRelatedToTab: true,
|
isRelatedToTab: true,
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
registerCommand({
|
registerCommand({
|
||||||
id: 'jsonl.preview',
|
id: 'jsonl.preview',
|
||||||
category: 'JSON Lines editor',
|
category: __t('command.jsonl', { defaultMessage: 'JSON Lines editor' }),
|
||||||
name: __t('command.jsonl.preview', { defaultMessage: 'Preview' }),
|
name: __t('command.jsonl.preview', { defaultMessage: 'Preview' }),
|
||||||
icon: 'icon preview',
|
icon: 'icon preview',
|
||||||
keyText: 'F5',
|
keyText: 'F5',
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
registerCommand({
|
registerCommand({
|
||||||
id: 'jsonl.previewNewTab',
|
id: 'jsonl.previewNewTab',
|
||||||
category: 'JSON Lines editor',
|
category: __t('command.jsonl', { defaultMessage: 'JSON Lines editor' }),
|
||||||
name: __t('command.jsonl.previewNewTab', { defaultMessage: 'Preview in new tab' }),
|
name: __t('command.jsonl.previewNewTab', { defaultMessage: 'Preview in new tab' }),
|
||||||
icon: 'icon preview',
|
icon: 'icon preview',
|
||||||
testEnabled: () => getCurrentEditor() != null,
|
testEnabled: () => getCurrentEditor() != null,
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
registerCommand({
|
registerCommand({
|
||||||
id: 'jsonl.closePreview',
|
id: 'jsonl.closePreview',
|
||||||
category: 'JSON Lines editor',
|
category: __t('command.jsonl', { defaultMessage: 'JSON Lines editor' }),
|
||||||
name: __t('command.jsonl.closePreview', { defaultMessage: 'Close preview' }),
|
name: __t('command.jsonl.closePreview', { defaultMessage: 'Close preview' }),
|
||||||
icon: 'icon close',
|
icon: 'icon close',
|
||||||
testEnabled: () => getCurrentEditor()?.isPreview(),
|
testEnabled: () => getCurrentEditor()?.isPreview(),
|
||||||
|
|||||||
Reference in New Issue
Block a user