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", "fear": "Fear",
"spotlight": "Spotlight" "spotlight": "Spotlight"
}, },
"CountdownBaseType": {
"shortterm": { "label": "Short Term", "shortLabel": "Short" },
"longterm": { "label": "Long Term", "shortLabel": "Long" }
},
"DaggerheartDiceAnimationEvents": { "DaggerheartDiceAnimationEvents": {
"critical": { "name": "Critical" }, "critical": { "name": "Critical" },
"higher": { "name": "Highest Roll" } "higher": { "name": "Highest Roll" }

View file

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

View file

@ -962,11 +962,13 @@ export const countdownAppMode = {
export const countdownType = { export const countdownType = {
shortterm: { shortterm: {
id: 'shortterm', id: 'shortterm',
label: 'Short' label: 'DAGGERHEART.CONFIG.CountdownBaseType.shortterm.label',
shortLabel: 'DAGGERHEART.CONFIG.CountdownBaseType.shortterm.shortLabel'
}, },
longterm: { longterm: {
id: '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, empty: this.empty,
pluralize: this.pluralize, pluralize: this.pluralize,
positive: this.positive, positive: this.positive,
isNullish: this.isNullish, isNullish: this.isNullish
debug: this.debug
}); });
} }
static add(a, b) { static add(a, b) {
@ -93,8 +92,4 @@ export default class RegisterHandlebarsHelpers {
static isNullish(a) { static isNullish(a) {
return a === null || a === undefined; 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> <span class="window-title">{{localize "DAGGERHEART.UI.Countdowns.title"}}</span>
<div class="header-type-toggles"> <div class="header-type-toggles">
{{#each typeToggles as |type|}} {{#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}} {{/each}}
</div> </div>
{{#if isGM}} {{#if isGM}}