From 7b86da02f792e8f7b499e1fd955d8c57300fbefb Mon Sep 17 00:00:00 2001 From: Douglas Hall Date: Wed, 22 Jun 2016 11:49:49 -0400 Subject: [PATCH] Check theme overrides when retrieving platform name from settings --- lms/templates/emails/activation_email.txt | 9 ++++++--- lms/templates/emails/activation_email_subject.txt | 5 ++++- lms/templates/emails/email_change.txt | 10 ++++++++-- lms/templates/emails/email_change_subject.txt | 5 ++++- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/lms/templates/emails/activation_email.txt b/lms/templates/emails/activation_email.txt index 56a49702b6..a697fada1a 100644 --- a/lms/templates/emails/activation_email.txt +++ b/lms/templates/emails/activation_email.txt @@ -1,10 +1,13 @@ <%! from django.utils.translation import ugettext as _ %> -${_("Thank you for signing up for {platform_name}.").format(platform_name=settings.PLATFORM_NAME)} +<%! from openedx.core.djangoapps.theming.helpers import get_value as get_themed_value %> +${_("Thank you for signing up for {platform_name}.").format( + platform_name=get_themed_value('PLATFORM_NAME', settings.PLATFORM_NAME) +)} ${_("Change your life and start learning today by activating your " "{platform_name} account. Click on the link below or copy and " "paste it into your browser's address bar.").format( - platform_name=settings.PLATFORM_NAME + platform_name=get_themed_value('PLATFORM_NAME', settings.PLATFORM_NAME) )} % if is_secure: @@ -15,4 +18,4 @@ ${_("Change your life and start learning today by activating your " ${_("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; " "if you require assistance, check the help section of the " - "{platform_name} website.").format(platform_name=settings.PLATFORM_NAME)} + "{platform_name} website.").format(platform_name=get_themed_value('PLATFORM_NAME', settings.PLATFORM_NAME))} diff --git a/lms/templates/emails/activation_email_subject.txt b/lms/templates/emails/activation_email_subject.txt index 01514b5f4f..8fb64f9abc 100644 --- a/lms/templates/emails/activation_email_subject.txt +++ b/lms/templates/emails/activation_email_subject.txt @@ -1,3 +1,6 @@ <%! from django.utils.translation import ugettext as _ %> +<%! from openedx.core.djangoapps.theming.helpers import get_value as get_themed_value %> -${_("Activate Your {platform_name} Account").format(platform_name=settings.PLATFORM_NAME)} +${_("Activate Your {platform_name} Account").format( + platform_name=get_themed_value('PLATFORM_NAME', settings.PLATFORM_NAME +))} diff --git a/lms/templates/emails/email_change.txt b/lms/templates/emails/email_change.txt index 79f8929f99..618320fb49 100644 --- a/lms/templates/emails/email_change.txt +++ b/lms/templates/emails/email_change.txt @@ -1,8 +1,14 @@ <%! from django.utils.translation import ugettext as _ %> +<%! from openedx.core.djangoapps.theming.helpers import get_value as get_themed_value %> ${_("We received a request to change the e-mail associated with your " "{platform_name} account from {old_email} to {new_email}. " "If this is correct, please confirm your new e-mail address by " - "visiting:").format(platform_name=settings.PLATFORM_NAME, old_email=old_email, new_email=new_email)} + "visiting:").format( + platform_name=get_themed_value('PLATFORM_NAME', settings.PLATFORM_NAME), + old_email=old_email, + new_email=new_email + ) +} % if is_secure: https://${ site }/email_confirm/${ key } @@ -13,4 +19,4 @@ ${_("We received a request to change the e-mail associated with your " ${_("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; " "if you require assistance, check the help section of the " - "{platform_name} web site.").format(platform_name=settings.PLATFORM_NAME)} + "{platform_name} web site.").format(platform_name=get_themed_value('PLATFORM_NAME', settings.PLATFORM_NAME))} diff --git a/lms/templates/emails/email_change_subject.txt b/lms/templates/emails/email_change_subject.txt index 7c9e3fb400..acc114bb98 100644 --- a/lms/templates/emails/email_change_subject.txt +++ b/lms/templates/emails/email_change_subject.txt @@ -1,2 +1,5 @@ <%! from django.utils.translation import ugettext as _ %> -${_("Request to change {platform_name} account e-mail").format(platform_name=settings.PLATFORM_NAME)} +<%! from openedx.core.djangoapps.theming.helpers import get_value as get_themed_value %> +${_("Request to change {platform_name} account e-mail").format( + platform_name=get_themed_value('PLATFORM_NAME', settings.PLATFORM_NAME) +)}