From de1fa8ba728ec5321194eea910af7e266c67a447 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnier Date: Tue, 4 Aug 2026 08:31:08 +0200 Subject: [PATCH] =?UTF-8?q?fix(i18n):=20lien=20du=20succ=C3=A8s=20h=C3=A9r?= =?UTF-8?q?o=C3=AFque=20localis=C3=A9=20(EN/FR)=20et=20avertissement=20XP?= =?UTF-8?q?=20traduit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lang/en.json | 1 + lang/es.json | 1 + lang/fr.json | 1 + module/actor/actor.js | 6 +++--- module/system/helpers.js | 7 +++++++ templates/chat/rolls/default-roll-card.hbs | 2 +- 6 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lang/en.json b/lang/en.json index fb0a668..5c6cde3 100644 --- a/lang/en.json +++ b/lang/en.json @@ -195,6 +195,7 @@ "BOL.ui.deletetitle": "Delete", "BOL.ui.confirmdelete": "Are you sure to delete this item ?", "BOL.ui.nomorealchemypoints": "No more Creation Point !", + "BOL.ui.notenoughxp": "Not enough experience points !", "BOL.ui.armornoformula": "The Armor {protect.name} has no protection formula !", "BOL.ui.selectactor": "Select the actors to apply the macro", "BOL.ui.itemnotfound": "Impossible to find the object of this macro", diff --git a/lang/es.json b/lang/es.json index ac59a14..43e846b 100644 --- a/lang/es.json +++ b/lang/es.json @@ -195,6 +195,7 @@ "BOL.ui.deletetitle": "Borrar", "BOL.ui.confirmdelete": "¿Seguro que quieres borrar este objeto?", "BOL.ui.nomorealchemypoints": "¡Sin Puntos de Creación!", + "BOL.ui.notenoughxp": "¡No hay suficientes puntos de experiencia!", "BOL.ui.armornoformula": "La Armadura {protect.name} no dispone de fórmula de protección!", "BOL.ui.selectactor": "Selecciona un actora para aplicar la macro", "BOL.ui.itemnotfound": "Imposible encontrar el objeto de esta macro", diff --git a/lang/fr.json b/lang/fr.json index 36c37f0..5b5a1f7 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -229,6 +229,7 @@ "BOL.ui.deletetitle": "Suppression", "BOL.ui.confirmdelete": "Vous êtes sûr de vouloir supprimer cet item ?", "BOL.ui.nomorealchemypoints": "Plus assez de Points de Création !", + "BOL.ui.notenoughxp": "Pas assez de points d'expérience !", "BOL.ui.armornoformula": "L'armure {protect.name} n'a pas de formule pour la protection !", "BOL.ui.selectactor": "Selectionnez votre personnage pour utiliser la macro", "BOL.ui.itemnotfound": "Impossible de trouver l'objet de cette macro", diff --git a/module/actor/actor.js b/module/actor/actor.js index 45b86bc..73ac7cc 100644 --- a/module/actor/actor.js +++ b/module/actor/actor.js @@ -301,7 +301,7 @@ export class BoLActor extends Actor { this.update({ [`system.attributes.${key}`]: attr, [`system.xp`]: xp }) this.addXPLog("attribute", key, nextXP, attr.value) } else { - ui.notifications.warn("Pas assez de points d'expérience !") + ui.notifications.warn(game.i18n.localize("BOL.ui.notenoughxp")) } } } @@ -318,7 +318,7 @@ export class BoLActor extends Actor { this.update({ [`system.aptitudes.${key}`]: apt, [`system.xp`]: xp }) this.addXPLog("aptitude", key, nextXP, apt.value) } else { - ui.notifications.warn("Pas assez de points d'expérience !") + ui.notifications.warn(game.i18n.localize("BOL.ui.notenoughxp")) } } } @@ -335,7 +335,7 @@ export class BoLActor extends Actor { this.updateEmbeddedDocuments('Item', [{ _id: career._id, 'system.rank': career.system.rank + 1 }]) this.addXPLog("career", career.name, nextXP, career.system.rank + 1) } else { - ui.notifications.warn("Pas assez de points d'expérience !") + ui.notifications.warn(game.i18n.localize("BOL.ui.notenoughxp")) } } } diff --git a/module/system/helpers.js b/module/system/helpers.js index b8ae5b8..e67a65f 100644 --- a/module/system/helpers.js +++ b/module/system/helpers.js @@ -141,6 +141,13 @@ export const registerHandlebarsHelpers = function () { return key == "creature" || key == "daemon"; }) + // Journal entry documenting Heroic/Legendary success options, localized + Handlebars.registerHelper('criticalJournalId', function () { + return game.i18n.lang === "en" + ? "cNk3xcQ1F7I3Uk8Q" // Rules summary (EN) + : "veAAxCtCKcFIsnln"; // Vademecum des Joueurs (FR) + }) + // Handle v12 removal of this helper Handlebars.registerHelper('select', function (selected, options) { const escapedValue = RegExp.escape(Handlebars.escapeExpression(selected)); diff --git a/templates/chat/rolls/default-roll-card.hbs b/templates/chat/rolls/default-roll-card.hbs index 31d3025..fa1cefb 100644 --- a/templates/chat/rolls/default-roll-card.hbs +++ b/templates/chat/rolls/default-roll-card.hbs @@ -61,7 +61,7 @@ {{/if}}
- {{localize "BOL.chat.criticalbuttonjournal"}} + {{localize "BOL.chat.criticalbuttonjournal"}}
{{#if (and isCritical weapon)}}