Fix auto-translation stuff

This commit is contained in:
LeRatierBretonnien 2020-06-06 13:27:59 +02:00
parent 0b165f5074
commit 9bcf14d2ee
2 changed files with 6 additions and 3 deletions

View File

@ -368,9 +368,12 @@ Hooks.once('init', () => {
var char = chars[key]; var char = chars[key];
//console.log("Was here !", key, char ); //console.log("Was here !", key, char );
var abrev = char["abrev"]; var abrev = char["abrev"];
let toTransl = "CHAR." + abrev;
if ( game.i18n.localize( toTransl ) != toTransl) { // Manages unknown language
char["label"] = game.i18n.localize( "CHAR." + abrev ); char["label"] = game.i18n.localize( "CHAR." + abrev );
char["abrev"] = game.i18n.localize( "CHARAbbrev." + abrev ); char["abrev"] = game.i18n.localize( "CHARAbbrev." + abrev );
} }
}
return chars; return chars;
}, },
"bestiary_traits": (beast_traits, translations) => { "bestiary_traits": (beast_traits, translations) => {

View File

@ -3,7 +3,7 @@
"name": "WH4-fr-translation", "name": "WH4-fr-translation",
"title": "Traduction du module WH4 en Français.", "title": "Traduction du module WH4 en Français.",
"description": "La traduction du module WH4.", "description": "La traduction du module WH4.",
"version": "0.83", "version": "0.84",
"minimumCoreVersion" : "0.6.0", "minimumCoreVersion" : "0.6.0",
"compatibleCoreVersion": "0.6.1", "compatibleCoreVersion": "0.6.1",
"author": "LeRatierBretonnien", "author": "LeRatierBretonnien",