Skip to content

Commit

Permalink
Merge pull request #154 from LittleVolo/master
Browse files Browse the repository at this point in the history
Templates enhancement for better translation + French translation update
  • Loading branch information
ClipplerBlood authored Feb 13, 2024
2 parents 7e59a66 + 43b5455 commit 72cc6a9
Show file tree
Hide file tree
Showing 20 changed files with 1,410 additions and 1,259 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ junit.xml

# Environment variables
.env
.DS_Store
1,316 changes: 666 additions & 650 deletions src/lang/en.json

Large diffs are not rendered by default.

1,251 changes: 690 additions & 561 deletions src/lang/fr.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/module/active-effects/effects.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@ export function prepareActiveEffectCategories(effects, showCreateButtons = false
let categories = {
temporary: {
type: 'temporary',
name: 'Temporary Effects',
name: game.i18n.localize('DL.EffectTemporary'),
showCreateButtons: showCreateButtons,
showControls: 3,
effects: [],
},
passive: {
type: 'passive',
name: 'Passive Effects',
name: game.i18n.localize('DL.EffectPassive'),
showCreateButtons: showCreateButtons,
showControls: 3,
effects: [],
},
inactive: {
type: 'inactive',
name: 'Inactive Effects',
name: game.i18n.localize('DL.EffectInactive'),
showCreateButtons: showCreateButtons,
showControls: 3,
effects: [],
Expand Down
2 changes: 1 addition & 1 deletion src/templates/actor/actor-sheet.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a class="item" data-tab="magic">{{localize "DL.TabsMagic"}}</a>
<a class="item" data-tab="items">{{localize "DL.TabsInventory"}}</a>
<a class="item" data-tab="background">{{localize "DL.TabsBackground"}}</a>
<a class="item" data-tab="afflictions">{{localize "DL.ModsAfflictions"}}</a>
<a class="item" data-tab="afflictions">{{localize "DL.TabsAfflictions"}}</a>
{{#if effects}}<a class="item" data-tab="effects">{{localize "DL.TabsEffects"}}</a>{{/if}}
</nav>

Expand Down
3 changes: 2 additions & 1 deletion src/templates/actor/creature-sidemenu.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@
<label class="switchTurn">
<input type="checkbox" id="system.fastturn" name="system.fastturn" {{checked system.fastturn}}>
<div class="slider round">
<span class="on">Fast turn</span><span class="off">Slow turn</span>
<span class="on">{{localize "DL.TurnFastButton"}}</span>
<span class="off">{{localize "DL.TurnSlowButton"}}</span>
</div>
</label>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/templates/actor/sidemenu.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="isPC">
<label class="switch">
<input type="checkbox" id="system.isPC" name="system.isPC" {{checked system.isPC}} />
<div class="slider round"><span class="on">PC</span><span class="off">NPC</span></div>
<div class="slider round"><span class="on">{{localize "DL.ActorTypePC"}}</span><span class="off">{{localize "DL.ActorTypeNPC"}}</span></div>
</label>
</div>
{{#if system.isPC}}
Expand Down Expand Up @@ -41,7 +41,7 @@
<div class="healingratetext">{{localize "DL.CharHealthHealingRating"}}</div>
</div>
<div class="editBars">
<a class="bar-edit" title="{{localize 'DL.ToogleBarView'}}"><i class="fas fa-edit"></i></a>
<a class="bar-edit" title="{{localize 'DL.ToggleBarView'}}"><i class="fas fa-edit"></i></a>
</div>
{{#if system.characteristics.editbar}}
<div class="barboxes">
Expand Down
3 changes: 2 additions & 1 deletion src/templates/actor/vehicle-sidemenu.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
<label class="switchTurn">
<input type="checkbox" id="system.fastturn" name="system.fastturn" {{checked system.fastturn}}>
<div class="slider round">
<span class="on">Fast turn</span><span class="off">Slow turn</span>
<span class="on">{{localize "DL.TurnFastButton"}}</span>
<span class="off">{{localize "DL.TurnSlowButton"}}</span>
</div>
</label>
</div>
Expand Down
16 changes: 8 additions & 8 deletions src/templates/item/item-ancestry-edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
</div>
<div class="dl-item-section-section-title">
<b>{{localize "DL.LanguagesTitle"}} ({{localize "CONTROLS.Drop"}})</b>
<a class="create-nested-item" data-tippy-content="{{localize 'DL.ItemAddItem'}}"
<a class="create-nested-item" data-tippy-content="{{localize 'DL.ItemAddLanguage'}}"
data-type="language" data-group="language" data-folder-loc="LanguagesTitle">
<i class="fas fa-plus"></i>
</a>
Expand All @@ -161,7 +161,7 @@
{{#if item.system.enrichedDescriptionUnrolled}}data-tippy-html="{{item.system.enrichedDescriptionUnrolled}}"{{/if}}>
<img src="{{item.img}}">
<span class="edit-nested-item dl-clickable">{{item.name}}</span>
<a class="delete-ancestryitem" data-tippy-content="{{localize 'DL.ItemDeleteItem'}}" data-type="language">
<a class="delete-ancestryitem" data-tippy-content="{{localize 'DL.ItemDeleteLanguage'}}" data-type="language">
<i class="fas fa-times"></i>
</a>
</div>
Expand All @@ -176,7 +176,7 @@
<div class="dl-item-section-section margin">
<div class="dl-item-section-section-title">
<b>{{localize "DL.FeaturesTitle"}} ({{localize "CONTROLS.Drop"}})</b>
<a class="create-nested-item" data-tippy-content="{{localize 'DL.ItemAddItem'}}"
<a class="create-nested-item" data-tippy-content="{{localize 'DL.FeatureAdd'}}"
data-type="feature" data-group="talent" data-folder-loc="FeaturesTitle">
<i class="fas fa-plus"></i>
</a>
Expand All @@ -187,7 +187,7 @@
{{#if item.system.enrichedDescriptionUnrolled}}data-tippy-html="{{item.system.enrichedDescriptionUnrolled}}"{{/if}}>
<img src="{{item.img}}">
<span class="edit-nested-item dl-clickable">{{item.name}}</span>
<a class="delete-ancestryitem" data-tippy-content="{{localize 'DL.ItemDeleteItem'}}" data-type="talent">
<a class="delete-ancestryitem" data-tippy-content="{{localize 'DL.FeatureDelete'}}" data-type="talent">
<i class="fas fa-times"></i>
</a>
</div>
Expand Down Expand Up @@ -217,7 +217,7 @@
<div class="dl-item-section-section margin">
<div class="dl-item-section-section-title">
<b>{{localize "DL.AncestryLearnSpell"}} ({{localize "CONTROLS.Drop"}})</b>
<a class="create-nested-item" data-tippy-content="{{localize 'DL.ItemAddItem'}}"
<a class="create-nested-item" data-tippy-content="{{localize 'DL.MagicAddSpell'}}"
data-type="spell" data-group="spells4" data-folder-loc="MagicSpellsTitle">
<i class="fas fa-plus"></i>
</a>
Expand All @@ -228,7 +228,7 @@
{{#if item.system.enrichedDescriptionUnrolled}}data-tippy-html="{{item.system.enrichedDescriptionUnrolled}}"{{/if}}>
<img src="{{item.img}}">
<span class="edit-nested-item dl-clickable">{{item.name}}</span>
<a class="delete-ancestryitem" data-tippy-content="{{localize 'DL.ItemDeleteItem'}}" data-type="spells4">
<a class="delete-ancestryitem" data-tippy-content="{{localize 'DL.MagicDeleteSpell'}}" data-type="spells4">
<i class="fas fa-times"></i>
</a>
</div>
Expand All @@ -239,7 +239,7 @@
<div class="dl-item-section-section margin">
<div class="dl-item-section-section-title">
<b>{{localize "DL.AncestryLearnTalent"}} ({{localize "CONTROLS.Drop"}})</b>
<a class="create-nested-item" data-tippy-content="{{localize 'DL.ItemAddItem'}}"
<a class="create-nested-item" data-tippy-content="{{localize 'DL.TalentAdd'}}"
data-type="talent" data-group="talent4" data-folder-loc="TalentTitle">
<i class="fas fa-plus"></i>
</a>
Expand All @@ -250,7 +250,7 @@
{{#if item.system.enrichedDescriptionUnrolled}}data-tippy-html="{{item.system.enrichedDescriptionUnrolled}}"{{/if}}>
<img src="{{item.img}}">
<span class="edit-nested-item dl-clickable">{{item.name}}</span>
<a class="delete-ancestryitem" data-tippy-content="{{localize 'DL.ItemDeleteItem'}}" data-type="talent4">
<a class="delete-ancestryitem" data-tippy-content="{{localize 'DL.TalentDelete'}}" data-type="talent4">
<i class="fas fa-times"></i>
</a>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/templates/item/item-path-edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{{#if item.system.enrichedDescriptionUnrolled}}data-tippy-html="{{item.system.enrichedDescriptionUnrolled}}"{{/if}}>
<img src="{{item.img}}">
<span class="edit-nested-item dl-clickable">{{item.name}}</span>
<a class="delete-item" data-tippy-content="{{localize 'DL.ItemDeleteItem'}}" data-type="{{type}}"
<a class="delete-item" data-tippy-content="{{localize 'DL.Delete'}}" data-type="{{type}}"
style="align-self: center; margin-left: auto; margin-right: 4px">
<i class="fas fa-times"></i>
</a>
Expand Down Expand Up @@ -181,7 +181,7 @@
<div class="dl-item-section-section">
<div class="dl-item-section-section-title">
<b>{{localize "DL.TalentTitle"}}</b>
<a class="create-nested-item" data-tippy-content="{{localize 'DL.ItemAddItem'}}"
<a class="create-nested-item" data-tippy-content="{{localize 'DL.TalentAdd'}}"
data-type="talent" data-group="talents" data-folder-loc="TalentTitle" data-level="{{index}}">
<i class="fas fa-plus"></i>
</a>
Expand All @@ -192,7 +192,7 @@
<div class="dl-item-section-section">
<div class="dl-item-section-section-title">
<b>{{localize "DL.TalentTitle"}} ({{localize 'DL.PathsLevelTalentChooseOne'}})</b>
<a class="create-nested-item" data-tippy-content="{{localize 'DL.ItemAddItem'}}"
<a class="create-nested-item" data-tippy-content="{{localize 'DL.TalentAdd'}}"
data-type="talent" data-group="talentspick" data-folder-loc="TalentTitle" data-level="{{index}}">
<i class="fas fa-plus"></i>
</a>
Expand All @@ -203,7 +203,7 @@
<div class="dl-item-section-section">
<div class="dl-item-section-section-title">
<b>{{localize "DL.MagicSpellsTitle"}}</b>
<a class="create-nested-item" data-tippy-content="{{localize 'DL.ItemAddItem'}}"
<a class="create-nested-item" data-tippy-content="{{localize 'DL.MagicAddSpell'}}"
data-type="spell" data-group="spells" data-folder-loc="MagicSpellsTitle" data-level="{{index}}">
<i class="fas fa-plus"></i>
</a>
Expand Down
16 changes: 8 additions & 8 deletions src/templates/item/item-role-edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
<div class="dl-item-section-section margin">
<div class="dl-item-section-section-title">
<b>{{localize "DL.TalentTitle"}} ({{localize "CONTROLS.Drop"}})</b>
<a class="create-nested-item" data-tippy-content="{{localize 'DL.ItemAddItem'}}" data-type="talent"
<a class="create-nested-item" data-tippy-content="{{localize 'DL.TalentAdd'}}" data-type="talent"
data-group="talent" data-folder-loc="TalentTitle">
<i class="fas fa-plus"></i>
</a>
Expand All @@ -186,7 +186,7 @@
{{/if}}>
<img src="{{item.img}}">
<span class="edit-nested-item dl-clickable">{{item.name}}</span>
<a class="delete-roleitem" data-tippy-content="{{localize 'DL.ItemDeleteItem'}}" data-type="talent">
<a class="delete-roleitem" data-tippy-content="{{localize 'DL.TalentDelete'}}" data-type="talent">
<i class="fas fa-times"></i>
</a>
</div>
Expand All @@ -197,7 +197,7 @@
<div class="dl-item-section-section margin">
<div class="dl-item-section-section-title">
<b>{{localize "DL.WeaponTitle"}} ({{localize "CONTROLS.Drop"}})</b>
<a class="create-nested-item" data-tippy-content="{{localize 'DL.ItemAddItem'}}" data-type="weapon"
<a class="create-nested-item" data-tippy-content="{{localize 'DL.WeaponAdd'}}" data-type="weapon"
data-group="weapon" data-folder-loc="WeaponTitle">
<i class="fas fa-plus"></i>
</a>
Expand All @@ -210,7 +210,7 @@
{{/if}}>
<img src="{{item.img}}">
<span class="edit-nested-item dl-clickable">{{item.name}}</span>
<a class="delete-roleitem" data-tippy-content="{{localize 'DL.ItemDeleteItem'}}" data-type="weapon">
<a class="delete-roleitem" data-tippy-content="{{localize 'DL.WeaponDelete'}}" data-type="weapon">
<i class="fas fa-times"></i>
</a>
</div>
Expand All @@ -221,7 +221,7 @@
<div class="dl-item-section-section margin">
<div class="dl-item-section-section-title">
<b>{{localize "DL.MagicSpellsTitle"}} ({{localize "CONTROLS.Drop"}})</b>
<a class="create-nested-item" data-tippy-content="{{localize 'DL.ItemAddItem'}}" data-type="spell"
<a class="create-nested-item" data-tippy-content="{{localize 'DL.MagicAddSpell'}}" data-type="spell"
data-group="spell" data-folder-loc="MagicSpellsTitle">
<i class="fas fa-plus"></i>
</a>
Expand All @@ -234,7 +234,7 @@
{{/if}}>
<img src="{{item.img}}">
<span class="edit-nested-item dl-clickable">{{item.name}}</span>
<a class="delete-roleitem" data-tippy-content="{{localize 'DL.ItemDeleteItem'}}" data-type="spell">
<a class="delete-roleitem" data-tippy-content="{{localize 'DL.MagicDeleteSpell'}}" data-type="spell">
<i class="fas fa-times"></i>
</a>
</div>
Expand All @@ -245,7 +245,7 @@
<div class="dl-item-section-section margin">
<div class="dl-item-section-section-title">
<b>{{localize "DL.CreatureSpecialEndRound"}} ({{localize "CONTROLS.Drop"}})</b>
<a class="create-nested-item" data-tippy-content="{{localize 'DL.ItemAddItem'}}" data-type="endoftheround"
<a class="create-nested-item" data-tippy-content="{{localize 'DL.CreatureAddEndRound'}}" data-type="endoftheround"
data-group="endoftheround" data-folder-loc="CreatureSpecialEndRound">
<i class="fas fa-plus"></i>
</a>
Expand All @@ -258,7 +258,7 @@
{{/if}}>
<img src="{{item.img}}">
<span class="edit-nested-item dl-clickable">{{item.name}}</span>
<a class="delete-roleitem" data-tippy-content="{{localize 'DL.ItemDeleteItem'}}" data-type="endoftheround">
<a class="delete-roleitem" data-tippy-content="{{localize 'DL.CreatureDeleteEndRound'}}" data-type="endoftheround">
<i class="fas fa-times"></i>
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/item/partial/item-attacks.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<span class="sep"></span>
<input type="text" name="{{actionId}}.damagetype" value="{{action.damagetype}}" data-tippy-content="{{localize "DL.ActionTargetType"}}" placeholder="-" autosize />
</div>
<a class="dl-clickable damagetype-control" style="align-self: center;" data-tippy-content="{{localize "DL.DamageAddType"}}" data-action="create">
<a class="dl-clickable damagetype-control" style="align-self: center;" data-tippy-content="{{localize "DL.DamageDeleteType"}}" data-action="create">
<i class="fas fa-plus"></i>
</a>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/templates/item/partial/item-effects.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{#each effects as |section sid|}}
<li class="items-header flexrow" data-effect-type="{{section.type}}">
<div class="item-name effect-name flexrow">{{localize section.name}}</div>
<div class="effect-source">Duration</div>
<div class="effect-source">{{localize "DL.EffectDuration"}}</div>
<div class="effect-controls flexrow">
{{#if section.showCreateButtons}}
<a class="effect-control" data-action="create" title="{{localize 'DL.EffectCreate'}}">
Expand All @@ -30,18 +30,18 @@
<div class="effect-controls flexrow">
{{#if (eq section.showControls 1)}}
<a class="effect-control" data-action="toggle" title="{{localize 'DL.EffectToggle'}}">
<i class="fas {{#if effect.disabled}}fa-check{{else}}fa-times{{/if}}"></i>
<i class="fas {{#if effect.disabled}}fa-toggle-off{{else}}fa-toggle-on{{/if}}"></i>
</a>
{{/if}} {{#if (eq section.showControls 2)}}
<a class="effect-control" data-action="toggle" title="{{localize 'DL.EffectToggle'}}">
<i class="fas {{#if effect.disabled}}fa-check{{else}}fa-times{{/if}}"></i>
<i class="fas {{#if effect.disabled}}fa-toggle-off{{else}}fa-toggle-on{{/if}}"></i>
</a>
<a class="effect-control" data-action="edit" title="{{localize 'DL.EffectEdit'}}">
<i class="fas fa-edit"></i>
</a>
{{/if}} {{#if (eq section.showControls 3)}}
<a class="effect-control" data-action="toggle" title="{{localize 'DL.EffectToggle'}}">
<i class="fas {{ifThen effect.disabled "fa-check" "fa-times"}}"></i>
<i class="fas {{ifThen effect.disabled "fa-toggle-off" "fa-toggle-on"}}"></i>
</a>
<a class="effect-control" data-action="edit" title="{{localize 'DL.EffectEdit'}}">
<i class="fas fa-edit"></i>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/item/partial/item-healing.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<div>
<b>{{localize "DL.TalentHealingOptions"}}</b>
<div class="dl-new-project-radio {{checked healing}}" data-tippy-content="{{localize " DL.TalentHealingOptions"}}">
<div class="dl-new-project-radio {{checked healing}}" data-tippy-content="{{localize "DL.TalentHealingOptions"}}">
<input type="checkbox" name="{{healingId}}" id="healingoptions" {{checked healing}} />
<i class="dl-icon-healing"></i>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/item/partial/item-measured-template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</select>
</div>
<div style="gap: 0">
<div class="dl-new-project-2 nohover" data-tippy-content="{{localize " DL.ActionTexture"}}">
<div class="dl-new-project-2 nohover" data-tippy-content="{{localize "DL.ActionTexture"}}">
<input type="text" name="system.activatedEffect.texture" value="{{system.activatedEffect.texture}}"
autosize placeholder="path/image.webp" style="min-width: 120px; max-width: 200px; text-overflow: ellipsis; color: grey !important;
overflow: hidden; direction: rtl;">
Expand Down
5 changes: 4 additions & 1 deletion src/templates/item/partial/item-sheet-header.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
<div class="togglegm">
<label class="switchBig">
<input type="checkbox" id="{{editId}}" name="{{editId}}" {{checked edit}} />
<div class="slider round"><span class="on">Edit</span><span class="off">View</span></div>
<div class="slider round">
<span class="on">{{localize "DL.ButtonEdit"}}</span>
<span class="off">{{localize "DL.ButtonView"}}</span>
</div>
</label>
</div>
{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion src/templates/tabs/activeeffects.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{#each effects as |section sid|}}
<li class="items-header flexrow" data-effect-type="{{section.type}}">
<div class="item-name effect-name flexrow">{{localize section.name}}</div>
<div class="effect-source">Duration</div>
<div class="effect-source">{{localize "DL.EffectDuration"}}</div>
<div class="effect-controls flexrow">
{{#if section.showCreateButtons}}
<a class="effect-control" data-action="create" title="{{localize 'DL.EffectCreate'}}">
Expand Down
2 changes: 1 addition & 1 deletion src/templates/tabs/combat.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
{{system.quantity}} <i class="fas fa-arrows-alt-v"></i>
</div>
<div class="col-2">
<a class="dl-clickable item-delete" title="{{localize 'DL.ArmorDelete'}}"><i class="fas fa-times"></i></a>
<a class="dl-clickable item-delete" title="{{localize 'DL.AmmoDelete'}}"><i class="fas fa-times"></i></a>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 72cc6a9

Please sign in to comment.