Meriadec Pillet
7 years ago
committed by
GitHub
14 changed files with 243 additions and 157 deletions
@ -0,0 +1,23 @@ |
|||||
|
// @flow
|
||||
|
|
||||
|
import React from 'react' |
||||
|
|
||||
|
import type { Account } from '@ledgerhq/wallet-common/lib/types' |
||||
|
import type { T } from 'types/common' |
||||
|
|
||||
|
import Box from 'components/base/Box' |
||||
|
import Label from 'components/base/Label' |
||||
|
import SelectAccount from 'components/SelectAccount' |
||||
|
|
||||
|
type Props = { |
||||
|
account: Account | null, |
||||
|
onChangeAccount: Function, |
||||
|
t: T, |
||||
|
} |
||||
|
|
||||
|
export default (props: Props) => ( |
||||
|
<Box flow={1}> |
||||
|
<Label>{props.t('receive:steps.chooseAccount.label')}</Label> |
||||
|
<SelectAccount onChange={props.onChangeAccount} value={props.account} /> |
||||
|
</Box> |
||||
|
) |
@ -1,11 +1,21 @@ |
|||||
// @flow
|
// @flow
|
||||
|
|
||||
|
import fs from 'fs' |
||||
import path from 'path' |
import path from 'path' |
||||
import FSBackend from 'i18next-node-fs-backend' |
import FSBackend from 'i18next-node-fs-backend' |
||||
|
|
||||
import staticPath from 'helpers/staticPath' |
import staticPath from 'helpers/staticPath' |
||||
import { createWithBackend } from './instanciate' |
import { createWithBackend } from './instanciate' |
||||
|
|
||||
|
const ns = p => |
||||
|
fs |
||||
|
.readdirSync(p) |
||||
|
.filter(f => !fs.statSync(path.join(p, f)).isDirectory()) |
||||
|
.map(file => file.split('.yml')[0]) |
||||
|
|
||||
export default createWithBackend(FSBackend, { |
export default createWithBackend(FSBackend, { |
||||
loadPath: path.join(staticPath, '/i18n/{{lng}}/{{ns}}.yml'), |
ns: ns(path.join(staticPath, '/i18n/en')), |
||||
|
backend: { |
||||
|
loadPath: path.join(staticPath, '/i18n/{{lng}}/{{ns}}.yml'), |
||||
|
}, |
||||
}) |
}) |
||||
|
@ -1,20 +1,16 @@ |
|||||
import { createWithResources } from './instanciate' |
import { createWithResources } from './instanciate' |
||||
|
|
||||
const resources = { |
const req = require.context('../../../static/i18n/en', true, /.yml$/) |
||||
account: require('../../../static/i18n/en/account.yml'), |
|
||||
accountsOrder: require('../../../static/i18n/en/accountsOrder.yml'), |
|
||||
addAccount: require('../../../static/i18n/en/addAccount.yml'), |
|
||||
common: require('../../../static/i18n/en/common.yml'), |
|
||||
dashboard: require('../../../static/i18n/en/dashboard.yml'), |
|
||||
device: require('../../../static/i18n/en/device.yml'), |
|
||||
language: require('../../../static/i18n/en/language.yml'), |
|
||||
receive: require('../../../static/i18n/en/receive.yml'), |
|
||||
send: require('../../../static/i18n/en/send.yml'), |
|
||||
settings: require('../../../static/i18n/en/settings.yml'), |
|
||||
sidebar: require('../../../static/i18n/en/sidebar.yml'), |
|
||||
time: require('../../../static/i18n/en/time.yml'), |
|
||||
operationsList: require('../../../static/i18n/en/operationsList.yml'), |
|
||||
update: require('../../../static/i18n/en/update.yml'), |
|
||||
} |
|
||||
|
|
||||
export default createWithResources({ en: resources }) |
const resources = req.keys().reduce((result, file) => { |
||||
|
const [, fileName] = file.match(/\.\/(.*)\.yml/) |
||||
|
result[fileName] = req(file) |
||||
|
return result |
||||
|
}, {}) |
||||
|
|
||||
|
export default createWithResources({ |
||||
|
ns: Object.keys(resources), |
||||
|
resources: { |
||||
|
en: resources, |
||||
|
}, |
||||
|
}) |
||||
|
@ -1,8 +1,8 @@ |
|||||
step1: |
step1: |
||||
connect: Connect your <0>Ledger device</0> to your computer and enter your <1>PIN code</1> on your device |
connect: Connect your <1>Ledger device</1> to your computer and enter your <3>PIN code</3> on your device |
||||
choose: We detected {{devicesCount}} devices connected, please select one: |
choose: "We detected {{count}} devices connected, please select one:" |
||||
|
|
||||
step2: |
step2: |
||||
open: Open <0>{{appName}}</0> App on your device |
open: Open <1><0>{{appName}}</0></1> App on your device |
||||
|
|
||||
info: You must use the device associated to the account <0>{{accountName}}</0> |
info: You must use the device associated to the account <1><0>{{accountName}}</0></1> |
||||
|
@ -1 +1,12 @@ |
|||||
title: Receive |
title: Receive funds |
||||
|
|
||||
|
steps: |
||||
|
chooseAccount: |
||||
|
title: Choose Account |
||||
|
label: Account |
||||
|
connectDevice: |
||||
|
title: Connect Device |
||||
|
confirmAddress: |
||||
|
title: Confirm Address |
||||
|
receiveFunds: |
||||
|
title: Receive Funds |
||||
|
Loading…
Reference in new issue