Added localization for the fate type parsing error

This commit is contained in:
Chris Ryan 2025-12-10 22:13:14 +10:00
parent 3e366a4c44
commit c11a4f617d
3 changed files with 6 additions and 5 deletions

View file

@ -262,7 +262,7 @@ Hooks.on('chatMessage', (_, message) => {
const fateTypeFromRollCommand = getFateType(rollCommand?.type); const fateTypeFromRollCommand = getFateType(rollCommand?.type);
if (fateTypeFromRollCommand == "BAD") { 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; return false;
} }

View file

@ -2687,6 +2687,7 @@
"onlyUseableByPC": "This can only be used with a PC token", "onlyUseableByPC": "This can only be used with a PC token",
"dualityParsing": "Duality roll not properly formatted", "dualityParsing": "Duality roll not properly formatted",
"fateParsing": "Fate 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", "attributeFaulty": "The supplied Attribute doesn't exist",
"domainCardWrongDomain": "You don't have access to that Domain", "domainCardWrongDomain": "You don't have access to that Domain",
"domainCardToHighLevel": "The Domain Card is too high level to be selected", "domainCardToHighLevel": "The Domain Card is too high level to be selected",

View file

@ -7,7 +7,7 @@ export default function DhFateRollEnricher(match, _options) {
const fateTypeFromRoll = getFateType(roll?.type); const fateTypeFromRoll = getFateType(roll?.type);
if (fateTypeFromRoll == "BAD") { 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; return;
} }
@ -27,7 +27,7 @@ function getFateMessage(roll, flavor) {
const fateType = getFateType(roll?.type); const fateType = getFateType(roll?.type);
if (fateType == "BAD") { 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 ''; return '';
} }
@ -61,7 +61,7 @@ export const renderFateButton = async event => {
const fateTypeFromButton = getFateType(button.dataset?.fatetype); const fateTypeFromButton = getFateType(button.dataset?.fatetype);
if (fateTypeFromButton == "BAD") { 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; return;
} }