diff --git a/daggerheart.mjs b/daggerheart.mjs index 7758adb5..a010e03f 100644 --- a/daggerheart.mjs +++ b/daggerheart.mjs @@ -262,7 +262,7 @@ Hooks.on('chatMessage', (_, message) => { const fateTypeFromRollCommand = getFateType(rollCommand?.type); if (fateTypeFromRollCommand == "BAD") { - ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.fateParsing') + ". Bad Fate Type. Valid Fate Types are 'Hope' and 'Fear'."); + ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.fateTypeParsing')); return false; } diff --git a/lang/en.json b/lang/en.json index c47019f9..c46f0f21 100755 --- a/lang/en.json +++ b/lang/en.json @@ -2687,6 +2687,7 @@ "onlyUseableByPC": "This can only be used with a PC token", "dualityParsing": "Duality roll not properly formatted", "fateParsing": "Fate roll not properly formatted", + "fateTypeParsing": "Fate roll not properly formatted, bad fate type. Valid types are 'Hope' and 'Fear'", "attributeFaulty": "The supplied Attribute doesn't exist", "domainCardWrongDomain": "You don't have access to that Domain", "domainCardToHighLevel": "The Domain Card is too high level to be selected", diff --git a/module/enrichers/FateRollEnricher.mjs b/module/enrichers/FateRollEnricher.mjs index d48c6e55..941616c0 100644 --- a/module/enrichers/FateRollEnricher.mjs +++ b/module/enrichers/FateRollEnricher.mjs @@ -7,7 +7,7 @@ export default function DhFateRollEnricher(match, _options) { const fateTypeFromRoll = getFateType(roll?.type); if (fateTypeFromRoll == "BAD") { - ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.fateParsing') + ". Bad Fate Type. Valid Fate Types are 'Hope' and 'Fear'."); + ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.fateTypeParsing')); return; } @@ -27,10 +27,10 @@ function getFateMessage(roll, flavor) { const fateType = getFateType(roll?.type); if (fateType == "BAD") { - ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.fateParsing') + ". Bad Fate Type. Valid Fate Types are 'Hope' and 'Fear'."); + ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.fateTypeParsing')); return ''; } - + const fateTypeLocalized = fateType === "Hope" ? game.i18n.localize("DAGGERHEART.GENERAL.hope") : game.i18n.localize("DAGGERHEART.GENERAL.fear"); const title = flavor ?? fateTypeLocalized + ' ' + @@ -61,7 +61,7 @@ export const renderFateButton = async event => { const fateTypeFromButton = getFateType(button.dataset?.fatetype); if (fateTypeFromButton == "BAD") { - ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.fateParsing') + ". Bad Fate Type. Valid Fate Types are 'Hope' and 'Fear'."); + ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.fateTypeParsing')); return; }