From c9722b9b0465e5e40f80d376f5bef21fcd397eef Mon Sep 17 00:00:00 2001 From: sladecraven Date: Wed, 11 May 2022 22:05:35 +0200 Subject: [PATCH] Enhance localization stuff --- lang/fr.json | 3 ++- module/controllers/bol-rolls.js | 5 +++++ system.json | 2 +- templates/chat/rolls/default-roll-card.hbs | 14 +++++++++----- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/lang/fr.json b/lang/fr.json index aa9ddf1..e807b7f 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -87,6 +87,7 @@ "BOL.ui.failure": "Échec", "BOL.ui.fumble": "Échec critique", "BOL.ui.critical": "Succès critique", + "BOL.ui.criticallegend": "Succès légendaire !", "BOL.ui.maneuvers": "Actions de combat", "BOL.ui.stacksize": "Taille de pile (max)", "BOL.ui.weapons": "Armes", @@ -366,7 +367,7 @@ "BOL.chat.rolldamage": "Lancer les dommages", "BOL.chat.rolldamage6": "Lancer les dommages +6", "BOL.chat.rolldamage12": "Dommages +12 (1 Pt. d'Heroisme)", - "BOL.chat.damageresult": "Dommages de {weapon.name} : {total}", + "BOL.chat.damageresult": "Dommages de {name} : {total}", "BOL.chat.damagetarget": "Cible : {target}", "BOL.chat.applydamagetotarget": "Appliquer les dommages à la cible", "BOL.chat.fightoption": "Option de combat", diff --git a/module/controllers/bol-rolls.js b/module/controllers/bol-rolls.js index 0b456cd..8490c43 100644 --- a/module/controllers/bol-rolls.js +++ b/module/controllers/bol-rolls.js @@ -25,6 +25,7 @@ export class BoLRoll { let rollData = { mode: "attribute", actorId: actor.id, + img: actor.img, attribute: attribute, attrValue: attribute.value, aptValue: 0, @@ -52,6 +53,7 @@ export class BoLRoll { { mode: "aptitude", actorId: actor.id, + img: actor.img, attribute: attribute, aptitude: aptitude, attrValue: attribute.value, @@ -84,6 +86,7 @@ export class BoLRoll { let rolldata = { mode: "weapon", actorId: actor.id, + img: actor.img, weapon: weapon, isRanged: weaponData.properties.ranged || weaponData.properties.throwing, targetId: target?.id, @@ -131,6 +134,7 @@ export class BoLRoll { let alchemyDef = { mode: "alchemy", actorId: actor.id, + img: actor.img, alchemy: alchemy, attribute: actor.data.data.attributes.mind, attrValue: actor.data.data.attributes.mind.value, @@ -154,6 +158,7 @@ export class BoLRoll { let spellDef = { mode: "spell", actorId: actor.id, + img: actor.img, spell: spell, attribute: actor.data.data.attributes.mind, attrValue: actor.data.data.attributes.mind.value, diff --git a/system.json b/system.json index 202a18a..f25f346 100644 --- a/system.json +++ b/system.json @@ -14,7 +14,7 @@ "url": "https://github.com/ZigmundKreud/bol", "license": "LICENSE.txt", "flags": {}, - "version": "1.3.10", + "version": "1.3.11", "templateVersion": 10, "minimumCoreVersion": "0.8.6", "compatibleCoreVersion": "9", diff --git a/templates/chat/rolls/default-roll-card.hbs b/templates/chat/rolls/default-roll-card.hbs index c855bd6..15e3218 100644 --- a/templates/chat/rolls/default-roll-card.hbs +++ b/templates/chat/rolls/default-roll-card.hbs @@ -1,9 +1,13 @@
{{#if isSuccess}} - {{#if isCritical}} -

 {{localize "BOL.ui.critical"}}... + {{#if isLegendary}} +

 {{localize "BOL.ui.criticallegend"}}... {{else}} -

 {{localize "BOL.ui.success"}}... + {{#if isCritical}} +

 {{localize "BOL.ui.critical"}}... + {{else}} +

 {{localize "BOL.ui.success"}}... + {{/if}} {{/if}} {{/if}} {{#if isFailure}} @@ -13,7 +17,7 @@

 {{localize "BOL.ui.failure"}}... {{/if}} {{/if}} - {{actor.name}} + {{actor.name}}

@@ -36,7 +40,7 @@ {{#if alchemy}} {{> "systems/bol/templates/chat/rolls/alchemy-roll-card.hbs"}} {{/if}} - + {{#if reroll}} {{/if}}