Closed goldenxp closed 3 years ago
Hello! i Saw your changes, they have two problems You make changes at "runtime", but not in the main "tuesday.js" file (main file for runtime), so i can't see what was changed. You are also making overly drastic changes that could damage other users projects. I am not opposed to making changes, but delicately.
How are you trying to use localization and values_button function?
Basically, we have 3 languages and the choices buttons are not showing up. This blocks the client from playing the game. When debugging, I noted the matchAll function tries to run on an object of a locale string (like en:"") instead of the actual string itself. This produces an error and the buttons don't render. My fix sanitizes the language lookup as done elsewhere in the codebase. I wasn't aware of the runtime vs main runtime differences. That's a small problem to fix. I totally understand the need to protect other projects - my CSV separator change for example handles this with a new setting value (we need commas) and the default behavior preserves current functionality. Localization is crucial for this project.
The problem with buttons is very simple to solve. the default 'width size' = 0 is done to make the button fit the text on it. to prevent the button from disappearing, set it to a fixed size.
For CSV export I added settings for Separated and Delimiter
I think I figured out what the problem is. It wasn't the choice button but the global interface button - if the global interface button is purely iconic, that is it has no text, this causes button addition failure so the choice buttons do not get made.
Also there may be another issue related to this where additional languages are not added if the text button is purely iconic with no string. This causes localization for other languages to fail. It's easy to fix by directly editing the JSON. Thanks for your assistance earlier.
unfortunately the error could not be repeated. Can you send a JSON snippet with this problem, or describe how I can replicate this problem?
I'll make a new issue with the repro steps.
I fixed this in my local branch but my client is using the main web build which rejected my pull request for this fix. Basically, values_button tries to get a string from an object and fails so no buttons show up.