lookit / lookit-jspsych

0 stars 0 forks source link

Support translations #53

Closed becky-gilbert closed 1 week ago

becky-gilbert commented 2 weeks ago

TL;DR

We would like to support translations for CHS plugins with hard-coded/non-parameterized text, such as video-consent and video-config.

Summary

The first iteration of plugins used hard-coded English text, but we would like to allow researchers to select the study language, which should automatically translate all hard-coded text into that language. Ideally we would be able to re-use our EFP yaml translation files with no/minimal changes.

To support translations, we propose building a separate package with a function that can be called with the language, HTML template, and template context/parameters, and return the appropriate HTML-formatted content. By making this a separate package, we can update the translations and increment version numbers separately to the rest of the lookit-jspsych packages.