Translate vehicle roles in actors compendium

This commit is contained in:
pallando 2024-10-10 10:41:09 +02:00
parent 37f3eb3997
commit 1bb7d0b248

View File

@ -518,7 +518,7 @@ Hooks.once('init', () => {
} else if (trait_en.type == "vehicleRole") {
let validCompendiums = game.wfrp4e.tags.getPacksWithTag("vehicleRole")
for (let compData of validCompendiums) {
let role_fr = game.babele.translate(compData.metadata.id, { name: name_en }, true);
let role_fr = game.babele.translate(compData.metadata.id, trait_en, true);
if (role_fr?.system) {
trait_en.name = role_fr.name || trait_en.name
// DEBG: console.log(">>>>> Role ?", role_fr.name );