From 7366d2b1a26bf5eac65a82da6a4ad2a7f495b403 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Thu, 18 Dec 2014 13:38:15 -0500 Subject: [PATCH 1/4] Replace "edX Studio" with "{studio_name}" For theming and internationalization --- cms/envs/common.py | 2 +- cms/templates/500.html | 10 ++-- cms/templates/activation_active.html | 10 ++-- cms/templates/activation_complete.html | 8 +-- cms/templates/activation_invalid.html | 5 +- cms/templates/asset_index.html | 2 +- cms/templates/base.html | 2 +- cms/templates/checklists.html | 2 +- cms/templates/emails/activation_email.txt | 4 +- .../emails/activation_email_subject.txt | 2 +- .../emails/course_creator_admin_subject.txt | 4 +- .../course_creator_admin_user_pending.txt | 4 +- .../emails/course_creator_denied.txt | 4 +- .../emails/course_creator_granted.txt | 11 ++-- .../emails/course_creator_revoked.txt | 4 +- .../emails/course_creator_subject.txt | 2 +- cms/templates/error.html | 6 ++- cms/templates/export.html | 8 ++- cms/templates/howitworks.html | 38 +++++++------ cms/templates/import.html | 2 +- cms/templates/index.html | 53 +++++++++++-------- cms/templates/login.html | 10 ++-- cms/templates/manage_users.html | 2 +- cms/templates/register.html | 22 ++++---- cms/templates/settings.html | 2 +- cms/templates/settings_advanced.html | 2 +- cms/templates/temp-course-landing.html | 4 +- cms/templates/widgets/header.html | 3 +- cms/templates/widgets/sock.html | 20 +++---- 29 files changed, 142 insertions(+), 106 deletions(-) diff --git a/cms/envs/common.py b/cms/envs/common.py index 4df4e08f00..6050e4e853 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -41,7 +41,7 @@ from dealer.git import git from xmodule.modulestore.edit_info import EditInfoMixin ############################ FEATURE CONFIGURATION ############################# - +STUDIO_NAME = "{platform_name} Studio".format(platform_name=PLATFORM_NAME) FEATURES = { 'USE_DJANGO_PIPELINE': True, diff --git a/cms/templates/500.html b/cms/templates/500.html index 8a336bef53..6cffdd40a7 100644 --- a/cms/templates/500.html +++ b/cms/templates/500.html @@ -1,17 +1,21 @@ <%! from django.utils.translation import ugettext as _ %> <%inherit file="base.html" /> -<%block name="title">${_("Studio Server Error")} +<%block name="title">${_("{studio_name} Server Error").format(studio_name=settings.STUDIO_NAME)} <%block name="bodyclass">view-util util-500 <%block name="content">
-

${_("The Studio servers encountered an error")}

+

+ ${_("The {studio_name} servers encountered an error").format( + studio_name="{studio_name}".format(studio_name=settings.STUDIO_NAME) + )} +

- ${_("An error occurred in Studio and the page could not be loaded. Please try again in a few moments.")} + ${_("An error occurred in {studio_name} and the page could not be loaded. Please try again in a few moments.").format(studio_name=settings.STUDIO_NAME)} ${_("We've logged the error and our staff is currently working to resolve this error as soon as possible.")} ${_('If the problem persists, please email us at {email_link}.').format( email_link=u'{email_address}'.format( diff --git a/cms/templates/activation_active.html b/cms/templates/activation_active.html index d7133062de..0882271a9f 100644 --- a/cms/templates/activation_active.html +++ b/cms/templates/activation_active.html @@ -4,7 +4,9 @@ <%block name="content">

-

${_("Studio Account Activation")}

+

+ ${_("{studio_name} Account Activation").format(studio_name=settings.STUDIO_NAME)} +

@@ -17,13 +19,15 @@

${_("Your account is already active")}

-

${_("This account, set up using {0}, has already been activated. Please sign in to start working within edX Studio.".format(user.email))}

+

${_("This account, set up using {email}, has already been activated. Please sign in to start working within {studio_name}.".format(email=user.email, studio_name=settings.STUDIO_NAME))}

diff --git a/cms/templates/activation_complete.html b/cms/templates/activation_complete.html index 27efbdc34f..e2dbad0a3d 100644 --- a/cms/templates/activation_complete.html +++ b/cms/templates/activation_complete.html @@ -4,7 +4,7 @@ <%block name="content">
-

${_("Studio Account Activation")}

+

${_("{studio_name} Account Activation").format(studio_name=settings.STUDIO_NAME)}

@@ -17,13 +17,15 @@

${_("Your account activation is complete!")}

-

${_("Thank you for activating your account. You may now sign in and start using edX Studio to author courses.")}

+

${_("Thank you for activating your account. You may now sign in and start using {studio_name} to author courses.").format(studio_name=settings.STUDIO_NAME)}

diff --git a/cms/templates/activation_invalid.html b/cms/templates/activation_invalid.html index d50ed51db4..3c3d345732 100644 --- a/cms/templates/activation_invalid.html +++ b/cms/templates/activation_invalid.html @@ -4,7 +4,7 @@ <%block name="content">
-

${_("Studio Account Activation")}

+

${_("{studio_name} Account Activation").format(studio_name=settings.STUDIO_NAME)}

@@ -18,7 +18,8 @@

${_("Your account activation is invalid")}

${_("We're sorry. Something went wrong with your activation. Check to make sure the URL you went to was correct — e-mail programs will sometimes split it into two lines.")}

-

${_("If you still have issues, contact edX Support. In the meantime, you can also return to {link_start}the Studio homepage.{link_end}").format( +

${_("If you still have issues, contact {platform_name} Support. In the meantime, you can also return to {link_start}the {studio_name} homepage.{link_end}").format( + platform_name=settings.PLATFORM_NAME, studio_name=settings.STUDIO_NAME, link_start='', link_end="" )}

diff --git a/cms/templates/asset_index.html b/cms/templates/asset_index.html index 1c10d1131c..ec08800c12 100644 --- a/cms/templates/asset_index.html +++ b/cms/templates/asset_index.html @@ -63,7 +63,7 @@

${_("To add files to use in your course, click {em_start}Upload New File{em_end}. Then follow the prompts to upload a file from your computer.").format(em_start='', em_end="")}

-

${_("{em_start}Caution{em_end}: edX recommends that you limit the file size to {em_start}10 MB{em_end}. In addition, do not upload video or audio files. You should use a third party service to host multimedia files.").format(em_start='', em_end="")}

+

${_("{em_start}Caution{em_end}: {platform_name} recommends that you limit the file size to {em_start}10 MB{em_end}. In addition, do not upload video or audio files. You should use a third party service to host multimedia files.").format(em_start='', em_end="", platform_name=settings.PLATFORM_NAME)}

${_("The course image, textbook chapters, and files that appear on your Course Handouts sidebar also appear in this list.")}

diff --git a/cms/templates/base.html b/cms/templates/base.html index 8a8a70c0de..d02d85fb0e 100644 --- a/cms/templates/base.html +++ b/cms/templates/base.html @@ -22,7 +22,7 @@ <% ctx_loc = context_course.location %> ${context_course.display_name_with_default | h} | % endif - edX Studio + ${settings.STUDIO_NAME} diff --git a/cms/templates/checklists.html b/cms/templates/checklists.html index 1c95dd7b22..e721c63429 100644 --- a/cms/templates/checklists.html +++ b/cms/templates/checklists.html @@ -54,7 +54,7 @@
-

${_("Studio checklists")}

+

${_("{studio_name} checklists").format(studio_name=settings.STUDIO_NAME)}

@@ -87,7 +89,9 @@