From fd925407925e4d91c4f96bfb7689cf0d043af9a8 Mon Sep 17 00:00:00 2001 From: Chris Ryan <73275196+chrisryan10@users.noreply.github.com> Date: Sun, 7 Sep 2025 06:06:17 +1000 Subject: [PATCH] Add keys, update usage for translations (#1156) Co-authored-by: Chris Ryan --- lang/en.json | 12 +++++++++++- module/applications/sheets-configs/action-config.mjs | 6 +++--- module/config/generalConfig.mjs | 8 ++++---- templates/actionTypes/cost.hbs | 10 +++++----- templates/actionTypes/range-target.hbs | 6 +++--- templates/actionTypes/uses.hbs | 6 +++--- 6 files changed, 29 insertions(+), 19 deletions(-) diff --git a/lang/en.json b/lang/en.json index f1164232..37e6cfff 100755 --- a/lang/en.json +++ b/lang/en.json @@ -992,6 +992,12 @@ "selectType": "Select Action Type", "selectAction": "Action Selection" }, + "TargetTypes": { + "any": "Any", + "friendly": "Friendly", + "hostile": "Hostile", + "self": "Self" + }, "TemplateTypes": { "circle": "Circle", "cone": "Cone", @@ -1880,7 +1886,9 @@ "tier4": "tier 4", "domains": "Domains", "downtime": "Downtime", - "rules": "Rules" + "rules": "Rules", + "configuration": "Configuration", + "base": "Base" }, "Tiers": { "singular": "Tier", @@ -1981,6 +1989,8 @@ "save": "Save", "scalable": "Scalable", "situationalBonus": "Situational Bonus", + "spent": "Spent", + "step": "Step", "stress": "Stress", "subclasses": "Subclasses", "success": "Success", diff --git a/module/applications/sheets-configs/action-config.mjs b/module/applications/sheets-configs/action-config.mjs index ea3c6f31..f673fc66 100644 --- a/module/applications/sheets-configs/action-config.mjs +++ b/module/applications/sheets-configs/action-config.mjs @@ -66,7 +66,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) { group: 'primary', id: 'base', icon: null, - label: 'Base' + label: 'DAGGERHEART.GENERAL.Tabs.base' }, config: { active: false, @@ -74,7 +74,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) { group: 'primary', id: 'config', icon: null, - label: 'Configuration' + label: 'DAGGERHEART.GENERAL.Tabs.configuration' }, effect: { active: false, @@ -82,7 +82,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) { group: 'primary', id: 'effect', icon: null, - label: 'Effect' + label: 'DAGGERHEART.GENERAL.Tabs.effects' } }; diff --git a/module/config/generalConfig.mjs b/module/config/generalConfig.mjs index 60b3a2f1..8714d44b 100644 --- a/module/config/generalConfig.mjs +++ b/module/config/generalConfig.mjs @@ -90,22 +90,22 @@ export const rangeInclusion = { export const otherTargetTypes = { friendly: { id: 'friendly', - label: 'Friendly' + label: 'DAGGERHEART.CONFIG.TargetTypes.friendly' }, hostile: { id: 'hostile', - label: 'Hostile' + label: 'DAGGERHEART.CONFIG.TargetTypes.hostile' }, any: { id: 'any', - label: 'Any' + label: 'DAGGERHEART.CONFIG.TargetTypes.any' } }; export const targetTypes = { self: { id: 'self', - label: 'Self' + label: 'DAGGERHEART.CONFIG.TargetTypes.self' }, ...otherTargetTypes }; diff --git a/templates/actionTypes/cost.hbs b/templates/actionTypes/cost.hbs index a1b7de48..7a9f33d9 100644 --- a/templates/actionTypes/cost.hbs +++ b/templates/actionTypes/cost.hbs @@ -1,6 +1,6 @@
- Cost + {{localize "DAGGERHEART.GENERAL.Cost.single"}} {{#each source as |cost index|}} @@ -8,10 +8,10 @@ {{formField ../fields.consumeOnSuccess value=cost.consumeOnSuccess name=(concat "cost." index ".consumeOnSuccess") classes="checkbox" rootId=partId localize=true}} {{/if}}
- {{formField ../fields.scalable label="Scalable" value=cost.scalable name=(concat "cost." index ".scalable") classes="checkbox"}} - {{formField ../fields.key choices=(@root.disableOption index @root.costOptions ../source) label="Resource" value=cost.key name=(concat "cost." index ".key") localize=true blank=false}} - {{formField ../fields.value label="Amount" value=cost.value name=(concat "cost." index ".value")}} - {{formField ../fields.step label="Step" value=cost.step name=(concat "cost." index ".step") disabled=(not cost.scalable)}} + {{formField ../fields.scalable label="DAGGERHEART.GENERAL.scalable" value=cost.scalable name=(concat "cost." index ".scalable") classes="checkbox" localize=true}} + {{formField ../fields.key choices=(@root.disableOption index @root.costOptions ../source) label="DAGGERHEART.GENERAL.resource" value=cost.key name=(concat "cost." index ".key") localize=true blank=false}} + {{formField ../fields.value label="DAGGERHEART.GENERAL.amount" value=cost.value name=(concat "cost." index ".value") localize=true}} + {{formField ../fields.step label="DAGGERHEART.GENERAL.step" value=cost.step name=(concat "cost." index ".step") disabled=(not cost.scalable) localize=true}}
{{/each}} diff --git a/templates/actionTypes/range-target.hbs b/templates/actionTypes/range-target.hbs index 3776f0c1..143acdf8 100644 --- a/templates/actionTypes/range-target.hbs +++ b/templates/actionTypes/range-target.hbs @@ -1,12 +1,12 @@
{{localize "DAGGERHEART.GENERAL.range"}}{{#if fields.target}} & {{localize "DAGGERHEART.GENERAL.Target.single"}}{{/if}} - {{formField fields.range value=source.range label="Range" name=(concat path "range") localize=true}} + {{formField fields.range value=source.range label="DAGGERHEART.GENERAL.range" name=(concat path "range") localize=true}} {{#if fields.target}}
{{#if (and source.target.type (not (eq source.target.type 'self')))}} - {{ formField fields.target.amount value=source.target.amount label="Amount" name=(concat path "target.amount") }} + {{ formField fields.target.amount value=source.target.amount label="DAGGERHEART.GENERAL.amount" name=(concat path "target.amount") localize=true}} {{/if}} - {{ formField fields.target.type value=source.target.type label="Target" name=(concat path "target.type") localize=true }} + {{ formField fields.target.type value=source.target.type label="DAGGERHEART.GENERAL.Target.single" name=(concat path "target.type") localize=true }}
{{/if}}
\ No newline at end of file diff --git a/templates/actionTypes/uses.hbs b/templates/actionTypes/uses.hbs index 2c1c3cd4..7304f810 100644 --- a/templates/actionTypes/uses.hbs +++ b/templates/actionTypes/uses.hbs @@ -4,8 +4,8 @@ {{formField fields.consumeOnSuccess value=source.consumeOnSuccess name="uses.consumeOnSuccess" classes="checkbox" rootId=partId localize=true}} {{/if}}
- {{formField fields.value label="Spent" value=source.value name="uses.value" rootId=partId}} - {{formField fields.max label="Max" value=source.max name="uses.max" rootId=partId}} + {{formField fields.value label="DAGGERHEART.GENERAL.spent" value=source.value name="uses.value" rootId=partId localize=true}} + {{formField fields.max label="DAGGERHEART.GENERAL.max" value=source.max name="uses.max" rootId=partId localize=true}}
- {{formField fields.recovery label="Recovery" value=source.recovery name="uses.recovery" rootId=partId localize=true}} + {{formField fields.recovery label="DAGGERHEART.GENERAL.recovery" value=source.recovery name="uses.recovery" rootId=partId localize=true}}
\ No newline at end of file