From 235f8aef3954f4084895940555303bd643b1c8d9 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 21 Jan 2026 15:44:33 -0700 Subject: [PATCH] Fully localize the PlayerSheet --- langs/en-ca.json | 5 +++++ module/apps/PlayerSheet.mjs | 3 +-- templates/PlayerSheet/attributes.hbs | 4 ++-- templates/PlayerSheet/header.hbs | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/langs/en-ca.json b/langs/en-ca.json index b768f0e..8a082e1 100644 --- a/langs/en-ca.json +++ b/langs/en-ca.json @@ -54,6 +54,11 @@ "no-attributes": "No attributes yet", "add-new-attribute": "Add New Attribute" }, + "PlayerSheet": { + "manage-attributes": "Manage Attributes", + "current-value": "Current value", + "max-value": "Maximum value" + }, "QueryStatus": { "title": "Information Request Status", "user-disconnected-tooltip": "This user is not logged in to Foundry", diff --git a/module/apps/PlayerSheet.mjs b/module/apps/PlayerSheet.mjs index 864d11f..d38ec38 100644 --- a/module/apps/PlayerSheet.mjs +++ b/module/apps/PlayerSheet.mjs @@ -82,7 +82,7 @@ export class PlayerSheet extends HandlebarsApplicationMixin(ActorSheetV2) { controls.push({ icon: `fa-solid fa-at`, - label: `Manage Attributes`, + label: `taf.Apps.PlayerSheet.manage-attributes`, action: `manageAttributes`, visible: () => { const isGM = game.user.isGM; @@ -167,7 +167,6 @@ export class PlayerSheet extends HandlebarsApplicationMixin(ActorSheetV2) { event.stopPropagation(); if ( event.detail > 1 ) { return } - // const docSheetConfigWidth = TAFDocumentSheetConfig.DEFAULT_OPTIONS.position.width; new TAFDocumentSheetConfig({ document: this.document, position: { diff --git a/templates/PlayerSheet/attributes.hbs b/templates/PlayerSheet/attributes.hbs index c52b575..a2f0457 100644 --- a/templates/PlayerSheet/attributes.hbs +++ b/templates/PlayerSheet/attributes.hbs @@ -11,7 +11,7 @@ class="attr-range__value" name="{{attr.path}}.value" value="{{attr.value}}" - aria-label="Current value" + aria-label="{{localize "taf.Apps.PlayerSheet.current-value"}}" data-tooltip="@{{ attr.id }}{{#if attr.isRange}}.value{{/if}}" > {{#if attr.isRange}} @@ -21,7 +21,7 @@ class="attr-range__max" name="{{attr.path}}.max" value="{{attr.max}}" - aria-label="Maximum value" + aria-label="{{localize "taf.Apps.PlayerSheet.max-value"}}" data-tooltip="@{{ attr.id }}.max" > {{/if}} diff --git a/templates/PlayerSheet/header.hbs b/templates/PlayerSheet/header.hbs index 3e5daf3..e0b684b 100644 --- a/templates/PlayerSheet/header.hbs +++ b/templates/PlayerSheet/header.hbs @@ -12,6 +12,6 @@ name="name" class="large" value="{{actor.name}}" - placeholder="{{ localize 'Name' }}" + placeholder="{{ localize "Name" }}" />