From d9a6c7c1792b207a819f653fb6c02784f2e31232 Mon Sep 17 00:00:00 2001 From: sladecraven Date: Tue, 18 Oct 2022 09:30:30 +0200 Subject: [PATCH] Babele management fix for talents/traits --- babele-register.js | 7 ++++--- module.json | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/babele-register.js b/babele-register.js index 0ab0821..36b0a09 100644 --- a/babele-register.js +++ b/babele-register.js @@ -334,12 +334,13 @@ Hooks.once('init', () => { special = " (" + game.i18n.localize( res[2].trim() ) + ")"; // And the special keyword } var trait_fr = game.babele.translate( compmod+'.talents', { name: name_en }, true ) - trait_fr.name = trait_fr.name || name_en + trait_fr.name = trait_fr.name || name_en // Security since babele v10 //console.log(">>>>> Talent ?", trait_fr, name_en, special, trait_fr.name); if ( trait_fr.name != "Sprinter" && trait_fr.name == name_en) { // If no translation, test ugtalents trait_fr = game.babele.translate( 'wfrp4e-unofficial-grimoire.ug-careerstalentstraits', { name: name_en }, true ); + trait_fr.name = trait_fr.name || name_en // Security since babele v10 } - if ( trait_fr.name == "Sprinter" || trait_fr.name != name_en) { // Talent translated! + if ( trait_fr.name && (trait_fr.name == "Sprinter" || trait_fr.name != name_en)) { // Talent translated! trait_en.name = trait_fr.name.trim() + special if ( trait_fr.system ) { // Why ??? trait_en.system.description.value = trait_fr.system.description.value; @@ -348,7 +349,7 @@ Hooks.once('init', () => { } else if ( trait_en.type == "career") { var career_fr = game.babele.translate( compmod+'.careers', trait_en, true ); career_fr.name = career_fr.name || trait_en.name - console.log(">>>>> Career ?", career_fr.name ); + //console.log(">>>>> Career ?", career_fr.name ); trait_en.system = duplicate(career_fr.system); } else if ( trait_en.type == "trapping" || trait_en.type == "weapon" || trait_en.type == "armour" || trait_en.type == "container" || trait_en.type == "money") { diff --git a/module.json b/module.json index 4bf1b4e..5a58268 100644 --- a/module.json +++ b/module.json @@ -8,7 +8,7 @@ } ], "url": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr", - "version": "6.2.10", + "version": "6.2.11", "esmodules": [ "babele-register.js", "addon-register.js", @@ -136,11 +136,11 @@ } ], "manifest": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/raw/v10/module.json", - "download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-6.2.10.zip", + "download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-6.2.11.zip", "id": "wh4-fr-translation", "compatibility": { "minimum": "10", - "verified": "10.286" + "verified": "10" }, "relationships": { "systems": [