提交 35fd228f 编写于 作者: B Benjamin Pasero

clarify && in nls comments

上级 ce7de941
......@@ -35,7 +35,7 @@ export enum WindowMode {
Minimized
}
export const defaultWindowState = function(mode = WindowMode.Normal): IWindowState {
export const defaultWindowState = function (mode = WindowMode.Normal): IWindowState {
return {
width: 1024,
height: 768,
......
......@@ -707,13 +707,13 @@ export class BaseDeleteFileAction extends BaseFileAction {
confirm = {
message: this.element.isDirectory ? nls.localize('confirmMoveTrashMessageFolder', "Are you sure you want to delete '{0}' and its contents?", this.element.name) : nls.localize('confirmMoveTrashMessageFile', "Are you sure you want to delete '{0}'?", this.element.name),
detail: isWindows ? nls.localize('undoBin', "You can restore from the recycle bin.") : nls.localize('undoTrash', "You can restore from the trash."),
primaryButton: isWindows ? nls.localize('deleteButtonLabelRecycleBin', "&&Move to Recycle Bin") : nls.localize('deleteButtonLabelTrash', "&&Move to Trash")
primaryButton: isWindows ? nls.localize('deleteButtonLabelRecycleBin', "&&Move to Recycle Bin") : nls.localize({ key: 'deleteButtonLabelTrash', comment: ['&& denotes a mnemonic'] }, "&&Move to Trash")
};
} else {
confirm = {
message: this.element.isDirectory ? nls.localize('confirmDeleteMessageFolder', "Are you sure you want to permanently delete '{0}' and its contents?", this.element.name) : nls.localize('confirmDeleteMessageFile', "Are you sure you want to permanently delete '{0}'?", this.element.name),
detail: nls.localize('irreversible', "This action is irreversible!"),
primaryButton: nls.localize('deleteButtonLabel', "&&Delete")
primaryButton: nls.localize({ key: 'deleteButtonLabel', comment: ['&& denotes a mnemonic'] }, "&&Delete")
};
}
......@@ -878,7 +878,7 @@ export class ImportFileAction extends BaseFileAction {
let confirm: IConfirmation = {
message: nls.localize('confirmOverwrite', "A file or folder with the same name already exists in the destination folder. Do you want to replace it?"),
detail: nls.localize('irreversible', "This action is irreversible!"),
primaryButton: nls.localize('replaceButtonLabel', "&&Replace")
primaryButton: nls.localize({ key: 'replaceButtonLabel', comment: ['&& denotes a mnemonic'] }, "&&Replace")
};
overwrite = this.messageService.confirm(confirm);
......
......@@ -863,7 +863,7 @@ export class FileDragAndDrop implements IDragAndDrop {
let confirm: IConfirmation = {
message: nls.localize('confirmOverwriteMessage', "'{0}' already exists in the destination folder. Do you want to replace it?", source.name),
detail: nls.localize('irreversible', "This action is irreversible!"),
primaryButton: nls.localize('replaceButtonLabel', "&&Replace")
primaryButton: nls.localize({ key: 'replaceButtonLabel', comment: ['&& denotes a mnemonic'] }, "&&Replace")
};
if (this.messageService.confirm(confirm)) {
......
......@@ -166,8 +166,8 @@ export class TextFileService extends AbstractTextFileService {
// Windows: Save | Don't Save | Cancel
// Mac/Linux: Save | Cancel | Don't
const save = { label: resourcesToConfirm.length > 1 ? this.mnemonicLabel(nls.localize('saveAll', "&&Save All")) : this.mnemonicLabel(nls.localize('save', "&&Save")), result: ConfirmResult.SAVE };
const dontSave = { label: this.mnemonicLabel(nls.localize('dontSave', "Do&&n't Save")), result: ConfirmResult.DONT_SAVE };
const save = { label: resourcesToConfirm.length > 1 ? this.mnemonicLabel(nls.localize({ key: 'saveAll', comment: ['&& denotes a mnemonic'] }, "&&Save All")) : this.mnemonicLabel(nls.localize({ key: 'save', comment: ['&& denotes a mnemonic'] }, "&&Save")), result: ConfirmResult.SAVE };
const dontSave = { label: this.mnemonicLabel(nls.localize({ key: 'dontSave', comment: ['&& denotes a mnemonic'] }, "Do&&n't Save")), result: ConfirmResult.DONT_SAVE };
const cancel = { label: nls.localize('cancel', "Cancel"), result: ConfirmResult.CANCEL };
const buttons = [save];
......
......@@ -437,7 +437,7 @@ export abstract class BaseUndoAction extends GitAction {
detail: count === 1
? nls.localize('confirmUndoAllOne', "There are unstaged changes in {0} file.\n\nThis action is irreversible!", count)
: nls.localize('confirmUndoAllMultiple', "There are unstaged changes in {0} files.\n\nThis action is irreversible!", count),
primaryButton: nls.localize('cleanChangesLabel', "&&Clean Changes")
primaryButton: nls.localize({ key: 'cleanChangesLabel', comment: ['&& denotes a mnemonic'] }, "&&Clean Changes")
};
}
......@@ -446,7 +446,7 @@ export abstract class BaseUndoAction extends GitAction {
return {
message: nls.localize('confirmUndo', "Are you sure you want to clean changes in '{0}'?", label),
detail: nls.localize('irreversible', "This action is irreversible!"),
primaryButton: nls.localize('cleanChangesLabel', "&&Clean Changes")
primaryButton: nls.localize({ key: 'cleanChangesLabel', comment: ['&& denotes a mnemonic'] }, "&&Clean Changes")
};
}
......@@ -984,7 +984,7 @@ export class PublishAction extends GitAction {
const result = this.messageService.confirm({
message: nls.localize('confirmPublishMessage', "Are you sure you want to publish '{0}' to '{1}'?", branchName, remoteName),
primaryButton: nls.localize('confirmPublishMessageButton', "&&Publish")
primaryButton: nls.localize({ key: 'confirmPublishMessageButton', comment: ['&& denotes a mnemonic'] }, "&&Publish")
});
promise = TPromise.as(result ? remoteName : null);
......
......@@ -737,7 +737,7 @@ class TaskService extends EventEmitter implements ITaskService {
if (this._taskSystem && this._taskSystem.isActiveSync()) {
if (this._taskSystem.canAutoTerminate() || this.messageService.confirm({
message: nls.localize('TaskSystem.runningTask', 'There is a task running. Do you want to terminate it?'),
primaryButton: nls.localize('TaskSystem.terminateTask', "&&Terminate Task")
primaryButton: nls.localize({ key: 'TaskSystem.terminateTask', comment: ['&& denotes a mnemonic'] }, "&&Terminate Task")
})) {
return this._taskSystem.terminate().then((response) => {
if (response.success) {
......
......@@ -27,7 +27,7 @@ export class MessageService extends WorkbenchMessageService {
public confirm(confirmation: IConfirmation): boolean {
if (!confirmation.primaryButton) {
confirmation.primaryButton = nls.localize('yesButton', "&&Yes");
confirmation.primaryButton = nls.localize({ key: 'yesButton', comment: ['&& denotes a mnemonic'] }, "&&Yes");
}
if (!confirmation.secondaryButton) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册