After changing the text to Spanish I restarted LMS, CMS and workers.
It works until I run any of the following:
tutor images build openedx # or tutor local restart # after a code update
At that point the container is rebuilt with the original templates from GitHub and my edits are lost, so the e-mail reverts to English.
My questions
What is the recommended way to override these templates so the change survives every tutor images build openedx?
Comprehensive theme?
Tutor plugin with patches/edx-platform/...?
Copying under $TUTOR_ROOT/env/build/openedx/edx-platform/...?
Once the files are in the correct place, which commands should I run (assets build, collectstatic, restart, etc.) to make sure LMS and workers pick up the new version?
Do I need to duplicate both body.html and body.txt, or is overriding only the HTML file enough?
Any advice or step-by-step checklist would be greatly appreciated. Thanks!
What you are experiencing with tutor images build openedx overwriting your changes is the expected behaviour, when this command is run it will recreate the containers with the content from edx-platform
To have your changes persist I expect the most reliable method to be adding the changed templates into your theme.
as an illustrative example using the indigo theme, if I wanted to modify the text of openedx/core/djangoapps/user_authn/templates/user_authn/edx_ace/passwordreset/email/body.html then I’ll create my modified copy in my indigo theme at /home/tutor/.local/share/tutor/env/build/openedx/themes/indigo/lms/templates/user_authn/edx_ace/passwordreset/email/body.html
followed by rebuilding the images with tutor images build openedx and a restart with tutor local stop && tutor local start -d
sometimes there can be caching issues with rebuilding, so I typically add the --no-cache switch to the build command, like tutor images build openedx --no-cache
Copied my Spanish versions of body.html and body.txt into ~/.local/share/tutor/env/build/openedx/themes/indigo/lms/templates/student/edx_ace/accountactivation/email/
Ran tutor images build openedx --no-cache
Launched the environment with tutor local launch
Despite all that, the activation emails are still in English. I’m not using the Indigo plugin—this is a fully custom theme. Any other ideas why my overrides aren’t being picked up?
Whenever you run tutor local launch or tutor config save, the env directory is refreshed. This causes your theme at ~/.local/share/tutor/env/build/openedx/themes/ to reset to the default. To make custom changes, create your own theme and modify it as needed. You can refer to the official documentation for Indigo theme customization.