Auto-translate spells + parse eis items
This commit is contained in:
parent
d1fc5afbcb
commit
7256dc14c2
@ -51,28 +51,31 @@ Hooks.on("chatMessage", (html, content, msg) => {
|
||||
/* Additionnal hooks ready */
|
||||
Hooks.once('ready', () => {
|
||||
|
||||
game.packs.forEach((pack, idx) => {
|
||||
if(!pack.translated && pack.entity === 'Actor') {
|
||||
let translations = {
|
||||
"label": pack.metadata.name,
|
||||
"mapping": {
|
||||
"name": "name",
|
||||
"description": "details.biography.value",
|
||||
"items": {
|
||||
"path": "items",
|
||||
"converter": "bestiary_traits"
|
||||
const lang = game.settings.get('core', 'language');
|
||||
if ( lang == "fr" ) {
|
||||
game.packs.forEach((pack, idx) => {
|
||||
if(!pack.translated && pack.entity === 'Actor') {
|
||||
let translations = {
|
||||
"label": pack.metadata.name,
|
||||
"mapping": {
|
||||
"name": "name",
|
||||
"description": "details.biography.value",
|
||||
"items": {
|
||||
"path": "items",
|
||||
"converter": "bestiary_traits"
|
||||
},
|
||||
"characteristics": {
|
||||
"path": "data.characteristics",
|
||||
"converter": "npc_characteristics"
|
||||
}
|
||||
},
|
||||
"characteristics": {
|
||||
"path": "data.characteristics",
|
||||
"converter": "npc_characteristics"
|
||||
}
|
||||
},
|
||||
"entries": [
|
||||
]
|
||||
};
|
||||
console.log("Actor compendium has been replaced !!!!");
|
||||
game.packs[idx] = new TranslatedCompendium(pack, translations);
|
||||
}
|
||||
});
|
||||
"entries": [
|
||||
]
|
||||
};
|
||||
console.log("Actor compendium has been replaced !!!!");
|
||||
game.packs[idx] = new TranslatedCompendium(pack, translations);
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
} );
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "WH4-fr-translation",
|
||||
"title": "Traduction du module WH4 en Français.",
|
||||
"description": "La traduction du module WH4.",
|
||||
"version": "0.64",
|
||||
"version": "0.65",
|
||||
"minimumCoreVersion" : "0.5.1",
|
||||
"compatibleCoreVersion": "0.5.5",
|
||||
"author": "LeRatierBretonnien",
|
||||
|
Loading…
Reference in New Issue
Block a user