From bbe108fd3d60f2e68a0d2318bc71b13a8613647d Mon Sep 17 00:00:00 2001 From: Dorako Date: Sat, 11 Feb 2023 09:21:19 +0100 Subject: [PATCH] 1.11.16 --- CHANGELOG.md | 4 ++++ modules/message-hooks.js | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31ec942..17c4971 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 1.11.16 + +- (Refinement) [Cuingamehtar] Spell area types are now localizable. + # 1.11.15 - (New) Remade the styling for the Combat Carousel module, removed the old misc. setting. diff --git a/modules/message-hooks.js b/modules/message-hooks.js index d544572..de9df3a 100644 --- a/modules/message-hooks.js +++ b/modules/message-hooks.js @@ -267,8 +267,12 @@ function injectSpellInfo(html, spell) { let areaInfo = document.createElement("p"); let areaInfoLabel = document.createElement("strong"); areaInfoLabel.textContent = i18n("PF2E.AreaLabel") + " "; + let areaType = spell?.system?.area?.type; + let areaTypeLabel = areaType + ? i18n("PF2E.AreaType" + areaType.charAt(0).toUpperCase() + areaType.slice(1)).toLowerCase() + : ""; let areaValue = document.createElement("span"); - areaValue.textContent = area + " " + i18n("PF2E.Foot").toLowerCase() + " " + spell?.system?.area?.type; + areaValue.textContent = area + " " + i18n("PF2E.Foot").toLowerCase() + " " + areaTypeLabel; areaInfo.append(areaInfoLabel); areaInfo.append(areaValue); spellInfo.append(areaInfo);