From 9f6c117c84f943e201692a3ac3d739e816e7f074 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 21 Jan 2026 15:27:12 -0700 Subject: [PATCH] Fully localize the Ask app where possible --- langs/en-ca.json | 8 +++++++- module/apps/Ask.mjs | 8 ++++++-- templates/Ask/controls.hbs | 4 ++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/langs/en-ca.json b/langs/en-ca.json index 14b5d33..82a7438 100644 --- a/langs/en-ca.json +++ b/langs/en-ca.json @@ -36,9 +36,15 @@ "Key": "Key", "Value": "Value", "no-data-submitted": "No data submitted", - "data-query-notif-header": "Data Query Notification" + "data-query-notif-header": "Data Query Notification", + "cancel": "Cancel", + "confirm-and-close": "Confirm and Close" }, "Apps": { + "Ask": { + "title": "Questions", + "invalid-input-type": "Invalid input type provided: {type}" + }, "QueryStatus": { "title": "Information Request Status", "user-disconnected-tooltip": "This user is not logged in to Foundry", diff --git a/module/apps/Ask.mjs b/module/apps/Ask.mjs index e6d3ce4..1ad0c64 100644 --- a/module/apps/Ask.mjs +++ b/module/apps/Ask.mjs @@ -1,4 +1,5 @@ import { __ID__, filePath } from "../consts.mjs"; +import { localizer } from "../utils/localizer.mjs"; const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api; @@ -24,7 +25,7 @@ export class Ask extends HandlebarsApplicationMixin(ApplicationV2) { width: 330, }, window: { - title: `Questions`, + title: `taf.Apps.Ask.title`, resizable: true, minimizable: true, contentTag: `form`, @@ -80,7 +81,10 @@ export class Ask extends HandlebarsApplicationMixin(ApplicationV2) { for (const input of inputs) { if (!validInputTypes.includes(input.type)) { - input.details = `Invalid input type provided: ${input.type}`; + input.details = localizer( + `taf.Apps.Ask.invalid-input-type`, + { type: input.type }, + ); input.type = `error`; }; }; diff --git a/templates/Ask/controls.hbs b/templates/Ask/controls.hbs index a619549..f354689 100644 --- a/templates/Ask/controls.hbs +++ b/templates/Ask/controls.hbs @@ -3,11 +3,11 @@ type="button" data-action="cancel" > - Cancel + {{localize "taf.misc.cancel"}}