Skip to content

add translations to TMB_MOT, TMB_LN_SWITCHING#33

Merged
joshunrau merged 2 commits into
mainfrom
TMB
Jun 5, 2026
Merged

add translations to TMB_MOT, TMB_LN_SWITCHING#33
joshunrau merged 2 commits into
mainfrom
TMB

Conversation

@joshunrau

@joshunrau joshunrau commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

Release Notes

  • New Features
    • Added French language support to interactive assessments (TMB LN Switching, TMB MOT).
    • Users can now select between English and French for all instructions, prompts, and feedback.
    • New language selection and lock features available for consistent language preferences across assessments.

@joshunrau joshunrau merged commit e8ebd2c into main Jun 5, 2026
0 of 2 checks passed
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fba32dc9-c12b-407b-a967-43f8a96adf59

📥 Commits

Reviewing files that changed from the base of the PR and between 8a4f0ea and cd3e424.

⛔ Files ignored due to path filters (3)
  • lib/interactive/TMB_LN_SWITCHING/TestMyBrain.12.18.min.js is excluded by !**/*.min.js
  • lib/interactive/TMB_MOT/TestMyBrain.12.18.min.js is excluded by !**/*.min.js
  • lib/interactive/TMB_MOT/snap.0.5.1.min.js is excluded by !**/*.min.js
📒 Files selected for processing (6)
  • lib/interactive/TMB_LN_SWITCHING/index.ts
  • lib/interactive/TMB_LN_SWITCHING/render.js
  • lib/interactive/TMB_LN_SWITCHING/translator.ts
  • lib/interactive/TMB_MOT/index.ts
  • lib/interactive/TMB_MOT/render.js
  • lib/interactive/TMB_MOT/translator.ts

Walkthrough

Two neuropsychological test instruments (TMB_LN_SWITCHING and TMB_MOT) are updated with bilingual English/French localization. Each instrument's configuration metadata is expanded to declare dual language support, translator modules are created with UI text strings in both languages, and render functions consume translators to localize all user-facing text.

Changes

Bilingual localization for TMB instruments

Layer / File(s) Summary
TMB_LN_SWITCHING localization config and translator
lib/interactive/TMB_LN_SWITCHING/index.ts, lib/interactive/TMB_LN_SWITCHING/translator.ts
Instrument metadata (language, tags, instructions, description, title) transitions from single-language strings to en/fr objects. Language selection controls (enableLanguageLock, enableLanguageSelect) are added. Translator module provides English and French text for buttons, letter/number judgements, practice-error alerts, timeout prompts, and step-by-step instructions.
TMB_LN_SWITCHING render localization
lib/interactive/TMB_LN_SWITCHING/render.js
Render function imports translator and localizes practice-error alerts, timeout alerts, button labels across frame types, trial judgement display (via translation lookup), and instructional content in setFrameSequence(). A tFormat helper interpolates variables into translated templates.
TMB_MOT localization config and translator
lib/interactive/TMB_MOT/index.ts, lib/interactive/TMB_MOT/translator.ts
Instrument metadata transitions from single-language to en/fr objects (language, tags, instructions, description, title). Language selection controls are added. Translator module supplies English and French text for optional practice flow, button labels, trial/score phrasing, and comprehensive instructional text covering multiple dot-count practice stages.
TMB_MOT render localization
lib/interactive/TMB_MOT/render.js
Render function imports translator and localizes optional-practice alerts, score and trial-counter labels throughout the task, practice feedback messages, timeout alerts, mid-screen click instructions, button labels, and full instructional content (testMessage) with stage-specific guidance. tFormat helper handles variable substitution in templated strings.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🌍 Two tasks now speak in two fine tongues,
English and French on every button rung,
Translators turn the hardcoded text,
To localized strings—see what comes next,
Letter and dot shall flow in both,
A bilingual oath. 🎯

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch TMB

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant