Skip to content

Fields marked as code are not translated to JS #3064

@ghost

Description

Any field that is prefixed with $ and contains python specific code will break once the project is exported as HTML, because that field will not be translated. This is easily reproduced by giving a text stimulus python specific code like len([0,1]) and trying to run the study on Pavlovia. The error I get is ReferenceError: len is not defined.

I'm not so sure on how the translation process is structured, but this would be a nice thing to have. I work around the issue by setting those fields to a variable that I declare and set earlier in the routine (the code component then being translated as needed). This is on the latest release v2020.2.2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions