Skip to content

Commit

Permalink
Merge pull request #125817 from microsoft/aeschli/125786
Browse files Browse the repository at this point in the history
aeschli/125786
  • Loading branch information
aeschli committed Jun 9, 2021
2 parents f8b576c + 33d504f commit b4c1bd0
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 11 deletions.
14 changes: 8 additions & 6 deletions src/vs/workbench/contrib/codeEditor/browser/saveParticipants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,10 @@ class FormatOnSaveParticipant implements ITextFileSaveParticipant {
const nestedProgress = new Progress<{ displayName?: string, extensionId?: ExtensionIdentifier }>(provider => {
progress.report({
message: localize(
'formatting',
"Running '{0}' Formatter ([configure](command:workbench.action.openSettings?%5B%22editor.formatOnSave%22%5D)).",
provider.displayName || provider.extensionId && provider.extensionId.value || '???'
{ key: 'formatting2', comment: ['[configure]({1}) is a link. Only translate `configure`. Do not change brackets and parentheses or {1}'] },
"Running '{0}' Formatter ([configure]({1})).",
provider.displayName || provider.extensionId && provider.extensionId.value || '???',
'command:workbench.action.openSettings?%5B%22editor.formatOnSave%22%5D'
)
});
});
Expand Down Expand Up @@ -336,9 +337,10 @@ class CodeActionOnSaveParticipant implements ITextFileSaveParticipant {
private _report(): void {
progress.report({
message: localize(
'codeaction.get',
"Getting code actions from '{0}' ([configure](command:workbench.action.openSettings?%5B%22editor.codeActionsOnSave%22%5D)).",
[...this._names].map(name => `'${name}'`).join(', ')
{ key: 'codeaction.get2', comment: ['[configure]({1}) is a link. Only translate `configure`. Do not change brackets and parentheses or {1}'] },
"Getting code actions from '{0}' ([configure]({1})).",
[...this._names].map(name => `'${name}'`).join(', '),
'command:workbench.action.openSettings?%5B%22editor.codeActionsOnSave%22%5D'
)
});
}
Expand Down
4 changes: 3 additions & 1 deletion src/vs/workbench/contrib/remote/browser/remoteExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,9 @@ class OnAutoForwardedAction extends Disposable {
}

private linkMessage() {
return nls.localize('remote.tunnelsView.notificationLink', "[See all forwarded ports](command:{0}.focus)", TunnelPanel.ID);
return nls.localize(
{ key: 'remote.tunnelsView.notificationLink2', comment: ['[See all forwarded ports]({0}) is a link. Only translate `See all forwarded ports`. Do not change brackets and parentheses or {0}'] },
"[See all forwarded ports]({0})", `command:${TunnelPanel.ID}.focus`);
}

private async showNotification(tunnel: RemoteTunnel) {
Expand Down
6 changes: 5 additions & 1 deletion src/vs/workbench/contrib/remote/browser/remoteIndicator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,11 @@ export class RemoteStatusIndicator extends Disposable implements IWorkbenchContr
const workspaceLabel = this.getWorkspaceLabel();
if (workspaceLabel) {
const toolTip: IMarkdownString = {
value: nls.localize('workspace.tooltip', "Virtual workspace on {0}\n\n[Some features](command:{1}) are not available for resources located on a virtual file system.", workspaceLabel, LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID),
value: nls.localize(
{ key: 'workspace.tooltip2', comment: ['{0} is a remote location name, e.g. GitHub', '[Some features]({1}) is a link. Only translate `Some features`. Do not change brackets and parentheses or {1}'] },
"Virtual workspace on {0}\n\n[Some features]({1}) are not available for resources located on a virtual file system.",
workspaceLabel, `command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`
),
isTrusted: true
};
this.renderRemoteStatusIndicator(`$(remote) ${truncate(workspaceLabel, RemoteStatusIndicator.REMOTE_STATUS_LABEL_MAX_LENGTH)}`, toolTip);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,12 @@ export class WorkspaceTrustUXHandler extends Disposable implements IWorkbenchCon
ariaLabel = trusted ? localize('status.ariaTrustedWindow', "This window is trusted.") :
localize('status.ariaUntrustedWindow', "Restricted Mode: Some features are disabled because this window is not trusted.");
toolTip = trusted ? ariaLabel : {
value: localize('status.tooltipUntrustedWindow', "Running in Restricted Mode\n\n\Some [features are disabled](command:{0}) because this [window is not trusted](command:{1}).", LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID, MANAGE_TRUST_COMMAND_ID),
value: localize(
{ key: 'status.tooltipUntrustedWindow2', comment: ['[abc]({n}) are links. Only translate `features are disabled` and `window is not trusted`. Do not change brackets and parentheses or {n}'] },
"Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [window is not trusted]({1}).",
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`,
`command:${MANAGE_TRUST_COMMAND_ID}`
),
isTrusted: true,
supportThemeIcons: true
};
Expand All @@ -384,7 +389,12 @@ export class WorkspaceTrustUXHandler extends Disposable implements IWorkbenchCon
ariaLabel = trusted ? localize('status.ariaTrustedFolder', "This folder is trusted.") :
localize('status.ariaUntrustedFolder', "Restricted Mode: Some features are disabled because this folder is not trusted.");
toolTip = trusted ? ariaLabel : {
value: localize('status.tooltipUntrustedFolder', "Running in Restricted Mode\n\n\Some [features are disabled](command:{0}) because this [folder is not trusted](command:{1}).", LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID, MANAGE_TRUST_COMMAND_ID),
value: localize(
{ key: 'status.tooltipUntrustedFolder2', comment: ['[abc]({n}) are links. Only translate `features are disabled` and `folder is not trusted`. Do not change brackets and parentheses or {n}'] },
"Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [folder is not trusted]({1}).",
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`,
`command:${MANAGE_TRUST_COMMAND_ID}`
),
isTrusted: true,
supportThemeIcons: true
};
Expand All @@ -394,7 +404,12 @@ export class WorkspaceTrustUXHandler extends Disposable implements IWorkbenchCon
ariaLabel = trusted ? localize('status.ariaTrustedWorkspace', "This workspace is trusted.") :
localize('status.ariaUntrustedWorkspace', "Restricted Mode: Some features are disabled because this workspace is not trusted.");
toolTip = trusted ? ariaLabel : {
value: localize('status.tooltipUntrustedWorkspace', "Running in Restricted Mode\n\n\Some [features are disabled](command:{0}) because this [workspace is not trusted](command:{1}).", LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID, MANAGE_TRUST_COMMAND_ID),
value: localize(
{ key: 'status.tooltipUntrustedWorkspace2', comment: ['[abc]({n}) are links. Only translate `features are disabled` and `workspace is not trusted`. Do not change brackets and parentheses or {n}'] },
"Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [workspace is not trusted]({1}).",
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`,
`command:${MANAGE_TRUST_COMMAND_ID}`
),
isTrusted: true,
supportThemeIcons: true
};
Expand Down

0 comments on commit b4c1bd0

Please sign in to comment.