From 38525c325727bcdb5ccaa6399c1ee5353c46f608 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnier Date: Sun, 7 Jun 2026 00:53:31 +0200 Subject: [PATCH] Fix: Add missing MNBL i18n keys and show effects tab always - Added MNBL.details and MNBL.description to lang/fr.json - Removed conditional display of effects tab in partial-item-nav.hbs - Effects tab now always visible in item sheets - Added MNBL i18n keys verification to test script Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- lang/fr.json | 2 ++ templates/partial-item-nav.hbs | 8 +++----- test-templates.js | 35 +++++++++++++++++++++++++++++++--- 3 files changed, 37 insertions(+), 8 deletions(-) diff --git a/lang/fr.json b/lang/fr.json index 6a2b624..cfd7291 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -47,6 +47,8 @@ "chaos": "Chaos", "difficulty": "Difficulté", "duration": "Durée", + "details": "Détails", + "description": "Description", "elementslords": "Seigneurs des Éléments", "equipment": "Equipement", "examples": "Exemples", diff --git a/templates/partial-item-nav.hbs b/templates/partial-item-nav.hbs index 8e983c3..f491a4e 100644 --- a/templates/partial-item-nav.hbs +++ b/templates/partial-item-nav.hbs @@ -1,10 +1,8 @@ {{!-- Sheet Tab Navigation --}}

diff --git a/test-templates.js b/test-templates.js index d78f34f..01d1316 100644 --- a/test-templates.js +++ b/test-templates.js @@ -222,8 +222,36 @@ if (missingKeys.length === 0) { console.log(` ❌ Clés EFFECT manquantes : ${missingKeys.join(', ')}`); } -// 9. Vérification de l'utilisation du helper subtract -console.log('\n9. Vérification de l\'utilisation du helper subtract :'); +// 9. Vérification des clés i18n MNBL dans lang/fr.json +console.log('\n9. Vérification des clés i18n MNBL :'); +const mnblKeys = Object.keys(frJson.MNBL || {}); + +const requiredMnblKeys = [ + 'all', 'allegiance', 'balance', 'beastslords', 'chaos', + 'difficulty', 'duration', 'details', 'description', + 'elementslords', 'equipment', 'examples', 'exercisedskills', + 'highlanguage', 'initiateTalents', 'law', 'mode', 'mainattribute', + 'none', 'aguerriTalents', 'prerequisitesAguerri', 'prerequisitesMaitre', + 'prerequisites', 'maitreTalents', 'pronounced', 'pronouncedrune', + 'pronouncerune', 'rune', 'soulcost', 'soulpoints', 'traced', + 'tracedrune', 'tracerune' +]; + +let missingMnblKeys = []; +for (const key of requiredMnblKeys) { + if (!mnblKeys.includes(key)) { + missingMnblKeys.push(key); + } +} + +if (missingMnblKeys.length === 0) { + console.log(` ✅ Toutes les clés MNBL sont présentes (${mnblKeys.length} clés)`); +} else { + console.log(` ❌ Clés MNBL manquantes : ${missingMnblKeys.join(', ')}`); +} + +// 10. Vérification de l'utilisation du helper subtract +console.log('\n10. Vérification de l\'utilisation du helper subtract :'); const subtractPattern = /subtract/g; const subtractFiles = [ 'templates/partial-active-effects.hbs', @@ -273,9 +301,10 @@ console.log(`API dépréciée utilisée: ${deprecatedFound ? 'Oui' : 'Non'}`); console.log(`Référence à effect.webp: ${effectWebpFound ? 'Oui' : 'Non'}`); console.log(`Utilisation de duration.type: ${durationTypeFound ? 'Oui' : 'Non'}`); console.log(`Clés i18n EFFECT: ${missingKeys.length === 0 ? 'Complet' : 'Manquantes'}`); +console.log(`Clés i18n MNBL: ${missingMnblKeys.length === 0 ? 'Complet' : 'Manquantes'}`); console.log(`Helper subtract: ${(subtractUsed && subtractRegistered) ? 'OK' : (subtractUsed ? 'Manquant' : 'Non utilisé')}`); -if (errors.length === 0 && missingPartials.length === 0 && !deprecatedFound && !effectWebpFound && !durationTypeFound && missingKeys.length === 0 && (subtractUsed ? subtractRegistered : true)) { +if (errors.length === 0 && missingPartials.length === 0 && !deprecatedFound && !effectWebpFound && !durationTypeFound && missingKeys.length === 0 && missingMnblKeys.length === 0 && (subtractUsed ? subtractRegistered : true)) { console.log('\n✅ Toutes les vérifications ont réussi !'); process.exit(0); } else {