-
Notifications
You must be signed in to change notification settings - Fork 0
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
Multi language Email issues #357
Comments
openfoodfoundation/openfoodnetwork#3043 was an s3. I keep this one in s3. Specially for the first two cases where "forgot password" and "order shipped" emails are still being sent in English :-/ |
point 2 here has been addressed in openfoodfoundation/openfoodnetwork#5763 ✔️ |
@luisramos0 @sauloperez is point one doable now? Or do we still rely on devise? |
The email is in devise but it was always doable, we just need to override it on our side. BTW, most of these are easy, we could break this epic in smaller issues and tag then good-first-issues. |
Ok issue created here : openfoodfoundation/openfoodnetwork#6007 @luisramos0 @sauloperez I'm unsure how to reproduce the other cases:
Is it correct I need to try those for a user that is in a different locale than me? I'm guessing this needs a redesign on how we are assigning a locale to a user? |
The user locale is the last locale the user was on on their lastest logged in session. I think we are fine here.
Let me know if this is useful or if you have any questions. |
Follow up from openfoodfoundation/openfoodnetwork#3189, there are currently 6 different issues with multi language emails, this epic represents those issues. When the work is started, we can create individual issues. Some solutions are still not defined, here's a summary of my analysis:
This wiki page summaries all emails: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Emails
1. Forgotten password email (case 3 in the wiki)
The email is always sent in English. This is done in devise (a dependency of spree).
Additionally, the email itself is not styled, so we may also need to redo the email template.
2. Order shipped email (case 7 in the wiki)
The email is always sent in English. This is done in spree.
Additionally, the email itself is not styled, so we may also need to redo the email template).
To replicate this one you need to go to the bulk order management page and before you see the ship button you need to capture payment.
3. Enterprise manager (new account) invitation email and sign up email (case 11.1 and 11.2 in the wiki)
There's no way to know whats the new user locale, the best option here is to user current user locale.
4. Subscription confirmation email I (case 13 in the wiki) and then all subs emails (case 14-20)
When creating a subscription for a new customer there's no way of knowing the customer locale. Again, the best option is to use the current user locale. I am not sure but in this case, I think there will be no user created so there will be no place to store the locale.
5. Order created in the backoffice (not described in wiki)
Same as in subscriptions, when we create an order in the backoffice for a new customer that has never logged in, there's no way to know what the user locale is. Best option is to use current user locale. I am not sure a user record is created in this case...
6. GUEST user checkout emails
Guest user is not registered in the DB so there is no place to store the user locale (I thought of using the session locale but the email is sent on delayedJob which is a different process without access to the session locale).
@maikel commented: “I think the clearest way to use Delayed Job is to create custom jobs for whatever we want to delay. These jobs can store the current locale of the guest and use it for sending the email.“
In these 3 last cases of 1. guest user checkout, 2. order created in the backoffice and 3. subscriptions with new customer, the same problem applies to all order emails (resend confirmation in the backoffice, order cancelation, invoice, etc). All these emails need to be in the user locale, but in some cases, there is no user record to store the locale. This needs to be investigated.
Issue list
The text was updated successfully, but these errors were encountered: