Design fixes #50

Merged
SinusFox merged 62 commits from design-fixes into main 2024-10-11 14:23:53 +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..."; 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
View File
@@ -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);