From e8b70f1e15e23b647e82cba1eeaf0f0b2737d54f Mon Sep 17 00:00:00 2001 From: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com> Date: Wed, 26 Jun 2024 13:44:02 -0400 Subject: [PATCH] update loc (#614) --- src/make.ts | 12 ++++++++++-- src/tree.ts | 17 ++++++++++++----- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/make.ts b/src/make.ts index 80641ca1..9dddd539 100644 --- a/src/make.ts +++ b/src/make.ts @@ -858,7 +858,12 @@ export async function prePostConfigureHelper( export async function preConfigure(triggeredBy: TriggeredBy): Promise { let scriptFile: string | undefined = configuration.getPreConfigureScript(); if (!scriptFile) { - vscode.window.showErrorMessage("Pre-configure failed: no script provided."); + vscode.window.showErrorMessage( + localize( + "no.preconfigure.script.provided", + "Pre-configure failed: no script provided." + ) + ); logger.message( "No pre-configure script is set in settings. " + "Make sure a pre-configuration script path is defined with makefile.preConfigureScript." @@ -910,7 +915,10 @@ export async function postConfigure(triggeredBy: TriggeredBy): Promise { let scriptFile: string | undefined = configuration.getPostConfigureScript(); if (!scriptFile) { vscode.window.showErrorMessage( - "Post-configure failed: no script provided." + localize( + "no.postconfigure.script.provided", + "Post-configure failed: no script provided." + ) ); logger.message( "No post-configure script is set in settings. " + diff --git a/src/tree.ts b/src/tree.ts index dfdd0420..792c8491 100644 --- a/src/tree.ts +++ b/src/tree.ts @@ -82,7 +82,7 @@ export class LaunchTargetNode extends BaseNode { let shortName: string; if (!launchConfiguration) { - shortName = "Unset"; + shortName = localize("Unset", "Unset"); } else { if (vscode.workspace.workspaceFolders) { // In a complete launch target string, the binary path is relative to cwd. @@ -169,8 +169,10 @@ export class ConfigurationNode extends BaseNode { try { const item: vscode.TreeItem = new vscode.TreeItem(this._name); item.collapsibleState = vscode.TreeItemCollapsibleState.None; - item.tooltip = - "The makefile configuration currently selected from settings ('makefile.configurations')."; + item.tooltip = localize( + "makefile.currently.selected.configuration", + "The makefile configuration currently selected from settings ('makefile.configurations')." + ); item.contextValue = [`nodeType=configuration`].join(","); return item; } catch (e) { @@ -377,10 +379,12 @@ export class ProjectOutlineProvider if (!pathInSettings) { if (kind === "Build Log") { extension.updateBuildLogPresent(false); + kind = localize("build.log", "Build Log"); } else if (kind === "Makefile") { extension.updateMakefileFilePresent(false); } - return `${kind}: [Unset]`; + const unset = localize("Unset", "Unset"); + return `${kind}: ${unset}`; } const pathInSettingsToTest: string | undefined = @@ -401,12 +405,15 @@ export class ProjectOutlineProvider if (kind === "Build Log") { extension.updateBuildLogPresent(checkFileExists); + kind = localize("build.log", "Build Log"); } else if (kind === "Makefile") { extension.updateMakefileFilePresent(checkFileExists); } + const notFound = localize("not.found", "not found"); + return ( - (!checkFileExists ? `${kind} (not found)` : `${kind}`) + + (!checkFileExists ? `${kind} (${notFound})` : `${kind}`) + `: [${ makeRelative ? util.makeRelPath(finalPath, util.getWorkspaceRoot())