Fixed localization

This commit is contained in:
WBHarry 2026-06-10 15:25:15 +02:00
parent 114123ac50
commit 3effc2a0b2
5 changed files with 11 additions and 10 deletions

View file

@ -1170,6 +1170,10 @@
"fear": "Fear",
"spotlight": "Spotlight"
},
"CountdownBaseType": {
"shortterm": { "label": "Short Term", "shortLabel": "Short" },
"longterm": { "label": "Long Term", "shortLabel": "Long" }
},
"DaggerheartDiceAnimationEvents": {
"critical": { "name": "Critical" },
"higher": { "name": "Highest Roll" }

View file

@ -189,7 +189,7 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application
context.typeToggles =
Object.values(CONFIG.DH.GENERAL.countdownType).map(type => ({
type: type.id,
label: game.i18n.localize(type.label),
label: game.i18n.localize(type.shortLabel),
active: context.userCountdownTypes.includes(type.id)
}));

View file

@ -962,11 +962,13 @@ export const countdownAppMode = {
export const countdownType = {
shortterm: {
id: 'shortterm',
label: 'Short'
label: 'DAGGERHEART.CONFIG.CountdownBaseType.shortterm.label',
shortLabel: 'DAGGERHEART.CONFIG.CountdownBaseType.shortterm.shortLabel'
},
longterm: {
id: 'longterm',
label: 'Long'
label: 'DAGGERHEART.CONFIG.CountdownBaseType.longterm.label',
shortLabel: 'DAGGERHEART.CONFIG.CountdownBaseType.longterm.shortLabel'
}
};

View file

@ -16,8 +16,7 @@ export default class RegisterHandlebarsHelpers {
empty: this.empty,
pluralize: this.pluralize,
positive: this.positive,
isNullish: this.isNullish,
debug: this.debug
isNullish: this.isNullish
});
}
static add(a, b) {
@ -93,8 +92,4 @@ export default class RegisterHandlebarsHelpers {
static isNullish(a) {
return a === null || a === undefined;
}
static debug(a) {
return a;
}
}

View file

@ -4,7 +4,7 @@
<span class="window-title">{{localize "DAGGERHEART.UI.Countdowns.title"}}</span>
<div class="header-type-toggles">
{{#each typeToggles as |type|}}
<a class="header-type {{#unless type.active}}inactive{{/unless}}" data-action="onToggleCountdownTypes" data-type="{{type.type}}">{{type.label}}</a>
<a class="header-type {{#unless type.active}}inactive{{/unless}}" data-action="onToggleCountdownTypes" data-type="{{type.type}}">{{localize type.label}}</a>
{{/each}}
</div>
{{#if isGM}}