Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turkle rejects HTML templates that use JavaScript template literals #80

Open
hltcoe-bot opened this issue Aug 7, 2020 · 2 comments
Open

Comments

@hltcoe-bot
Copy link
Collaborator

Discovered by an undergrad working with paulmac.

Turkle currently assumes that the syntax ${foo} is only used for Turkle template variables. When uploading a CSV file, Turkle (currently) requires that the CSV header include a column name for each of the "template variables" it discovers.

When Mechanical Turk was first deployed, ${foo} was not a valid JavaScript construct. But newer versions of JavaScript (apparently starting with the ES2015 standard) introduced support for Template literals (formerly called Template strings). Template literals are backtick-quoted strings that use the same ${foo} syntax for variable substitution, e.g.:

var foo = 'world';
var x = `hello ${foo}`;

Poster: Craig Harman id: 257

@hltcoe-bot
Copy link
Collaborator Author

Here are the HTML template and CSV file that exposed the problem:

audio-translation-json.html

json-file.csv

Poster: Craig Harman

@hltcoe-bot
Copy link
Collaborator Author

mentioned in merge request !216

Poster: Craig Harman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant