From 5e26398a7af3ab9b953fe60baa80d95a2bd41eb1 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Fri, 5 Jun 2020 09:15:43 +0200 Subject: [PATCH] Fix translations and spell damages --- babele-register.js | 19 +++++++++++++------ fr.json | 4 ++-- module.json | 4 ++-- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/babele-register.js b/babele-register.js index da5a310..52c82d0 100644 --- a/babele-register.js +++ b/babele-register.js @@ -67,9 +67,10 @@ class ActorWfrp4e_fr extends ActorWfrp4e { if (formula.includes("force mentale")) { // Determine if it's looking for the bonus or the value - if (formula.includes('bonus')) - formula = formula.replace( "bonus de force mentale", ); - else + if (formula.includes('bonus')) { + formula = formula.replace( "bonus de force mentale", actorData.data.characteristics["wp"].bonus); + formula = formula.replace( "force mentale bonus", actorData.data.characteristics["wp"].bonus); + } else formula = formula.replace("force mentale", actorData.data.characteristics["wp"].value); } @@ -80,8 +81,10 @@ class ActorWfrp4e_fr extends ActorWfrp4e { while (formula.includes(actorData.data.characteristics[ch].label.toLowerCase())) { // Determine if it's looking for the bonus or the value - if (formula.includes('bonus')) + if (formula.includes('bonus')) { formula = formula.replace("bonus de " + WFRP4E.characteristics[ch].toLowerCase(), actorData.data.characteristics[ch].bonus); + formula = formula.replace(WFRP4E.characteristics[ch].toLowerCase() + " bonus", actorData.data.characteristics[ch].bonus); + } else formula = formula.replace(WFRP4E.characteristics[ch].toLowerCase(), actorData.data.characteristics[ch].value); } @@ -113,8 +116,10 @@ class ActorWfrp4e_fr extends ActorWfrp4e { if (formula.includes("force mentale")) { // Determine if it's looking for the bonus or the value - if (formula.includes('bonus')) + if (formula.includes('bonus')) { formula = formula.replace( "bonus de force mentale", actorData.data.characteristics["wp"].bonus); + formula = formula.replace( "force mentale bonus", actorData.data.characteristics["wp"].bonus); + } else formula = formula.replace("force mentale", actorData.data.characteristics["wp"].value); } @@ -130,8 +135,10 @@ class ActorWfrp4e_fr extends ActorWfrp4e { if (formula.includes(WFRP4E.characteristics[ch].toLowerCase())) { // Determine if it's looking for the bonus or the value - if (formula.includes('bonus')) + if (formula.includes('bonus')) { formula = formula.replace("bonus de " + WFRP4E.characteristics[ch].toLowerCase(), actorData.data.characteristics[ch].bonus); + formula = formula.replace(WFRP4E.characteristics[ch].toLowerCase() + " bonus", actorData.data.characteristics[ch].bonus); + } else formula = formula.replace(WFRP4E.characteristics[ch].toLowerCase(), actorData.data.characteristics[ch].value); } diff --git a/fr.json b/fr.json index fae54b0..82dd352 100644 --- a/fr.json +++ b/fr.json @@ -541,9 +541,9 @@ "MARKET.CreditRequest" : "Envoi d'argent", "MARKET.CreditCommandNotAllowed" : "Les joueurs ne sont pas autorisés à utiliser cette commande, seulement le MJ.", "MARKET.ReceivedBy" : "Reçu par:", - "MARKET.MoneyTransactionWrongCommand" : "Syntaxe erronée. Merci de format^er votre commande comme l'un des exemples ci-dessous:", + "MARKET.MoneyTransactionWrongCommand" : "Syntaxe erronée. Merci de formater votre commande comme l'un des exemples ci-dessous:", "MARKET.CreditCommandExample" : "/credit 3co2pa
/credit 450sc each
/credit 2pa12sc4co split", - "MARKET.Credit": "Envoi d'argent effectué: {number1} GC {number2} SS {number3} BP", + "MARKET.Credit": "Envoi d'argent effectué: {number1} Co {number2} Pa {number3} Sc", "MARKET.RequestMessageForSplitCredit": "La somme d'argent {initialAmount} sera partagée entre le(s) {activePlayerNumber} joueur(s) actif(s), chaque joueur recevant:", "MARKET.RequestMessageForEachCredit": "La somme d'argent {initialAmount} sera donnée au(x) {activePlayerNumber} joueur(s) actif(s), chaque joueur recevant:", "MARKET.NoPlayers": "Aucun joueur actif dans cette session.", diff --git a/module.json b/module.json index dd7d8be..0a57b2e 100644 --- a/module.json +++ b/module.json @@ -3,9 +3,9 @@ "name": "WH4-fr-translation", "title": "Traduction du module WH4 en Français.", "description": "La traduction du module WH4.", - "version": "0.80", + "version": "0.81", "minimumCoreVersion" : "0.6.0", - "compatibleCoreVersion": "0.6.0", + "compatibleCoreVersion": "0.6.1", "author": "LeRatierBretonnien", "esmodules": [ "babele-register.js",