Design fixes #50
@@ -98,6 +98,8 @@ export default function text(lang: string, input: string): string {
|
|||||||
return "Überprüfe auf leere Eingabefelder...";
|
return "Überprüfe auf leere Eingabefelder...";
|
||||||
case "importing":
|
case "importing":
|
||||||
return "Importiere...";
|
return "Importiere...";
|
||||||
|
case "err_invalidConstraintFormat":
|
||||||
|
return "Fehler: Nicht erlaubter Operator verwendet.";
|
||||||
default:
|
default:
|
||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
@@ -203,6 +205,8 @@ export default function text(lang: string, input: string): string {
|
|||||||
return "Checking for empty input boxes...";
|
return "Checking for empty input boxes...";
|
||||||
case "importing":
|
case "importing":
|
||||||
return "Importing...";
|
return "Importing...";
|
||||||
|
case "err_invalidConstraintFormat":
|
||||||
|
return "Error: Invalid constraint format.";
|
||||||
default:
|
default:
|
||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -585,7 +585,7 @@ function parseLPConstraint(constraint: string): { vars: Variable[], bound: Bound
|
|||||||
const operators = ["<=", ">=", "="];
|
const operators = ["<=", ">=", "="];
|
||||||
let operator = operators.find(op => constraint.includes(op));
|
let operator = operators.find(op => constraint.includes(op));
|
||||||
if (!operator) {
|
if (!operator) {
|
||||||
throw new Error("Invalid constraint format");
|
throw new Error(getTranslation("err_invalidConstraintFormat"));
|
||||||
}
|
}
|
||||||
|
|
||||||
const [expr, boundStr] = constraint.split(operator);
|
const [expr, boundStr] = constraint.split(operator);
|
||||||
|
|||||||
Reference in New Issue
Block a user