Corrections sur les clés de label manquantes
Some checks failed
Release Creation / build (release) Failing after 54s
Some checks failed
Release Creation / build (release) Failing after 54s
This commit is contained in:
@@ -32,7 +32,7 @@ export class DonjonEtCieRollDialog {
|
||||
buttons: [
|
||||
{
|
||||
action: "roll",
|
||||
label: "Lancer",
|
||||
label: game.i18n.localize("DNC.UI.RollAction"),
|
||||
icon: "fa-solid fa-bolt",
|
||||
default: true,
|
||||
callback: async (event, button) => {
|
||||
@@ -70,7 +70,7 @@ export class DonjonEtCieRollDialog {
|
||||
buttons: [
|
||||
{
|
||||
action: "roll",
|
||||
label: "Lancer",
|
||||
label: game.i18n.localize("DNC.UI.RollAction"),
|
||||
icon: "fa-solid fa-dice-d20",
|
||||
default: true,
|
||||
callback: async (event, button) => {
|
||||
@@ -107,7 +107,7 @@ export class DonjonEtCieRollDialog {
|
||||
buttons: [
|
||||
{
|
||||
action: "roll",
|
||||
label: "Attaquer",
|
||||
label: game.i18n.localize("DNC.UI.AttackAction"),
|
||||
icon: "fa-solid fa-sword",
|
||||
default: true,
|
||||
callback: async (event, button) => {
|
||||
@@ -153,7 +153,7 @@ export class DonjonEtCieRollDialog {
|
||||
buttons: [
|
||||
{
|
||||
action: "roll",
|
||||
label: "Lancer",
|
||||
label: game.i18n.localize("DNC.UI.RollAction"),
|
||||
icon: "fa-solid fa-wand-magic-sparkles",
|
||||
default: true,
|
||||
callback: async (event, button) => {
|
||||
@@ -185,7 +185,7 @@ export class DonjonEtCieRollDialog {
|
||||
buttons: [
|
||||
{
|
||||
action: "roll",
|
||||
label: "Utiliser",
|
||||
label: game.i18n.localize("DNC.UI.UseAction"),
|
||||
icon: "fa-solid fa-hourglass-half",
|
||||
default: true,
|
||||
callback: async (event, button) => {
|
||||
@@ -218,7 +218,7 @@ export class DonjonEtCieRollDialog {
|
||||
buttons: [
|
||||
{
|
||||
action: "roll",
|
||||
label: "Lancer",
|
||||
label: game.i18n.localize("DNC.UI.RollAction"),
|
||||
icon: "fa-solid fa-burst",
|
||||
default: true,
|
||||
callback: async (event, button) => {
|
||||
|
||||
@@ -35,8 +35,9 @@ export class DonjonEtCieRolls {
|
||||
}
|
||||
|
||||
static #getModeLabel(mode) {
|
||||
if (mode === "avantage") return "Avantage";
|
||||
if (mode === "desavantage") return "Desavantage";
|
||||
if (mode === "avantage") return game.i18n.localize("DNC.UI.ModeAdvantage");
|
||||
if (mode === "desavantage") return game.i18n.localize("DNC.UI.ModeDisadvantage");
|
||||
if (mode === "normal") return game.i18n.localize("DNC.UI.ModeNormal");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -77,7 +78,7 @@ export class DonjonEtCieRolls {
|
||||
const path = `system.faveurs.${favorKey}.delta`;
|
||||
const before = Number(foundry.utils.getProperty(actor, path) ?? 0);
|
||||
if (!before) {
|
||||
ui.notifications.warn(`Aucune faveur disponible pour ${label}.`);
|
||||
ui.notifications.warn(game.i18n.format("DNC.Warn.NoFavorAvailable", { label }));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -113,7 +114,7 @@ export class DonjonEtCieRolls {
|
||||
const path = `system.faveurs.${favorKey}.delta`;
|
||||
const before = Number(foundry.utils.getProperty(actor, path) ?? 0);
|
||||
if (!before) {
|
||||
ui.notifications.warn(`Aucune faveur disponible pour ${label}.`);
|
||||
ui.notifications.warn(game.i18n.format("DNC.Warn.NoFavorAvailable", { label }));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -182,29 +183,29 @@ export class DonjonEtCieRolls {
|
||||
if (!result) return null;
|
||||
|
||||
await this.#createChatCard(actor, "systems/fvtt-donjon-et-cie/templates/chat/roll-card.hbs", {
|
||||
title: label ?? "Jet de caracteristique",
|
||||
title: label ?? game.i18n.localize("DNC.Roll.Characteristic"),
|
||||
subtitle: result.characteristic.label,
|
||||
formula: result.values.length > 1 ? "2d20" : "1d20",
|
||||
mode: effectiveMode,
|
||||
modeLabel: this.#getModeLabel(effectiveMode),
|
||||
target: result.target,
|
||||
targetPillLabel: "Cible",
|
||||
targetPillLabel: game.i18n.localize("DNC.Chat.Target"),
|
||||
targetPillValue: result.target,
|
||||
values: result.values,
|
||||
kept: result.kept,
|
||||
keptPillLabel: "Garde",
|
||||
keptPillLabel: game.i18n.localize("DNC.Chat.Kept"),
|
||||
keptPillValue: result.kept,
|
||||
success: result.success,
|
||||
favorLabel: favor?.label ?? null,
|
||||
favorNote: favor?.note ?? null,
|
||||
details: [
|
||||
{ label: "Caracteristique", value: result.characteristic.label },
|
||||
{ label: "Valeur cible", value: result.target },
|
||||
{ label: game.i18n.localize("DNC.UI.Characteristic"), value: result.characteristic.label },
|
||||
{ label: game.i18n.localize("DNC.Chat.TargetValue"), value: result.target },
|
||||
...(favor ? [
|
||||
{ label: "Faveur", value: favor.label },
|
||||
{ label: "Dé de faveur", value: favor.result },
|
||||
{ label: "Avant", value: DonjonEtCieUtility.formatUsageDie(favor.before) },
|
||||
{ label: "Apres", value: DonjonEtCieUtility.formatUsageDie(favor.after) }
|
||||
{ label: game.i18n.localize("DNC.Chat.Favor"), value: favor.label },
|
||||
{ label: game.i18n.localize("DNC.Chat.FavorDie"), value: favor.result },
|
||||
{ label: game.i18n.localize("DNC.Chat.Before"), value: DonjonEtCieUtility.formatUsageDie(favor.before) },
|
||||
{ label: game.i18n.localize("DNC.Chat.After"), value: DonjonEtCieUtility.formatUsageDie(favor.after) }
|
||||
] : [])
|
||||
]
|
||||
});
|
||||
@@ -297,7 +298,7 @@ export class DonjonEtCieRolls {
|
||||
targetPillValue: result.target,
|
||||
values: result.values,
|
||||
kept: result.kept,
|
||||
keptPillLabel: "Jet",
|
||||
keptPillLabel: game.i18n.localize("DNC.Chat.RollValue"),
|
||||
keptPillValue: result.kept,
|
||||
success: result.success,
|
||||
favorLabel: favor?.label ?? null,
|
||||
@@ -305,16 +306,16 @@ export class DonjonEtCieRolls {
|
||||
showDamageButton: result.success && Boolean(item.system.degats),
|
||||
itemUuid: item.uuid,
|
||||
details: [
|
||||
{ label: "Arme", value: item.name },
|
||||
{ label: "Caracteristique", value: characteristicLabel },
|
||||
{ label: game.i18n.localize("DNC.UI.Weapon"), value: item.name },
|
||||
{ label: game.i18n.localize("DNC.UI.Characteristic"), value: characteristicLabel },
|
||||
{ label: `Valeur de ${characteristicLabel}`, value: result.target },
|
||||
{ label: "Degats", value: item.system.degats || "—" },
|
||||
{ label: "Portee", value: item.system.portee || "—" },
|
||||
{ label: game.i18n.localize("DNC.UI.Damage"), value: item.system.degats || "—" },
|
||||
{ label: game.i18n.localize("DNC.UI.Range"), value: item.system.portee || "—" },
|
||||
...(favor ? [
|
||||
{ label: "Faveur", value: favor.label },
|
||||
{ label: "Dé de faveur", value: favor.result },
|
||||
{ label: "Avant", value: DonjonEtCieUtility.formatUsageDie(favor.before) },
|
||||
{ label: "Apres", value: DonjonEtCieUtility.formatUsageDie(favor.after) }
|
||||
{ label: game.i18n.localize("DNC.Chat.Favor"), value: favor.label },
|
||||
{ label: game.i18n.localize("DNC.Chat.FavorDie"), value: favor.result },
|
||||
{ label: game.i18n.localize("DNC.Chat.Before"), value: DonjonEtCieUtility.formatUsageDie(favor.before) },
|
||||
{ label: game.i18n.localize("DNC.Chat.After"), value: DonjonEtCieUtility.formatUsageDie(favor.after) }
|
||||
] : [])
|
||||
]
|
||||
});
|
||||
@@ -402,7 +403,7 @@ export class DonjonEtCieRolls {
|
||||
const availableMagicHp = currentPv + focus.activeValue;
|
||||
|
||||
if (cost > availableMagicHp) {
|
||||
ui.notifications.warn("Le lanceur ne dispose pas d'assez de PV et de focus pour payer ce sort.");
|
||||
ui.notifications.warn(game.i18n.localize("DNC.Warn.SpellInsufficientResources"));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -445,7 +446,7 @@ export class DonjonEtCieRolls {
|
||||
targetPillValue: result.target,
|
||||
values: result.values,
|
||||
kept: result.kept,
|
||||
keptPillLabel: "Jet",
|
||||
keptPillLabel: game.i18n.localize("DNC.Chat.RollValue"),
|
||||
keptPillValue: result.kept,
|
||||
success,
|
||||
specialNote,
|
||||
@@ -454,23 +455,23 @@ export class DonjonEtCieRolls {
|
||||
itemUuid: item.uuid,
|
||||
actorUuid: actor.uuid,
|
||||
details: [
|
||||
{ label: "Sortilege", value: item.name },
|
||||
{ label: "Caracteristique", value: result.characteristic.label },
|
||||
{ label: "Valeur de la caracteristique", value: result.target },
|
||||
{ label: "Cout en PV", value: cost },
|
||||
{ label: "Focus", value: focus.activeValue > 0 ? `${focus.activeValue} (${DonjonEtCieUtility.formatUsageDie(focus.before)})` : "—" },
|
||||
{ label: "Focus depense", value: focusSpent },
|
||||
{ label: "Focus restant", value: focusRemaining },
|
||||
{ label: "PV depenses", value: spentPv },
|
||||
{ label: "PV restants", value: remainingPv },
|
||||
{ label: "Rang du lanceur", value: rank },
|
||||
{ label: "Difficulte", value: item.system.difficulte ?? 0 },
|
||||
{ label: "Effet", value: item.system.effet || "—" },
|
||||
{ label: game.i18n.localize("DNC.UI.Spell"), value: item.name },
|
||||
{ label: game.i18n.localize("DNC.UI.Characteristic"), value: result.characteristic.label },
|
||||
{ label: game.i18n.localize("DNC.Chat.CharacteristicValue"), value: result.target },
|
||||
{ label: game.i18n.localize("DNC.Chat.HpCost"), value: cost },
|
||||
{ label: game.i18n.localize("DNC.UI.Focus"), value: focus.activeValue > 0 ? `${focus.activeValue} (${DonjonEtCieUtility.formatUsageDie(focus.before)})` : "—" },
|
||||
{ label: game.i18n.localize("DNC.Chat.FocusSpent"), value: focusSpent },
|
||||
{ label: game.i18n.localize("DNC.Chat.FocusRemaining"), value: focusRemaining },
|
||||
{ label: game.i18n.localize("DNC.Chat.HpSpent"), value: spentPv },
|
||||
{ label: game.i18n.localize("DNC.Chat.HpRemaining"), value: remainingPv },
|
||||
{ label: game.i18n.localize("DNC.Chat.CasterRank"), value: rank },
|
||||
{ label: game.i18n.localize("DNC.Chat.Difficulty"), value: item.system.difficulte ?? 0 },
|
||||
{ label: game.i18n.localize("DNC.Chat.Effect"), value: item.system.effet || "—" },
|
||||
...(favor ? [
|
||||
{ label: "Faveur", value: favor.label },
|
||||
{ label: "Dé de faveur", value: favor.result },
|
||||
{ label: "Avant", value: DonjonEtCieUtility.formatUsageDie(favor.before) },
|
||||
{ label: "Apres", value: DonjonEtCieUtility.formatUsageDie(favor.after) }
|
||||
{ label: game.i18n.localize("DNC.Chat.Favor"), value: favor.label },
|
||||
{ label: game.i18n.localize("DNC.Chat.FavorDie"), value: favor.result },
|
||||
{ label: game.i18n.localize("DNC.Chat.Before"), value: DonjonEtCieUtility.formatUsageDie(favor.before) },
|
||||
{ label: game.i18n.localize("DNC.Chat.After"), value: DonjonEtCieUtility.formatUsageDie(favor.after) }
|
||||
] : [])
|
||||
],
|
||||
focusRolled: focus.rolled,
|
||||
@@ -490,7 +491,7 @@ export class DonjonEtCieRolls {
|
||||
static async rollSpellChaos(actor, item) {
|
||||
const before = Number(actor?.system?.magie?.chaos?.delta ?? 12);
|
||||
if (!before || before < 4) {
|
||||
ui.notifications.warn("Le Chaos n'est pas disponible pour ce sort.");
|
||||
ui.notifications.warn(game.i18n.localize("DNC.Warn.ChaosUnavailable"));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user