Adding MPS Export #49

Merged
SinusFox merged 61 commits from adding-unit-tests-and-language-switching into main 2024-10-11 14:08:24 +00:00
2 changed files with 5 additions and 1 deletions
Showing only changes of commit 60f315f65b - Show all commits
+4
View File
@@ -98,6 +98,8 @@ export default function text(lang: string, input: string): string {
return "Überprüfe auf leere Eingabefelder...";
case "importing":
return "Importiere...";
case "err_invalidConstraintFormat":
return "Fehler: Nicht erlaubter Operator verwendet.";
default:
return input;
}
@@ -203,6 +205,8 @@ export default function text(lang: string, input: string): string {
return "Checking for empty input boxes...";
case "importing":
return "Importing...";
case "err_invalidConstraintFormat":
return "Error: Invalid constraint format.";
default:
return input;
}
+1 -1
View File
@@ -585,7 +585,7 @@ function parseLPConstraint(constraint: string): { vars: Variable[], bound: Bound
const operators = ["<=", ">=", "="];
let operator = operators.find(op => constraint.includes(op));
if (!operator) {
throw new Error("Invalid constraint format");
throw new Error(getTranslation("err_invalidConstraintFormat"));
}
const [expr, boundStr] = constraint.split(operator);