Loëck Vézien
7 years ago
6 changed files with 42 additions and 48 deletions
@ -1,11 +1,21 @@ |
|||
// @flow
|
|||
|
|||
import fs from 'fs' |
|||
import path from 'path' |
|||
import FSBackend from 'i18next-node-fs-backend' |
|||
|
|||
import staticPath from 'helpers/staticPath' |
|||
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, { |
|||
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' |
|||
|
|||
const resources = { |
|||
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'), |
|||
} |
|||
const req = require.context('../../../static/i18n/en', true, /.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: |
|||
connect: Connect your <0>Ledger device</0> to your computer and enter your <1>PIN code</1> on your device |
|||
choose_plural: We detected {{count}} devices connected, please select one: |
|||
connect: Connect your <1>Ledger device</1> to your computer and enter your <3>PIN code</3> on your device |
|||
choose: "We detected {{count}} devices connected, please select one:" |
|||
|
|||
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> |
|||
|
Loading…
Reference in new issue