Skip to content

Commit

Permalink
update loc (#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
gcampbell-msft authored Jun 26, 2024
1 parent cd150d3 commit e8b70f1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
12 changes: 10 additions & 2 deletions src/make.ts
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,12 @@ export async function prePostConfigureHelper(
export async function preConfigure(triggeredBy: TriggeredBy): Promise<number> {
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."
Expand Down Expand Up @@ -910,7 +915,10 @@ export async function postConfigure(triggeredBy: TriggeredBy): Promise<number> {
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. " +
Expand Down
17 changes: 12 additions & 5 deletions src/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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 =
Expand All @@ -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())
Expand Down

0 comments on commit e8b70f1

Please sign in to comment.