Skip to content
This repository has been archived by the owner on Mar 11, 2023. It is now read-only.

Translation of emails template from subscription app. #53

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fernandogrd
Copy link
Member

Review needed.

@fsouza
Copy link
Contributor

fsouza commented Jun 5, 2012

Not sure yet if it will work as is, I need to check.

+@tatiana

@tatiana
Copy link
Member

tatiana commented Jun 25, 2012

Thanks, @fernandogrd! We still need to provide support to emails i18n. Recording the user's local preference might be an alternative... Any thoughts, @fsouza?

@fernandogrd
Copy link
Member Author

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.

@fernandogrd
Copy link
Member Author

s/ContextRequest/RequestContext/

@fsouza
Copy link
Contributor

fsouza commented Jun 26, 2012

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.

@fernandogrd
Copy link
Member Author

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.

@fsouza
Copy link
Contributor

fsouza commented Jun 27, 2012

when the user log in or every time he changes the page language?

Not sure yet what is the best approach.

@fernandogrd
Copy link
Member Author

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.

@tatiana
Copy link
Member

tatiana commented Jun 27, 2012

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants