Fix talent Sprinter

This commit is contained in:
2022-02-01 22:41:49 +01:00
parent 004c463c4e
commit d16d5ef76e
3 changed files with 8 additions and 4 deletions

View File

@ -320,11 +320,11 @@ 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 );
//console.log(">>>>> Talent ?", name_en, special, trait_fr.name);
if ( trait_fr.name == name_en) { // If no translation, test ugtalents
//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 );
}
if ( trait_fr.name != name_en) { // Talent translated!
if ( trait_fr.name == "Sprinter" || trait_fr.name != name_en) { // Talent translated!
trait_en.name = trait_fr.name.trim() + special;
if ( trait_fr.data ) { // Why ???
trait_en.data.description.value = trait_fr.data.description.value;