[Community PR] Localize hardcoded text (#1002)

* Localize remaining hardcoded user-facing strings

* Introduce pluralize helper for localizing strings

* Localize missing strings from ItemBrowser
This commit is contained in:
Luiz HD Costa 2025-08-21 22:35:36 -03:00 committed by GitHub
parent e9f7c0c16b
commit 888cf9172b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 147 additions and 82 deletions

View file

@ -25,7 +25,7 @@ export default class CostField extends fields.ArrayField {
config.costs = CostField.calcCosts.call(this, costs);
const hasCost = CostField.hasCost.call(this, config.costs);
if (config.isFastForward && !hasCost)
return ui.notifications.warn("You don't have the resources to use that action.");
return ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.Notifications.insufficientResources'));
return hasCost;
}

View file

@ -25,7 +25,7 @@ export default class UsesField extends fields.SchemaField {
if (uses && !uses.value) uses.value = 0;
config.uses = uses;
const hasUses = UsesField.hasUses.call(this, config.uses);
if (config.isFastForward && !hasUses) return ui.notifications.warn("That action doesn't have remaining uses.");
if (config.isFastForward && !hasUses) return ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.Notifications.actionNoUsesRemaining'));
return hasUses;
}