diff --git a/src/lang/de.json b/src/lang/de.json index c1ea7a2..391571e 100644 --- a/src/lang/de.json +++ b/src/lang/de.json @@ -198,7 +198,8 @@ "DS4.RollDialogDefaultTitle": "Proben-Optionen", "DS4.RollDialogOkButton": "OK", "DS4.RollDialogCancelButton": "Abbrechen", - "DS4.ErrorUnexpectedHtmlType": "Typfehler: Erwartet wurde {exType}, tatsächlich erhalten wurde {realType}", + "DS4.ErrorUnexpectedHtmlType": "Typfehler: Erwartet wurde '{exType}', tatsächlich erhalten wurde '{realType}'.", + "DS4.ErrorCouldNotFindForm": "Konnte HTML Element '{htmlElement}' nicht finden.", "DS4.RollDialogTargetLabel": "Probenwert", "DS4.RollDialogModifierLabel": "SL-Modifikator", "DS4.RollDialogCoupLabel": "Immersieg bis", diff --git a/src/lang/en.json b/src/lang/en.json index 6cd7c33..e1d15a5 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -198,7 +198,8 @@ "DS4.RollDialogDefaultTitle": "Roll Options", "DS4.RollDialogOkButton": "Ok", "DS4.RollDialogCancelButton": "Cancel", - "DS4.ErrorUnexpectedHtmlType": "Type Error: Expected {exType}, got {realType}", + "DS4.ErrorUnexpectedHtmlType": "Type Error: Expected '{exType}' but got '{realType}'.", + "DS4.ErrorCouldNotFindForm": "Could not find html element '{htmlElement}'.", "DS4.RollDialogTargetLabel": "Check Target Number", "DS4.RollDialogModifierLabel": "Game Master Modifier", "DS4.RollDialogCoupLabel": "Coup to", diff --git a/src/module/rolls/check-factory.ts b/src/module/rolls/check-factory.ts index b0f007e..43d8efa 100644 --- a/src/module/rolls/check-factory.ts +++ b/src/module/rolls/check-factory.ts @@ -150,7 +150,9 @@ async function askGmModifier( } else { const innerForm = html[0].querySelector("form"); if (!innerForm) { - throw new Error(); // TODO: localize + throw new Error( + game.i18n.format("DS4.ErrorCouldNotFindHtmlElement", { htmlElement: "form" }), + ); } resolve(innerForm); }