mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-09 19:00:53 -04:00
feat(client, i18n): add note about exam being available only in English (#53736)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
@@ -1461,6 +1461,7 @@
|
||||
"go-back-to-learn": "Go back to the stable version of the curriculum.",
|
||||
"read-database-cert-article": "Please read this forum post before proceeding.",
|
||||
"enable-cookies": "You must enable third-party cookies before starting.",
|
||||
"english-only": "The courses in this section are only available in English. We are only able to translate the titles and introductions at the moment, not the lessons themselves."
|
||||
"english-only": "The courses in this section are only available in English. We are only able to translate the titles and introductions at the moment, not the lessons themselves.",
|
||||
"exam-english-only": "Please note that the certification exam is currently available only in English. The rest of the courses are available in some languages."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,11 @@ import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Alert } from '@freecodecamp/ui';
|
||||
import { SuperBlocks } from '../../../../../shared/config/superblocks';
|
||||
import { isOldRespCert, isRelationalDbCert } from '../../../utils/is-a-cert';
|
||||
import {
|
||||
isOldRespCert,
|
||||
isRelationalDbCert,
|
||||
isExamCert
|
||||
} from '../../../utils/is-a-cert';
|
||||
import { Link } from '../../../components/helpers';
|
||||
import { CodeAllyDown } from '../../../components/growth-book/codeally-down';
|
||||
|
||||
@@ -42,6 +46,12 @@ function LegacyLinks({ superBlock }: LegacyLinksProps): JSX.Element {
|
||||
)}
|
||||
</>
|
||||
);
|
||||
} else if (isExamCert(superBlock) && clientLocale != 'english') {
|
||||
return (
|
||||
<Alert variant='info'>
|
||||
<p>{t('intro:misc-text.exam-english-only')}</p>
|
||||
</Alert>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -7,3 +7,7 @@ export function isOldRespCert(superBlock: string): boolean {
|
||||
export function isRelationalDbCert(superBlock: string): boolean {
|
||||
return superBlock === String(SuperBlocks.RelationalDb);
|
||||
}
|
||||
|
||||
export function isExamCert(superBlock: string): boolean {
|
||||
return superBlock === String(SuperBlocks.FoundationalCSharp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user