forked from public/foundryvtt-wh4-lang-fr-fr
c54a625a42
- Remplacement des comparaisons localisées dans handleCorruptionResult par des chaînes anglaises en dur pour que les paliers de Corruption soient correctement appliqués - Correction de _onResist pour accepter les valeurs anglaises et françaises de sévérité de Corruption - Correction des liens @Corruption[modérée] → @Corruption[moderate] dans les scripts d'effets - Élargissement de la clause de garde dans xS2su09zcza9du09.js pour couvrir les valeurs anglaises et françaises - Ajout de AGENTS.md
2.9 KiB
2.9 KiB
AGENTS.md — foundryvtt-wh4-lang-fr-fr
FoundryVTT WFRP4e French translation module (wh4-fr-translation).
Quick start
npm run build # packs scripts/*.js → modules/loadScripts.js (do NOT edit loadScripts.js manually)
python3 -mjson.tool fr.json > /dev/null # validate JSON (CI check)
python3 -mjson.tool module.json > /dev/null
No test framework exists. Only automated check is JSON validity (.gitea/workflows/validate.yaml on every push).
Architecture
fr.json(2715 keys) — UI/system flat key→val translations (WFRP4E.*namespace)compendium/*.json— compendium translations named{source-module}.{pack-type}.json; entries keyed by Englishidscripts/*.js— ActiveEffect scripts named by Foundry item IDs (GUID-likea7v422EZcOUUC20X.js)modules/loadScripts.js— generated bynpm run build; never edit directlymodules/babele-register.js— registers all compendium JSONs with Babele atinithook; contains all converter logicmodules/addon-register.js— patchesgame.wfrp4e.config.*with French strings atinit/readymodules/config-patch.js—WH4FRPatchConfigclass (skill list translation, talent list, NPC details)modules/import-stat-2.js— French stat block parser (replaces WFRP4e default)wh4_fr.js— entry point, initstravelv2andinnsubmodules frommodules/packs/— custom French compendium packs (LevelDB format)patch-styles.css— CSS patches
Critical conventions
- Never use French words as JS variable names in
scripts/.BlessuresandTestsshadow WFRP4e internals (the system usesgame.wfrp4e.config.*lookup based on English names, andBlessures/Testsas variable names break this). Scan with:node find-blessures-variables.cjs node find-tests-variables.cjs - Conflicts in the release workflow:
compatibility-verified: '13'in.gitea/workflows/release.yamlbut"verified": "14"inmodule.json. The CI step overwrites the release yaml's value — but if adding module.json updates, match both.
Upstream sync workflow
When updating to a new WFRP4e release:
node tools/copy-new-scripts.js --list # count new scripts
node tools/copy-new-scripts.js --dry-run # preview
node tools/copy-new-scripts.js --copy # copy new scripts
node tools/sync-scripts.js # compare scripts with upstream
node tools/translate-scripts.js # apply auto-translation passes
node tools/check-tests.js # scan for "Tests" in scripts/ content
Release
Published via Gitea release. The zip includes: module.json, fr.json, wh4_fr.js, patch-styles.css, README.md, LICENSE, compendium/, modules/, packs/, icons/, images/, trade/.
Detailed architecture reference in .github/copilot-instructions.md.