-
Notifications
You must be signed in to change notification settings - Fork 18
Translation of emails template from subscription app. #53
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Fernando Rocha <[email protected]>
Signed-off-by: Fernando Rocha <[email protected]>
Not sure yet if it will work as is, I need to check. |
Thanks, @fernandogrd! We still need to provide support to emails i18n. Recording the user's local preference might be an alternative... Any thoughts, @fsouza? |
In my manual local tests, it works 'out of the box'. If I choose English in menu and access a view that sends e-mail. I receive it in English, If I choose Portuguese in menu, I receive it in Portuguese. I don't know how it works, but I did nothing, nor passing ContextRequest, or using the translation api. |
s/ContextRequest/RequestContext/ |
The point is that this request does not come from a user, but from PagSeguro. We would need to store the user preference about the page language, so when PagSeguro sends a notification to us we know which language to use. |
Hum, I see now. What would be best? I thought about a field in AccountProfile to be updated when user log-in (via signal), using the current idiom, the one identified by Django. This would be transparent for the user and will keep things working as it is now. Other option is give user more control, showing preference in user panel and always respect it, eg: Change to user defined idiom at login, even if current idiom (identified by django) is other. |
when the user log in or every time he changes the page language? Not sure yet what is the best approach. |
I think maybe is just better to store the language only when user start the process of subscription. Every login seems a waste of resources.. and the system works well as it is. |
@fernandogrd but what would happen if at that exact moment the user weren't using his/her prefered locale? Perhaps @fsouza proposal of changing when the language choice changes is better. |
Review needed.