fix(i18n, client): use placeholder on map (#41064)
Modifies the translation flow for the certification buttons on the learn/landing map to pass the superBlock title to the string as a placeholder. This will allow translators to restructure the order of the sentence (i.e. certification and hours) based on language- specific grammar structures.
This commit is contained in:
committed by
GitHub
parent
3b79b7836b
commit
1e0c09faff
@@ -21,8 +21,10 @@ const codingPrepRE = new RegExp('Interview Prep');
|
||||
function createSuperBlockTitle(str) {
|
||||
const superBlockTitle = i18next.t(`intro:${dasherize(str)}.title`);
|
||||
return codingPrepRE.test(str)
|
||||
? `${superBlockTitle} ${i18next.t('learn.cert-map-estimates.coding-prep')}`
|
||||
: `${superBlockTitle} ${i18next.t('learn.cert-map-estimates.certs')}`;
|
||||
? i18next.t('learn.cert-map-estimates.coding-prep', {
|
||||
title: superBlockTitle
|
||||
})
|
||||
: i18next.t('learn.cert-map-estimates.certs', { title: superBlockTitle });
|
||||
}
|
||||
|
||||
const linkSpacingStyle = {
|
||||
|
Reference in New Issue
Block a user