From bb1c76bccea31ee406a4dd78de3b3db1e3b49681 Mon Sep 17 00:00:00 2001 From: Luiz Costa Date: Sun, 17 Aug 2025 21:33:01 -0300 Subject: [PATCH] Localize remaining hardcoded user-facing strings --- lang/en.json | 7 ++++++- module/data/fields/action/costField.mjs | 2 +- module/data/fields/action/usesField.mjs | 2 +- templates/sheets/actors/character/header.hbs | 2 +- templates/ui/chat/parts/target-part.hbs | 2 +- templates/ui/itemBrowser/itemBrowser.hbs | 4 ++-- 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lang/en.json b/lang/en.json index a7a615f5..705e69d6 100755 --- a/lang/en.json +++ b/lang/en.json @@ -2334,6 +2334,10 @@ "playerMessage": "{user} rerolled their {name}" } }, + "ItemBrowser": { + "title": "Daggerheart Compendium Browser", + "hint": "Select a Folder in sidebar to start browsing through the compendium" + }, "Notifications": { "adversaryMissing": "The linked adversary doesn't exist in the world.", "beastformInapplicable": "A beastform can only be applied to a Character.", @@ -2393,7 +2397,8 @@ "beastformEquipWeapon": "You cannot use weapons while in a Beastform.", "loadoutMaxReached": "You've reached maximum loadout. Move atleast one domain card to the vault, or increase the limit in homebrew settings if desired.", "domainMaxReached": "You've reached the maximum domains for the class. Increase the limit in homebrew settings if desired.", - "insufficientResources": "You have insufficient resources", + "insufficientResources": "You don't have enough resources to use that action.", + "actionNoUsesRemaining": "That action doesn't have remaining uses.", "multiclassAlreadyPresent": "You already have a class and multiclass", "subclassesAlreadyPresent": "You already have a class and multiclass subclass", "noDiceSystem": "Your selected dice {system} does not have a {faces} dice" diff --git a/module/data/fields/action/costField.mjs b/module/data/fields/action/costField.mjs index f4d942b1..c224fff0 100644 --- a/module/data/fields/action/costField.mjs +++ b/module/data/fields/action/costField.mjs @@ -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; } diff --git a/module/data/fields/action/usesField.mjs b/module/data/fields/action/usesField.mjs index 3993ca3b..5c2bfb61 100644 --- a/module/data/fields/action/usesField.mjs +++ b/module/data/fields/action/usesField.mjs @@ -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; } diff --git a/templates/sheets/actors/character/header.hbs b/templates/sheets/actors/character/header.hbs index 88a72fb8..e19c1dea 100644 --- a/templates/sheets/actors/character/header.hbs +++ b/templates/sheets/actors/character/header.hbs @@ -6,7 +6,7 @@ type='text' name='name' value='{{document.name}}' - placeholder='Actor Name' + placeholder='{{localize "DAGGERHEART.GENERAL.actorName"}}' /> diff --git a/templates/ui/chat/parts/target-part.hbs b/templates/ui/chat/parts/target-part.hbs index 82c71456..b014032d 100644 --- a/templates/ui/chat/parts/target-part.hbs +++ b/templates/ui/chat/parts/target-part.hbs @@ -1,5 +1,5 @@
-
Target
+
{{#if (gt currentTargets.length 1)}}{{localize "DAGGERHEART.GENERAL.Target.plural"}}{{else}}{{localize "DAGGERHEART.GENERAL.Target.single"}}{{/if}}
{{#if (or (and targets.length (or (gt targetShort.hit 0) (gt targetShort.miss 0))) (and hasSave pendingSaves))}}
diff --git a/templates/ui/itemBrowser/itemBrowser.hbs b/templates/ui/itemBrowser/itemBrowser.hbs index 000e4c03..8c06fb29 100644 --- a/templates/ui/itemBrowser/itemBrowser.hbs +++ b/templates/ui/itemBrowser/itemBrowser.hbs @@ -82,8 +82,8 @@ {{!--
--}} {{else}}
-

Daggerheart Compendium Browser

- Select a Folder in sidebar to start browsing trought the compendium +

{{localize "DAGGERHEART.UI.ItemBrowser.title"}}

+ {{localize "DAGGERHEART.UI.ItemBrowser.hint"}}
{{/if}}
\ No newline at end of file