Enhance auto-translate again

This commit is contained in:
LeRatierBretonnien 2020-03-31 09:27:04 +02:00
parent 316069d64f
commit 69bbf569fb
4 changed files with 31 additions and 3 deletions

View File

@ -68,7 +68,16 @@ Hooks.once('init', () => {
talents_list[i] = transl;
}
return talents_list;
}
},
// To avoid duplicateing class for all careers
"career_class": (value) => {
return game.i18n.localize( value.trim() );
},
// Search back in careers the translated name of the groupe (as it is the name of the level career itself)
"career_careergroup": (value) => {
var compendium = game.packs.find(p => p.collection === 'wfrp4e.careers');
return compendium.i18nName( value );
}
});
}

View File

@ -8,6 +8,14 @@
"talents": {
"path": "data.talents",
"converter": "career_talents"
},
"class": {
"path": "data.class.value",
"converter": "career_class"
},
"careergroup": {
"path": "data.careergroup.value",
"converter": "career_careergroup"
}
},
"entries": [

13
fr.json
View File

@ -551,7 +551,18 @@
"Knighty Order": "Ordre chevaleresque",
"Guilder": "Guilde",
"Soldiers": "Soldats",
"Silver": "Argent",
"Gold": "Or",
"Brass": "Bronze"
"Brass": "Bronze",
"Academics": "Lettrés",
"Burgher": "Citadins",
"Rogues": "Roublards",
"Riverfolk": "Riverains",
"Peasants": "Ruraux",
"Warrior": "Guerriers",
"Ranger": "Itinérants",
"Courtier": "Courtisans"
}

View File

@ -2,7 +2,7 @@
"name": "WH4-fr-translation",
"title": "Traduction du module WH4 en Français.",
"description": "La traduction du module WH4.",
"version": "0.19",
"version": "0.20",
"minimumCoreVersion" : "0.5.1",
"author": "LeRatierBretonnien",
"esmodules": ["babele-register.js"],