From 69bbf569fb378d9141c43bf57b99c0e6bf201a6b Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Tue, 31 Mar 2020 09:27:04 +0200 Subject: [PATCH] Enhance auto-translate again --- babele-register.js | 11 ++++++++++- compendium/wfrp4e.careers.json | 8 ++++++++ fr.json | 13 ++++++++++++- module.json | 2 +- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/babele-register.js b/babele-register.js index f131ebd..cba5ded 100644 --- a/babele-register.js +++ b/babele-register.js @@ -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 ); + } }); } diff --git a/compendium/wfrp4e.careers.json b/compendium/wfrp4e.careers.json index 1ceba27..c4a7e97 100644 --- a/compendium/wfrp4e.careers.json +++ b/compendium/wfrp4e.careers.json @@ -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": [ diff --git a/fr.json b/fr.json index ec9e3d4..4af509f 100644 --- a/fr.json +++ b/fr.json @@ -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" + } diff --git a/module.json b/module.json index 5c5189b..a9ccabc 100644 --- a/module.json +++ b/module.json @@ -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"],