diff --git a/packages/debug/src/browser/console/debug-console-items.tsx b/packages/debug/src/browser/console/debug-console-items.tsx index ff21c14ff00e9..79fc0dd20398f 100644 --- a/packages/debug/src/browser/console/debug-console-items.tsx +++ b/packages/debug/src/browser/console/debug-console-items.tsx @@ -21,6 +21,7 @@ import { ConsoleItem, CompositeConsoleItem } from '@theia/console/lib/browser/co import { DebugSession } from '../debug-session'; import { Severity } from '@theia/core/lib/common/severity'; import * as monaco from '@theia/monaco-editor-core'; +import { nls } from '@theia/core'; export type DebugSessionProvider = () => DebugSession | undefined; @@ -237,7 +238,7 @@ export class DebugVariable extends ExpressionContainer { return; } const input = new SingleTextInputDialog({ - title: `Set ${this.name} Value`, + title: nls.localize('theia/debug/debugVariableInput', 'Set {0} Value', this.name), initialValue: this.value }); const newValue = await input.open(); diff --git a/packages/debug/src/browser/view/debug-watch-expression.tsx b/packages/debug/src/browser/view/debug-watch-expression.tsx index ab21689aae14a..c826613e0e869 100644 --- a/packages/debug/src/browser/view/debug-watch-expression.tsx +++ b/packages/debug/src/browser/view/debug-watch-expression.tsx @@ -62,7 +62,7 @@ export class DebugWatchExpression extends ExpressionItem { async open(): Promise { const input = new SingleTextInputDialog({ - title: 'Edit Watch Expression', + title: nls.localizeByDefault('Edit Expression'), initialValue: this.expression }); const newValue = await input.open(); diff --git a/packages/filesystem/src/browser/file-tree/file-tree-model.ts b/packages/filesystem/src/browser/file-tree/file-tree-model.ts index 108aaa9be260f..69a21f2644b45 100644 --- a/packages/filesystem/src/browser/file-tree/file-tree-model.ts +++ b/packages/filesystem/src/browser/file-tree/file-tree-model.ts @@ -16,7 +16,7 @@ import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; -import { CompositeTreeNode, TreeNode, ConfirmDialog, CompressedTreeModel } from '@theia/core/lib/browser'; +import { CompositeTreeNode, TreeNode, ConfirmDialog, CompressedTreeModel, Dialog } from '@theia/core/lib/browser'; import { FileStatNode, DirNode, FileNode } from './file-tree'; import { LocationService } from '../location'; import { LabelProvider } from '@theia/core/lib/browser/label-provider'; @@ -25,6 +25,7 @@ import { FileOperationError, FileOperationResult, FileChangesEvent, FileChangeTy import { MessageService } from '@theia/core/lib/common/message-service'; import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; import { FileSystemUtils } from '../../common'; +import { nls } from '@theia/core'; @injectable() export class FileTreeModel extends CompressedTreeModel implements LocationService { @@ -200,10 +201,10 @@ export class FileTreeModel extends CompressedTreeModel implements LocationServic protected async shouldReplace(fileName: string): Promise { const dialog = new ConfirmDialog({ - title: 'Replace file', - msg: `File '${fileName}' already exists in the destination folder. Do you want to replace it?`, - ok: 'Yes', - cancel: 'No' + title: nls.localize('theia/filesystem/replaceTitle', 'Replace File'), + msg: nls.localizeByDefault('{0} already exists. Are you sure you want to overwrite it?', fileName), + ok: Dialog.YES, + cancel: Dialog.NO }); return !!await dialog.open(); } diff --git a/packages/git/src/browser/git-scm-provider.ts b/packages/git/src/browser/git-scm-provider.ts index ef18a95022d0b..86836561e7a3c 100644 --- a/packages/git/src/browser/git-scm-provider.ts +++ b/packages/git/src/browser/git-scm-provider.ts @@ -415,14 +415,14 @@ export class GitScmProvider implements ScmProvider { fileText = `${paths.length} files`; } return new ConfirmDialog({ - title: 'Discard changes', + title: nls.localize('vscode.git/package/command.clean', 'Discard Changes'), msg: nls.localize('vscode.git/commands/confirm discard', 'Do you really want to discard changes in {0}?', fileText) }).open(); } protected confirmAll(): Promise { return new ConfirmDialog({ - title: 'Discard All Changes', + title: nls.localize('vscode.git/package/command.cleanAll', 'Discard All Changes'), msg: nls.localize('vscode.git/commands/confirm discard all', 'Do you really want to discard all changes?') }).open(); } diff --git a/packages/plugin-ext/src/main/browser/commands.ts b/packages/plugin-ext/src/main/browser/commands.ts index 41b76340e8b8a..601484cf5c6a3 100644 --- a/packages/plugin-ext/src/main/browser/commands.ts +++ b/packages/plugin-ext/src/main/browser/commands.ts @@ -71,7 +71,7 @@ class OpenNewTabDialog extends AbstractDialog { constructor(windowService: WindowService) { super({ - title: 'Your browser prevented opening of a new tab' + title: nls.localize('theia/plugin/blockNewTab', 'Your browser prevented opening of a new tab') }); this.windowService = windowService; diff --git a/packages/plugin-ext/src/main/browser/dialogs-main.ts b/packages/plugin-ext/src/main/browser/dialogs-main.ts index 4519f3f8677ff..501bd7618a9a8 100644 --- a/packages/plugin-ext/src/main/browser/dialogs-main.ts +++ b/packages/plugin-ext/src/main/browser/dialogs-main.ts @@ -24,6 +24,7 @@ import { FileUploadService } from '@theia/filesystem/lib/browser/file-upload-ser import { FileService } from '@theia/filesystem/lib/browser/file-service'; import { FileStat } from '@theia/filesystem/lib/common/files'; import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; +import { nls } from '@theia/core'; export class DialogsMainImpl implements DialogsMain { @@ -146,7 +147,7 @@ export class DialogsMainImpl implements DialogsMain { try { // Create save file dialog props const dialogProps = { - title: options.title ?? 'Save', + title: options.title ?? nls.localizeByDefault('Save'), saveLabel: options.saveLabel, filters: options.filters, inputValue: fileNameValue