diff --git a/src/module/system/action-macros/basic/escape.ts b/src/module/system/action-macros/basic/escape.ts index c5c97e13141..6a6b7ca18e1 100644 --- a/src/module/system/action-macros/basic/escape.ts +++ b/src/module/system/action-macros/basic/escape.ts @@ -86,7 +86,7 @@ function escapeCheckContext>( ); if (highest) { - const { checkType, stat: slug, subtitle } = ActionMacroHelpers.resolveStat(highest.statistic.slug); + const { checkType, stat: slug, subtitle } = ActionMacroHelpers.resolveStat(highest.statistic.slug, opts.actor); return { modifiers: data.modifiers, rollOptions: highest.rollOptions, diff --git a/src/module/system/action-macros/helpers.ts b/src/module/system/action-macros/helpers.ts index ce711cec7eb..49b04b585a7 100644 --- a/src/module/system/action-macros/helpers.ts +++ b/src/module/system/action-macros/helpers.ts @@ -30,7 +30,10 @@ import type { } from "./types.ts"; class ActionMacroHelpers { - static resolveStat(stat: string): { + static resolveStat( + stat: string, + actor: ActorPF2e, + ): { checkType: CheckType; property: string; stat: string; @@ -54,11 +57,14 @@ class ActionMacroHelpers { default: { const slug = sluggify(stat); const property = `skills.${slug}`; + let subtitle = `PF2E.ActionsCheck.${stat}`; + if (!game.i18n.has(subtitle)) + subtitle = game.i18n.format("PF2E.ActionsCheck.x", { type: actor.skills?.[stat]?.label ?? null }); return { checkType: "skill-check", property, stat, - subtitle: `PF2E.ActionsCheck.${stat}`, + subtitle, }; } } @@ -68,7 +74,7 @@ class ActionMacroHelpers { options: CheckContextOptions, data: CheckContextData, ): CheckMacroContext | undefined { - const { checkType: type, property, stat: slug, subtitle } = this.resolveStat(data.slug); + const { checkType: type, property, stat: slug, subtitle } = this.resolveStat(data.slug, options.actor); const statistic = options.actor.getStatistic(data.slug) ?? (fu.getProperty(options.actor, property) as StrikeData); if (!statistic) {