diff --git a/cms/envs/common.py b/cms/envs/common.py index 4df4e08f00..6b044d388d 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -41,7 +41,12 @@ from dealer.git import git from xmodule.modulestore.edit_info import EditInfoMixin ############################ FEATURE CONFIGURATION ############################# - +STUDIO_SHORT_NAME = "Studio" +STUDIO_NAME = "{platform_name} {short_name}".format( + platform_name=PLATFORM_NAME, short_name=STUDIO_SHORT_NAME, +) +# Note that if you redefine STUDIO_SHORT_NAME in another settings file, +# you'll also need to redefine STUDIO_NAME -- it won't automatically inherit. FEATURES = { 'USE_DJANGO_PIPELINE': True, diff --git a/cms/static/js/sock.js b/cms/static/js/sock.js index 0d8af7c0d0..9e5b30d7f1 100644 --- a/cms/static/js/sock.js +++ b/cms/static/js/sock.js @@ -3,12 +3,22 @@ require(["domReady", "jquery", "jquery.smoothScroll"], var toggleSock = function (e) { e.preventDefault(); - var $btnLabel = $(this).find('.copy'); + var $btnShowSockLabel = $(this).find('.copy-show'); + var $btnHideSockLabel = $(this).find('.copy-hide'); var $sock = $('.wrapper-sock'); var $sockContent = $sock.find('.wrapper-inner'); - $sock.toggleClass('is-shown'); - $sockContent.toggle('fast'); + if ($sock.hasClass('is-shown')) { + $sock.removeClass('is-shown'); + $sockContent.hide('fast'); + $btnHideSockLabel.removeClass("is-shown").addClass("is-hidden"); + $btnShowSockLabel.removeClass("is-hidden").addClass("is-shown"); + } else { + $sock.addClass('is-shown'); + $sockContent.show('fast'); + $btnHideSockLabel.removeClass("is-hidden").addClass("is-shown"); + $btnShowSockLabel.removeClass("is-shown").addClass("is-hidden"); + } $.smoothScroll({ offset: -200, @@ -17,12 +27,6 @@ require(["domReady", "jquery", "jquery.smoothScroll"], scrollElement: null, scrollTarget: $sock }); - - if ($sock.hasClass('is-shown')) { - $btnLabel.text(gettext('Hide Studio Help')); - } else { - $btnLabel.text(gettext('Looking for Help with Studio?')); - } }; domReady(function () { diff --git a/cms/templates/500.html b/cms/templates/500.html index 8a336bef53..bdf94a2285 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_SHORT_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_SHORT_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_SHORT_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..0ddeb185f9 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_SHORT_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..135f15764d 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_SHORT_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..585293e75b 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_SHORT_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..db59bd7e2a 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_SHORT_NAME)}

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