Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate Theia using language packs #10106

Merged
merged 1 commit into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Expand Up @@ -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/common/nls';

@injectable()
export class BulkEditContribution extends AbstractViewContribution<BulkEditTreeWidget> implements TabBarToolbarContribution {
Expand Down Expand Up @@ -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,
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ import URI from '@theia/core/lib/common/uri';
import { EditorWidget, EditorManager, EditorOpenerOptions } from '@theia/editor/lib/browser';
import { MEMORY_TEXT } from '@theia/core/lib/common';
import { Disposable } from '@theia/core/lib/common/disposable';
import { nls } from '@theia/core/lib/common/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 {
Expand Down Expand Up @@ -94,7 +95,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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
9 changes: 5 additions & 4 deletions packages/console/src/browser/console-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/common/nls';

export namespace ConsoleCommands {
export const SELECT_ALL: Command = {
Expand Down Expand Up @@ -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')
});
}

Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/browser/about-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -44,7 +44,7 @@ export class AboutDialog extends ReactDialog<void> {
super({
title: FrontendApplicationConfigProvider.get().applicationName,
});
this.appendAcceptButton('Ok');
this.appendAcceptButton(Dialog.OK);
}

@postConstruct()
Expand Down
Loading