fvtt-fria-ligan / morkborg-foundry-vtt

An unoffical, community-supported system for playing MÖRK BORG on Foundry VTT.
Other
31 stars 17 forks source link

Error when rolling agility (French translation) #174

Open ghost opened 1 year ago

ghost commented 1 year ago

Hi !

When the system is translated in French, I noted a problem when rolling agility from character sheet.

Here is my config:

Foundry Virtual Tabletop: Version 11 Stable, 11.306
Système de jeu: morkborg, 3.2.1
Modules actifs: 0
Mode de performance: 2

Here are the logs:

foundry.js:12665 Uncaught (in promise) Error: Unresolved StringTerm 0é.value requested for evaluation
    at StringTerm.evaluate (foundry.js:12665:11)
    at Roll._evaluateSync (foundry.js:10241:36)
    at Roll.evaluate (foundry.js:10166:64)
    at testAbility (test-abilities.js:15:15)
    at testCustomAbility (test-abilities.js:103:9)
    at MBCharacterSheet._onCustomAbilityRoll (character-sheet.js:188:5)
    at HTMLSpanElement.dispatch (jquery.min.js:2:43184)
    at y.handle (jquery.min.js:2:41168)

The problem seems to be the accent in the word "Agilité" (fr.json, line 3).

To begin testing the system, I replaced Agilité with Agilite. But I am not fluent enough in Javascript to suggest a prettier solution...

Thanks !

ghost commented 1 year ago

Hi again ! I managed to support accentuated "custom" abilities by using their untranslated names. Here is merge request, for you to judge: https://github.com/fvtt-fria-ligan/morkborg-foundry-vtt/pull/177. Thanks !