Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make email templates in the admin notifications for the platform translatable #5182

Closed
2 tasks
Tracked by #5521 ...
teolemon opened this issue Apr 28, 2021 · 3 comments
Closed
2 tasks
Tracked by #5521 ...
Labels
📨 Emails ✨ Feature Features or enhancements to Open Food Facts server 🎯 P1 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it. Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. untranslatable strings

Comments

@teolemon
Copy link
Member

teolemon commented Apr 28, 2021

What

  • Adding multilingual (at least English) support for followup emails
  • Make email templates in the admin notifications for the platform translatable and send the English version if lang≠fr

Why

  • It will save valuable time for admins to handle international requests.

Part of

Screenshot

image

Code pointer

my $mailto_body = URI::Escape::XS::encodeURIComponent(<<TEXT

@teolemon teolemon added ✨ Feature Features or enhancements to Open Food Facts server 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers labels Apr 28, 2021
@stephanegigandet
Copy link
Contributor

@teolemon so currently those mails are in templates:

e.g. https://github.com/openfoodfacts/openfoodfacts-server/blob/main/templates/emails/user_new_pro_account.tt.txt

How do you want to do handle the translations?

Option 1:

we create files in /templates/emails/ :+1:

user_new_pro_account.tt.en.txt
user_new_pro_account.tt.fr.txt

And either those files are updated manually, or the translations are managed through Crowdin.

Option 2:

we put the emails templates out of the /templates/email dir and we put them in common.pot (or email.pot)

Same question for the welcome email when a user creates an account on OFF (normal account or pro account)

@stephanegigandet
Copy link
Contributor

Note: some email templates are HTML email templates, so we would need to make sure that the translation method does not break the HTML code.

e.g. https://github.com/openfoodfacts/openfoodfacts-server/blob/main/templates/emails/user_new_pro_account_admin_notification.tt.html

@github-actions github-actions bot added the ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it. label Aug 19, 2021
@openfoodfacts openfoodfacts deleted a comment from github-actions bot Oct 7, 2021
@aakankshabhende
Copy link

I would like to work on this issue @teolemon

@teolemon teolemon added the Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. label Oct 31, 2022
@manon-corneille manon-corneille closed this as not planned Won't fix, can't repro, duplicate, stale Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📨 Emails ✨ Feature Features or enhancements to Open Food Facts server 🎯 P1 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it. Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. untranslatable strings
Projects
Status: Done
Status: Done
Development

No branches or pull requests

4 participants