fix: affichage des Instincts et Interdits du Totem sur la fiche PJ

- Helper smarttl : honore la clé passée en 3e argument (défaut "name") ;
  il renvoyait systématiquement le nom du Totem, donc Instincts et
  Interdits n'apparaissaient pas (description et autres clés aussi).
- Onglet Totem (AppV2 et legacy) : libellés localisés
  IDENTITY.instincts / IDENTITY.prohibits au lieu de textes codés en dur.
This commit is contained in:
2026-08-05 13:06:57 +02:00
parent 0ad240bd03
commit a13b0fc2d6
3 changed files with 7 additions and 6 deletions
+3 -2
View File
@@ -98,8 +98,9 @@ export const registerHandlebarsHelpers = function () {
});
// search translation with variables
Handlebars.registerHelper('smarttl', function (arrayLabel, objectLabel, options) {
return game.i18n.localize(arrayLabel + "." + objectLabel + ".name");
Handlebars.registerHelper('smarttl', function (arrayLabel, objectLabel, key) {
if (!key || typeof key !== 'string') key = 'name';
return game.i18n.localize(arrayLabel + "." + objectLabel + "." + key);
});
// Return an object of skills ordered alphabetically by their localized