From ff192935d8f1fb91e8a04ce48e701dbe31d70dd0 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Fri, 27 Dec 2013 10:04:08 -0500 Subject: [PATCH] Removing JS gettext() in favor of server-side substitution. [LMS-1680] --- cms/templates/asset_index.html | 13 ++++---- cms/templates/textbooks.html | 2 +- lms/envs/common.py | 2 +- lms/templates/help_modal.html | 42 ++++++++++++------------- lms/templates/login.html | 2 +- lms/templates/manage_user_standing.html | 2 +- lms/templates/register-shib.html | 4 +-- lms/templates/register.html | 4 +-- 8 files changed, 36 insertions(+), 35 deletions(-) diff --git a/cms/templates/asset_index.html b/cms/templates/asset_index.html index 0f4a3660a5..8b96881f70 100644 --- a/cms/templates/asset_index.html +++ b/cms/templates/asset_index.html @@ -18,13 +18,14 @@ <%block name="jsextra"> diff --git a/lms/templates/manage_user_standing.html b/lms/templates/manage_user_standing.html index 19bc63d667..2e894ccc8b 100644 --- a/lms/templates/manage_user_standing.html +++ b/lms/templates/manage_user_standing.html @@ -42,7 +42,7 @@ $(function() { var form = $("#disable-form"); $("#submit-form").click(function(){ - $("#account-change-status").html(gettext("working...")); + $("#account-change-status").text("${_('working...')}"); $.ajax({ type: "POST", url: form.attr('action'), diff --git a/lms/templates/register-shib.html b/lms/templates/register-shib.html index ecfc8a60b5..27f24d2143 100644 --- a/lms/templates/register-shib.html +++ b/lms/templates/register-shib.html @@ -70,13 +70,13 @@ $submitButton. removeClass('is-disabled'). removeProp('disabled'). - html("${_('Update my {platform_name} Account').format(platform_name=settings.PLATFORM_NAME)}"); + text("${_('Update my {platform_name} Account').format(platform_name=settings.PLATFORM_NAME)}"); } else { $submitButton. addClass('is-disabled'). prop('disabled', true). - html(gettext('Processing your account information …')); + text("${_(u'Processing your account information …')}"); } } diff --git a/lms/templates/register.html b/lms/templates/register.html index 240deb4e20..ce054725f8 100644 --- a/lms/templates/register.html +++ b/lms/templates/register.html @@ -76,13 +76,13 @@ $submitButton. removeClass('is-disabled'). removeProp('disabled'). - html("${_('Create My {platform_name} Account').format(platform_name=settings.PLATFORM_NAME)}"); + text("${_('Create My {platform_name} Account').format(platform_name=settings.PLATFORM_NAME)}"); } else { $submitButton. addClass('is-disabled'). prop('disabled', true). - html(gettext('Processing your account information …')); + text("${_(u'Processing your account information…')}"); } }