Sync with new Compendium structure

This commit is contained in:
2020-05-11 10:01:50 +02:00
parent 382ec09b1c
commit f75a8a0789
3 changed files with 18 additions and 15 deletions

View File

@ -388,7 +388,7 @@ Hooks.once('init', () => {
special = " (" + game.i18n.localize( res[2].trim() ) + ")"; // And the special keyword
}
var trait_fr = fulltraits.translate( { name: name_en } );
console.log(">>>>> Trait ?", name_en, nbt, trait_fr.name, special);
//console.log(">>>>> Trait ?", name_en, nbt, trait_fr.name, special);
trait_en.name = nbt + trait_fr.name + special;
if ( trait_fr.data && trait_fr.data.description && trait_fr.data.description.value ) {
trait_en.data.description.value = trait_fr.data.description.value;
@ -410,7 +410,7 @@ Hooks.once('init', () => {
special = " (" + game.i18n.localize( res[2].trim() ) + ")"; // And the special keyword
}
var trait_fr = fullskills.translate( { name: name_en } );
console.log(">>>>> Skill ?", name_en, special, trait_fr.name);
//console.log(">>>>> Skill ?", name_en, special, trait_fr.name);
trait_en.name = trait_fr.name + special;
trait_en.data.description.value = trait_fr.data.description.value;
@ -419,7 +419,7 @@ Hooks.once('init', () => {
if ( (!trait_fr.data || !trait_fr.data.description || !trait_fr.data.description.value) && eisspells) { // If no translation, test eisspells
trait_fr = eisspells.translate( { name: name_en } );
}
console.log(">>>>> Spell ?", name_en, special, trait_fr.name );
//console.log(">>>>> Spell ?", name_en, special, trait_fr.name );
trait_en.name = trait_fr.name + special;
if ( trait_fr.data && trait_fr.data.description && trait_fr.data.description.value )
trait_en.data.description.value = trait_fr.data.description.value;
@ -431,16 +431,16 @@ Hooks.once('init', () => {
special = " (" + game.i18n.localize( res[2].trim() ) + ")"; // And the special keyword
}
var trait_fr = fulltalents.translate( { name: name_en } );
console.log(">>>>> Talent ?", name_en, special, trait_fr.name);
//console.log(">>>>> Talent ?", name_en, special, trait_fr.name);
trait_en.name = trait_fr.name + special;
trait_en.data.description.value = trait_fr.data.description.value;
} else if ( trait_en.type == "career") {
var career_fr = fullcareers.translate( trait_en );
console.log(">>>>> Career ?", name_en, career_fr.name);
//console.log(">>>>> Career ?", name_en, career_fr.name);
trait_en = career_fr;
} else if ( trait_en.type == "trapping" || trait_en.type == "weapon" || trait_en.type == "armour" || trait_en.type == "container" || trait_en.type == "money") {
var trapping_fr = fulltrappings.translate( trait_en );
console.log(">>>>> Trapping ?", name_en, trapping_fr.name);
//console.log(">>>>> Trapping ?", name_en, trapping_fr.name);
trait_en.name = trapping_fr.name;
trait_en.data.description = trapping_fr.data.description;
}