Skip to content

Localize 'learn more' text #17714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/client/browser/intellisenseStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

// IMPORTANT: Do not import any node fs related modules here, as they do not work in browser.
import * as vscode from 'vscode';
import { LanguageService } from './localize';
import { Common, LanguageService } from './localize';

export function createStatusItem(): vscode.Disposable {
if ('createLanguageStatusItem' in vscode.languages) {
Expand All @@ -15,7 +15,7 @@ export function createStatusItem(): vscode.Disposable {
statusItem.text = LanguageService.statusItem.text();
statusItem.detail = LanguageService.statusItem.detail();
statusItem.command = {
title: 'Learn More',
title: Common.learnMore(),
command: 'vscode.open',
arguments: [vscode.Uri.parse('https://aka.ms/AAdzyh4')],
};
Expand Down
4 changes: 4 additions & 0 deletions src/client/browser/localize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export namespace LanguageService {
};
}

export namespace Common {
export const learnMore = localize('Common.learnMore', 'Learn more');
}

function localize(key: string, defValue?: string) {
// Return a pointer to function so that we refetch it on each call.
return (): string => getLocalizedString(key, defValue);
Expand Down