This commit is contained in:
Garrett Campbell 2024-06-26 09:52:45 -04:00
Родитель a7976a6333
Коммит 8f859fcfb4
2 изменённых файлов: 22 добавлений и 7 удалений

Просмотреть файл

@ -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."
@ -910,7 +915,10 @@ export async function postConfigure(triggeredBy: TriggeredBy): Promise<number> {
let scriptFile: string | undefined = configuration.getPostConfigureScript();
if (!scriptFile) {
vscode.window.showErrorMessage(
localize(
"no.postconfigure.script.provided",
"Post-configure failed: no script provided."
)
);
logger.message(
"No post-configure script is set in settings. " +

Просмотреть файл

@ -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())