From 3ea07a2379bfa407f8c9c75f010c9d31529127d9 Mon Sep 17 00:00:00 2001
From: Johannes Loher <johannes.loher@fg4f.de>
Date: Sat, 13 Mar 2021 22:22:28 +0100
Subject: [PATCH] Add missing i18n

---
 src/lang/de.json                          | 5 +++--
 src/lang/en.json                          | 5 +++--
 src/module/rolls/check-evaluation.ts      | 2 +-
 src/module/rolls/check.ts                 | 2 +-
 src/module/rolls/slaying-dice-modifier.ts | 2 +-
 5 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/lang/de.json b/src/lang/de.json
index 3e2c0ae..1f5fc6d 100644
--- a/src/lang/de.json
+++ b/src/lang/de.json
@@ -185,8 +185,9 @@
     "DS4.CreatureBaseInfoDescription": "Beschreibung",
     "DS4.WarningManageActiveEffectOnOwnedItem": "Das Verwalten von aktiven Effekten innerhalb eines besessen Items wird derzeit nicht unterstützt und wird in einem nachfolgenden Update hinzugefügt.",
     "DS4.WarningActorCannotOwnItem": "Der Aktor '{actorName}' vom Typ '{actorType}' kann das Item '{itemName}' vom Typ '{itemType}' nicht besitzen.",
-    "DS4.ErrorDiceCritOverlap": "Es gibt eine Überlappung zwischen Patzern und Immersiegen.",
-    "DS4.ErrorExplodingRecursionLimitExceeded": "Die maximale Rekursionstiefe für slayende Würfelwürfe wurde überschritten.",
+    "DS4.ErrorDiceCoupFumbleOverlap": "Es gibt eine Überlappung zwischen Patzern und Immersiegen.",
+    "DS4.ErrorSlayingDiceRecursionLimitExceeded": "Die maximale Rekursionstiefe für slayende Würfelwürfe wurde überschritten.",
+    "DS4.ErrorInvalidNumberOfDice": "Ungültige Anzahl an Würfeln.",
     "DS4.ErrorDuringMigration": "Fehler während der Aktualisierung des DS4 Systems von Migrationsversion {currentVersion} auf {targetVersion}. Der Fehler trat während der Ausführung des Migrationsskripts mit der Version {migrationVersion} auf. Spätere Migrationsskripte wurden nicht ausgeführt. Mehr Details finden Sie in der Entwicklerkonsole (F12).",
     "DS4.ErrorCannotRollUnownedItem": "Für das Item '{name}' ({id}) kann nicht gewürfelt werden, da es keinem Aktor gehört.",
     "DS4.ErrorRollingForItemTypeNotPossible": "Würfeln ist für Items vom Typ '{type}' nicht möglich.",
diff --git a/src/lang/en.json b/src/lang/en.json
index 056091c..c99f0e6 100644
--- a/src/lang/en.json
+++ b/src/lang/en.json
@@ -185,8 +185,9 @@
     "DS4.CreatureBaseInfoDescription": "Description",
     "DS4.WarningManageActiveEffectOnOwnedItem": "Managing Active Effects within an Owned Item is not currently supported and will be added in a subsequent update.",
     "DS4.WarningActorCannotOwnItem": "The actor '{actorName}' of type '{actorType}' cannot own the item '{itemName}' of type '{itemType}'.",
-    "DS4.ErrorDiceCritOverlap": "There's an overlap between Fumbles and Coups",
-    "DS4.ErrorExplodingRecursionLimitExceeded": "Maximum recursion depth for exploding dice roll exceeded",
+    "DS4.ErrorDiceCoupFumbleOverlap": "There is an overlap between Fumbles and Coups.",
+    "DS4.ErrorSlayingDiceRecursionLimitExceeded": "Maximum recursion depth for slaying dice roll exceeded.",
+    "DS4.ErrorInvalidNumberOfDice": "Invalid number of dice.",
     "DS4.ErrorDuringMigration": "Error while migrating DS4 system from migration version {currentVersion} to {targetVersion}. The error occurred during execution of migration script with version {migrationVersion}. Later migrations have not been executed. For more details, please look at the development console (F12).",
     "DS4.ErrorCannotRollUnownedItem": "Rolling for item '{name}' ({id})is not possible because it is not owned.",
     "DS4.ErrorRollingForItemTypeNotPossible": "Rolling is not possible for items of type '{type}'.",
diff --git a/src/module/rolls/check-evaluation.ts b/src/module/rolls/check-evaluation.ts
index fa97e82..442ecf3 100644
--- a/src/module/rolls/check-evaluation.ts
+++ b/src/module/rolls/check-evaluation.ts
@@ -34,7 +34,7 @@ function assignSubChecksToDice(
     const requiredNumberOfDice = getRequiredNumberOfDice(checkTargetNumber);
 
     if (dice.length !== requiredNumberOfDice || requiredNumberOfDice < 1) {
-        throw new Error(game.i18n.localize("DS4.ErrorInvalidNumberOfDice")); // TODO: add i18n
+        throw new Error(game.i18n.localize("DS4.ErrorInvalidNumberOfDice"));
     }
 
     const checkTargetNumberForLastSubCheck = checkTargetNumber - 20 * (requiredNumberOfDice - 1);
diff --git a/src/module/rolls/check.ts b/src/module/rolls/check.ts
index ea24c4e..58e3894 100644
--- a/src/module/rolls/check.ts
+++ b/src/module/rolls/check.ts
@@ -44,7 +44,7 @@ export class DS4Check extends DiceTerm {
                 ? parseInt(parseMinimumFumbleResult)
                 : DS4Check.DEFAULT_MINIMUM_FUMBLE_RESULT;
             if (this.minimumFumbleResult <= this.maximumCoupResult)
-                throw new SyntaxError(game.i18n.localize("DS4.ErrorDiceCritOverlap"));
+                throw new SyntaxError(game.i18n.localize("DS4.ErrorDiceCoupFumbleOverlap"));
         }
 
         // Parse and store no fumble
diff --git a/src/module/rolls/slaying-dice-modifier.ts b/src/module/rolls/slaying-dice-modifier.ts
index dbb4176..e9b434c 100644
--- a/src/module/rolls/slaying-dice-modifier.ts
+++ b/src/module/rolls/slaying-dice-modifier.ts
@@ -24,6 +24,6 @@ function slay(this: DicePool, modifier: string): void {
             this.rolls.push(additionalRoll);
             this.results.push({ result: additionalRoll.total ?? 0, active: true });
         }
-        if (checked > 1000) throw new Error(game.i18n.localize("DS4.ErrorExplodingRecursionLimitExceeded"));
+        if (checked > 1000) throw new Error(game.i18n.localize("DS4.ErrorSlayingDiceRecursionLimitExceeded"));
     }
 }