Repository navigation
fix(web): scope email template languages to active languages - #1810
Open
thomasbeaudry wants to merge 2 commits into
Open
thomasbeaudry wants to merge 2 commits into
thomasbeaudry wants to merge 2 commits into
Conversation
…Spanish defaults Email template editors (new-user and group assignment) showed all three languages regardless of which were enabled in the instance settings. This scoped the language picker and validation to activeLanguages from the setup state, so disabled languages no longer appear. Also added the missing Spanish translations to both default email templates and alphabetized the language options on the settings page. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gdevenyi
requested changes
Oct 14, 2026
gdevenyi
left a comment
Contributor
There was a problem hiding this comment.
The lint-and-test check fails, so review is on hold.
@opendatacapture/web#lint stops at tsc. The new required activeLanguages prop is not passed in the existing unit tests:
apps/web/src/components/GroupEmailTemplates/__tests__/EditTemplateDialog.test.tsx(line 35)apps/web/src/components/GroupEmailTemplates/__tests__/ViewDefaultTemplateDialog.test.tsx(lines 18, 23, 33, 40)
Please pass activeLanguages in these tests, run pnpm lint and pnpm test:coverage locally, and push. Review continues when CI is green.
Reviewed at commit a338e3b.
`activeLanguages` became a required prop on EditTemplateDialog and ViewDefaultTemplateDialog, but their own tests were not updated, so `@opendatacapture/web#lint` stopped at tsc with five TS2741s. Both fixtures leave Spanish out, which lets a new case assert the picker offers only the languages the instance has enabled — the behaviour this branch adds. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
packages/schemasTest plan
packages/schemas/src/mail(31 tests, including newescoverage)NewUserTemplateSection,MailSettings, mail route (46 tests)GroupEmailTemplates,CreateTemplateForm,EmailTemplateEditor(120 tests)🤖 Generated with Claude Code