Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Translation issues

1630661789
Paul V.
Pro
Sheet Author
Compendium Curator
Getting some weird translation issues when I'm testing a new sheet In the Sandbox the sheet looks fine the translation are working fine and everything looks great. When I try the same code using the Custom Sheet options, loading the same html,css and translate.json  i get a mess of red field names as if the sheet is not getting the translated values correctly. Has anyone experienced this? and how do i fix it
1630730148

Edited 1630730186
vÍnce
Pro
Sheet Author
That's odd... I've only seen that when the translate.json is either missing[all keys have red text], is missing keys[only missing keys have red text], or isn't a valid json[all keys have red text]. The translate.json validates on&nbsp; <a href="https://jsonlint.com/" rel="nofollow">https://jsonlint.com/</a> &nbsp;?
1630733227
Paul V.
Pro
Sheet Author
Compendium Curator
It is as if all the keys are missing in the custom sheet version.. but it works fine in the sandbox
1630735532
vÍnce
Pro
Sheet Author
Is it only for that custom game?&nbsp; If you create a new custom game and load up with a bare minimum of "test code", do you still have red text?
1630741510

Edited 1630741613
Paul V.
Pro
Sheet Author
Compendium Curator
I've just created a new custom game with the same html, css and translation code and i get the same [all key red text] apart for weirdly [Height] being 'translated' to Page Height - which is not in my translate code at all
1630742222
Paul V.
Pro
Sheet Author
Compendium Curator
found the issue.&nbsp;&nbsp; the last line of the translation had a ,. Obviously the sand box deals with this the custom sheet doesnt "wealth": "Wealth", "weight": "Weight", "wt": "wt", "wisdom": "Wisdom", } needed to be&nbsp; "wealth": "Wealth", "weight": "Weight", "wt": "wt", "wisdom": "Wisdom" }
1630747497
David
Sheet Author
Paul V. said: found the issue.&nbsp;&nbsp; the last line of the translation had a ,. Obviously the sand box deals with this the custom sheet doesnt "wealth": "Wealth", "weight": "Weight", "wt": "wt", "wisdom": "Wisdom", } needed to be&nbsp; "wealth": "Wealth", "weight": "Weight", "wt": "wt", "wisdom": "Wisdom" } That production server with legacy off doesn't handle it errant , either.&nbsp;
1630771540

Edited 1630771646
vÍnce
Pro
Sheet Author
And validating with JsonLint should have caught that... ;-P
1630773604

Edited 1630773653
Andreas J.
Forum Champion
Sheet Author
Translator
vÍnce said: And validating with JsonLint should have caught that... ;-P AKA <a href="https://wiki.roll20.net/Sheet_Mistakes#7" rel="nofollow">https://wiki.roll20.net/Sheet_Mistakes#7</a> :D Not using a linter/code validator on your HTML/CSS/Sheetworker/Translation files.
1631520551
Paul V.
Pro
Sheet Author
Compendium Curator
back from holiday, still new (well not new but new to new stuff, last time i coded html was nearly 20 years ago) thanks for the heads up re code validators
1631556676
vÍnce
Pro
Sheet Author
Paul V. said: back from holiday, still new (well not new but new to new stuff, last time i coded html was nearly 20 years ago) thanks for the heads up re code validators No worries Paul.. I need constant validation. ;-P