提交 be41fd02 编写于 作者: M Matt Bierner

Show document link tooltip first and put click instructions in parens

Fixes #76077

This change also update our standard link hovers to follow this format
上级 52d5d26c
......@@ -39,7 +39,7 @@ function parseLink(
return {
uri: OpenDocumentLinkCommand.createCommandUri(resourcePath, tempUri.fragment),
tooltip: localize('documentLink.tooltip', 'follow link')
tooltip: localize('documentLink.tooltip', 'Follow link')
};
}
......
......@@ -27,26 +27,26 @@ import { registerThemingParticipant } from 'vs/platform/theme/common/themeServic
const HOVER_MESSAGE_GENERAL_META = new MarkdownString().appendText(
platform.isMacintosh
? nls.localize('links.navigate.mac', "Cmd + click to follow link")
: nls.localize('links.navigate', "Ctrl + click to follow link")
? nls.localize('links.navigate.mac', "Follow link (cmd + click)")
: nls.localize('links.navigate', "Follow link (cmd + click)")
);
const HOVER_MESSAGE_COMMAND_META = new MarkdownString().appendText(
platform.isMacintosh
? nls.localize('links.command.mac', "Cmd + click to execute command")
: nls.localize('links.command', "Ctrl + click to execute command")
? nls.localize('links.command.mac', "Execute command (cmd + click)")
: nls.localize('links.command', "Execute command (cmd + click)")
);
const HOVER_MESSAGE_GENERAL_ALT = new MarkdownString().appendText(
platform.isMacintosh
? nls.localize('links.navigate.al.mac', "Option + click to follow link")
: nls.localize('links.navigate.al', "Alt + click to follow link")
? nls.localize('links.navigate.al.mac', "Follow link (cption + click)")
: nls.localize('links.navigate.al', "Follow link (alt + click)")
);
const HOVER_MESSAGE_COMMAND_ALT = new MarkdownString().appendText(
platform.isMacintosh
? nls.localize('links.command.al.mac', "Option + click to execute command")
: nls.localize('links.command.al', "Alt + click to execute command")
? nls.localize('links.command.al.mac', "Execute command (cption + click)")
: nls.localize('links.command.al', "Execute command (alt + click)")
);
const decoration = {
......@@ -116,11 +116,11 @@ class LinkOccurrence {
const message = new MarkdownString().appendText(
platform.isMacintosh
? useMetaKey
? nls.localize('links.custom.mac', "Cmd + click to {0}", link.tooltip)
: nls.localize('links.custom.mac.al', "Option + click to {0}", link.tooltip)
? nls.localize('links.custom.mac', "{0} (cmd + click)", link.tooltip)
: nls.localize('links.custom.mac.al', "{0} (option + click)", link.tooltip)
: useMetaKey
? nls.localize('links.custom', "Ctrl + click to {0}", link.tooltip)
: nls.localize('links.custom.al', "Alt + click to {0}", link.tooltip)
? nls.localize('links.custom', "{0} (ctrl + click)", link.tooltip)
: nls.localize('links.custom.al', "{0} (alt + click)", link.tooltip)
);
options.hoverMessage = message;
}
......
......@@ -3548,7 +3548,7 @@ declare module 'vscode' {
* The tooltip text when you hover over this link.
*
* If a tooltip is provided, is will be displayed in a string that includes instructions on how to
* trigger the link, such as `cmd + click to {0}`. The specific instructions vary depending on OS,
* trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS,
* user settings, and localization.
*/
tooltip?: string;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册