[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

@ -1,11 +1,11 @@
<div class="roll-part target-section dice-roll" data-action="expandRoll">
<div class="roll-part-header"><div><span>Target</span></div></div>
<div class="roll-part-header"><div><span>{{pluralize currentTargets.length "DAGGERHEART.GENERAL.Target"}}</span></div></div>
{{#if (or (and targets.length (or (gt targetShort.hit 0) (gt targetShort.miss 0))) (and hasSave pendingSaves))}}
<div class="roll-part-extra on-reduced">
<div class="wrapper">
{{#if (or (gt targetShort.hit 0) (gt targetShort.miss 0))}}
<div class="target-hit-status">{{targetShort.hit}} {{#if (gt targetShort.hit 1)}}{{localize "DAGGERHEART.GENERAL.hit.single"}}{{else}}{{localize "DAGGERHEART.GENERAL.hit.plural"}}{{/if}}</div>
<div class="target-hit-status is-miss">{{targetShort.miss}} {{#if (gt targetShort.miss 1)}}{{localize "DAGGERHEART.GENERAL.miss.single"}}{{else}}{{localize "DAGGERHEART.GENERAL.miss.plural"}}{{/if}}</div>
<div class="target-hit-status">{{targetShort.hit}} {{pluralize targetShort.hit "DAGGERHEART.GENERAL.hit"}}</div>
<div class="target-hit-status is-miss">{{targetShort.miss}} {{pluralize targetShort.miss "DAGGERHEART.GENERAL.miss"}}</div>
{{/if}}
{{#if (and hasSave pendingSaves)}}<div class="target-pending-saves" data-tooltip="{{localize "DAGGERHEART.UI.Tooltip.pendingSaves"}}" data-tooltip-direction="UP"><i class="fa-solid fa-shield fa-lg fa-beat"></i></div>{{/if}}
</div>