Skip to content

Conversation

courtney-bryce-hilton
Copy link

This PR adds my initial pass at putting together the jsPsychTranslate plugin to facilitate multilingual experiments, based on discussions with Becky and Josh (as well as Melissa and Sam; as part of the POSE project).

Copy link

changeset-bot bot commented Jul 28, 2025

⚠️ No Changeset found

Latest commit: 793305a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@becky-gilbert
Copy link
Collaborator

@courtney-bryce-hilton this looks great - very exciting!
I still need to try this out. But just having looked over the PR, I have some minor suggestions for changes: a little more explanation in the docs about how the plugin can/should be used, and additional tests. Should I direct my changes at your fork/branch, or edit this PR directly? cc @jodeleeuw

@courtney-bryce-hilton
Copy link
Author

Thanks Becky!

Feel free to edit the PR directly if that's easier. Whatever you'd prefer.

"dependencies": {
"regenerator-runtime": "^0.14.0"
},
"version": "7.28.2",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

babel/runtime updated because of it's listed as an i18next dependency with version specified as "^7.27.6".

Comment on lines +147 to +149
dropdownEl.style.fontSize = "14px";
dropdownEl.style.fontFamily = "Open Sans, Arial', sans-serif";
dropdownEl.style.padding = "4px";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this to match the style used in the only other select elements I could find in jsPsych (other than in the survey plugin), which are written as inline style in the initialize-camera and initialize-microphone plugins. This should probably factored out of all of the plugins and moved into the jspsych.css file as a jspsych-dropdown class. Do we want to do that in this PR?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, that'd be a good idea I think.

Actually I had left the styling for the dropdown blank because I wasn't sure what default jspsych styling to apply and I couldn't find anything in jspsych.css for it.

Should we just create a jspsych-dropdown class or something?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me! We should probably wait for a 👍 from @jodeleeuw because the CSS change will require a jspsych core release. And we'll need to tell people to use the translate plugin with that upcoming jsPsych core version rather than just v8 (either make it a formal dependency or just recommend it in the docs).

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

Successfully merging this pull request may close these issues.

2 participants