Compare commits

...

5 Commits

4 changed files with 30 additions and 16 deletions

View File

@ -289,6 +289,7 @@ Hooks.once('init', () => {
console.log("No beast traits found here ...")
return beast_traits
}
//console.log("TRANS:", beast_traits)
for (let trait_en of beast_traits) {
let special = "";
let nbt = "";
@ -403,7 +404,7 @@ Hooks.once('init', () => {
}
if (trait_fr.name && (trait_fr.name == "Sprinter" || trait_fr.name != name_en)) { // Talent translated!
trait_en.name = trait_fr.name.trim() + special
if (trait_fr.system) { // Why ???
if (trait_fr.system?.description?.value) { // Why ???
trait_en.system.description.value = trait_fr.system.description.value;
}
}
@ -412,21 +413,23 @@ Hooks.once('init', () => {
if (game.system.version.match("7.")) {
compendiumCareers = 'wfrp4e-core.items'
}
let career_fr = game.babele.translate(compendiumCareers, trait_en, true);
career_fr.name = career_fr.name || trait_en.name
let career_fr = game.babele.translate(compendiumCareers, { name: name_en }, true);
trait_en.name = career_fr.name || trait_en.name
//console.log(">>>>> Career ?", career_fr.name );
trait_en.system = duplicate(career_fr.system);
if ( career_fr?.system) {
trait_en.system = duplicate(career_fr.system);
}
} else if (trait_en.type == "trapping" || trait_en.type == "weapon" || trait_en.type == "armour" || trait_en.type == "container" || trait_en.type == "money") {
let compendiumTrappings = 'wfrp4e-core.trappings' // Per default
if (game.system.version.match("7.")) {
compendiumTrappings = 'wfrp4e-core.items'
}
let trapping_fr = game.babele.translate(compendiumTrappings, trait_en, true);
let trapping_fr = game.babele.translate(compendiumTrappings, { name: name_en }, true);
//console.log(">>>>> Trapping ?", name_en, trapping_fr.name);
trapping_fr.name = trapping_fr.name || trait_en.name
if (trapping_fr.system) {
trait_en.system.description = trapping_fr.system.description;
trait_en.name = trapping_fr.name || trait_en.name
if (trapping_fr.system?.description?.value) {
trait_en.system.description.value = trapping_fr.system.description.value
}
}
}

17
fr.json
View File

@ -1523,14 +1523,19 @@
"Academics": "Lettrés",
"Academic": "Lettré",
"Burgher": "Citadins",
"Rogues": "Roublards",
"Burghers": "Citadins",
"Burgher": "Citadin",
"Rogues": "Roublards",
"Rogue": "Roublard",
"Riverfolk": "Riverains",
"Peasants": "Ruraux",
"Peasant": "Ruraux",
"Warrior": "Guerriers",
"Ranger": "Itinérants",
"Courtier": "Courtisans",
"Peasant": "Rural",
"Warriors": "Guerriers",
"Warrior": "Guerrier",
"Rangers": "Itinérants",
"Ranger": "Itinérant",
"Courtiers": "Courtisans",
"Courtier": "Courtisan",
"Calvalry": "Cavalerie",
"Flail": "Fléau",

View File

@ -8,7 +8,7 @@
}
],
"url": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr",
"version": "7.0.3",
"version": "7.0.5",
"esmodules": [
"babele-register.js",
"addon-register.js",
@ -127,7 +127,7 @@
}
],
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/raw/v10/module.json",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-7.0.3.zip",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-7.0.5.zip",
"id": "wh4-fr-translation",
"compatibility": {
"minimum": "10",

View File

@ -176,6 +176,12 @@ export class WH4FRPatchConfig {
game.wfrp4e.config.species["welf"] = "Elfe Sylvain";
}
if (game.wfrp4e.config.classTrappings) {
for(const c of Object.keys(game.wfrp4e.config.classTrappings)) {
game.wfrp4e.config.classTrappings[game.i18n.localize(c)] = game.wfrp4e.config.classTrappings[c];
}
}
this.patch_species_skills();
this.patch_species_talents();
this.patch_subspecies();