Skip to content

Backend translations: make emails translatable #7368

@aapeliv

Description

@aapeliv

Right now emails are hardcoded in .mjml files here: https://github.com/Couchers-org/couchers/tree/develop/app/backend/templates/v2

We should update these so that we can translate them.

I think the way to do it is to take each individual string and replace it with a string key, e.g.

<mj-text>You have successfully deleted your account from Couchers.org.</mj-text>

replace You have successfully deleted your account from Couchers.org. with something like {{ email_account_deletion_complete.success_message }}, and extracting the actual string into en.json.

This will require some thinking for parts that interpolate strings. That bit will require being careful with string injection (the emails don't necessarily do this correctly everywhere at the moment).

(I also suggest employing an LLM.)

Metadata

Metadata

Labels

1.topic backendThis issue relates to the python backend

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions