Skip to content

Make confirmation email for Welsh bi-lingual#2083

Merged
chao-xian merged 5 commits into
mainfrom
welsh-confirmation
May 13, 2026
Merged

Make confirmation email for Welsh bi-lingual#2083
chao-xian merged 5 commits into
mainfrom
welsh-confirmation

Conversation

@chao-xian
Copy link
Copy Markdown
Contributor

What problem does this pull request solve?

When a user answers Welsh questions, the confirmation email now uses a bilingual Notify template. The mailer passes both English and Welsh personalisation variables (_cy variants for submission_date, what_happens_next_text, and support_contact_details) so each language section of the template receives the correct content. Template selection is driven by the explicit submission_locale parameter rather than the ambient I18n locale.

Trello card: https://trello.com/c/NLqWmwvf/2894-update-confirmation-emails-to-cater-for-new-welsh-form-submissions

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

@chao-xian chao-xian force-pushed the welsh-confirmation branch from 3e1b95c to 550abf4 Compare May 7, 2026 16:14
Copy link
Copy Markdown
Contributor

@stephencdaly stephencdaly left a comment

Choose a reason for hiding this comment

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

Changes look good, we just need to make sure we're passing in the Welsh support details like we're passing in the Welsh "what happens next"

Comment thread spec/mailers/form_submission_confirmation_mailer_spec.rb Outdated
Comment thread app/mailers/form_submission_confirmation_mailer.rb Outdated
Comment thread app/jobs/send_confirmation_email_job.rb Outdated
@chao-xian chao-xian force-pushed the welsh-confirmation branch 3 times, most recently from 8cbe7d7 to 36647bc Compare May 11, 2026 11:47
Copy link
Copy Markdown
Contributor

@stephencdaly stephencdaly left a comment

Choose a reason for hiding this comment

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

Changes do what we need. I've suggested a few improvements to the tests for the additional logic added for the Welsh support details.

Comment thread spec/jobs/send_confirmation_email_job_spec.rb
Comment thread app/jobs/send_confirmation_email_job.rb Outdated
Comment thread spec/mailers/form_submission_confirmation_mailer_spec.rb Outdated
@chao-xian chao-xian force-pushed the welsh-confirmation branch from 36647bc to 54a55e6 Compare May 13, 2026 10:00
chao-xian added 5 commits May 13, 2026 11:05
…ocale

We need to send emails that has both English and Welsh for users who answered any submission in Welsh. This means we need to explicitly pass the locale we want to use.
…Welsh

Unfortunately have to discard relying on the I18n locale as we are using two languages at this point, whereas I18n will use whatever singular locale is set.
We now need to use the bi-lingual version.
@chao-xian chao-xian force-pushed the welsh-confirmation branch from 54a55e6 to 7d37989 Compare May 13, 2026 10:05
@github-actions
Copy link
Copy Markdown
Contributor

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2083.submit.review.forms.service.gov.uk/

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

@chao-xian chao-xian added this pull request to the merge queue May 13, 2026
Merged via the queue into main with commit d3cae96 May 13, 2026
3 checks passed
@chao-xian chao-xian deleted the welsh-confirmation branch May 13, 2026 10:36
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