Fix babele issue + new translation stuff
This commit is contained in:
parent
7be54e833a
commit
500701fc3b
@ -65,6 +65,10 @@ const _manage_inn_roll = async (content, msg) => {
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
const setup_wfrp4e_tables = () => {
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
/* Hook for specific command */
|
||||
Hooks.on("chatMessage", (html, content, msg) => {
|
||||
@ -80,6 +84,7 @@ Hooks.on("chatMessage", (html, content, msg) => {
|
||||
Hooks.once('ready', () => {
|
||||
|
||||
_patch_eis();
|
||||
setup_wfrp4e_tables();
|
||||
|
||||
const lang = game.settings.get('core', 'language');
|
||||
if ( lang == "fr" ) {
|
||||
@ -104,8 +109,8 @@ Hooks.once('ready', () => {
|
||||
"entries": [
|
||||
]
|
||||
};
|
||||
console.log("Actor compendium has been replaced !!!!");
|
||||
newpack = new TranslatedCompendium(pack, translations);
|
||||
console.log("Actor compendium has been replaced !!!!", newpack);
|
||||
}
|
||||
pack_array.push( [name, newpack ] );
|
||||
} );
|
||||
|
@ -147,6 +147,7 @@ class ActorWfrp4e_fr extends ActorWfrp4e {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************************/
|
||||
Hooks.once('init', () => {
|
||||
|
||||
@ -275,6 +276,13 @@ Hooks.once('init', () => {
|
||||
0
|
||||
],
|
||||
}
|
||||
WFRP4E.species = {
|
||||
"human": "Humain",
|
||||
"dwarf": "Nain",
|
||||
"halfling": "Halfling",
|
||||
"helf": "Haut Elfe",
|
||||
"welf": "Elfe Sylvain"
|
||||
}
|
||||
|
||||
if(typeof Babele !== 'undefined') {
|
||||
|
||||
@ -287,7 +295,7 @@ Hooks.once('init', () => {
|
||||
Babele.get().registerConverters({
|
||||
"career_skills": (skills_list) => {
|
||||
var compendium = game.packs.find(p => p.collection === 'wfrp4e.skills');
|
||||
console.log( "Thru here ...", compendium, skills_list);
|
||||
//console.log( "Thru here ...", compendium, skills_list);
|
||||
if ( skills_list ) {
|
||||
var i;
|
||||
var len = skills_list.length;
|
||||
@ -350,18 +358,18 @@ Hooks.once('init', () => {
|
||||
},
|
||||
"npc_characteristics": (chars) => { // Auto-convert char names in the sheet
|
||||
for (var key in chars) {
|
||||
//console.log("Was here !", key, chars[key].label);
|
||||
var char = chars[key]
|
||||
var char = chars[key];
|
||||
//console.log("Was here !", key, char );
|
||||
var abrev = 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;
|
||||
},
|
||||
"bestiary_traits": (beast_traits, translations) => {
|
||||
var fulltraits = game.packs.get('wfrp4e.traits');
|
||||
var fullskills = game.packs.get('wfrp4e.skills');
|
||||
var fulltalents = game.packs.get('wfrp4e.talents');
|
||||
var fulltalents = game.packs.get('wfrp4e.talents');
|
||||
var fullcareers = game.packs.get('wfrp4e.careers');
|
||||
var fulltrappings = game.packs.get('wfrp4e.trappings');
|
||||
var fullspells = game.packs.get('wfrp4e.spells');
|
||||
@ -411,9 +419,11 @@ 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);
|
||||
trait_en.name = trait_fr.name + special;
|
||||
trait_en.data.description.value = trait_fr.data.description.value;
|
||||
//console.log(">>>>> Skill ?", name_en, special, trait_fr.name, trait_fr);
|
||||
if (trait_fr.translated) {
|
||||
trait_en.name = trait_fr.name + special;
|
||||
trait_en.data.description.value = trait_fr.data.description.value;
|
||||
}
|
||||
} else if ( trait_en.type == "prayer") {
|
||||
var trait_fr = fullprayers.translate( { name: name_en } );
|
||||
//console.log(">>>>> Prayer ?", name_en, special, trait_fr.name );
|
||||
@ -438,8 +448,10 @@ Hooks.once('init', () => {
|
||||
}
|
||||
var trait_fr = fulltalents.translate( { name: name_en } );
|
||||
//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;
|
||||
if ( trait_fr.translated) {
|
||||
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);
|
||||
|
52
fr.json
52
fr.json
@ -642,6 +642,21 @@
|
||||
"WFRP4E.SymptomTreatment.Delirium" : "Certaines autorités traitent le délire comme faisant partie de la fièvre et prescrivent les mêmes remèdes. Ces derniers coûtent de quelques Sous de Cuivre à quelques Pistoles, et 10% d'entre eux sont efficaces.<br><br>Avec le bon médicament, un <b> Test de Guérison Intermédiaire (+0)</b> réussi fait cesser les hallucinations pendant <a class = 'chat-roll'><i class='fas fa-dice'></i> 1d10</a> heures.<br><br>Il est également courant de calmer les patients délirants avec des drogues tranquilisantes, comme la Fleur de Lune ou même de la Belladone, pour garder le patient Inconscient jusqu'à ce que la condition soit passée, en l'envoyant dans un sommeil agité jusqu'à ce qu'il récupère ou meure.",
|
||||
"WFRP4E.SymptomTreatment.Swelling" : "La plupart des traitements consistent à plonger la partie affectée, ou parfois tout le corps, dans un bain d'eau glacée pour réduire la chaleur qui accompagne les gonflements. Un <b>Test de Guérison Etendu Difficile (-20)</b> requérant +3 DR réduit le gonflement pendant <b><a class = 'chat-roll'>2d10</a></b> heures. Chaque Test prend une heure. Le patient subit une condition Fatigué +1 pour chaque test effectué au cours du processus.<br><br>Certains médecins saignent plutôt le patient avec une lame ou des sangsues. Un <b>Test de Guérison Etendu</b> réussi nécessitant +4 SR et des Outils (Médecin) réduisent le gonflement pendant (<a class = 'chat-roll'>1d10</a> + le Bonus d'Endurance du patient) heures. Chaque Test a une Difficulté <b>Impossible (-50)</b> et nécessite 30mn.",
|
||||
|
||||
"Blight": "Toxine",
|
||||
"Buboes": "Bubons",
|
||||
"Convulsions": "Convulsions",
|
||||
"Coughs and Sneezes": "Toux et éternuements",
|
||||
"Fever": "Fièvre",
|
||||
"Flux": "Intoxications Alimentaires",
|
||||
"Gangrene": "Gangrène",
|
||||
"Lingering": "Persistant",
|
||||
"Malaise": "Malaise",
|
||||
"Nausea": "Nausée",
|
||||
"Pox": "Démangeaisons",
|
||||
"Wounded": "Blessé",
|
||||
"Delirium": "Délire",
|
||||
"Swelling": "Gonflement",
|
||||
|
||||
"Wounds Healed" : "Blessures soignées",
|
||||
"ITEM.LoreEffectPlaceholder" : "Remplacer le ssavoir par défaut",
|
||||
"ITEM.ChannelOverride" : "Remplacer la focalisation",
|
||||
@ -821,29 +836,28 @@
|
||||
"Willpower": "Force Mentale",
|
||||
"Fellowship": "Sociabilité",
|
||||
|
||||
"CHAR.WS": "Capacité de Combat",
|
||||
"CHAR.BS": "Capacité de Tir",
|
||||
"CHAR.S": "Force",
|
||||
"CHAR.T": "Endurance",
|
||||
"CHAR.I": "Initiative",
|
||||
"CHAR.Ag": "Agilité",
|
||||
"CHAR.Dex": "Dexterité",
|
||||
"CHAR.Int": "Intelligence",
|
||||
"CHAR.WP": "Force Mentale",
|
||||
"CHAR.WS": "Capacité de Combat",
|
||||
"CHAR.BS": "Capacité de Tir",
|
||||
"CHAR.S": "Force",
|
||||
"CHAR.T": "Endurance",
|
||||
"CHAR.I": "Initiative",
|
||||
"CHAR.Ag": "Agilité",
|
||||
"CHAR.Dex": "Dexterité",
|
||||
"CHAR.Int": "Intelligence",
|
||||
"CHAR.WP": "Force Mentale",
|
||||
"CHAR.Fel": "Sociabilité",
|
||||
|
||||
"CHARAbbrev.WS": "CC",
|
||||
"CHARAbbrev.BS": "CT",
|
||||
"CHARAbbrev.S": "F",
|
||||
"CHARAbbrev.T": "E",
|
||||
"CHARAbbrev.I": "I",
|
||||
"CHARAbbrev.Ag": "Ag",
|
||||
"CHARAbbrev.Dex": "Dex",
|
||||
"CHARAbbrev.Int": "Int",
|
||||
"CHARAbbrev.WP": "FM",
|
||||
"CHARAbbrev.WS": "CC",
|
||||
"CHARAbbrev.BS": "CT",
|
||||
"CHARAbbrev.S": "F",
|
||||
"CHARAbbrev.T": "E",
|
||||
"CHARAbbrev.I": "I",
|
||||
"CHARAbbrev.Ag": "Ag",
|
||||
"CHARAbbrev.Dex": "Dex",
|
||||
"CHARAbbrev.Int": "Int",
|
||||
"CHARAbbrev.WP": "FM",
|
||||
"CHARAbbrev.Fel": "Soc",
|
||||
|
||||
|
||||
"CHARBonus.WS": "Bonus de Capacité de Combat",
|
||||
"CHARBonus.BS": "Bonus de Capacité de Tir",
|
||||
"CHARBonus.S": "Bonus de Force",
|
||||
|
@ -3,7 +3,7 @@
|
||||
"name": "WH4-fr-translation",
|
||||
"title": "Traduction du module WH4 en Français.",
|
||||
"description": "La traduction du module WH4.",
|
||||
"version": "0.78",
|
||||
"version": "0.80",
|
||||
"minimumCoreVersion" : "0.6.0",
|
||||
"compatibleCoreVersion": "0.6.0",
|
||||
"author": "LeRatierBretonnien",
|
||||
|
Loading…
Reference in New Issue
Block a user