diff --git a/cms/envs/aws.py b/cms/envs/aws.py index 4484aca24d4187877ff45a98af7785f0ca4111c7..6c9e2fd881b945534b7d45a3b68c4484110a9a5b 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -246,9 +246,9 @@ LOGGING = get_logger_config(LOG_DIR, service_variant=SERVICE_VARIANT) #theming start: -PLATFORM_NAME = ENV_TOKENS.get('PLATFORM_NAME', 'edX') -STUDIO_NAME = ENV_TOKENS.get('STUDIO_NAME', 'edX Studio') -STUDIO_SHORT_NAME = ENV_TOKENS.get('STUDIO_SHORT_NAME', 'Studio') +PLATFORM_NAME = ENV_TOKENS.get('PLATFORM_NAME', PLATFORM_NAME) +STUDIO_NAME = ENV_TOKENS.get('STUDIO_NAME', STUDIO_NAME) +STUDIO_SHORT_NAME = ENV_TOKENS.get('STUDIO_SHORT_NAME', STUDIO_SHORT_NAME) # Event Tracking if "TRACKING_IGNORE_URL_PATTERNS" in ENV_TOKENS: diff --git a/cms/envs/common.py b/cms/envs/common.py index 18f7068f1d6302c773a708480b327b66da877350..685184c2837b63c7aaa9c8353d3974fa97d32192 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -65,6 +65,9 @@ from lms.envs.common import ( MEDIA_ROOT, MEDIA_URL, + # Lazy Gettext + _, + # Django REST framework configuration REST_FRAMEWORK, @@ -125,8 +128,8 @@ from openedx.core.lib.license import LicenseMixin # Dummy secret key for dev/test SECRET_KEY = 'dev key' -STUDIO_NAME = "Studio" -STUDIO_SHORT_NAME = "Studio" +STUDIO_NAME = _("Your Platform Studio") +STUDIO_SHORT_NAME = _("Studio") FEATURES = { 'GITHUB_PUSH': False, diff --git a/common/djangoapps/third_party_auth/models.py b/common/djangoapps/third_party_auth/models.py index a3778e94947ff66b5d96ea50decf673994a34bf9..af3e18a551d500def9c7554f21189ea01fd4a4eb 100644 --- a/common/djangoapps/third_party_auth/models.py +++ b/common/djangoapps/third_party_auth/models.py @@ -51,14 +51,6 @@ _PSA_OAUTH2_BACKENDS = [backend_class.name for backend_class in _load_backend_cl _PSA_SAML_BACKENDS = [backend_class.name for backend_class in _load_backend_classes(SAMLAuth)] _LTI_BACKENDS = [backend_class.name for backend_class in _load_backend_classes(LTIAuthBackend)] -DEFAULT_SAML_CONTACT = { - # Default contact information to put into the SAML metadata that gets generated by python-saml. - "givenName": u"{} Support".format( - configuration_helpers.get_value('PLATFORM_NAME', settings.PLATFORM_NAME), - ), - "emailAddress": configuration_helpers.get_value('TECH_SUPPORT_EMAIL', settings.TECH_SUPPORT_EMAIL), -} - def clean_json(value, of_type): """ Simple helper method to parse and clean JSON """ @@ -576,6 +568,14 @@ class SAMLConfiguration(ConfigurationModel): def get_setting(self, name): """ Get the value of a setting, or raise KeyError """ + default_saml_contact = { + # Default contact information to put into the SAML metadata that gets generated by python-saml. + "givenName": _("{platform_name} Support").format( + platform_name=configuration_helpers.get_value('PLATFORM_NAME', settings.PLATFORM_NAME) + ), + "emailAddress": configuration_helpers.get_value('TECH_SUPPORT_EMAIL', settings.TECH_SUPPORT_EMAIL), + } + if name == "ORG_INFO": return json.loads(self.org_info_str) if name == "SP_ENTITY_ID": @@ -593,8 +593,8 @@ class SAMLConfiguration(ConfigurationModel): other_config = { # These defaults can be overriden by self.other_config_str "GET_ALL_EXTRA_DATA": True, # Save all attribute values the IdP sends into the UserSocialAuth table - "TECHNICAL_CONTACT": DEFAULT_SAML_CONTACT, - "SUPPORT_CONTACT": DEFAULT_SAML_CONTACT, + "TECHNICAL_CONTACT": default_saml_contact, + "SUPPORT_CONTACT": default_saml_contact, } other_config.update(json.loads(self.other_config_str)) return other_config[name] # SECURITY_CONFIG, SP_EXTRA, or similar extra settings diff --git a/common/test/acceptance/tests/studio/test_studio_help.py b/common/test/acceptance/tests/studio/test_studio_help.py index b21a1ef0b8ef1a06145752024803024d3028de23..f1b524e95b4a1dbcd5d8c3308798ab1dd89674ef 100644 --- a/common/test/acceptance/tests/studio/test_studio_help.py +++ b/common/test/acceptance/tests/studio/test_studio_help.py @@ -179,7 +179,7 @@ class HomeHelpTest(StudioCourseTest): Scenario: Help link in sidebar links is working on 'Home'(Courses tab) page. Given that I am on the 'Home'(Courses tab) page. And I want help about the courses - And I click the 'Getting Started with edX Studio' in the sidebar links + And I click the 'Getting Started with Your Platform Studio' in the sidebar links Then Help link should open. And help url should be correct """ @@ -190,7 +190,7 @@ class HomeHelpTest(StudioCourseTest): test=self, page=self.home_page, href=expected_url, - help_text='Getting Started with edX Studio', + help_text='Getting Started with Your Platform Studio', as_list_item=True ) @@ -232,7 +232,7 @@ class NewCourseHelpTest(AcceptanceTest): Scenario: Help link in sidebar links is working on 'Create a New Course' page in the dashboard. Given that I am on the 'Create a New Course' page in the dashboard. And I want help about the process - And I click the 'Getting Started with edX Studio' in the sidebar links + And I click the 'Getting Started with Your Platform Studio' in the sidebar links Then Help link should open. And help url should be correct """ @@ -243,7 +243,7 @@ class NewCourseHelpTest(AcceptanceTest): test=self, page=self.dashboard_page, href=expected_url, - help_text='Getting Started with edX Studio', + help_text='Getting Started with Your Platform Studio', as_list_item=True ) @@ -285,7 +285,7 @@ class NewLibraryHelpTest(AcceptanceTest): Scenario: Help link in sidebar links is working on 'Create a New Library' page in the dashboard. Given that I am on the 'Create a New Library' page in the dashboard. And I want help about the process - And I click the 'Getting Started with edX Studio' in the sidebar links + And I click the 'Getting Started with Your Platform Studio' in the sidebar links Then Help link should open. And help url should be correct """ @@ -296,7 +296,7 @@ class NewLibraryHelpTest(AcceptanceTest): test=self, page=self.dashboard_page, href=expected_url, - help_text='Getting Started with edX Studio', + help_text='Getting Started with Your Platform Studio', as_list_item=True ) diff --git a/lms/envs/aws.py b/lms/envs/aws.py index 58dfc6da70d0f59d9fd3e454c1e5370054aa0288..6bbbbf922ba227deafa1e96d4559346938b63168 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -581,7 +581,7 @@ if 'DATADOG_API' in AUTH_TOKENS: # Analytics Dashboard ANALYTICS_DASHBOARD_URL = ENV_TOKENS.get("ANALYTICS_DASHBOARD_URL", ANALYTICS_DASHBOARD_URL) -ANALYTICS_DASHBOARD_NAME = ENV_TOKENS.get("ANALYTICS_DASHBOARD_NAME", PLATFORM_NAME + " Insights") +ANALYTICS_DASHBOARD_NAME = ENV_TOKENS.get("ANALYTICS_DASHBOARD_NAME", ANALYTICS_DASHBOARD_NAME) # Mailchimp New User List MAILCHIMP_NEW_USER_LIST_ID = ENV_TOKENS.get("MAILCHIMP_NEW_USER_LIST_ID") diff --git a/lms/envs/common.py b/lms/envs/common.py index d86079f0ada9b7e17a6aff81264056c4be752bd4..9a63804cb680f6b551d873691cb7de7716b3ed8a 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -45,7 +45,7 @@ from lms.djangoapps.lms_xblock.mixin import LmsBlockMixin ################################### FEATURES ################################### # The display name of the platform to be used in templates/emails/etc. -PLATFORM_NAME = "Your Platform Name Here" +PLATFORM_NAME = _('Your Platform Name Here') CC_MERCHANT_NAME = PLATFORM_NAME PLATFORM_FACEBOOK_ACCOUNT = "http://www.facebook.com/YourPlatformFacebookAccount" @@ -2852,7 +2852,7 @@ OPENID_DOMAIN_PREFIX = 'openid:' ### Analytics Dashboard (Insights) settings ANALYTICS_DASHBOARD_URL = "" -ANALYTICS_DASHBOARD_NAME = PLATFORM_NAME + " Insights" +ANALYTICS_DASHBOARD_NAME = _('Your Platform Insights') # REGISTRATION CODES DISPLAY INFORMATION SUBTITUTIONS IN THE INVOICE ATTACHMENT INVOICE_CORP_ADDRESS = "Please place your corporate address\nin this configuration" diff --git a/lms/envs/devstack.py b/lms/envs/devstack.py index 9169f9a30853ac52e7c3e7c97ab8f41a253ebf11..c0cbd866e79648b59f796cd84b47fe64f1f2eccb 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -15,7 +15,6 @@ DEBUG = True USE_I18N = True DEFAULT_TEMPLATE_ENGINE['OPTIONS']['debug'] = True SITE_NAME = 'localhost:8000' -PLATFORM_NAME = ENV_TOKENS.get('PLATFORM_NAME', 'Devstack') # By default don't use a worker, execute tasks as if they were local functions CELERY_ALWAYS_EAGER = True HTTPS = 'off'