提交 eb8e1815 编写于 作者: B Benjamin Pasero

dialogs - make sure to put mnemonics for button labels

上级 d9b04426
......@@ -120,8 +120,8 @@ export class ExtensionHostProfileService extends Disposable implements IExtensio
type: 'info',
message: nls.localize('restart1', "Profile Extensions"),
detail: nls.localize('restart2', "In order to profile extensions a restart is required. Do you want to restart '{0}' now?", this._productService.nameLong),
primaryButton: nls.localize('restart3', "Restart"),
secondaryButton: nls.localize('cancel', "Cancel")
primaryButton: nls.localize('restart3', "&&Restart"),
secondaryButton: nls.localize('cancel', "&&Cancel")
}).then(res => {
if (res.confirmed) {
this._nativeHostService.relaunch({ addArgs: [`--inspect-extensions=${randomPort()}`] });
......
......@@ -606,8 +606,8 @@ export class DebugExtensionHostAction extends Action {
type: 'info',
message: nls.localize('restart1', "Profile Extensions"),
detail: nls.localize('restart2', "In order to profile extensions a restart is required. Do you want to restart '{0}' now?", this.productService.nameLong),
primaryButton: nls.localize('restart3', "Restart"),
secondaryButton: nls.localize('cancel', "Cancel")
primaryButton: nls.localize('restart3', "&&Restart"),
secondaryButton: nls.localize('cancel', "&&Cancel")
});
if (res.confirmed) {
await this._nativeHostService.relaunch({ addArgs: [`--inspect-extensions=${randomPort()}`] });
......
......@@ -77,8 +77,8 @@ export class StartupProfiler implements IWorkbenchContribution {
type: 'info',
message: localize('prof.message', "Successfully created profiles."),
detail: localize('prof.detail', "Please create an issue and manually attach the following files:\n{0}", profileFiles),
primaryButton: localize('prof.restartAndFileIssue', "Create Issue and Restart"),
secondaryButton: localize('prof.restart', "Restart")
primaryButton: localize('prof.restartAndFileIssue', "&&Create Issue and Restart"),
secondaryButton: localize('prof.restart', "&&Restart")
}).then(res => {
if (res.confirmed) {
Promise.all<any>([
......@@ -90,7 +90,7 @@ export class StartupProfiler implements IWorkbenchContribution {
type: 'info',
message: localize('prof.thanks', "Thanks for helping us."),
detail: localize('prof.detail.restart', "A final restart is required to continue to use '{0}'. Again, thank you for your contribution.", this._productService.nameLong),
primaryButton: localize('prof.restart', "Restart"),
primaryButton: localize('prof.restart.button', "&&Restart"),
secondaryButton: undefined
}).then(() => {
// now we are ready to restart
......
......@@ -608,7 +608,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
type: 'info',
message: localize('turn off sync confirmation', "Do you want to turn off sync?"),
detail: localize('turn off sync detail', "Your settings, keybindings, extensions, snippets and UI State will no longer be synced."),
primaryButton: localize('turn off', "Turn Off"),
primaryButton: localize({ key: 'turn off', comment: ['&& denotes a mnemonic'] }, "&&Turn off"),
checkbox: this.userDataSyncWorkbenchService.accountStatus === AccountStatus.Available ? {
label: localize('turn off sync everywhere', "Turn off sync on all your devices and clear the data from the cloud.")
} : undefined
......@@ -1222,6 +1222,8 @@ class AcceptChangesContribution extends Disposable implements IEditorContributio
const isRemote = conflicts.some(({ remoteResource }) => isEqual(remoteResource, resource));
const acceptRemoteLabel = localize('accept remote', "Accept Remote");
const acceptMergesLabel = localize('accept merges', "Accept Merges");
const acceptRemoteButtonLabel = localize('accept remote button', "Accept &&Remote");
const acceptMergesButtonLabel = localize('accept merges button', "Accept &&Merges");
this.acceptChangesButton = this.instantiationService.createInstance(FloatingClickWidget, this.editor, isRemote ? acceptRemoteLabel : acceptMergesLabel, null);
this._register(this.acceptChangesButton.onClick(async () => {
const model = this.editor.getModel();
......@@ -1236,7 +1238,7 @@ class AcceptChangesContribution extends Disposable implements IEditorContributio
message: isRemote
? localize('confirm replace and overwrite local', "Would you like to accept remote {0} and replace local {1}?", syncAreaLabel.toLowerCase(), syncAreaLabel.toLowerCase())
: localize('confirm replace and overwrite remote', "Would you like to accept merges and replace remote {0}?", syncAreaLabel.toLowerCase()),
primaryButton: isRemote ? acceptRemoteLabel : acceptMergesLabel
primaryButton: isRemote ? acceptRemoteButtonLabel : acceptMergesButtonLabel
});
if (result.confirmed) {
try {
......
......@@ -491,7 +491,7 @@ class UserDataSyncMachinesViewDataProvider implements ITreeViewDataProvider {
const result = await this.dialogService.confirm({
type: 'info',
message: localize('turn off sync on machine', "Are you sure you want to turn off sync on {0}?", machine.name),
primaryButton: localize('turn off', "Turn off"),
primaryButton: localize({ key: 'turn off', comment: ['&& denotes a mnemonic'] }, "&&Turn off"),
});
if (!result.confirmed) {
......
......@@ -288,8 +288,8 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat
type: 'warning',
message: localize('sync in progress', "Settings Sync is being turned on. Would you like to cancel it?"),
title: localize('settings sync', "Settings Sync"),
primaryButton: localize('yes', "Yes"),
secondaryButton: localize('no', "No"),
primaryButton: localize({ key: 'yes', comment: ['&& denotes a mnemonic'] }, "&&Yes"),
secondaryButton: localize({ key: 'no', comment: ['&& denotes a mnemonic'] }, "&&No"),
});
if (result.confirmed) {
await manualSyncTask.stop();
......@@ -429,7 +429,7 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat
message: localize('reset', "This will clear your data in the cloud and stop sync on all your devices."),
title: localize('reset title', "Clear"),
type: 'info',
primaryButton: localize('reset button', "Reset"),
primaryButton: localize({ key: 'resetButton', comment: ['&& denotes a mnemonic'] }, "&&Reset"),
});
if (result.confirmed) {
await this.userDataSyncService.resetRemote();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册