fix(client, i18n): translate mobile tabs (#41030)
This commit is contained in:
committed by
GitHub
parent
b83295d88d
commit
2c4c679a92
@ -285,6 +285,12 @@
|
|||||||
"cert-map-estimates": {
|
"cert-map-estimates": {
|
||||||
"certs": "认证(300 小时)",
|
"certs": "认证(300 小时)",
|
||||||
"coding-prep": "(数千小时的挑战)"
|
"coding-prep": "(数千小时的挑战)"
|
||||||
|
},
|
||||||
|
"editor-tabs": {
|
||||||
|
"info": "信息",
|
||||||
|
"code": "码",
|
||||||
|
"tests": "测验",
|
||||||
|
"preview": "预习"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"donate": {
|
"donate": {
|
||||||
|
@ -285,6 +285,12 @@
|
|||||||
"cert-map-estimates": {
|
"cert-map-estimates": {
|
||||||
"certs": "Certification (300\u00A0hours)",
|
"certs": "Certification (300\u00A0hours)",
|
||||||
"coding-prep": "(Thousands of hours of challenges)"
|
"coding-prep": "(Thousands of hours of challenges)"
|
||||||
|
},
|
||||||
|
"editor-tabs": {
|
||||||
|
"info": "Info",
|
||||||
|
"code": "Code",
|
||||||
|
"tests": "Tests",
|
||||||
|
"preview": "Preview"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"donate": {
|
"donate": {
|
||||||
|
@ -285,6 +285,12 @@
|
|||||||
"cert-map-estimates": {
|
"cert-map-estimates": {
|
||||||
"certs": "Certificación (300 horas)",
|
"certs": "Certificación (300 horas)",
|
||||||
"coding-prep": "(Miles de horas de desafíos)"
|
"coding-prep": "(Miles de horas de desafíos)"
|
||||||
|
},
|
||||||
|
"editor-tabs": {
|
||||||
|
"info": "Información",
|
||||||
|
"code": "Código",
|
||||||
|
"tests": "Pruebas",
|
||||||
|
"preview": "Avance"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"donate": {
|
"donate": {
|
||||||
|
@ -334,6 +334,12 @@ const translationsSchema = {
|
|||||||
'cert-map-estimates': {
|
'cert-map-estimates': {
|
||||||
certs: 'Certification (300\u00A0hours)',
|
certs: 'Certification (300\u00A0hours)',
|
||||||
'coding-prep': '(Thousands of hours of challenges)'
|
'coding-prep': '(Thousands of hours of challenges)'
|
||||||
|
},
|
||||||
|
'editor-tabs': {
|
||||||
|
info: 'Info',
|
||||||
|
code: 'Code',
|
||||||
|
tests: 'Tests',
|
||||||
|
preview: 'Preview'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
donate: {
|
donate: {
|
||||||
|
@ -9,6 +9,7 @@ import { currentTabSelector, moveToTab } from '../redux';
|
|||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import EditorTabs from './EditorTabs';
|
import EditorTabs from './EditorTabs';
|
||||||
import { showUpcomingChanges } from '../../../../../config/env.json';
|
import { showUpcomingChanges } from '../../../../../config/env.json';
|
||||||
|
import i18next from 'i18next';
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
currentTab: currentTabSelector
|
currentTab: currentTabSelector
|
||||||
@ -64,18 +65,29 @@ class MobileLayout extends Component {
|
|||||||
id='challenge-page-tabs'
|
id='challenge-page-tabs'
|
||||||
onSelect={moveToTab}
|
onSelect={moveToTab}
|
||||||
>
|
>
|
||||||
<TabPane eventKey={1} title='Info'>
|
<TabPane eventKey={1} title={i18next.t('learn.editor-tabs.info')}>
|
||||||
{instructions}
|
{instructions}
|
||||||
</TabPane>
|
</TabPane>
|
||||||
<TabPane eventKey={2} title='Code' {...editorTabPaneProps}>
|
<TabPane
|
||||||
|
eventKey={2}
|
||||||
|
title={i18next.t('learn.editor-tabs.code')}
|
||||||
|
{...editorTabPaneProps}
|
||||||
|
>
|
||||||
{showUpcomingChanges && <EditorTabs />}
|
{showUpcomingChanges && <EditorTabs />}
|
||||||
{editor}
|
{editor}
|
||||||
</TabPane>
|
</TabPane>
|
||||||
<TabPane eventKey={3} title='Tests' {...editorTabPaneProps}>
|
<TabPane
|
||||||
|
eventKey={3}
|
||||||
|
title={i18next.t('learn.editor-tabs.tests')}
|
||||||
|
{...editorTabPaneProps}
|
||||||
|
>
|
||||||
{testOutput}
|
{testOutput}
|
||||||
</TabPane>
|
</TabPane>
|
||||||
{hasPreview && (
|
{hasPreview && (
|
||||||
<TabPane eventKey={4} title='Preview'>
|
<TabPane
|
||||||
|
eventKey={4}
|
||||||
|
title={i18next.t('learn.editor-tabs.preview')}
|
||||||
|
>
|
||||||
{preview}
|
{preview}
|
||||||
</TabPane>
|
</TabPane>
|
||||||
)}
|
)}
|
||||||
|
Reference in New Issue
Block a user