From 60f315f65b49b962c000bb168682bf9eac507bbe Mon Sep 17 00:00:00 2001 From: SinusFox <61253950+SinusFox@users.noreply.github.com> Date: Fri, 11 Oct 2024 15:56:09 +0200 Subject: [PATCH] Updating language file --- src/app/lang.ts | 4 ++++ src/app/scripts.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/lang.ts b/src/app/lang.ts index 62fef5d..c61f566 100644 --- a/src/app/lang.ts +++ b/src/app/lang.ts @@ -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; } diff --git a/src/app/scripts.ts b/src/app/scripts.ts index 1894813..9d3ddcb 100644 --- a/src/app/scripts.ts +++ b/src/app/scripts.ts @@ -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);