<Link
className='btn btn-link'
to='/initialization/'>
- cancel
+ {t('commonWords.cancel')}
</Link>
</div>
</div>
<Link
className='btn btn-link'
to='/initialization/'>
- cancel
+ {t('commonWords.cancel')}
</Link>
</div>
</div>
return (
<div className={styles.main}>
<div>
- <h2 className={styles.title}>{t('init.mnemonic')}</h2>
+ <h2 className={styles.title}>{t('mnemonic.backup')}</h2>
<div className={styles.formWarpper}>
<div className={styles.form}>
<StepList>
- <Step>
+ <Step
+ nextL={t('mnemonic.continue')}
+ >
<Mnemonic
mnemonic={this.props.mnemonic}
/>
className={'btn btn-link'}
onClick={() => this.props.succeeded()}
>
- skip
+ {t('mnemonic.skip')}
</button>
</Step>
<Step>
<Link
className='btn btn-link'
to='/initialization/'>
- cancel
+ {t('commonWords.cancel')}
</Link>
</form>
</div>
import { NotFound, Step, StepList, ConfirmMnemonic, Mnemonic, PageContent, PageTitle } from 'features/shared/components'
import componentClassNames from 'utility/componentClassNames'
import styles from './MnemonicStepper.scss'
+import {withNamespaces} from 'react-i18next'
class MnemonicStepper extends React.Component {
constructor(props) {
if (this.props.mnemonic.length === 0) {
return <NotFound />
}
+ const t = this.props.t
return (
<div className={componentClassNames(this, 'flex-container')}>
- <PageTitle title={'Mnemonic'} />
+ <PageTitle title={t('mnemonic.backup')} />
<div className={`${styles.main} flex-container`}>
<div className={styles.content}>
<StepList>
- <Step>
+ <Step
+ nextL={t('mnemonic.continue')}
+ >
<Mnemonic
mnemonic={this.props.mnemonic}
/>
<button className={`btn btn-default ${styles.marginLeft}`}
onClick={() => this.props.succeeded()}
>
- skip
+ {t('mnemonic.skip')}
</button>
</Step>
succeeded: () => dispatch(actions.key.createSuccess()),
})
-export default connect(
+export default withNamespaces('translations') (connect(
mapStateToProps,
mapDispatchToProps
-)(MnemonicStepper)
+)(MnemonicStepper))
import { ErrorBanner, SingletonField} from 'features/shared/components'
import {reduxForm} from 'redux-form'
import style from './ConfirmMnemonic.scss'
+import {withNamespaces} from 'react-i18next'
class ConfirmMnemonic extends React.Component {
constructor(props) {
fields: {words},
error,
handleSubmit,
- submitting
+ submitting,
+ t
} = this.props
const { seedWords } = this.state
return (
<form onSubmit={handleSubmit(this.submitWithValidation)}>
- <h4>Enter your wallet recover phrase</h4>
- <p>Confirm that you backup your Recovery phrase by filling in the missing words:</p>
+ <h4>{t('mnemonic.confirmTitle')}</h4>
+ <p>{t('mnemonic.confirmMessage')}</p>
<div className={style.seedArea}>
{seedWords.map((seedWord) => {
return ( seedWord.show ?
className={`btn btn-primary ${style.submit}`}
type='submit'
disabled={submitting}>
- submit
+ {t('mnemonic.confirm')}
</button>
</form>
return errors
}
-export default (reduxForm({
+export default withNamespaces('translations') (reduxForm({
form: 'MnemonicInit',
fields: [
'words[].value',
}
.seedWord{
- //width: 130px;
- min-width: 120px;
- flex: 1 1 15%;
+ width: 121px;
height: 36px;
margin: 5px 10px 5px 0;
text-align: center;
.seedArea{
display: flex;
- //flex-direction: row;
flex-wrap: wrap;
margin-bottom: $gutter-size/2;
}
import React from 'react'
import { copyToClipboard } from 'utility/clipboard'
import styles from './Mnemonic.scss'
+import {withNamespaces} from 'react-i18next'
class Mnemonic extends React.Component {
constructor(props) {
}
render() {
+ const t = this.props.t
const {mnemonicArray} = this.state
return (
<div>
<div className={styles.flexContainer}>
- <h4>Mnemonic</h4>
+ <h4>{t('init.mnemonic')}</h4>
<button
className='btn btn-link'
onClick={() => copyToClipboard(this.props.mnemonic)}
<img className={styles.copy} src={require('images/copy.svg')}/>
</button>
</div>
- <p>Write down the following seed and save it in a secure location.</p>
+ <p>{t('mnemonic.backupMessage')}</p>
<div className={`${styles.flexContainer} ${styles.seedArea}`}>
{
}
}
-export default Mnemonic
+export default withNamespaces('translations') (Mnemonic)
import React from 'react'
import styles from './stepper.scss'
+import {withNamespaces} from 'react-i18next'
class Step extends React.Component {
displayNext,
component,
children,
+ t,
+ nextL,
+ prevL
} = this.props
if(isActive === false) return null
<div>
{component ? React.createElement(component) : children}
<Next
+ label={nextL || t('commonWords.continue')}
isActive={displayNext}
goToNextStep={() => this.props.goToNextStep()}
/>
<Previous
+ label={prevL || t('commonWords.cancel')}
isActive={displayPrevious}
goToPreviousStep={() => this.props.goToPreviousStep()}
/>
class Next extends React.Component {
render() {
- const { isActive } = this.props
+ const { isActive, label } = this.props
if (isActive === false) return null
return (
<button
className={`btn btn-primary ${styles.floatLeft}`}
onClick={() => this.props.goToNextStep()}>
- Continue
+ {label}
</button>
)
}
class Previous extends React.Component {
render() {
- const { isActive } = this.props
+ const { isActive, label } = this.props
if (isActive === false) return null
return (
<a
className={`btn btn-link ${styles.marginLeft}`}
onClick={() => this.props.goToPreviousStep()}>
- Cancel
+ {label}
</a>
)
}
}
-export default Step
\ No newline at end of file
+export default withNamespaces('translations') (Step)
\ No newline at end of file
"page":"Page",
"close":"Close",
"errorCode":"Error Code:",
- "requestId":"Request ID:"
+ "requestId":"Request ID:",
+ "cancel": "Cancel",
+ "continue":"Continue"
},
"crumbName":{
"transaction": "transactions",
"selectFile":"Select Restore File",
"restore":"Restore"
},
+ "mnemonic":{
+ "backup":"Backup Seed",
+ "backupMessage":"Mnemonic used to restore the key related information. Please write down the following seed and save it in a secure location.",
+ "continue":"I have written down the seed",
+ "skip": "Skip the backup",
+ "confirmTitle":"Enter your wallet recover phrase",
+ "confirm": "Confirm Seed",
+ "confirmMessage":"Confirm that you backed up your Mnemonic by filling the missing words."
+ },
"notFound":{
"title":"Not Found",
"word":"We couldn't find the page you were looking for."
"page":"页面",
"close":"关闭",
"errorCode":"错误代码:",
- "requestId":"请求ID:"
+ "requestId":"请求ID:",
+ "cancel": "返回",
+ "continue":"继续"
},
"crumbName":{
"transaction": "交易",
"selectFile":"选择备份文件",
"restore":"恢复"
},
+ "mnemonic":{
+ "backup":"备份助记词",
+ "backupMessage":"助记词用于恢复密钥相关的信息。 请将它准确的抄写到纸上,并存放在的安全的地方。",
+ "continue":"我已抄写助记词",
+ "skip": "跳过备份",
+ "confirmTitle":"请重复输入钱包助记词",
+ "confirm": "验证助记词",
+ "confirmMessage":"填写缺失的文字以验证你已经抄写下助记词。"
+ },
"notFound":{
"title":"页面找不到",
"word":"我们找不到你所寻找的页面。"