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
@ -283,8 +283,8 @@
|
|||||||
"scrimba-tip": "注意:如果这个小浏览器窗口覆盖了代码,点击拖动它。同时,你可以随时暂停,在视频中编辑代码。",
|
"scrimba-tip": "注意:如果这个小浏览器窗口覆盖了代码,点击拖动它。同时,你可以随时暂停,在视频中编辑代码。",
|
||||||
"chal-preview": "挑战预览",
|
"chal-preview": "挑战预览",
|
||||||
"cert-map-estimates": {
|
"cert-map-estimates": {
|
||||||
"certs": "认证(300 小时)",
|
"certs": "{{title}} 认证(300 小时)",
|
||||||
"coding-prep": "(数千小时的挑战)"
|
"coding-prep": "{{title}}(数千小时的挑战)"
|
||||||
},
|
},
|
||||||
"editor-tabs": {
|
"editor-tabs": {
|
||||||
"info": "Info",
|
"info": "Info",
|
||||||
|
@ -283,8 +283,8 @@
|
|||||||
"scrimba-tip": "Tip: If the mini-browser is covering the code, click and drag to move it. Also, feel free to stop and edit the code in the video at any time.",
|
"scrimba-tip": "Tip: If the mini-browser is covering the code, click and drag to move it. Also, feel free to stop and edit the code in the video at any time.",
|
||||||
"chal-preview": "Challenge Preview",
|
"chal-preview": "Challenge Preview",
|
||||||
"cert-map-estimates": {
|
"cert-map-estimates": {
|
||||||
"certs": "Certification (300\u00A0hours)",
|
"certs": "{{title}} Certification (300\u00A0hours)",
|
||||||
"coding-prep": "(Thousands of hours of challenges)"
|
"coding-prep": "{{title}} (Thousands of hours of challenges)"
|
||||||
},
|
},
|
||||||
"editor-tabs": {
|
"editor-tabs": {
|
||||||
"info": "Info",
|
"info": "Info",
|
||||||
|
@ -283,8 +283,8 @@
|
|||||||
"scrimba-tip": "Sugerencia: Si el mini-navegador cubre el código, haz clic y arrastra para moverlo. Además, siéntate libre de detener y editar el código en el video en cualquier momento.",
|
"scrimba-tip": "Sugerencia: Si el mini-navegador cubre el código, haz clic y arrastra para moverlo. Además, siéntate libre de detener y editar el código en el video en cualquier momento.",
|
||||||
"chal-preview": "Vista previa del desafío",
|
"chal-preview": "Vista previa del desafío",
|
||||||
"cert-map-estimates": {
|
"cert-map-estimates": {
|
||||||
"certs": "(300 horas)",
|
"certs": "Certificación {{title}} (300 horas)",
|
||||||
"coding-prep": "(Miles de horas de desafíos)"
|
"coding-prep": "{{title}} (Miles de horas de desafíos)"
|
||||||
},
|
},
|
||||||
"editor-tabs": {
|
"editor-tabs": {
|
||||||
"info": "Info",
|
"info": "Info",
|
||||||
|
@ -21,8 +21,10 @@ const codingPrepRE = new RegExp('Interview Prep');
|
|||||||
function createSuperBlockTitle(str) {
|
function createSuperBlockTitle(str) {
|
||||||
const superBlockTitle = i18next.t(`intro:${dasherize(str)}.title`);
|
const superBlockTitle = i18next.t(`intro:${dasherize(str)}.title`);
|
||||||
return codingPrepRE.test(str)
|
return codingPrepRE.test(str)
|
||||||
? `${superBlockTitle} ${i18next.t('learn.cert-map-estimates.coding-prep')}`
|
? i18next.t('learn.cert-map-estimates.coding-prep', {
|
||||||
: `${superBlockTitle} ${i18next.t('learn.cert-map-estimates.certs')}`;
|
title: superBlockTitle
|
||||||
|
})
|
||||||
|
: i18next.t('learn.cert-map-estimates.certs', { title: superBlockTitle });
|
||||||
}
|
}
|
||||||
|
|
||||||
const linkSpacingStyle = {
|
const linkSpacingStyle = {
|
||||||
|
Reference in New Issue
Block a user