Localize and finish dialog

This commit is contained in:
Carlos Fernandez 2026-04-23 18:23:51 -04:00
parent 632e33ecd6
commit 14e30d7b41
8 changed files with 107 additions and 54 deletions

View file

@ -1,15 +1,15 @@
<section class="initialization-container tab {{#if tabs.initialization.active}} active{{/if}}" data-group="{{tabs.initialization.group}}" data-tab="{{tabs.initialization.id}}">
<h1>Character Selection</h1>
<header><span>Leader</span></header>
<h1>{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.initializationTitle"}}</h1>
<header><span>{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.leader"}}</span></header>
<section class="main-roll {{#if selectedLeaderDisabled}}inactive{{/if}}">
<div class="hint">Select one Character to be the leader</div>
<div class="hint">{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.selectLeaderHint"}}</div>
<select class="main-character-field" {{#if selectedLeaderDisabled}}disabled{{/if}}>
{{selectOptions selectedLeaderOptions selected=selectedLeader.memberId blank="" }}
</select>
</section>
<header><span>Party Members</span></header>
<div class="hint">Select all Characters who will participate in the roll</div>
<header><span>{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.members"}}</span></header>
<div class="hint">{{"DAGGERHEART.APPLICATIONS.GroupRollSelect.selectParticipantsHint"}}</div>
<div class="members-container">
{{#each memberSelection as |member|}}
<button
@ -19,7 +19,12 @@
{{#if (and (not member.selected) ../allSelected)}}disabled{{/if}}
>
<img class="portrait" src="{{member.img}}" />
<span class="name">{{member.name}}</span>
<span class="name">
{{member.name}}
{{#if (eq @root.selectedLeader.memberId member.id)}}
<i class="fa-solid fa-crown" inert></i>
{{/if}}
</span>
<input type="checkbox" {{#if member.selected}}checked{{/if}} />
</button>
{{/each}}

View file

@ -1,15 +1,15 @@
<section class="group-roll tab {{#if tabs.groupRoll.active}} active{{/if}}" data-group="{{tabs.groupRoll.group}}" data-tab="{{tabs.groupRoll.id}}">
<h1>Group Roll</h1>
<header><span>Members</span></header>
<h1>{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.title"}}</h1>
<header><span>{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.members"}}</span></header>
<div class="aiding-members">
{{#each aidKeys as |key|}}
<div data-application-part="{{key}}"></div>
{{/each}}
</div>
<header><span>Leader</span></header>
<header><span>{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.leader"}}</span></header>
<div data-application-part="leader"></div>
<header><span>Result</span></header>
<header><span>{{localize "DAGGERHEART.GENERAL.result.single"}}</span></header>
<div data-application-part="result"></div>
<div data-application-part="footer"></div>
</section>

View file

@ -1,6 +1,5 @@
{{#with (ifThen (eq partId "leader") leader (lookup members partId))}}
<section class="member-roll-container {{type}} {{#if @root.allHaveRolled}}select-padding{{/if}} {{#unless isEditable}}inactive{{/unless}}" data-member-key="{{@root.partId}}">
{{log this}}
<img class="portrait" src="{{img}}" />
<div class="name-area">
<span class="name">{{name}}</span>
@ -12,10 +11,23 @@
{{numberFormat modifier sign=true}}
</span>
{{/if}}
{{#if isEditable}}
<div class="buttons">
<button type="button" data-action="makeRoll" class="plain" data-tooltip="DAGGERHEART.GENERAL.Roll.basic">
<img class="roll-img duality" src="systems/daggerheart/assets/icons/dice/duality/DualityBW.svg" alt="2d12">
</button>
<button
type="button"
data-action="removeRoll"
class="plain icon fa-solid fa-trash"
data-tooltip="DAGGERHEART.APPLICATIONS.GroupRollSelect.removeRoll"
></button>
</div>
{{/if}}
</div>
{{else if readyToRoll}}
<div class="trait">
Trait
{{localize "DAGGERHEART.CONFIG.RollTypes.trait.name" }}
<select name="{{basePath}}.rollChoice" {{#if hasRolled}}disabled{{/if}}>
{{selectOptions ../traitOptions selected=rollChoice localize=true}}
</select>
@ -27,7 +39,7 @@
<div class="roll-data">
<div class="duality-label">
{{roll.total}}
<span class="with">{{localize "DAGGERHEART.GENERAL.withThing" thing=roll.totalLabel}}</span>
<span class="with">{{withLabelShort}}</span>
</div>
<div class="roll-dice-container">
<a class="roll-dice" data-action="rerollDice" data-member="{{@root.partId}}" data-dice-type="hope">
@ -49,15 +61,26 @@
<span class="roll-value">{{positive roll.modifierTotal}}</span>
</div>
</div>
{{#if (and isEditable (ne ../partId "leader"))}}
{{#if (and @root.isGM (ne ../partId "leader"))}}
<div class="buttons">
<button type="button" data-action="markSuccessful" data-success="true" class="plain icon fa-solid fa-check {{#if modifier}}{{#if successfull}}active{{else}}inactive{{/if}}{{/if}}"></button>
<button type="button" data-action="markSuccessful" class="plain icon fa-solid fa-times {{#if modifier}}{{#if successfull}}inactive{{else}}active{{/if}}{{/if}}"></button>
<button
type="button"
data-action="markSuccessful"
data-success="true"
class="plain icon fa-solid fa-check {{#if modifier}}{{#if successful}}active{{else}}inactive{{/if}}{{/if}}"
data-tooltip="DAGGERHEART.GENERAL.success"
></button>
<button
type="button"
data-action="markSuccessful"
class="plain icon fa-solid fa-times {{#if modifier}}{{#if successful}}inactive{{else}}active{{/if}}{{/if}}"
data-tooltip="DAGGERHEART.GENERAL.failure"
></button>
</div>
{{/if}}
</div>
{{else if readyToRoll}}
<a class="roll-button initial-roll" data-action="makeRoll" data-member="{{@root.partId}}">
{{else if (and readyToRoll isEditable)}}
<a class="roll-button initial-roll" data-action="makeRoll" data-member="{{@root.partId}}" data-tooltip="DAGGERHEART.GENERAL.Roll.basic">
<img class="roll-img duality" src="systems/daggerheart/assets/icons/dice/duality/DualityBW.svg" alt="2d12">
</a>
{{/if}}

View file

@ -1,15 +1,15 @@
{{#if hasRolled}}
{{#if (and hasRolled leader.roll)}}
<div class="group-roll-results with-result {{groupRoll.totalDualityClass}}">
<div class="row leader">
<span class="label">Leader Roll</span>
<span class="label">{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.leaderRoll"}}</span>
<span class="duality-label">
{{leader.roll.total}}
<span class="with">{{localize "DAGGERHEART.GENERAL.withThing" thing=leader.roll.totalLabel}}</span>
</span>
</div>
<div class="row modifiers">
<span class="label">Modifiers</span>
<span class="label">{{localize "DAGGERHEART.GENERAL.Modifier.plural"}}</span>
<div class="item-tags">
{{#each groupRoll.modifiers as |modifier|}}
<span class="tag {{#if (gte modifier 0)}}success{{else}}failure{{/if}}">
@ -20,12 +20,12 @@
</div>
<div class="divider"></div>
<div class="row total">
<span class="label">Total</span>
<span class="label">{{localize "DAGGERHEART.GENERAL.total"}}</span>
<span class="duality-label"><span class="value">{{groupRoll.total}}</span> {{groupRoll.totalLabel}}</span>
</div>
</div>
{{else}}
<div class="group-roll-results empty">
Results will appear when characters roll
{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.resultsHint"}}
</div>
{{/if}}