Skip to content

Commit

Permalink
Translate Theia
Browse files Browse the repository at this point in the history
  • Loading branch information
msujew committed Oct 15, 2021
1 parent 5d88bf5 commit b2ddec3
Showing 118 changed files with 1,768 additions and 1,439 deletions.
9 changes: 4 additions & 5 deletions packages/bulk-edit/src/browser/bulk-edit-contribution.ts
Original file line number Diff line number Diff line change
@@ -21,10 +21,9 @@ import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-con
import { BulkEditCommands } from './bulk-edit-commands';
import { MonacoBulkEditService } from '@theia/monaco/lib/browser/monaco-bulk-edit-service';
import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
import { BulkEditTreeWidget, BULK_EDIT_TREE_WIDGET_ID } from './bulk-edit-tree';
import { BulkEditTreeWidget, BULK_EDIT_TREE_WIDGET_ID, BULK_EDIT_WIDGET_NAME } from './bulk-edit-tree';
import { QuickViewService } from '@theia/core/lib/browser';

export const BULK_EDIT_WIDGET_NAME = 'Refactor Preview';
import { nls } from '@theia/core/lib/browser/nls';

@injectable()
export class BulkEditContribution extends AbstractViewContribution<BulkEditTreeWidget> implements TabBarToolbarContribution {
@@ -64,13 +63,13 @@ export class BulkEditContribution extends AbstractViewContribution<BulkEditTreeW
toolbarRegistry.registerItem({
id: BulkEditCommands.APPLY.id,
command: BulkEditCommands.APPLY.id,
tooltip: 'Apply Refactoring',
tooltip: nls.localize('vscode/bulkEdit.contribution/apply', 'Apply Refactoring'),
priority: 0,
});
toolbarRegistry.registerItem({
id: BulkEditCommands.DISCARD.id,
command: BulkEditCommands.DISCARD.id,
tooltip: 'Discard Refactoring',
tooltip: nls.localize('vscode/bulkEdit.contribution/Discard', 'Discard Refactoring'),
priority: 1,
});
}
Original file line number Diff line number Diff line change
@@ -28,9 +28,10 @@ import { EditorWidget, EditorManager, EditorOpenerOptions } from '@theia/editor/
import { DiffUris } from '@theia/core/lib/browser';
import { MEMORY_TEXT } from '@theia/core/lib/common';
import { Disposable } from '@theia/core/lib/common/disposable';
import { nls } from '@theia/core/lib/browser/nls';

export const BULK_EDIT_TREE_WIDGET_ID = 'bulkedit';
export const BULK_EDIT_WIDGET_NAME = 'Refactor Preview';
export const BULK_EDIT_WIDGET_NAME = nls.localize('vscode/bulkEdit.contribution/panel', 'Refactor Preview');

@injectable()
export class BulkEditTreeWidget extends TreeWidget {
@@ -95,7 +96,7 @@ export class BulkEditTreeWidget extends TreeWidget {
if (CompositeTreeNode.is(model.root) && model.root.children.length > 0) {
return super.renderTree(model);
}
return <div className='theia-widget-noInfo noEdits'>No edits have been detected in the workspace so far.</div>;
return <div className='theia-widget-noInfo noEdits'>{nls.localize('vscode/bulkEditService/nothing', 'No edits have been detected in the workspace so far.')}</div>;
}

protected renderCaption(node: TreeNode, props: NodeProps): React.ReactNode {
Original file line number Diff line number Diff line change
@@ -27,10 +27,10 @@ export const CALL_HIERARCHY_TOGGLE_COMMAND_ID = 'callhierarchy:toggle';
export const CALL_HIERARCHY_LABEL = 'Call Hierarchy';

export namespace CallHierarchyCommands {
export const OPEN: Command = {
export const OPEN = Command.toLocalizedCommand({
id: 'callhierarchy:open',
label: 'Open Call Hierarchy'
};
}, 'theia/callhierarchy/open');
}

@injectable()
9 changes: 5 additions & 4 deletions packages/console/src/browser/console-contribution.ts
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ import { ConsoleManager } from './console-manager';
import { ConsoleKeybindingContexts } from './console-keybinding-contexts';
import { ConsoleWidget } from './console-widget';
import { ConsoleContentWidget } from './console-content-widget';
import { nls } from '@theia/core/lib/browser/nls';

export namespace ConsoleCommands {
export const SELECT_ALL: Command = {
@@ -91,22 +92,22 @@ export class ConsoleContribution implements FrontendApplicationContribution, Com
registerMenus(menus: MenuModelRegistry): void {
menus.registerMenuAction(ConsoleContextMenu.CLIPBOARD, {
commandId: CommonCommands.COPY.id,
label: 'Copy',
label: CommonCommands.COPY.label,
order: 'a1',
});
menus.registerMenuAction(ConsoleContextMenu.CLIPBOARD, {
commandId: ConsoleCommands.SELECT_ALL.id,
label: 'Select All',
label: CommonCommands.SELECT_ALL.label,
order: 'a2'
});
menus.registerMenuAction(ConsoleContextMenu.CLIPBOARD, {
commandId: ConsoleCommands.COLLAPSE_ALL.id,
label: 'Collapse All',
label: nls.localize('vscode/repl/collapse', 'Collapse All'),
order: 'a3'
});
menus.registerMenuAction(ConsoleContextMenu.CLEAR, {
commandId: ConsoleCommands.CLEAR.id,
label: 'Clear Console'
label: nls.localize('vscode/repl/clearRepl', 'Clear Console')
});
}

4 changes: 2 additions & 2 deletions packages/core/src/browser/about-dialog.tsx
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

import * as React from 'react';
import { inject, injectable, postConstruct } from 'inversify';
import { DialogProps } from './dialogs';
import { Dialog, DialogProps } from './dialogs';
import { ReactDialog } from './dialogs/react-dialog';
import { ApplicationServer, ApplicationInfo, ExtensionInfo } from '../common/application-protocol';
import { Message } from './widgets/widget';
@@ -44,7 +44,7 @@ export class AboutDialog extends ReactDialog<void> {
super({
title: FrontendApplicationConfigProvider.get().applicationName,
});
this.appendAcceptButton('Ok');
this.appendAcceptButton(Dialog.OK);
}

@postConstruct()
Loading

0 comments on commit b2ddec3

Please sign in to comment.