-

${_("Welcome, {0}!".format(user.username))}

+

${_("Welcome, {0}!").format(user.username)}

%if len(courses) > 0:
diff --git a/cms/templates/widgets/units.html b/cms/templates/widgets/units.html index 62c1fb62d7c4..4284f8be5a42 100644 --- a/cms/templates/widgets/units.html +++ b/cms/templates/widgets/units.html @@ -1,5 +1,6 @@ <%! from django.core.urlresolvers import reverse %> <%! from contentstore.utils import compute_unit_state %> +<%! from django.utils.translation import ugettext as _ %>

- ${_('Please enter your new password twice so we can verify you typed it in correctly.
' - 'Required fields are noted by bold text and an asterisk (*).')} + {% trans 'Please enter your new password twice so we can verify you typed it in correctly.
Required fields are noted by bold text and an asterisk (*).' %}

- ${_("Required Information")} + {% trans "Required Information" %}
  1. - +
  2. - +
- +
{% else %}
-

${_("Your Password Reset Was Unsuccessful")}

+

{% trans "Your Password Reset Was Unsuccessful" %}

-

${_('The password reset link was invalid, possibly because the link has already been used. Please return to the login page and start the password reset process again.')}

+

{% trans 'The password reset link was invalid, possibly because the link has already been used. Please return to the login page and start the password reset process again.' %}

{% endif %} - + Date: Wed, 14 Aug 2013 13:04:24 +0000 Subject: [PATCH 2/5] i18n email fixed --- lms/templates/emails/activation_email.txt | 15 ++++----------- .../emails/activation_email_subject.txt | 3 ++- lms/templates/emails/email_change.txt | 16 ++++------------ lms/templates/emails/email_change_subject.txt | 3 ++- 4 files changed, 12 insertions(+), 25 deletions(-) diff --git a/lms/templates/emails/activation_email.txt b/lms/templates/emails/activation_email.txt index d6716dc764fc..c11f3c6867f6 100644 --- a/lms/templates/emails/activation_email.txt +++ b/lms/templates/emails/activation_email.txt @@ -1,8 +1,7 @@ +<%! from django.utils.translation import ugettext as _ %> <%namespace file="../main.html" import="stanford_theme_enabled" /> -Thank you for signing up for ${settings.PLATFORM_NAME}! To activate -your account, please copy and paste this address into your web -browser's address bar: +${_("Thank you for signing up for %s! To activate your account, please copy and paste this address into your web browser's address bar:") % (settings.PLATFORM_NAME)} % if is_secure: https://${ site }/activate/${ key } @@ -12,13 +11,7 @@ browser's address bar: ## Temporary hack until we develop a better way to adjust language % if stanford_theme_enabled(): - 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 about section of the - ${settings.PLATFORM_NAME} Courses web site. + ${_("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 about section of the %s Courses web site.") % (settings.PLATFORM_NAME)} % else: - 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 - ${settings.PLATFORM_NAME} web site. + ${_("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 %s web site.") % (settings.PLATFORM_NAME)} % endif diff --git a/lms/templates/emails/activation_email_subject.txt b/lms/templates/emails/activation_email_subject.txt index e78a5a8dc379..f75873357009 100644 --- a/lms/templates/emails/activation_email_subject.txt +++ b/lms/templates/emails/activation_email_subject.txt @@ -1 +1,2 @@ -Your account for ${settings.PLATFORM_NAME} +<%! from django.utils.translation import ugettext as _ %> +${_("Your account for %s") % (settings.PLATFORM_NAME)} diff --git a/lms/templates/emails/email_change.txt b/lms/templates/emails/email_change.txt index bff86e8da632..46a5d698fbac 100644 --- a/lms/templates/emails/email_change.txt +++ b/lms/templates/emails/email_change.txt @@ -1,8 +1,6 @@ +<%! from django.utils.translation import ugettext as _ %> <%namespace file="../main.html" import="stanford_theme_enabled" /> -We received a request to change the e-mail associated with your -${settings.PLATFORM_NAME} account from ${old_email} to ${new_email}. -If this is correct, please confirm your new e-mail address by -visiting: +${_("We received a request to change the e-mail associated with your %s account from %s to %s. If this is correct, please confirm your new e-mail address by visiting:") % (settings.PLATFORM_NAME,old_email,new_email)} % if is_secure: https://${ site }/email_confirm/${ key } @@ -12,13 +10,7 @@ visiting: ## TODO: fix this ugly hack % if stanford_theme_enabled(): - 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 about section of the - ${settings.PLATFORM_NAME} Courses web site. + ${_("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 about section of the %s Courses web site.") % (settings.PLATFORM_NAME)} % else: - 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 - ${settings.PLATFORM_NAME} web site. + ${_("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 %s web site.") % (settings.PLATFORM_NAME)} % endif diff --git a/lms/templates/emails/email_change_subject.txt b/lms/templates/emails/email_change_subject.txt index 57fea3ed5512..ae23e41a303a 100644 --- a/lms/templates/emails/email_change_subject.txt +++ b/lms/templates/emails/email_change_subject.txt @@ -1 +1,2 @@ -Request to change ${settings.PLATFORM_NAME} account e-mail +<%! from django.utils.translation import ugettext as _ %> +${_('Request to change %s account e-mail') % (settings.PLATFORM_NAME)} From f2fb9a631f97d67181a27892f9cd0a3c0db3d7d2 Mon Sep 17 00:00:00 2001 From: Wangxiao Date: Fri, 16 Aug 2013 08:15:22 +0000 Subject: [PATCH 3/5] pw_res_cf fix --- lms/templates/registration/password_reset_confirm.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/templates/registration/password_reset_confirm.html b/lms/templates/registration/password_reset_confirm.html index c51bb2d04441..76ae3984ae43 100644 --- a/lms/templates/registration/password_reset_confirm.html +++ b/lms/templates/registration/password_reset_confirm.html @@ -129,4 +129,4 @@

{% trans "Need Help?" %}

- From 53848c7cfd653ce4534c4b80e163458f788eb32c Mon Sep 17 00:00:00 2001 From: Wangxiao Date: Tue, 20 Aug 2013 08:29:18 +0000 Subject: [PATCH 4/5] format fix --- lms/templates/emails/activation_email.txt | 6 +++--- lms/templates/emails/activation_email_subject.txt | 2 +- lms/templates/emails/email_change.txt | 6 +++--- lms/templates/emails/email_change_subject.txt | 2 +- lms/templates/forgot_password_modal.html | 2 +- lms/templates/login.html | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lms/templates/emails/activation_email.txt b/lms/templates/emails/activation_email.txt index c11f3c6867f6..c291e4f87ad4 100644 --- a/lms/templates/emails/activation_email.txt +++ b/lms/templates/emails/activation_email.txt @@ -1,7 +1,7 @@ <%! from django.utils.translation import ugettext as _ %> <%namespace file="../main.html" import="stanford_theme_enabled" /> -${_("Thank you for signing up for %s! To activate your account, please copy and paste this address into your web browser's address bar:") % (settings.PLATFORM_NAME)} +${_("Thank you for signing up for {0}! To activate your account, please copy and paste this address into your web browser's address bar:").format(settings.PLATFORM_NAME)} % if is_secure: https://${ site }/activate/${ key } @@ -11,7 +11,7 @@ ${_("Thank you for signing up for %s! To activate your account, please copy and ## Temporary hack until we develop a better way to adjust language % if stanford_theme_enabled(): - ${_("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 about section of the %s Courses web site.") % (settings.PLATFORM_NAME)} + ${_("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 about section of the {0} Courses web site.").format(settings.PLATFORM_NAME)} % else: - ${_("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 %s web site.") % (settings.PLATFORM_NAME)} + ${_("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 {0} web site.").format(settings.PLATFORM_NAME)} % endif diff --git a/lms/templates/emails/activation_email_subject.txt b/lms/templates/emails/activation_email_subject.txt index f75873357009..3679baac4fb6 100644 --- a/lms/templates/emails/activation_email_subject.txt +++ b/lms/templates/emails/activation_email_subject.txt @@ -1,2 +1,2 @@ <%! from django.utils.translation import ugettext as _ %> -${_("Your account for %s") % (settings.PLATFORM_NAME)} +${_("Your account for {0}").format(settings.PLATFORM_NAME)} diff --git a/lms/templates/emails/email_change.txt b/lms/templates/emails/email_change.txt index 46a5d698fbac..e94cb60d3c00 100644 --- a/lms/templates/emails/email_change.txt +++ b/lms/templates/emails/email_change.txt @@ -1,6 +1,6 @@ <%! from django.utils.translation import ugettext as _ %> <%namespace file="../main.html" import="stanford_theme_enabled" /> -${_("We received a request to change the e-mail associated with your %s account from %s to %s. If this is correct, please confirm your new e-mail address by visiting:") % (settings.PLATFORM_NAME,old_email,new_email)} +${_("We received a request to change the e-mail associated with your {plat} account from {old} to {new}. If this is correct, please confirm your new e-mail address by visiting:").format(plat=settings.PLATFORM_NAME,old=old_email,new=new_email)} % if is_secure: https://${ site }/email_confirm/${ key } @@ -10,7 +10,7 @@ ${_("We received a request to change the e-mail associated with your %s account ## TODO: fix this ugly hack % if stanford_theme_enabled(): - ${_("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 about section of the %s Courses web site.") % (settings.PLATFORM_NAME)} + ${_("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 about section of the {0} Courses web site.").format(settings.PLATFORM_NAME)} % else: - ${_("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 %s web site.") % (settings.PLATFORM_NAME)} + ${_("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 {0} web site.").format(settings.PLATFORM_NAME)} % endif diff --git a/lms/templates/emails/email_change_subject.txt b/lms/templates/emails/email_change_subject.txt index ae23e41a303a..004ac0ab7fee 100644 --- a/lms/templates/emails/email_change_subject.txt +++ b/lms/templates/emails/email_change_subject.txt @@ -1,2 +1,2 @@ <%! from django.utils.translation import ugettext as _ %> -${_('Request to change %s account e-mail') % (settings.PLATFORM_NAME)} +${_('Request to change {0} account e-mail').format(settings.PLATFORM_NAME)} diff --git a/lms/templates/forgot_password_modal.html b/lms/templates/forgot_password_modal.html index 9987adf62ee1..8b0b929f78de 100644 --- a/lms/templates/forgot_password_modal.html +++ b/lms/templates/forgot_password_modal.html @@ -19,7 +19,7 @@

${_("Password Reset")}

  1. - + ${_("This is the email address you used to register with {platform}").format(platform=settings.PLATFORM_NAME)}
diff --git a/lms/templates/login.html b/lms/templates/login.html index b44f4852c8d1..c0a3c0286979 100644 --- a/lms/templates/login.html +++ b/lms/templates/login.html @@ -113,7 +113,7 @@

${_("The following errors occured while logging you in
  1. - +
  2. From 3b06f87d976187b548784503454a2933edb8b6e4 Mon Sep 17 00:00:00 2001 From: Wangxiao Date: Thu, 22 Aug 2013 09:07:14 +0000 Subject: [PATCH 5/5] merge bug fixed --- .../client_templates/course_grade_policy.html | 42 +++++++++---------- .../registration/password_reset_confirm.html | 4 -- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/cms/static/client_templates/course_grade_policy.html b/cms/static/client_templates/course_grade_policy.html index 2353490fbb08..5012a67b302a 100644 --- a/cms/static/client_templates/course_grade_policy.html +++ b/cms/static/client_templates/course_grade_policy.html @@ -1,35 +1,35 @@ -
  3. -
    - - - <%= gettext("e.g. Homework, Midterm Exams") %> +
  4. +
    + + + <%= gettext("Example: Homework, Midterm Exams") %>
    -
    - - - <%= gettext("e.g. HW, Midterm") %> +
    + + + <%= gettext("Example: HW, Midterm") %>
    -
    - - - <%= gettext("e.g. 25%") %> +
    + + + <%= gettext("Example: 25%") %>
    -
    - - +
    + + <%= gettext("total exercises assigned") %>
    -
    - - - <%= gettext("total exercises that won't be graded") %> +
    + + + <%= gettext("total exercises that won't bExample:aded") %>
  5. diff --git a/lms/templates/registration/password_reset_confirm.html b/lms/templates/registration/password_reset_confirm.html index db6e3f8bcf60..e4e415fff9ae 100644 --- a/lms/templates/registration/password_reset_confirm.html +++ b/lms/templates/registration/password_reset_confirm.html @@ -1,7 +1,3 @@ -<<<<<<< HEAD -======= -{% load i18n %} ->>>>>>> master {% load compressed %} {% load i18n %} {% load staticfiles %}