feat(i18n, client): translate breadcrumbs (#40881)
This commit is contained in:
committed by
GitHub
parent
e0e86c4ce9
commit
6c020f7069
@ -5,6 +5,7 @@ import { Link } from '../../../components/helpers/index';
|
|||||||
import { dasherize } from '../../../../../utils/slugs';
|
import { dasherize } from '../../../../../utils/slugs';
|
||||||
import './challenge-title.css';
|
import './challenge-title.css';
|
||||||
import GreenPass from '../../../assets/icons/GreenPass';
|
import GreenPass from '../../../assets/icons/GreenPass';
|
||||||
|
import i18next from 'i18next';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
block: PropTypes.string,
|
block: PropTypes.string,
|
||||||
@ -21,7 +22,9 @@ function ChallengeTitle({ block, children, isCompleted, superBlock }) {
|
|||||||
className='breadcrumb-left'
|
className='breadcrumb-left'
|
||||||
to={`/learn/${dasherize(superBlock)}`}
|
to={`/learn/${dasherize(superBlock)}`}
|
||||||
>
|
>
|
||||||
<span className='ellipsis'>{superBlock}</span>
|
<span className='ellipsis'>
|
||||||
|
{i18next.t(`intro:${dasherize(superBlock)}.title`)}
|
||||||
|
</span>
|
||||||
</Link>
|
</Link>
|
||||||
<div className='breadcrumb-center' />
|
<div className='breadcrumb-center' />
|
||||||
<Link
|
<Link
|
||||||
@ -29,7 +32,9 @@ function ChallengeTitle({ block, children, isCompleted, superBlock }) {
|
|||||||
state={{ breadcrumbBlockClick: block }}
|
state={{ breadcrumbBlockClick: block }}
|
||||||
to={`/learn/${dasherize(superBlock)}`}
|
to={`/learn/${dasherize(superBlock)}`}
|
||||||
>
|
>
|
||||||
{block}
|
{i18next.t(
|
||||||
|
`intro:${dasherize(superBlock)}.blocks.${dasherize(block)}.title`
|
||||||
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className='challenge-title'>
|
<div className='challenge-title'>
|
||||||
|
Reference in New Issue
Block a user