From 91c500d6ab788d3634db303d0a073d11da3c4176 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Tue, 12 Oct 2021 19:50:07 -0700 Subject: [PATCH] Localize 'learn more' text --- src/client/browser/intellisenseStatus.ts | 4 ++-- src/client/browser/localize.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/client/browser/intellisenseStatus.ts b/src/client/browser/intellisenseStatus.ts index 19e410399f4d..8e199aea49ca 100644 --- a/src/client/browser/intellisenseStatus.ts +++ b/src/client/browser/intellisenseStatus.ts @@ -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) { @@ -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')], }; diff --git a/src/client/browser/localize.ts b/src/client/browser/localize.ts index 5e13576e3e19..ca66b01266ac 100644 --- a/src/client/browser/localize.ts +++ b/src/client/browser/localize.ts @@ -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);