From 940828ff18e3201222ea910eabbdaa0d0ce2e46f Mon Sep 17 00:00:00 2001
From: David Joy
Date: Fri, 7 May 2021 14:00:21 -0400
Subject: [PATCH] fix: Resolving i18n violations, hard-coded edx.org-specific
strings (#433)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix: removing hard-coded edX from DemographicsSection messages
* fix: removing hard-coded “edX” strings from IDV messages
* fix: updating ThirdPartyAuth message description to remove hard-coded “edX” references.
* fix: replacing hard-coded “edX” strings with SITE_NAME in AccountSettingsPage
* fix: conditionalizing edx-specific strings in ConfirmationModal
If the SITE_NAME is ‘edX’, then edx.org-specific strings will be used. Otherwise, more general, Open edX-appropriate strings will be used.
* fix: conditionalizing edX-specific strings in delete account components.
If the SITE_NAME is ‘edX’, then edx.org-specific strings will be used. Otherwise, more general, Open edX-appropriate strings will be used.
* fix: replacing hard-coded ‘edX’ strings with SITE_NAME in ReviewRequirementsPanel
I missed a few because the messages were re-used.
* fix: review feedback, improving messages
- Removing unnecessary {siteName} references
- Improving some message descriptions
---
src/account-settings/AccountSettingsPage.jsx | 33 +++++++++----
.../AccountSettingsPage.messages.jsx | 8 ++--
.../delete-account/BeforeProceedingBanner.jsx | 4 +-
.../delete-account/ConfirmationModal.jsx | 20 +++++++-
.../delete-account/DeleteAccount.jsx | 23 +++++++--
.../delete-account/PrintingInstructions.jsx | 23 +++++++--
.../ConfirmationModal.test.jsx.snap | 42 ++++------------
.../__snapshots__/DeleteAccount.test.jsx.snap | 48 +++++--------------
.../delete-account/messages.js | 22 ++++++---
.../demographics/DemographicsSection.jsx | 7 ++-
.../DemographicsSection.messages.jsx | 2 +-
.../DemographicsSection.test.jsx.snap | 14 +++---
.../third-party-auth/ThirdPartyAuth.jsx | 2 +-
src/id-verification/CameraHelp.jsx | 6 ++-
.../IdVerification.messages.js | 20 ++++----
src/id-verification/IdVerificationPage.jsx | 22 +++++++--
.../panels/ReviewRequirementsPanel.jsx | 15 ++++--
src/id-verification/panels/SummaryPanel.jsx | 11 ++++-
18 files changed, 198 insertions(+), 124 deletions(-)
diff --git a/src/account-settings/AccountSettingsPage.jsx b/src/account-settings/AccountSettingsPage.jsx
index 46f59b5..0e4e8ef 100644
--- a/src/account-settings/AccountSettingsPage.jsx
+++ b/src/account-settings/AccountSettingsPage.jsx
@@ -44,8 +44,8 @@ class AccountSettingsPage extends React.Component {
// If there is a "duplicate_provider" query parameter, that's the backend's
// way of telling us that the provider account the user tried to link is already linked
- // to another Open edX account. We use this to display a message to that effect, and remove the
- // parameter from the URL.
+ // to another user account on the platform. We use this to display a message to that effect,
+ // and remove the parameter from the URL.
const duplicateTpaProvider = getQueryParameters().duplicate_provider;
if (duplicateTpaProvider !== undefined) {
history.replace(history.location.pathname);
@@ -164,10 +164,11 @@ class AccountSettingsPage extends React.Component {
{this.state.duplicateTpaProvider},
+ siteName: getConfig().SITE_NAME,
}}
/>
@@ -282,7 +283,10 @@ class AccountSettingsPage extends React.Component {
type="text"
value={this.props.formValues.username}
label={this.props.intl.formatMessage(messages['account.settings.field.username'])}
- helpText={this.props.intl.formatMessage(messages['account.settings.field.username.help.text'])}
+ helpText={this.props.intl.formatMessage(
+ messages['account.settings.field.username.help.text'],
+ { siteName: getConfig().SITE_NAME },
+ )}
isEditable={false}
{...editableFieldProps}
/>
@@ -310,7 +314,10 @@ class AccountSettingsPage extends React.Component {
}
value={this.props.formValues.email}
confirmationMessageDefinition={messages['account.settings.field.email.confirmation']}
- helpText={this.props.intl.formatMessage(messages['account.settings.field.email.help.text'])}
+ helpText={this.props.intl.formatMessage(
+ messages['account.settings.field.email.help.text'],
+ { siteName: getConfig().SITE_NAME },
+ )}
isEditable={this.isEditable('email')}
{...editableFieldProps}
/>
@@ -405,7 +412,12 @@ class AccountSettingsPage extends React.Component {
{this.props.intl.formatMessage(messages['account.settings.section.social.media'])}
- {this.props.intl.formatMessage(messages['account.settings.section.social.media.description'])}
+
+ {this.props.intl.formatMessage(
+ messages['account.settings.section.social.media.description'],
+ { siteName: getConfig().SITE_NAME },
+ )}
+
{this.props.intl.formatMessage(messages['account.settings.section.linked.accounts'])}
- {this.props.intl.formatMessage(messages['account.settings.section.linked.accounts.description'])}
+
+ {this.props.intl.formatMessage(
+ messages['account.settings.section.linked.accounts.description'],
+ { siteName: getConfig().SITE_NAME },
+ )}
+
diff --git a/src/account-settings/AccountSettingsPage.messages.jsx b/src/account-settings/AccountSettingsPage.messages.jsx
index 7398182..9a9c69b 100644
--- a/src/account-settings/AccountSettingsPage.messages.jsx
+++ b/src/account-settings/AccountSettingsPage.messages.jsx
@@ -63,7 +63,7 @@ const messages = defineMessages({
},
'account.settings.section.linked.accounts.description': {
id: 'account.settings.section.linked.accounts.description',
- defaultMessage: 'You can link your identity accounts to simplify signing in to edX.',
+ defaultMessage: 'You can link your identity accounts to simplify signing in to {siteName}.',
description: 'The linked accounts section heading description.',
},
'account.settings.field.username': {
@@ -73,7 +73,7 @@ const messages = defineMessages({
},
'account.settings.field.username.help.text': {
id: 'account.settings.field.username.help.text',
- defaultMessage: 'The name that identifies you on edX. You cannot change your username.',
+ defaultMessage: 'The name that identifies you on {siteName}. You cannot change your username.',
description: 'Help text for the account settings username field.',
},
'account.settings.field.full.name': {
@@ -108,7 +108,7 @@ const messages = defineMessages({
},
'account.settings.field.email.help.text': {
id: 'account.settings.field.email.help.text',
- defaultMessage: 'You receive messages from edX and course teams at this address.',
+ defaultMessage: 'You receive messages from {siteName} and course teams at this address.',
description: 'Help text for the account settings email field.',
},
'account.settings.field.secondary.email': {
@@ -331,7 +331,7 @@ const messages = defineMessages({
},
'account.settings.section.social.media.description': {
id: 'account.settings.section.social.media.description',
- defaultMessage: 'Optionally, link your personal accounts to the social media icons on your edX profile.',
+ defaultMessage: 'Optionally, link your personal accounts to the social media icons on your {siteName} profile.',
description: 'Section subheader for social media links settings',
},
'account.settings.field.social.platform.name.linkedin': {
diff --git a/src/account-settings/delete-account/BeforeProceedingBanner.jsx b/src/account-settings/delete-account/BeforeProceedingBanner.jsx
index e0df156..6f05132 100644
--- a/src/account-settings/delete-account/BeforeProceedingBanner.jsx
+++ b/src/account-settings/delete-account/BeforeProceedingBanner.jsx
@@ -6,6 +6,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Hyperlink } from '@edx/paragon';
// Messages
+import { getConfig } from '@edx/frontend-platform';
import messages from './messages';
// Components
@@ -22,13 +23,14 @@ const BeforeProceedingBanner = (props) => {
{intl.formatMessage(messages[instructionMessageId])}
),
+ siteName: getConfig().SITE_NAME,
}}
/>
diff --git a/src/account-settings/delete-account/ConfirmationModal.jsx b/src/account-settings/delete-account/ConfirmationModal.jsx
index 44230ba..99363cc 100644
--- a/src/account-settings/delete-account/ConfirmationModal.jsx
+++ b/src/account-settings/delete-account/ConfirmationModal.jsx
@@ -8,6 +8,7 @@ import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { faExclamationCircle, faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { getConfig } from '@edx/frontend-platform';
import messages from './messages';
import Alert from '../Alert';
import PrintingInstructions from './PrintingInstructions';
@@ -65,6 +66,13 @@ export class ConfirmationModal extends Component {
const open = ['confirming', 'pending', 'failed'].includes(status);
const passwordFieldId = 'passwordFieldId';
const invalidMessage = messages[this.getShortErrorMessageId(errorType)];
+
+ // TODO: We lack a good way of providing custom language for a particular site. This is a hack
+ // to allow edx.org to fulfill its business requirements.
+ const deleteAccountModalText2MessageKey = getConfig().SITE_NAME === 'edX'
+ ? 'account.settings.delete.account.modal.text.2.edX'
+ : 'account.settings.delete.account.modal.text.2';
+
return (
}
>
- {intl.formatMessage(messages['account.settings.delete.account.modal.text.1'])}
+ {intl.formatMessage(
+ messages['account.settings.delete.account.modal.text.1'],
+ { siteName: getConfig().SITE_NAME },
+ )}
- {intl.formatMessage(messages['account.settings.delete.account.modal.text.2'])}
+
+ {intl.formatMessage(
+ messages[deleteAccountModalText2MessageKey],
+ { siteName: getConfig().SITE_NAME },
+ )}
+
diff --git a/src/account-settings/delete-account/DeleteAccount.jsx b/src/account-settings/delete-account/DeleteAccount.jsx
index 3abf528..4222cb0 100644
--- a/src/account-settings/delete-account/DeleteAccount.jsx
+++ b/src/account-settings/delete-account/DeleteAccount.jsx
@@ -60,19 +60,36 @@ export class DeleteAccount extends React.Component {
} = this.props;
const canDelete = isVerifiedAccount && !hasLinkedTPA;
+ // TODO: We lack a good way of providing custom language for a particular site. This is a hack
+ // to allow edx.org to fulfill its business requirements.
+ const deleteAccountText2MessageKey = getConfig().SITE_NAME === 'edX'
+ ? 'account.settings.delete.account.text.2.edX'
+ : 'account.settings.delete.account.text.2';
+
return (
{intl.formatMessage(messages['account.settings.delete.account.header'])}
{intl.formatMessage(messages['account.settings.delete.account.subheader'])}
-
{intl.formatMessage(messages['account.settings.delete.account.text.1'])}
-
{intl.formatMessage(messages['account.settings.delete.account.text.2'])}
+
+ {intl.formatMessage(
+ messages['account.settings.delete.account.text.1'],
+ { siteName: getConfig().SITE_NAME },
+ )}
+
+
+ {intl.formatMessage(
+ messages[deleteAccountText2MessageKey],
+ { siteName: getConfig().SITE_NAME },
+ )}
+
- {intl.formatMessage(messages['account.settings.delete.account.text.warning'])}
+ {intl.formatMessage(messages['account.settings.delete.account.text.warning'],
+ { siteName: getConfig().SITE_NAME })}
diff --git a/src/account-settings/delete-account/PrintingInstructions.jsx b/src/account-settings/delete-account/PrintingInstructions.jsx
index c6feb64..36b932a 100644
--- a/src/account-settings/delete-account/PrintingInstructions.jsx
+++ b/src/account-settings/delete-account/PrintingInstructions.jsx
@@ -2,22 +2,39 @@ import React from 'react';
import { FormattedMessage, injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { Hyperlink } from '@edx/paragon';
+import { getConfig } from '@edx/frontend-platform';
import messages from './messages';
const PrintingInstructions = (props) => {
const actionLink = (
{props.intl.formatMessage(messages['account.settings.delete.account.text.3.link'])}
);
+ // TODO: We lack a good way of providing custom language for a particular site. This is a hack
+ // to allow edx.org to mention MicroMasters certificates to fulfill its business requirements.
+ if (getConfig().SITE_NAME === 'edX') {
+ return (
+
+ );
+ }
+
return (
);
diff --git a/src/account-settings/delete-account/__snapshots__/ConfirmationModal.test.jsx.snap b/src/account-settings/delete-account/__snapshots__/ConfirmationModal.test.jsx.snap
index 376cc8c..f353594 100644
--- a/src/account-settings/delete-account/__snapshots__/ConfirmationModal.test.jsx.snap
+++ b/src/account-settings/delete-account/__snapshots__/ConfirmationModal.test.jsx.snap
@@ -95,22 +95,14 @@ Array [
- You have selected "Delete My Account". Deletion of your account and personal data is permanent and cannot be undone. edX will not be able to recover your account or the data that is deleted.
+ You have selected "Delete My Account". Deletion of your account and personal data is permanent and cannot be undone. localhost will not be able to recover your account or the data that is deleted.
- If you proceed, you will be unable to use this account to take courses on the edX app, edx.org, or any other site hosted by edX. This includes access to edx.org from your employer's or university's system and access to private sites offered by MIT Open Learning, Wharton Executive Education, and Harvard Medical School.
+ If you proceed, you will be unable to use this account to take courses on localhost.
- You may also lose access to verified certificates and other program credentials like MicroMasters certificates. If you want to make a copy of these for your records before proceeding with deletion,
-
- follow the instructions for printing or downloading a certificate
-
- .
+ You may also lose access to verified certificates and other program credentials. You can make a copy of these for your records before proceeding with deletion.
@@ -314,22 +306,14 @@ Array [
- You have selected "Delete My Account". Deletion of your account and personal data is permanent and cannot be undone. edX will not be able to recover your account or the data that is deleted.
+ You have selected "Delete My Account". Deletion of your account and personal data is permanent and cannot be undone. localhost will not be able to recover your account or the data that is deleted.
- If you proceed, you will be unable to use this account to take courses on the edX app, edx.org, or any other site hosted by edX. This includes access to edx.org from your employer's or university's system and access to private sites offered by MIT Open Learning, Wharton Executive Education, and Harvard Medical School.
+ If you proceed, you will be unable to use this account to take courses on localhost.
- You may also lose access to verified certificates and other program credentials like MicroMasters certificates. If you want to make a copy of these for your records before proceeding with deletion,
-
- follow the instructions for printing or downloading a certificate
-
- .
+ You may also lose access to verified certificates and other program credentials. You can make a copy of these for your records before proceeding with deletion.
@@ -500,22 +484,14 @@ Array [
- You have selected "Delete My Account". Deletion of your account and personal data is permanent and cannot be undone. edX will not be able to recover your account or the data that is deleted.
+ You have selected "Delete My Account". Deletion of your account and personal data is permanent and cannot be undone. localhost will not be able to recover your account or the data that is deleted.
- If you proceed, you will be unable to use this account to take courses on the edX app, edx.org, or any other site hosted by edX. This includes access to edx.org from your employer's or university's system and access to private sites offered by MIT Open Learning, Wharton Executive Education, and Harvard Medical School.
+ If you proceed, you will be unable to use this account to take courses on localhost.
- You may also lose access to verified certificates and other program credentials like MicroMasters certificates. If you want to make a copy of these for your records before proceeding with deletion,
-
- follow the instructions for printing or downloading a certificate
-
- .
+ You may also lose access to verified certificates and other program credentials. You can make a copy of these for your records before proceeding with deletion.
diff --git a/src/account-settings/delete-account/__snapshots__/DeleteAccount.test.jsx.snap b/src/account-settings/delete-account/__snapshots__/DeleteAccount.test.jsx.snap
index 73c5e6a..ffd986b 100644
--- a/src/account-settings/delete-account/__snapshots__/DeleteAccount.test.jsx.snap
+++ b/src/account-settings/delete-account/__snapshots__/DeleteAccount.test.jsx.snap
@@ -11,28 +11,20 @@ exports[`DeleteAccount should match default section snapshot 1`] = `
We're sorry to see you go!
- Please note: Deletion of your account and personal data is permanent and cannot be undone. edX will not be able to recover your account or the data that is deleted.
+ Please note: Deletion of your account and personal data is permanent and cannot be undone. localhost will not be able to recover your account or the data that is deleted.
- Once your account is deleted, you cannot use it to take courses on the edX app, edx.org, or any other site hosted by edX. This includes access to edx.org from your employer’s or university’s system and access to private sites offered by MIT Open Learning, Wharton Executive Education, and Harvard Medical School.
+ Once your account is deleted, you cannot use it to take courses on localhost.
- You may also lose access to verified certificates and other program credentials like MicroMasters certificates. If you want to make a copy of these for your records before proceeding with deletion,
-
- follow the instructions for printing or downloading a certificate
-
- .
+ You may also lose access to verified certificates and other program credentials. You can make a copy of these for your records before proceeding with deletion.
- Warning: Account deletion is permanent. Please read the above carefully before proceeding. This is an irreversible action, and you will no longer be able to use the same email on edX.
+ Warning: Account deletion is permanent. Please read the above carefully before proceeding. This is an irreversible action, and you will no longer be able to use the same email on localhost.
- Please note: Deletion of your account and personal data is permanent and cannot be undone. edX will not be able to recover your account or the data that is deleted.
+ Please note: Deletion of your account and personal data is permanent and cannot be undone. localhost will not be able to recover your account or the data that is deleted.
- Once your account is deleted, you cannot use it to take courses on the edX app, edx.org, or any other site hosted by edX. This includes access to edx.org from your employer’s or university’s system and access to private sites offered by MIT Open Learning, Wharton Executive Education, and Harvard Medical School.
+ Once your account is deleted, you cannot use it to take courses on localhost.
- You may also lose access to verified certificates and other program credentials like MicroMasters certificates. If you want to make a copy of these for your records before proceeding with deletion,
-
- follow the instructions for printing or downloading a certificate
-
- .
+ You may also lose access to verified certificates and other program credentials. You can make a copy of these for your records before proceeding with deletion.
- Warning: Account deletion is permanent. Please read the above carefully before proceeding. This is an irreversible action, and you will no longer be able to use the same email on edX.
+ Warning: Account deletion is permanent. Please read the above carefully before proceeding. This is an irreversible action, and you will no longer be able to use the same email on localhost.
- Please note: Deletion of your account and personal data is permanent and cannot be undone. edX will not be able to recover your account or the data that is deleted.
+ Please note: Deletion of your account and personal data is permanent and cannot be undone. localhost will not be able to recover your account or the data that is deleted.
- Once your account is deleted, you cannot use it to take courses on the edX app, edx.org, or any other site hosted by edX. This includes access to edx.org from your employer’s or university’s system and access to private sites offered by MIT Open Learning, Wharton Executive Education, and Harvard Medical School.
+ Once your account is deleted, you cannot use it to take courses on localhost.
- You may also lose access to verified certificates and other program credentials like MicroMasters certificates. If you want to make a copy of these for your records before proceeding with deletion,
-
- follow the instructions for printing or downloading a certificate
-
- .
+ You may also lose access to verified certificates and other program credentials. You can make a copy of these for your records before proceeding with deletion.
- Warning: Account deletion is permanent. Please read the above carefully before proceeding. This is an irreversible action, and you will no longer be able to use the same email on edX.
+ Warning: Account deletion is permanent. Please read the above carefully before proceeding. This is an irreversible action, and you will no longer be able to use the same email on localhost.
- {this.props.intl.formatMessage(messages['account.settings.section.demographics.why'])}
+ {this.props.intl.formatMessage(
+ messages['account.settings.section.demographics.why'],
+ {
+ siteName: getConfig().SITE_NAME,
+ },
+ )}
{this.renderDemographicsServiceIssueWarning()}
diff --git a/src/account-settings/demographics/DemographicsSection.messages.jsx b/src/account-settings/demographics/DemographicsSection.messages.jsx
index 7842c4e..55117a1 100644
--- a/src/account-settings/demographics/DemographicsSection.messages.jsx
+++ b/src/account-settings/demographics/DemographicsSection.messages.jsx
@@ -162,7 +162,7 @@ const messages = defineMessages({
/* Legal copy link text */
'account.settings.section.demographics.why': {
id: 'account.settings.section.demographics.why',
- defaultMessage: 'Why does edX collect this information?',
+ defaultMessage: 'Why does {siteName} collect this information?',
description: 'Link text for a link to external legal text',
},
});
diff --git a/src/account-settings/demographics/test/__snapshots__/DemographicsSection.test.jsx.snap b/src/account-settings/demographics/test/__snapshots__/DemographicsSection.test.jsx.snap
index 8e65da2..f0631fa 100644
--- a/src/account-settings/demographics/test/__snapshots__/DemographicsSection.test.jsx.snap
+++ b/src/account-settings/demographics/test/__snapshots__/DemographicsSection.test.jsx.snap
@@ -17,7 +17,7 @@ exports[`DemographicsSection should render 1`] = `
rel="noopener noopener noreferrer"
target="_blank"
>
- Why does edX collect this information?
+ Why does localhost collect this information?
- Why does edX collect this information?
+ Why does localhost collect this information?
- Why does edX collect this information?
+ Why does localhost collect this information?
- Why does edX collect this information?
+ Why does localhost collect this information?
- Why does edX collect this information?
+ Why does localhost collect this information?
- Why does edX collect this information?
+ Why does localhost collect this information?
- Why does edX collect this information?
+ Why does localhost collect this information?
);
}
diff --git a/src/id-verification/CameraHelp.jsx b/src/id-verification/CameraHelp.jsx
index d797493..61a5382 100644
--- a/src/id-verification/CameraHelp.jsx
+++ b/src/id-verification/CameraHelp.jsx
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import { Collapsible } from '@edx/paragon';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
+import { getConfig } from '@edx/frontend-platform';
import messages from './IdVerification.messages';
import IdVerificationContext from './IdVerificationContext';
@@ -41,7 +42,10 @@ function CameraHelp(props) {
defaultOpen={props.isOpen}
>
- {props.intl.formatMessage(messages['id.verification.camera.help.difficulty.answer'])}
+ {props.intl.formatMessage(
+ messages['id.verification.camera.help.difficulty.answer'],
+ { siteName: getConfig().SITE_NAME },
+ )}
diff --git a/src/id-verification/IdVerification.messages.js b/src/id-verification/IdVerification.messages.js
index 4905054..4f2b709 100644
--- a/src/id-verification/IdVerification.messages.js
+++ b/src/id-verification/IdVerification.messages.js
@@ -58,23 +58,23 @@ const messages = defineMessages({
},
'id.verification.privacy.need.photo.question': {
id: 'id.verification.privacy.need.photo.question',
- defaultMessage: 'Why does edX need my photo?',
- description: 'Question about why edX needs a verification photo.',
+ defaultMessage: 'Why does {siteName} need my photo?',
+ description: 'Question about why the platform needs a verification photo.',
},
'id.verification.privacy.need.photo.answer': {
id: 'id.verification.privacy.need.photo.answer',
defaultMessage: 'We use your verification photos to confirm your identity and ensure the validity of your certificate.',
- description: 'Answering why edX needs a verification photo.',
+ description: 'Answering why the platform needs a verification photo.',
},
'id.verification.privacy.do.with.photo.question': {
id: 'id.verification.privacy.do.with.photo.question',
- defaultMessage: 'What does edX do with this photo?',
- description: 'Question about what edX does with the verification photo.',
+ defaultMessage: 'What does {siteName} do with this photo?',
+ description: 'Question about what the platform does with the verification photo.',
},
'id.verification.privacy.do.with.photo.answer': {
id: 'id.verification.privacy.do.with.photo.answer',
- defaultMessage: 'We securely encrypt your photo and send it our authorization service for review. Your photo and information are not saved or visible anywhere on edX after the verification process is complete.',
- description: 'Answering what edX does with the verification photo.',
+ defaultMessage: 'We securely encrypt your photo and send it our authorization service for review. Your photo and information are not saved or visible anywhere on {siteName} after the verification process is complete.',
+ description: 'Answering what the platform does with the verification photo.',
},
'id.verification.access.blocked.title': {
id: 'id.verification.access.blocked.title',
@@ -448,7 +448,7 @@ const messages = defineMessages({
},
'id.verification.camera.help.difficulty.answer': {
id: 'id.verification.camera.help.difficulty.answer',
- defaultMessage: 'If you require assistance with taking a photo for submission, contact edX support for additional suggestions.',
+ defaultMessage: 'If you require assistance with taking a photo for submission, contact {siteName} support for additional suggestions.',
description: 'Confirming what to do if the user has difficult holding their head relative to the camera.',
},
'id.verification.camera.help.upload.question': {
@@ -643,8 +643,8 @@ const messages = defineMessages({
},
'id.verification.review.error': {
id: 'id.verification.review.error',
- defaultMessage: 'edX Support Page',
- description: 'Text linking to the support page.',
+ defaultMessage: '{siteName} Support Page',
+ description: 'Text linking to the platform support page.',
},
'id.verification.submitted.title': {
id: 'id.verification.submitted.title',
diff --git a/src/id-verification/IdVerificationPage.jsx b/src/id-verification/IdVerificationPage.jsx
index 6a44f9e..0f8fd68 100644
--- a/src/id-verification/IdVerificationPage.jsx
+++ b/src/id-verification/IdVerificationPage.jsx
@@ -6,6 +6,7 @@ import {
import qs from 'qs';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { Modal, Button } from '@edx/paragon';
+import { getConfig } from '@edx/frontend-platform';
import { idVerificationSelector } from './data/selectors';
import './getUserMediaShim';
@@ -77,10 +78,25 @@ function IdVerificationPage(props) {
title={props.intl.formatMessage(messages['id.verification.privacy.title'])}
body={(
-
{props.intl.formatMessage(messages['id.verification.privacy.need.photo.question'])}
+
+ {props.intl.formatMessage(
+ messages['id.verification.privacy.need.photo.question'],
+ { siteName: getConfig().SITE_NAME },
+ )}
+
{props.intl.formatMessage(messages['id.verification.privacy.need.photo.answer'])}
-
{props.intl.formatMessage(messages['id.verification.privacy.do.with.photo.question'])}
-
{props.intl.formatMessage(messages['id.verification.privacy.do.with.photo.answer'])}
+
+ {props.intl.formatMessage(
+ messages['id.verification.privacy.do.with.photo.question'],
+ { siteName: getConfig().SITE_NAME },
+ )}
+
+
+ {props.intl.formatMessage(
+ messages['id.verification.privacy.do.with.photo.answer'],
+ { siteName: getConfig().SITE_NAME },
+ )}
+
)}
onClose={() => setIsModalOpen(false)}
diff --git a/src/id-verification/panels/ReviewRequirementsPanel.jsx b/src/id-verification/panels/ReviewRequirementsPanel.jsx
index a8e84e3..d183113 100644
--- a/src/id-verification/panels/ReviewRequirementsPanel.jsx
+++ b/src/id-verification/panels/ReviewRequirementsPanel.jsx
@@ -112,16 +112,25 @@ function ReviewRequirementsPanel(props) {
{props.intl.formatMessage(messages['id.verification.privacy.title'])}
- {props.intl.formatMessage(messages['id.verification.privacy.need.photo.question'])}
+ {props.intl.formatMessage(
+ messages['id.verification.privacy.need.photo.question'],
+ { siteName: getConfig().SITE_NAME },
+ )}
{props.intl.formatMessage(messages['id.verification.privacy.need.photo.answer'])}
- {props.intl.formatMessage(messages['id.verification.privacy.do.with.photo.question'])}
+ {props.intl.formatMessage(
+ messages['id.verification.privacy.do.with.photo.question'],
+ { siteName: getConfig().SITE_NAME },
+ )}
- {props.intl.formatMessage(messages['id.verification.privacy.do.with.photo.answer'])}
+ {props.intl.formatMessage(
+ messages['id.verification.privacy.do.with.photo.answer'],
+ { siteName: getConfig().SITE_NAME },
+ )}
diff --git a/src/id-verification/panels/SummaryPanel.jsx b/src/id-verification/panels/SummaryPanel.jsx
index a338c27..bec3b85 100644
--- a/src/id-verification/panels/SummaryPanel.jsx
+++ b/src/id-verification/panels/SummaryPanel.jsx
@@ -128,7 +128,16 @@ function SummaryPanel(props) {
This might be a temporary issue, so please try again in a few minutes.
If the problem persists, please go to {support_link} for help.
`}
- values={{ support_link:
{props.intl.formatMessage(messages['id.verification.review.error'])} }}
+ values={{
+ support_link: (
+
+ {props.intl.formatMessage(
+ messages['id.verification.review.error'],
+ { siteName: getConfig().SITE_NAME },
+ )}
+
+ ),
+ }}
/>
);
}