Commit c79ddd73 by David Baumgold

Merge pull request #3048 from louyihua/master

Make emails in lms translatable
parents 2cb94d82 0316f3b7
...@@ -9,3 +9,5 @@ input_encoding = utf-8 ...@@ -9,3 +9,5 @@ input_encoding = utf-8
input_encoding = utf-8 input_encoding = utf-8
[mako: cms/templates/emails/**.txt] [mako: cms/templates/emails/**.txt]
input_encoding = utf-8 input_encoding = utf-8
[mako: lms/templates/emails/**.txt]
input_encoding = utf-8
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%! from django.utils.translation import ugettext as _ %>
<%namespace file="../main.html" import="stanford_theme_enabled" /> <%namespace file="../main.html" import="stanford_theme_enabled" />
## Again, ugly hack that needs to be changed ## Again, ugly hack that needs to be changed
## TODO: this probably needs better formatting to look nice in an ## TODO: this probably needs better formatting to look nice in an
## email client (Mako leaves awkward whitespace) ## email client (Mako leaves awkward whitespace)
% if stanford_theme_enabled(): % if stanford_theme_enabled():
This is to confirm that you changed the e-mail associated with ${_("This is to confirm that you changed the e-mail associated with "
${settings.PLATFORM_NAME} from ${old_email} to ${new_email}. If you "{platform_name} from {old_email} to {new_email}. If you "
did not make this request, please contact us at "did not make this request, please contact us at").format(platform_name=settings.PLATFORM_NAME, old_email=old_email, new_email=new_email)}
${settings.CONTACT_EMAIL} ${settings.CONTACT_EMAIL}
% else: % else:
This is to confirm that you changed the e-mail associated with ${_("This is to confirm that you changed the e-mail associated with "
${settings.PLATFORM_NAME} from ${old_email} to ${new_email}. If you "{platform_name} from {old_email} to {new_email}. If you "
did not make this request, please contact us immediately. Contact "did not make this request, please contact us immediately. Contact "
information is listed at: "information is listed at:").format(platform_name=settings.PLATFORM_NAME, old_email=old_email, new_email=new_email)}
% if is_secure: % if is_secure:
https://${ site }${reverse('contact')} https://${ site }${reverse('contact')}
...@@ -22,5 +23,5 @@ ...@@ -22,5 +23,5 @@
% endif % endif
% endif % endif
We keep a log of old e-mails, so if this request was unintentional, we ${_("We keep a log of old e-mails, so if this request was unintentional, we "
can investigate. "can investigate.")}
<%! from django.utils.translation import ugettext as _ %>
<%namespace file="../main.html" import="stanford_theme_enabled" /> <%namespace file="../main.html" import="stanford_theme_enabled" />
We received a request to change the e-mail associated with your ${_("We received a request to change the e-mail associated with your "
${settings.PLATFORM_NAME} account from ${old_email} to ${new_email}. "{platform_name} account from {old_email} to {new_email}. "
If this is correct, please confirm your new e-mail address by "If this is correct, please confirm your new e-mail address by "
visiting: "visiting:").format(platform_name=settings.PLATFORM_NAME, old_email=old_email, new_email=new_email)}
% if is_secure: % if is_secure:
https://${ site }/email_confirm/${ key } https://${ site }/email_confirm/${ key }
...@@ -12,13 +13,13 @@ visiting: ...@@ -12,13 +13,13 @@ visiting:
## TODO: fix this ugly hack ## TODO: fix this ugly hack
% if stanford_theme_enabled(): % if stanford_theme_enabled():
If you didn't request this, you don't need to do anything; you won't ${_("If you didn't request this, you don't need to do anything; you won't "
receive any more email from us. Please do not reply to this e-mail; "receive any more email from us. Please do not reply to this e-mail; "
if you require assistance, check the about section of the "if you require assistance, check the about section of the "
${settings.PLATFORM_NAME} Courses web site. "{platform_name} Courses web site.").format(platform_name=settings.PLATFORM_NAME)}
% else: % else:
If you didn't request this, you don't need to do anything; you won't ${_("If you didn't request this, you don't need to do anything; you won't "
receive any more email from us. Please do not reply to this e-mail; "receive any more email from us. Please do not reply to this e-mail; "
if you require assistance, check the help section of the "if you require assistance, check the help section of the "
${settings.PLATFORM_NAME} web site. "{platform_name} web site.").format(platform_name=settings.PLATFORM_NAME)}
% endif % endif
Request to change ${settings.PLATFORM_NAME} account e-mail <%! from django.utils.translation import ugettext as _ %>
${_("Request to change {platform_name} account e-mail").format(platform_name=settings.PLATFORM_NAME)}
<%! from django.utils.translation import ugettext as _ %>
<%namespace file="../main.html" import="stanford_theme_enabled" /> <%namespace file="../main.html" import="stanford_theme_enabled" />
(Not currently used) (Not currently used)
## TODO: fix this ugly hack ## TODO: fix this ugly hack
% if stanford_theme_enabled(): % if stanford_theme_enabled():
We are sorry. Our course staff did not approve your request to change ${_("We are sorry. Our course staff did not approve your request to change "
your name from ${old_name} to ${new_name}. If you need further "your name from {old_name} to {new_name}. If you need further "
assistance, please e-mail the tech support at "assistance, please e-mail the tech support at").format(old_name=old_name, new_name=new_name)}
${settings.TECH_SUPPORT_EMAIL}. ${settings.TECH_SUPPORT_EMAIL}.
% else: % else:
We are sorry. Our course staff did not approve your request to change ${_("We are sorry. Our course staff did not approve your request to change "
your name from ${old_name} to ${new_name}. If you need further "your name from {old_name} to {new_name}. If you need further "
assistance, please e-mail the course staff at ta@edx.org. "assistance, please e-mail the course staff at ta@edx.org.").format(old_name=old_name, new_name=new_name)}
% endif % endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment