Yash/email templates bilingual #88
Merged
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.
TLDR: Added the remaining email templates + the translations for the french versions. All of the emails are now sent at the right places EXCEPT we need to finish the flow for when a volunteer accepts a time proposed by the participant and send an email to the volunteer and to the participant here. Each email template is 200+ lines of html which is why its so long :(
Summary
This PR implements a complete bilingual email system with automated sending at key points in the user workflow. The system supports both English and French, with automatic language detection from user preferences and timezone-aware scheduling notifications.
Changes
1. Bilingual Email Template System (Commit 1)
Template Infrastructure:
base/,source/,compiled/,text/PreservingUndefinedclass to preserve{{}}syntax for AWS SES variable replacementupdate_ses_templates.pyto compile.j2source files to HTMLEmail Templates (7 types × 2 languages = 14 templates):
Email Service Updates:
SESEmailServiceto support language parameter for all email methods[email protected]) and FR ([email protected])2. Automated Email Sending (Commit 2)
Email Triggers Implemented:
Intake Form Confirmation (
intake.py:273-286)Password Reset (
auth_service.py:50-102)Matches Available - Volunteer (
match_service.py:99-121)Matches Available - Participant (
match_service.py:556-575)Call Scheduled - Both Users (
match_service.py:284-356)get_timezone_from_abbreviation()utility to convert Canadian timezone abbreviationsParticipant Requested New Times (
match_service.py:417-444)Technical Implementation:
Languageenum: "en" or "fr"), defaults to English__init__.pyfiles toapp/utilities/andapp/utilities/ses/for proper IDE import resolutionTesting Considerations
http://localhost:3000(production URLs to be configured via environment variables later)Future Work
FRONTEND_URLenvironment variable for production deploymentNotion ticket link
Ticket Name
Implementation description
Steps to test
What should reviewers focus on?
Checklist