diff --git a/client/src/redux/propTypes.js b/client/src/redux/propTypes.js index a246d2399d..66317e2ed2 100644 --- a/client/src/redux/propTypes.js +++ b/client/src/redux/propTypes.js @@ -53,6 +53,7 @@ export const ChallengeNode = PropTypes.shape({ tail: PropTypes.arrayOf(PropTypes.string), time: PropTypes.string, title: PropTypes.string, + translationPending: PropTypes.bool, videoUrl: PropTypes.string }); diff --git a/client/src/templates/Challenges/classic/Show.js b/client/src/templates/Challenges/classic/Show.js index d3c975a971..fe5bd39150 100644 --- a/client/src/templates/Challenges/classic/Show.js +++ b/client/src/templates/Challenges/classic/Show.js @@ -209,7 +209,8 @@ class ShowClassic extends Component { fields: { blockName }, description, instructions, - superBlock + superBlock, + translationPending } = this.getChallenge(); const { forumTopicId, title } = this.getChallenge(); @@ -224,6 +225,7 @@ class ShowClassic extends Component { showToolPanel={showToolPanel} superBlock={superBlock} title={title} + translationPending={translationPending} videoUrl={this.getVideoUrl()} /> ); @@ -362,6 +364,7 @@ export const query = graphql` helpCategory videoUrl superBlock + translationPending forumTopicId fields { slug diff --git a/client/src/templates/Challenges/components/Challenge-Title.js b/client/src/templates/Challenges/components/Challenge-Title.js index 06db39bc0c..9922f159f1 100644 --- a/client/src/templates/Challenges/components/Challenge-Title.js +++ b/client/src/templates/Challenges/components/Challenge-Title.js @@ -11,18 +11,27 @@ const propTypes = { block: PropTypes.string, children: PropTypes.string, isCompleted: PropTypes.bool, - superBlock: PropTypes.string + superBlock: PropTypes.string, + translationPending: PropTypes.bool.isRequired }; -function ChallengeTitle({ block, children, isCompleted, superBlock }) { +function ChallengeTitle({ + block, + children, + isCompleted, + superBlock, + translationPending +}) { return (
- - {i18next.t('misc.translation-pending')} - + {translationPending && ( + + {i18next.t('misc.translation-pending')} + + )}
{title} diff --git a/client/src/templates/Challenges/components/__snapshots__/ChallengeTitle.test.js.snap b/client/src/templates/Challenges/components/__snapshots__/ChallengeTitle.test.js.snap index b2baacd3ed..739fdf0dfb 100644 --- a/client/src/templates/Challenges/components/__snapshots__/ChallengeTitle.test.js.snap +++ b/client/src/templates/Challenges/components/__snapshots__/ChallengeTitle.test.js.snap @@ -4,12 +4,6 @@ exports[` renders correctly 1`] = `
-
diff --git a/client/src/templates/Challenges/projects/backend/Show.js b/client/src/templates/Challenges/projects/backend/Show.js index d839d7fc18..c587e2e440 100644 --- a/client/src/templates/Challenges/projects/backend/Show.js +++ b/client/src/templates/Challenges/projects/backend/Show.js @@ -167,6 +167,7 @@ export class BackEnd extends Component { title, description, instructions, + translationPending, superBlock } }, @@ -200,6 +201,7 @@ export class BackEnd extends Component { block={blockName} isCompleted={isChallengeCompleted} superBlock={superBlock} + translationPending={translationPending} > {title} @@ -258,6 +260,7 @@ export const query = graphql` challengeType helpCategory superBlock + translationPending fields { blockName slug diff --git a/client/src/templates/Challenges/projects/frontend/Show.js b/client/src/templates/Challenges/projects/frontend/Show.js index 3bd217401d..496b6e338f 100644 --- a/client/src/templates/Challenges/projects/frontend/Show.js +++ b/client/src/templates/Challenges/projects/frontend/Show.js @@ -126,7 +126,8 @@ export class Project extends Component { forumTopicId, title, description, - superBlock + superBlock, + translationPending } }, isChallengeCompleted, @@ -157,6 +158,7 @@ export class Project extends Component { block={blockName} isCompleted={isChallengeCompleted} superBlock={superBlock} + translationPending={translationPending} > {title} @@ -200,6 +202,7 @@ export const query = graphql` challengeType helpCategory superBlock + translationPending fields { blockName slug diff --git a/client/src/templates/Challenges/video/Show.js b/client/src/templates/Challenges/video/Show.js index 7be45767b1..856fb253c9 100644 --- a/client/src/templates/Challenges/video/Show.js +++ b/client/src/templates/Challenges/video/Show.js @@ -63,6 +63,7 @@ const propTypes = { challengeMeta: PropTypes.object }), t: PropTypes.func.isRequired, + translationPending: PropTypes.bool.isRequired, updateChallengeMeta: PropTypes.func.isRequired, updateSolutionFormValues: PropTypes.func.isRequired }; @@ -161,6 +162,7 @@ export class Project extends Component { title, description, superBlock, + translationPending, videoId, question: { text, answers, solution } } @@ -194,6 +196,7 @@ export class Project extends Component { block={blockName} isCompleted={isChallengeCompleted} superBlock={superBlock} + translationPending={translationPending} > {title}