Skip to content

Commit

Permalink
Translate Theia
Browse files Browse the repository at this point in the history
  • Loading branch information
msujew committed Sep 15, 2021
1 parent 68dbea5 commit 4b05a4d
Show file tree
Hide file tree
Showing 92 changed files with 1,331 additions and 982 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
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/browser/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 @@ -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 {
Expand Down Expand Up @@ -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 {
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/browser/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
145 changes: 145 additions & 0 deletions packages/core/data/i18n/nls.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
{
"theia": {
"core": {
"common": {
"showNextTabInGroup": "Switch to Next Tab in Group",
"showPreviousTabInGroup": "Switch to Previous Tab in Group",
"showNextTabGroup": "Switch to Next Tab Group",
"showPreviousTabGroup": "Switch to Previous Tab Group",
"closeTab": "Close Tab",
"closeOthers": "Close Other Tabs",
"closeRight": "Close Tabs to the Right",
"closeAll": "Close All Tabs",
"closeTabMain": "Close Tab in Main Area",
"closeOtherTabMain": "Close Other Tabs in Main Area",
"closeAllTabMain": "Close All Tabs in Main Area",
"collapseTab": "Collapse Side Panel",
"collapseAllTabs": "Collapse All Side Panels",
"collapseBottomPanel": "Toggle Bottom Panel",
"toggleMaximized": "Toggle Maximized"
},
"keyboard": {
"choose": "Choose Keyboard Layout",
"chooseLayout": "Choose a keyboard layout",
"current": "(current: {0})",
"currentLayout": " - current layout",
"tryDetect": "Try to detect the keyboard layout from browser information and pressed keys.",
"mac": "Mac Keyboards",
"pc": "PC Keyboards"
}
},
"debug": {
"continueAll": "Continue All",
"pauseAll": "Pause All",
"copyExpressionValue": "Copy Expression Value",
"reveal": "Reveal",
"openLeft": "Open Left",
"openRight": "Open Right",
"openBottom": "Open Bottom",
"threads": "Threads"
},
"editor": {
"showAllEditors": "Show All Opened Editors",
"reopenDirty": "The file is dirty. Please save it first before reopening it with another encoding."
},
"external-terminal": {
"cwd": "Select current working directory for new external terminal"
},
"filesystem": {
"uploadFiles": "Upload Files...",
"copyDownloadLink": "Copy Download Link"
},
"getting-started": {
"newExtension": "Building a New Extension",
"newPlugin": "Building a New Plugin"
},
"git": {
"toggleBlameAnnotations": "Toggle Blame Annotations",
"addSignedOff": "Add Signed-off-by",
"noPreviousCommit": "No previous commit to amend",
"added": "Added",
"unstaged": "Unstaged",
"renamed": "Renamed",
"copied": "Copied",
"conflicted": "Conflicted"
},
"markers": {
"clearAll": "Clear All"
},
"mini-browser": {
"typeUrl": "Type a URL"
},
"navigator": {
"reveal": "Reveal in Explorer",
"toggleHiddenFiles": "Toggle Hidden Files",
"autoReveal": "Auto Reveal",
"refresh": "Refresh in Explorer"
},
"output": {
"clearOutputChannel": "Clear Output Channel...",
"showOutputChannel": "Show Output Channel...",
"hideOutputChannel": "Hide Output Channel...",
"closeOutputChannel": "Close Output Channel...",
"outputChannels": "Output Channels",
"hiddenChannels": "Hidden Channels"
},
"preview": {
"openPreviewSide": "Open Preview to the Side",
"openSource": "Open Source"
},
"property-view": {
"properties": "Properties",
"directory": "Directory",
"file": "File",
"symbolicLink": "Symbolic link",
"location": "Location",
"name": "Name",
"path": "Path",
"lastModified": "Last modified",
"created": "Created",
"size": "Size"
},
"scm": {
"amendHeadCommit": "HEAD Commit",
"amendLastCommit": "Amend last commit",
"amend": "Amend",
"unamendCommit": "Unamend commit",
"unamend": "Unamend",
"history": "History",
"changeRepository": "Change Repository..."
},
"siw": {
"includeIgnoredFiles": "Include Ignored Files",
"noFolderSpecified": "You have not opened or specified a folder. Only open files are currently searched.",
"resultSubset": "This is only a subset of all results. Use a more specific search term to narrow down the result list."
},
"task": {
"attachTask": "Attach Task...",
"openUserTasks": "Open User Tasks",
"clearHistory": "Clear History"
},
"typehierarchy": {
"typeHierarchy": "Type Hierarchy",
"subtypeHierarchy": "Subtype Hierarchy",
"supertypeHierarchy": "Supertype Hierarchy"
},
"vsx-registry": {
"installFromVSIX": "Install from VSIX",
"openVSX": "Open VSX Registry"
},
"workspace": {
"failSaveAs": "Cannot run \"{0}\" for the current widget.",
"openRecentWorkspace": "Open Recent Workspace...",
"closeWorkspace": "Do you really want to close the workspace?",
"duplicate": "Duplicate",
"workspaceFolderAddedTitle": "Folder added to Workspace",
"workspaceFolderAdded": "A workspace with multiple roots was created. Do you want to save your workspace configuration as a file?",
"noErasure": "Note: Nothing will be erased from disk",
"failApply": "Could not apply changes to new file"
},
"webview": {
"goToReadme": "Go To README",
"messageWarning": "The {0} endpoint's host pattern has been changed to `{1}`; changing the pattern can lead to security vulnerabilities. See `{2}` for more information."
}
}
}
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

0 comments on commit 4b05a4d

Please sign in to comment.