From 1dec97342f14e456d078ff3432bf9d81b7dc2edd Mon Sep 17 00:00:00 2001 From: Vladimir Volek Date: Fri, 4 Jan 2019 19:34:42 +0100 Subject: [PATCH 001/118] Remove ripple --- public/data/appConfig.json | 41 -------------------------------------- 1 file changed, 41 deletions(-) diff --git a/public/data/appConfig.json b/public/data/appConfig.json index 6125250a..8d8dbead 100644 --- a/public/data/appConfig.json +++ b/public/data/appConfig.json @@ -72,47 +72,6 @@ "tx": "https://ropsten.etherscan.io/tx/", "address": "https://ropsten.etherscan.io/address/" } - }, - { - "type": "ripple", - "name": "Ripple", - "symbol": "XRP", - "shortcut": "xrp", - "bip44": "m/44'/144'/a'/0/0", - "decimals": 6, - "fee": { - "defaultFee": "12", - "minFee": "10", - "maxFee": "10000", - "levels": [ - {"name": "Normal", "value": "12", "recommended": true } - ] - }, - "explorer": { - "tx": "https://xrpcharts.ripple.com/#/transactions/", - "address": "https://xrpcharts.ripple.com/#/graph/" - } - }, - { - "type": "ripple", - "name": "Ripple Testnet", - "testnet": true, - "symbol": "tXRP", - "shortcut": "txrp", - "bip44": "m/44'/144'/a'/0/0", - "decimals": 6, - "fee": { - "defaultFee": "12", - "minFee": "10", - "maxFee": "10000", - "levels": [ - {"name": "Normal", "value": "12", "recommended": true } - ] - }, - "explorer": { - "tx": "https://sisyfos.trezor.io/ripple-testnet-explorer/tx/", - "address": "https://sisyfos.trezor.io/ripple-testnet-explorer/address/" - } } ], From 9f65832e5343794caf06e916c609f7d25f37bcf1 Mon Sep 17 00:00:00 2001 From: Vladimir Volek Date: Fri, 4 Jan 2019 19:34:42 +0100 Subject: [PATCH 002/118] Remove ripple --- public/data/appConfig.json | 41 -------------------------------------- 1 file changed, 41 deletions(-) diff --git a/public/data/appConfig.json b/public/data/appConfig.json index 6125250a..8d8dbead 100644 --- a/public/data/appConfig.json +++ b/public/data/appConfig.json @@ -72,47 +72,6 @@ "tx": "https://ropsten.etherscan.io/tx/", "address": "https://ropsten.etherscan.io/address/" } - }, - { - "type": "ripple", - "name": "Ripple", - "symbol": "XRP", - "shortcut": "xrp", - "bip44": "m/44'/144'/a'/0/0", - "decimals": 6, - "fee": { - "defaultFee": "12", - "minFee": "10", - "maxFee": "10000", - "levels": [ - {"name": "Normal", "value": "12", "recommended": true } - ] - }, - "explorer": { - "tx": "https://xrpcharts.ripple.com/#/transactions/", - "address": "https://xrpcharts.ripple.com/#/graph/" - } - }, - { - "type": "ripple", - "name": "Ripple Testnet", - "testnet": true, - "symbol": "tXRP", - "shortcut": "txrp", - "bip44": "m/44'/144'/a'/0/0", - "decimals": 6, - "fee": { - "defaultFee": "12", - "minFee": "10", - "maxFee": "10000", - "levels": [ - {"name": "Normal", "value": "12", "recommended": true } - ] - }, - "explorer": { - "tx": "https://sisyfos.trezor.io/ripple-testnet-explorer/tx/", - "address": "https://sisyfos.trezor.io/ripple-testnet-explorer/address/" - } } ], From 0a4093386943ed159c769f47979b2ecdbedc4364 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Tue, 5 Feb 2019 13:51:50 +0100 Subject: [PATCH 003/118] add react-intl --- package.json | 1 + yarn.lock | 42 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 86c03fe9..111865b9 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "react": "^16.6.3", "react-dom": "^16.6.3", "react-hot-loader": "^4.6.2", + "react-intl": "^2.8.0", "react-json-view": "^1.19.1", "react-qr-reader": "^2.1.2", "react-qr-svg": "^2.1.0", diff --git a/yarn.lock b/yarn.lock index 959c82ba..426c0aa9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4793,6 +4793,11 @@ hoist-non-react-statics@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.0.tgz#d2ca2dfc19c5a91c5a6615ce8e564ef0347e2a40" +hoist-non-react-statics@^2.5.5: + version "2.5.5" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" + integrity sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw== + hoist-non-react-statics@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.2.1.tgz#c09c0555c84b38a7ede6912b61efddafd6e75e1e" @@ -5085,6 +5090,30 @@ interpret@^1.0.0, interpret@^1.0.4: version "1.1.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" +intl-format-cache@^2.0.5: + version "2.1.0" + resolved "https://registry.yarnpkg.com/intl-format-cache/-/intl-format-cache-2.1.0.tgz#04a369fecbfad6da6005bae1f14333332dcf9316" + integrity sha1-BKNp/sv61tpgBbrh8UMzMy3PkxY= + +intl-messageformat-parser@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/intl-messageformat-parser/-/intl-messageformat-parser-1.4.0.tgz#b43d45a97468cadbe44331d74bb1e8dea44fc075" + integrity sha1-tD1FqXRoytvkQzHXS7Ho3qRPwHU= + +intl-messageformat@^2.0.0, intl-messageformat@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-2.2.0.tgz#345bcd46de630b7683330c2e52177ff5eab484fc" + integrity sha1-NFvNRt5jC3aDMwwuUhd/9eq0hPw= + dependencies: + intl-messageformat-parser "1.4.0" + +intl-relativeformat@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/intl-relativeformat/-/intl-relativeformat-2.1.0.tgz#010f1105802251f40ac47d0e3e1a201348a255df" + integrity sha1-AQ8RBYAiUfQKxH0OPhogE0iiVd8= + dependencies: + intl-messageformat "^2.0.0" + into-stream@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" @@ -5092,7 +5121,7 @@ into-stream@^3.1.0: from2 "^2.1.1" p-is-promise "^1.1.0" -invariant@^2.2.0, invariant@^2.2.4: +invariant@^2.1.1, invariant@^2.2.0, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" dependencies: @@ -7972,6 +8001,17 @@ react-input-autosize@^2.2.1: dependencies: prop-types "^15.5.8" +react-intl@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-2.8.0.tgz#20b0c1f01d1292427768aa8ec9e51ab7e36503ba" + integrity sha512-1cSasNkHxZOXYYhms9Q1tSEWF8AWZQNq3nPLB/j8mYV0ZTSt2DhGQXHfKrKQMu4cgj9J1Crqg7xFPICTBgzqtQ== + dependencies: + hoist-non-react-statics "^2.5.5" + intl-format-cache "^2.0.5" + intl-messageformat "^2.1.0" + intl-relativeformat "^2.1.0" + invariant "^2.1.1" + react-is@^16.3.2, react-is@^16.6.0, react-is@^16.6.3: version "16.6.3" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.6.3.tgz#d2d7462fcfcbe6ec0da56ad69047e47e56e7eac0" From 736654fdd3409f8c3ba1aeb97d732bba57936d0a Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Tue, 5 Feb 2019 13:52:41 +0100 Subject: [PATCH 004/118] add flow type for react-intl MessageDescriptor --- src/flowtype/npm/react-intl.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/flowtype/npm/react-intl.js diff --git a/src/flowtype/npm/react-intl.js b/src/flowtype/npm/react-intl.js new file mode 100644 index 00000000..85b77ec3 --- /dev/null +++ b/src/flowtype/npm/react-intl.js @@ -0,0 +1,14 @@ +export type MessageDescriptor = { + // A unique, stable identifier for the message + id: string, + + // The default message (probably in English) + defaultMessage: string, + + // Context for the translator about how it's used in the UI + description?: string | object, +}; + +export type Messages = { + [key: string]: MessageDescriptor +}; \ No newline at end of file From ddf2819de3df5f9a86500e9ad523ca53a2b127f5 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Wed, 6 Feb 2019 18:01:09 +0100 Subject: [PATCH 005/118] add initial support for setting language --- src/actions/WalletActions.js | 8 ++++ src/actions/constants/wallet.js | 3 +- src/reducers/WalletReducer.js | 8 ++++ src/support/ConnectedIntlProvider.js | 49 +++++++++++++++++++++++ src/views/index.js | 59 +++++++++++++++------------- translations/de.json | 4 ++ translations/en.json | 4 ++ webpack/constants.js | 4 +- webpack/dev.babel.js | 4 +- 9 files changed, 111 insertions(+), 32 deletions(-) create mode 100644 src/support/ConnectedIntlProvider.js create mode 100644 translations/de.json create mode 100644 translations/en.json diff --git a/src/actions/WalletActions.js b/src/actions/WalletActions.js index cfc23b12..a17cb3cf 100644 --- a/src/actions/WalletActions.js +++ b/src/actions/WalletActions.js @@ -42,6 +42,9 @@ export type WalletAction = { type: typeof WALLET.SHOW_BETA_DISCLAIMER | typeof WALLET.HIDE_BETA_DISCLAIMER | typeof WALLET.SET_FIRST_LOCATION_CHANGE, } | { type: typeof WALLET.TOGGLE_SIDEBAR, +} | { + type: typeof WALLET.SET_LANGUAGE, + language: string } export const init = (): ThunkAction => (dispatch: Dispatch): void => { @@ -68,6 +71,11 @@ export const toggleSidebar = (): WalletAction => ({ type: WALLET.TOGGLE_SIDEBAR, }); +export const setLanguage = (language: string): WalletAction => ({ + type: WALLET.SET_LANGUAGE, + language, +}); + // This method will be called after each DEVICE.CONNECT action // if connected device has different "passphrase_protection" settings than saved instances // all saved instances will be removed immediately inside DevicesReducer diff --git a/src/actions/constants/wallet.js b/src/actions/constants/wallet.js index 40f0e914..b4213abd 100644 --- a/src/actions/constants/wallet.js +++ b/src/actions/constants/wallet.js @@ -12,4 +12,5 @@ export const HIDE_BETA_DISCLAIMER: 'wallet__hide_beta_disclaimer' = 'wallet__hid export const CLEAR_UNAVAILABLE_DEVICE_DATA: 'wallet__clear_unavailable_device_data' = 'wallet__clear_unavailable_device_data'; -export const TOGGLE_SIDEBAR: 'wallet__toggle_sidebar' = 'wallet__toggle_sidebar'; \ No newline at end of file +export const TOGGLE_SIDEBAR: 'wallet__toggle_sidebar' = 'wallet__toggle_sidebar'; +export const SET_LANGUAGE: 'wallet__set_language' = 'wallet__set_language'; \ No newline at end of file diff --git a/src/reducers/WalletReducer.js b/src/reducers/WalletReducer.js index 35df8b18..23ef6c82 100644 --- a/src/reducers/WalletReducer.js +++ b/src/reducers/WalletReducer.js @@ -13,6 +13,7 @@ import type { Action, RouterLocationState, TrezorDevice } from 'flowtype'; type State = { ready: boolean; online: boolean; + language: string; dropdownOpened: boolean; showBetaDisclaimer: boolean; showSidebar: boolean; @@ -26,6 +27,7 @@ type State = { const initialState: State = { ready: false, online: navigator.onLine, + language: 'en', dropdownOpened: false, firstLocationChange: true, showBetaDisclaimer: false, @@ -119,6 +121,12 @@ export default function wallet(state: State = initialState, action: Action): Sta showBetaDisclaimer: false, }; + case WALLET.SET_LANGUAGE: + return { + ...state, + language: action.language, + }; + default: return state; } diff --git a/src/support/ConnectedIntlProvider.js b/src/support/ConnectedIntlProvider.js new file mode 100644 index 00000000..86adc338 --- /dev/null +++ b/src/support/ConnectedIntlProvider.js @@ -0,0 +1,49 @@ +/* @flow */ +import * as React from 'react'; +import { connect } from 'react-redux'; +import type { MapStateToProps } from 'react-redux'; +import type { State } from 'flowtype'; + +import { IntlProvider, addLocaleData } from 'react-intl'; +import en from 'react-intl/locale-data/en'; +import de from 'react-intl/locale-data/de'; + +import messagesEn from '../../translations/en.json'; +import messagesDe from '../../translations/de.json'; + +addLocaleData([...en, ...de]); + +const messages = { + en: messagesEn, + de: messagesDe, +}; + +type OwnProps = { + children: React.Node +} + +type StateProps = { + locale: string +} + +type Props = StateProps & OwnProps; + +const mapStateToProps: MapStateToProps = (state: State): StateProps => ({ + locale: state.wallet.language, +}); + + +const ReactIntlProvider = ({ children, locale }: Props) => { + console.log(locale); + console.log(messages); + return ( + + {children} + + ); +}; + +export default connect(mapStateToProps, null)(ReactIntlProvider); \ No newline at end of file diff --git a/src/views/index.js b/src/views/index.js index 62221dce..cc8bdc23 100644 --- a/src/views/index.js +++ b/src/views/index.js @@ -5,6 +5,7 @@ import { Provider } from 'react-redux'; import { ConnectedRouter } from 'connected-react-router'; // general +import ConnectedIntlProvider from 'support/ConnectedIntlProvider'; import ErrorBoundary from 'support/ErrorBoundary'; import ImagesPreloader from 'support/ImagesPreloader'; import { getPattern } from 'support/routes'; @@ -35,34 +36,36 @@ import store, { history } from 'store'; const App = () => ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); diff --git a/translations/de.json b/translations/de.json new file mode 100644 index 00000000..df1039fa --- /dev/null +++ b/translations/de.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Willkommen bei react-intl", + "dashboard.selectyourcoin.body": "Zum Loslegen editiere src/App.js." +} diff --git a/translations/en.json b/translations/en.json new file mode 100644 index 00000000..5c2bbefb --- /dev/null +++ b/translations/en.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin EN", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} diff --git a/webpack/constants.js b/webpack/constants.js index 21e67444..b7381548 100644 --- a/webpack/constants.js +++ b/webpack/constants.js @@ -8,6 +8,7 @@ const constants: Object = Object.freeze({ BUILD: path.join(ABSOLUTE_BASE, 'build/'), PUBLIC: path.join(ABSOLUTE_BASE, 'public/'), SRC: path.join(ABSOLUTE_BASE, 'src/'), + TRANSLATIONS: path.join(ABSOLUTE_BASE, 'translations/'), PORT: 8081, INDEX: path.join(ABSOLUTE_BASE, 'src/index.html'), TREZOR_CONNECT_ROOT: path.join(ABSOLUTE_BASE, '../trezor-connect/'), @@ -24,10 +25,11 @@ export const TREZOR_CONNECT_FILES: string = path.join(constants.TREZOR_CONNECT_R export const { BUILD, SRC, + TRANSLATIONS, PORT, INDEX, PUBLIC, -}: { BUILD: string, SRC: string, PORT: string, INDEX: string, PUBLIC: string } = constants; +}: { BUILD: string, SRC: string, TRANSLATIONS: string, PORT: string, INDEX: string, PUBLIC: string } = constants; // export const SRC: string = constants.SRC; // export const PORT: string = constants.PORT; // export const INDEX: string = constants.INDEX; diff --git a/webpack/dev.babel.js b/webpack/dev.babel.js index 8d6862c1..b487ed18 100644 --- a/webpack/dev.babel.js +++ b/webpack/dev.babel.js @@ -9,7 +9,7 @@ import WebpackBuildNotifierPlugin from 'webpack-build-notifier'; // import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import { - SRC, BUILD, PORT, PUBLIC, + SRC, BUILD, PORT, PUBLIC, TRANSLATIONS, } from './constants'; const gitRevisionPlugin = new GitRevisionPlugin(); @@ -79,7 +79,7 @@ module.exports = { { type: 'javascript/auto', test: /\.json/, - exclude: /(node_modules)/, + exclude: [/(node_modules)/, TRANSLATIONS], loader: 'file-loader', query: { outputPath: './data', From e2ccb3153283d2506de247900822a898e0b1a4f4 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Wed, 6 Feb 2019 18:03:19 +0100 Subject: [PATCH 006/118] save selected language to local storage --- src/actions/LocalStorageActions.js | 14 ++++++++++++++ src/services/LocalStorageService.js | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/src/actions/LocalStorageActions.js b/src/actions/LocalStorageActions.js index 3fed5c65..5cb91059 100644 --- a/src/actions/LocalStorageActions.js +++ b/src/actions/LocalStorageActions.js @@ -52,6 +52,7 @@ const KEY_DISCOVERY: string = `${STORAGE_PATH}discovery`; const KEY_TOKENS: string = `${STORAGE_PATH}tokens`; const KEY_PENDING: string = `${STORAGE_PATH}pending`; const KEY_BETA_MODAL: string = '/betaModalPrivacy'; // this key needs to be compatible with "parent" (old) wallet +const KEY_LANGUAGE: string = `${STORAGE_PATH}language`; // https://github.com/STRML/react-localstorage/blob/master/react-localstorage.js // or @@ -235,6 +236,14 @@ const loadStorageData = (): ThunkAction => (dispatch: Dispatch): void => { }); } } + + const language: ?string = storageUtils.get(TYPE, KEY_LANGUAGE); + if (language) { + dispatch({ + type: WALLET.SET_LANGUAGE, + language: JSON.parse(language), + }); + } }; export const loadData = (): ThunkAction => (dispatch: Dispatch, getState: GetState): void => { @@ -250,3 +259,8 @@ export const hideBetaDisclaimer = (): ThunkAction => (dispatch: Dispatch): void storageUtils.set(TYPE, KEY_BETA_MODAL, true); dispatch(loadJSON()); }; + +export const setLanguage = (): ThunkAction => (dispatch: Dispatch, getState: GetState): void => { + const { language } = getState().wallet; + storageUtils.set(TYPE, KEY_LANGUAGE, JSON.stringify(language)); +}; diff --git a/src/services/LocalStorageService.js b/src/services/LocalStorageService.js index 7719120e..98d8852b 100644 --- a/src/services/LocalStorageService.js +++ b/src/services/LocalStorageService.js @@ -25,6 +25,10 @@ const LocalStorageService: Middleware = (api: MiddlewareAPI) => (next: Middlewar case WALLET.HIDE_BETA_DISCLAIMER: api.dispatch(LocalStorageActions.hideBetaDisclaimer()); break; + + case WALLET.SET_LANGUAGE: + api.dispatch(LocalStorageActions.setLanguage()); + break; // first time saving case CONNECT.REMEMBER: api.dispatch(LocalStorageActions.save()); From 302f48facb63e89ddbe115d8dfe4e7b339f1da3d Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Wed, 6 Feb 2019 18:04:04 +0100 Subject: [PATCH 007/118] add supported languages to config --- src/config/variables.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/config/variables.js b/src/config/variables.js index 48a7f1a3..d5b166db 100644 --- a/src/config/variables.js +++ b/src/config/variables.js @@ -78,3 +78,23 @@ export const LINE_HEIGHT = { BASE: '1.8', TREZOR_ACTION: '37px', }; + +export const LANGUAGE = [ + { code: 'en', name: 'English', en: 'English' }, + { code: 'bn', name: 'Bengali', en: 'Bengali' }, + { code: 'cs', name: 'Česky', en: 'Czech' }, + { code: 'de', name: 'Deutsch', en: 'German' }, + { code: 'el', name: 'Ελληνικά', en: 'Greek' }, + { code: 'es', name: 'Español', en: 'Spanish' }, + { code: 'fr', name: 'Français', en: 'French' }, + { code: 'id', name: 'Bahasa Indonesia', en: 'Indonesian' }, + { code: 'it', name: 'Italiano', en: 'Italian' }, + { code: 'ja', name: '日本語', en: 'Japanese' }, + { code: 'nl', name: 'Nederlands', en: 'Dutch' }, + { code: 'pl', name: 'Polski', en: 'Polish' }, + { code: 'pt', name: 'Português', en: 'Portuguese' }, + { code: 'ru', name: 'Русский', en: 'Russian' }, + { code: 'uk', name: 'Український', en: 'Ukrainian' }, + { code: 'zh', name: '中文(简体)', en: 'Chinese Simplified' }, + { code: 'zh_TW', name: '中文(台灣)', en: 'Chinese Traditional' }, +]; \ No newline at end of file From 567dccc6b268254c35ede817e29520fc65c09810 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Wed, 6 Feb 2019 18:04:46 +0100 Subject: [PATCH 008/118] add language picker to the header --- .../components/LanguagePicker/Container.js | 36 +++++++++++++++ .../Header/components/LanguagePicker/index.js | 45 +++++++++++++++++++ src/components/Header/index.js | 13 ++++++ src/config/colors.js | 1 + 4 files changed, 95 insertions(+) create mode 100644 src/components/Header/components/LanguagePicker/Container.js create mode 100644 src/components/Header/components/LanguagePicker/index.js diff --git a/src/components/Header/components/LanguagePicker/Container.js b/src/components/Header/components/LanguagePicker/Container.js new file mode 100644 index 00000000..0b076d3e --- /dev/null +++ b/src/components/Header/components/LanguagePicker/Container.js @@ -0,0 +1,36 @@ +/* @flow */ +import { bindActionCreators } from 'redux'; +import { connect } from 'react-redux'; +import { withRouter } from 'react-router-dom'; + +import * as WalletActions from 'actions/WalletActions'; +import type { MapStateToProps, MapDispatchToProps } from 'react-redux'; +import type { State, Dispatch } from 'flowtype'; + +import LanguagePicker from './index'; + +type StateProps = { + language: string, +} + +type DispatchProps = { + setLanguage: typeof WalletActions.setLanguage, +}; + +type OwnProps = { + +} + +export type Props = StateProps & DispatchProps; + +const mapStateToProps: MapStateToProps = (state: State): StateProps => ({ + language: state.wallet.language, +}); + +const mapDispatchToProps: MapDispatchToProps = (dispatch: Dispatch): DispatchProps => ({ + setLanguage: bindActionCreators(WalletActions.setLanguage, dispatch), +}); + +export default withRouter( + connect(mapStateToProps, mapDispatchToProps)(LanguagePicker), +); diff --git a/src/components/Header/components/LanguagePicker/index.js b/src/components/Header/components/LanguagePicker/index.js new file mode 100644 index 00000000..fbdc52da --- /dev/null +++ b/src/components/Header/components/LanguagePicker/index.js @@ -0,0 +1,45 @@ +/* eslint-disable jsx-a11y/accessible-emoji */ +/* @flow */ +import * as React from 'react'; +import styled from 'styled-components'; +import colors from 'config/colors'; +import { LANGUAGE } from 'config/variables'; + +import type { Props } from './Container'; + +const SelectWrapper = styled.div` + display: flex; + color: ${colors.WHITE}; + align-items: center; +`; + +const SelectIcon = styled.span` + padding: 0px 6px; +`; + +const StyledSelect = styled.select` + border: 0; + background: transparent; + cursor: pointer; + appearance: none; + border-radius: 0; + overflow: visible; + color: ${colors.WHITE}; +`; + + +const LanguagePicker = ({ language, setLanguage }: Props) => ( + + 🌎 + setLanguage(e.target.value)} + value={language} + > + {LANGUAGE.map(lang => ( + + ))} + + +); + +export default LanguagePicker; diff --git a/src/components/Header/index.js b/src/components/Header/index.js index ec5a767f..1bb4c0e7 100644 --- a/src/components/Header/index.js +++ b/src/components/Header/index.js @@ -1,3 +1,4 @@ +/* eslint-disable jsx-a11y/accessible-emoji */ /* @flow */ import React from 'react'; import styled from 'styled-components'; @@ -5,6 +6,7 @@ import { NavLink } from 'react-router-dom'; import colors from 'config/colors'; import { SCREEN_SIZE } from 'config/variables'; import type { toggleSidebar as toggleSidebarType } from 'actions/WalletActions'; +import LanguagePicker from './components/LanguagePicker/Container'; const Wrapper = styled.header` width: 100%; @@ -70,7 +72,11 @@ const Logo = styled.div` `; const MenuLinks = styled.div` + display: flex; + align-content: center; + justify-content: flex-end; flex: 0; + height: 100%; @media screen and (max-width: ${SCREEN_SIZE.SM}) { flex: 0 1 33%; @@ -78,6 +84,12 @@ const MenuLinks = styled.div` `; const Projects = styled.div` + display: flex; + align-items: center; + height: 100%; + border-right: 1px solid ${colors.HEADER_DIVIDER}; + padding-right: 24px; + margin-right: 24px; @media screen and (max-width: ${SCREEN_SIZE.SM}) { display: none; @@ -137,6 +149,7 @@ const Header = ({ sidebarEnabled, sidebarOpened, toggleSidebar }: Props) => ( Blog Support + diff --git a/src/config/colors.js b/src/config/colors.js index 23140583..139efa59 100644 --- a/src/config/colors.js +++ b/src/config/colors.js @@ -6,6 +6,7 @@ export default { WALLET_VIEW_TITLE: '#505050', HEADER: '#1A1A1A', + HEADER_DIVIDER: '#424242', BODY: '#E3E3E3', MAIN: '#FBFBFB', LANDING: '#F9F9F9', From d1610e02ec642ace8f97785924a3ac44f7e463a7 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Wed, 6 Feb 2019 18:42:50 +0100 Subject: [PATCH 009/118] fix eslint --- src/views/Wallet/components/LeftNavigation/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/Wallet/components/LeftNavigation/index.js b/src/views/Wallet/components/LeftNavigation/index.js index ac7a37ab..d440832c 100644 --- a/src/views/Wallet/components/LeftNavigation/index.js +++ b/src/views/Wallet/components/LeftNavigation/index.js @@ -257,7 +257,8 @@ class LeftNavigation extends React.PureComponent { color={colors.TEXT_SECONDARY} /> - ) : null + + ) : null } {this.props.devices.length > 1 && ( Date: Wed, 6 Feb 2019 18:46:54 +0100 Subject: [PATCH 010/118] use test translations in dashboard --- src/views/Wallet/views/Dashboard/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/views/Wallet/views/Dashboard/index.js b/src/views/Wallet/views/Dashboard/index.js index c3179c35..7266057b 100644 --- a/src/views/Wallet/views/Dashboard/index.js +++ b/src/views/Wallet/views/Dashboard/index.js @@ -1,3 +1,4 @@ +/* @flow */ import React from 'react'; import styled from 'styled-components'; import { connect } from 'react-redux'; @@ -9,6 +10,9 @@ import RippleIcon from 'images/coins/xrp.png'; import { H1 } from 'components/Heading'; import Paragraph from 'components/Paragraph'; +import { FormattedMessage } from 'react-intl'; +import messages from './index.messages'; + const Wrapper = styled.div` display: flex; flex-direction: column; @@ -50,8 +54,8 @@ const Dashboard = () => ( -

Please select your coin

- You will gain access to receiving & sending selected coin +

+ From a6ab089f350327319908c30c9b8dbcd329cdae51 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Wed, 6 Feb 2019 18:47:33 +0100 Subject: [PATCH 011/118] rerender subtree on language change --- src/support/ConnectedIntlProvider.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/support/ConnectedIntlProvider.js b/src/support/ConnectedIntlProvider.js index 86adc338..65ec53c8 100644 --- a/src/support/ConnectedIntlProvider.js +++ b/src/support/ConnectedIntlProvider.js @@ -38,6 +38,7 @@ const ReactIntlProvider = ({ children, locale }: Props) => { console.log(messages); return ( From 8258a7ee4d40c99658ea699bd07456bed509eaa3 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Wed, 6 Feb 2019 18:48:35 +0100 Subject: [PATCH 012/118] add test message definitions for Dashboard --- .../Wallet/views/Dashboard/index.messages.js | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/views/Wallet/views/Dashboard/index.messages.js diff --git a/src/views/Wallet/views/Dashboard/index.messages.js b/src/views/Wallet/views/Dashboard/index.messages.js new file mode 100644 index 00000000..5ee8098c --- /dev/null +++ b/src/views/Wallet/views/Dashboard/index.messages.js @@ -0,0 +1,21 @@ +/* @flow */ +import { defineMessages } from 'react-intl'; +import type { Messages } from 'flowtype/npm/react-intl'; + + +const messages: Messages = { + title: { + id: 'dashboard.selectyourcoin.title', + defaultMessage: 'Please select your coin', + description: 'Title of the dashboard component if coin was not selected', + }, + body: { + id: 'dashboard.selectyourcoin.body', + defaultMessage: 'You will gain access to receiving & sending selected coin', + description: 'Content of the dashboard component if coin was not selected', + }, +}; + +const definedMessages: typeof messages = defineMessages(messages); + +export default definedMessages; \ No newline at end of file From db5c7b38f0bdeb7028539deff05dc3d17441675c Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Tue, 12 Feb 2019 18:35:59 +0100 Subject: [PATCH 013/118] add .env to .gitignore --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9120523b..3b112708 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,6 @@ _old coverage test/**/__diff_output__ -test/screenshots \ No newline at end of file +test/screenshots + +.env \ No newline at end of file From 06ddcbfbf2c48ded3d1c8f64396d0f6921295759 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Tue, 12 Feb 2019 18:37:09 +0100 Subject: [PATCH 014/118] install react-intl, babel-plugin-react-intl, translations-manager --- package.json | 5 +++- yarn.lock | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 75 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b88487f5..f4784651 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "build:stable": "rimraf build/stable && npx webpack --config webpack/production.babel.js --output-path build/stable --progress --bail", "build:beta": "rimraf build/beta && cross-env BUILD=beta npx webpack --config webpack/production.babel.js --output-path build/beta --progress --bail", "build:dev": "rimraf build.dev && cross-env BUILD=development npx webpack --config webpack/production.babel.js --output-path build/dev --progress --bail", + "translations:extract": "cross-env NODE_ENV=translations npx babel src", "flow": "flow check src", "lint": "run-s lint:*", "lint:js": "npx eslint ./src ./webpack", @@ -49,13 +50,13 @@ "morgan": "^1.9.1", "npm-run-all": "^4.1.5", "prop-types": "^15.6.2", - "react-intl": "^2.8.0", "raf": "^3.4.1", "raven-js": "^3.27.0", "rc-tooltip": "^3.7.3", "react": "^16.7.0", "react-dom": "^16.7.0", "react-hot-loader": "^4.6.5", + "react-intl": "^2.8.0", "react-json-view": "^1.19.1", "react-qr-reader": "^2.1.2", "react-qr-svg": "^2.1.0", @@ -77,6 +78,7 @@ "styled-normalize": "^8.0.6", "trezor-bridge-communicator": "1.0.2", "trezor-connect": "7.0.0-beta.2", + "trezor-translations-manager": "slowbackspace/trezor-translations-manager", "wallet-address-validator": "^0.2.4", "web3": "1.0.0-beta.35", "webpack": "^4.29.1", @@ -100,6 +102,7 @@ "babel-jest": "^24.1.0", "babel-loader": "^8.0.5", "babel-plugin-module-resolver": "^3.1.3", + "babel-plugin-react-intl": "^3.0.1", "babel-plugin-styled-components": "^1.10.0", "cypress": "^3.1.5", "cypress-image-snapshot": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index 3a58c6f2..9f946fab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -725,7 +725,7 @@ pirates "^4.0.0" source-map-support "^0.5.9" -"@babel/runtime@^7.1.2": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2": version "7.3.1" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.3.1.tgz#574b03e8e8a9898eaf4a872a92ea20b7846f6f2a" integrity sha512-7jGW8ppV0ant637pIqAcFfQDDH1orEPGJb8aXfUozuCU3QqX7rX4DA8iwrbPrR1hcH0FTTHz47yQnk+bl5xHQA== @@ -1770,6 +1770,15 @@ babel-plugin-module-resolver@^3.1.3: reselect "^3.0.1" resolve "^1.4.0" +babel-plugin-react-intl@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/babel-plugin-react-intl/-/babel-plugin-react-intl-3.0.1.tgz#4abc7fff04a7bbbb7034aec0a675713f2e52181c" + integrity sha512-FqnEO+Tq7kJVUPKsSG3s5jaHi3pAC4RUR11IrscvjsfkOApLP2DtzNo6dtQ+tX+OzEzJx7cUms8aCw5BFyW5xg== + dependencies: + "@babel/runtime" "^7.0.0" + intl-messageformat-parser "^1.2.0" + mkdirp "^0.5.1" + "babel-plugin-styled-components@>= 1": version "1.9.2" resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.9.2.tgz#0e6a6587454dcb1c9a362a8fd31fc0b075ccd260" @@ -2946,6 +2955,16 @@ concat-stream@1.6.0, concat-stream@^1.5.0: readable-stream "^2.2.2" typedarray "^0.0.6" +concat-stream@1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + connect-history-api-fallback@^1.3.0: version "1.5.0" resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a" @@ -3216,6 +3235,22 @@ csstype@^2.5.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.2.tgz#3043d5e065454579afc7478a18de41909c8a2f01" integrity sha512-Rl7PvTae0pflc1YtxtKbiSqq20Ts6vpIYOD5WBafl4y123DyHUeLrRdQP66sQW8/6gmX8jrYJLXwNeMqYVJcow== +csv-stringify@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/csv-stringify/-/csv-stringify-5.3.0.tgz#ff2dfafa6fcccd455ff5039be9c202475aa3bbe0" + integrity sha512-VMYPbE8zWz475smwqb9VbX9cj0y4J0PBl59UdcqzLkzXHZZ8dh4Rmbb0ZywsWEtUml4A96Hn7Q5MW9ppVghYzg== + dependencies: + lodash.get "~4.4.2" + +csvtojson@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/csvtojson/-/csvtojson-2.0.8.tgz#d889f19576b2b33ead235490d2e5c9791481e8d3" + integrity sha512-DC6YFtsJiA7t/Yz+KjzT6GXuKtU/5gRbbl7HJqvDVVir+dxdw2/1EgwfgJdnsvUT7lOnON5DvGftKuYWX1nMOQ== + dependencies: + bluebird "^3.5.1" + lodash "^4.17.3" + strip-bom "^2.0.0" + currently-unhandled@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" @@ -3685,6 +3720,11 @@ dot-prop@^4.1.1: dependencies: is-obj "^1.0.0" +dotenv@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-6.2.0.tgz#941c0410535d942c8becf28d3f357dbd9d476064" + integrity sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w== + drbg.js@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b" @@ -4457,6 +4497,16 @@ extract-zip@1.6.6: mkdirp "0.5.0" yauzl "2.4.1" +extract-zip@^1.6.7: + version "1.6.7" + resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.6.7.tgz#a840b4b8af6403264c8db57f4f1a74333ef81fe9" + integrity sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k= + dependencies: + concat-stream "1.6.2" + debug "2.6.9" + mkdirp "0.5.1" + yauzl "2.4.1" + extsprintf@1.3.0, extsprintf@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" @@ -5647,7 +5697,7 @@ intl-format-cache@^2.0.5: resolved "https://registry.yarnpkg.com/intl-format-cache/-/intl-format-cache-2.1.0.tgz#04a369fecbfad6da6005bae1f14333332dcf9316" integrity sha1-BKNp/sv61tpgBbrh8UMzMy3PkxY= -intl-messageformat-parser@1.4.0: +intl-messageformat-parser@1.4.0, intl-messageformat-parser@^1.2.0: version "1.4.0" resolved "https://registry.yarnpkg.com/intl-messageformat-parser/-/intl-messageformat-parser-1.4.0.tgz#b43d45a97468cadbe44331d74bb1e8dea44fc075" integrity sha1-tD1FqXRoytvkQzHXS7Ho3qRPwHU= @@ -6894,6 +6944,11 @@ lodash.flow@^3.3.0: version "3.5.0" resolved "https://registry.yarnpkg.com/lodash.flow/-/lodash.flow-3.5.0.tgz#87bf40292b8cf83e4e8ce1a3ae4209e20071675a" +lodash.get@~4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" + integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= + lodash.isarguments@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" @@ -10646,6 +10701,20 @@ trezor-connect@7.0.0-beta.2: events "^1.1.1" whatwg-fetch "^2.0.4" +trezor-translations-manager@slowbackspace/trezor-translations-manager: + version "1.0.0" + resolved "https://codeload.github.com/slowbackspace/trezor-translations-manager/tar.gz/1e2e524d6b5be84ea39f74535066c3f22067692d" + dependencies: + csv-stringify "^5.3.0" + csvtojson "^2.0.8" + dotenv "^6.2.0" + extract-zip "^1.6.7" + fs-extra "^7.0.1" + glob "^7.1.3" + meow "^5.0.0" + request "^2.88.0" + request-promise-native "^1.0.5" + trim-newlines@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" From aa097041462cd690ba26bb4288d858d681a94725 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Tue, 12 Feb 2019 18:37:34 +0100 Subject: [PATCH 015/118] add configuration to run extraction of messages for translation --- babel.config.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/babel.config.js b/babel.config.js index 63b60eee..d35cc679 100644 --- a/babel.config.js +++ b/babel.config.js @@ -44,6 +44,18 @@ module.exports = (api) => { presets.push('jest'); } + if (api.env('translations')) { + plugins.push( + [ + 'react-intl', + { + messagesDir: './translations/extractedMessages/', + extractSourceLocation: true, + }, + ], + ); + } + return { presets, plugins, From 597842ae64b4935052acdd4d3330b0cefffd473f Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Tue, 12 Feb 2019 18:38:00 +0100 Subject: [PATCH 016/118] add configuration for trezor-translations-manager --- l10n.config.json | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 l10n.config.json diff --git a/l10n.config.json b/l10n.config.json new file mode 100644 index 00000000..83b03392 --- /dev/null +++ b/l10n.config.json @@ -0,0 +1,40 @@ +{ + "extractedMessagesFilePattern": "translations/extractedMessages/**/*.json", + "localesOutputDir": "translations/locales/", + "outputDir": "translations/", + "project": { + "identifier": "trezor-wallet-test", + "apiKeyEnv": "CROWDIN_API_KEY" + }, + "languages": [ + "af", + "ar", + "bn", + "zh-CN", + "zh-TW", + "cs", + "nl", + "en", + "et", + "fr", + "de", + "el", + "he", + "hi", + "hu", + "id", + "it", + "ja", + "ko", + "no", + "fa", + "pl", + "pt-PT", + "ru", + "es-ES", + "sv-SE", + "tr", + "uk", + "vi" + ] +} From 8cc69b7cb57cc1a8a968392b78ff4dc59556b7f3 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Tue, 12 Feb 2019 18:40:28 +0100 Subject: [PATCH 017/118] defineMessage for babel plugin --- src/views/Wallet/views/Dashboard/index.messages.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/views/Wallet/views/Dashboard/index.messages.js b/src/views/Wallet/views/Dashboard/index.messages.js index 5ee8098c..0505d977 100644 --- a/src/views/Wallet/views/Dashboard/index.messages.js +++ b/src/views/Wallet/views/Dashboard/index.messages.js @@ -2,8 +2,7 @@ import { defineMessages } from 'react-intl'; import type { Messages } from 'flowtype/npm/react-intl'; - -const messages: Messages = { +const definedMessages: Messages = defineMessages({ title: { id: 'dashboard.selectyourcoin.title', defaultMessage: 'Please select your coin', @@ -14,8 +13,6 @@ const messages: Messages = { defaultMessage: 'You will gain access to receiving & sending selected coin', description: 'Content of the dashboard component if coin was not selected', }, -}; - -const definedMessages: typeof messages = defineMessages(messages); +}); export default definedMessages; \ No newline at end of file From ec0e1b0bc57a928ac96dbb2121e245416c0192a0 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Tue, 12 Feb 2019 19:42:31 +0100 Subject: [PATCH 018/118] install TTM as dev dependency --- package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f4784651..19b50848 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,6 @@ "styled-normalize": "^8.0.6", "trezor-bridge-communicator": "1.0.2", "trezor-connect": "7.0.0-beta.2", - "trezor-translations-manager": "slowbackspace/trezor-translations-manager", "wallet-address-validator": "^0.2.4", "web3": "1.0.0-beta.35", "webpack": "^4.29.1", @@ -126,6 +125,7 @@ "stylelint-custom-processor-loader": "^0.6.0", "stylelint-processor-styled-components": "^1.5.2", "stylelint-webpack-plugin": "^0.10.5", + "trezor-translations-manager": "slowbackspace/trezor-translations-manager", "webpack-cli": "^3.2.3", "webpack-dev-server": "^3.1.14", "yargs": "11.0.0" diff --git a/yarn.lock b/yarn.lock index 9f946fab..dfc901b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10703,7 +10703,7 @@ trezor-connect@7.0.0-beta.2: trezor-translations-manager@slowbackspace/trezor-translations-manager: version "1.0.0" - resolved "https://codeload.github.com/slowbackspace/trezor-translations-manager/tar.gz/1e2e524d6b5be84ea39f74535066c3f22067692d" + resolved "https://codeload.github.com/slowbackspace/trezor-translations-manager/tar.gz/0f479a38ca79f239c5f98dc1227b3da9915219c3" dependencies: csv-stringify "^5.3.0" csvtojson "^2.0.8" From e1cbbeda9345a0ff6470a90020658c2b6d7be468 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Wed, 13 Feb 2019 22:49:45 +0100 Subject: [PATCH 019/118] add builded locales --- public/l10n/af.json | 4 ++++ public/l10n/ar.json | 4 ++++ public/l10n/bn.json | 4 ++++ public/l10n/cs.json | 4 ++++ public/l10n/de.json | 4 ++++ public/l10n/el.json | 4 ++++ public/l10n/en.json | 4 ++++ public/l10n/es-ES.json | 4 ++++ public/l10n/et.json | 4 ++++ public/l10n/fa.json | 4 ++++ public/l10n/fr.json | 4 ++++ public/l10n/he.json | 4 ++++ public/l10n/hi.json | 4 ++++ public/l10n/hu.json | 4 ++++ public/l10n/id.json | 4 ++++ public/l10n/it.json | 4 ++++ public/l10n/ja.json | 4 ++++ public/l10n/ko.json | 4 ++++ public/l10n/nl.json | 4 ++++ public/l10n/no.json | 4 ++++ public/l10n/pl.json | 4 ++++ public/l10n/pt-PT.json | 4 ++++ public/l10n/ru.json | 4 ++++ public/l10n/sv-SE.json | 4 ++++ public/l10n/tr.json | 4 ++++ public/l10n/uk.json | 4 ++++ public/l10n/vi.json | 4 ++++ public/l10n/zh-CN.json | 4 ++++ public/l10n/zh-TW.json | 4 ++++ 29 files changed, 116 insertions(+) create mode 100644 public/l10n/af.json create mode 100644 public/l10n/ar.json create mode 100644 public/l10n/bn.json create mode 100644 public/l10n/cs.json create mode 100644 public/l10n/de.json create mode 100644 public/l10n/el.json create mode 100644 public/l10n/en.json create mode 100644 public/l10n/es-ES.json create mode 100644 public/l10n/et.json create mode 100644 public/l10n/fa.json create mode 100644 public/l10n/fr.json create mode 100644 public/l10n/he.json create mode 100644 public/l10n/hi.json create mode 100644 public/l10n/hu.json create mode 100644 public/l10n/id.json create mode 100644 public/l10n/it.json create mode 100644 public/l10n/ja.json create mode 100644 public/l10n/ko.json create mode 100644 public/l10n/nl.json create mode 100644 public/l10n/no.json create mode 100644 public/l10n/pl.json create mode 100644 public/l10n/pt-PT.json create mode 100644 public/l10n/ru.json create mode 100644 public/l10n/sv-SE.json create mode 100644 public/l10n/tr.json create mode 100644 public/l10n/uk.json create mode 100644 public/l10n/vi.json create mode 100644 public/l10n/zh-CN.json create mode 100644 public/l10n/zh-TW.json diff --git a/public/l10n/af.json b/public/l10n/af.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/af.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/ar.json b/public/l10n/ar.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/ar.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/bn.json b/public/l10n/bn.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/bn.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/cs.json b/public/l10n/cs.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/cs.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/de.json b/public/l10n/de.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/de.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/el.json b/public/l10n/el.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/el.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/en.json b/public/l10n/en.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/en.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/es-ES.json b/public/l10n/es-ES.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/es-ES.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/et.json b/public/l10n/et.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/et.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/fa.json b/public/l10n/fa.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/fa.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/fr.json b/public/l10n/fr.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/fr.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/he.json b/public/l10n/he.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/he.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/hi.json b/public/l10n/hi.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/hi.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/hu.json b/public/l10n/hu.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/hu.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/id.json b/public/l10n/id.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/id.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/it.json b/public/l10n/it.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/it.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/ja.json b/public/l10n/ja.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/ja.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/ko.json b/public/l10n/ko.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/ko.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/nl.json b/public/l10n/nl.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/nl.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/no.json b/public/l10n/no.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/no.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/pl.json b/public/l10n/pl.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/pl.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/pt-PT.json b/public/l10n/pt-PT.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/pt-PT.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/ru.json b/public/l10n/ru.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/ru.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/sv-SE.json b/public/l10n/sv-SE.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/sv-SE.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/tr.json b/public/l10n/tr.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/tr.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/uk.json b/public/l10n/uk.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/uk.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/vi.json b/public/l10n/vi.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/vi.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/zh-CN.json b/public/l10n/zh-CN.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/zh-CN.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/zh-TW.json b/public/l10n/zh-TW.json new file mode 100644 index 00000000..519eafe7 --- /dev/null +++ b/public/l10n/zh-TW.json @@ -0,0 +1,4 @@ +{ + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file From 5ea88cb078c23ca5ff2e164c727d586cfb1bbe10 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Wed, 13 Feb 2019 22:51:25 +0100 Subject: [PATCH 020/118] add trezor-translations-manager depedency --- l10n.config.json | 2 +- package.json | 5 +++-- webpack/constants.js | 2 +- yarn.lock | 7 ++++--- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/l10n.config.json b/l10n.config.json index 83b03392..6a444913 100644 --- a/l10n.config.json +++ b/l10n.config.json @@ -1,6 +1,6 @@ { "extractedMessagesFilePattern": "translations/extractedMessages/**/*.json", - "localesOutputDir": "translations/locales/", + "localesOutputDir": "public/l10n/", "outputDir": "translations/", "project": { "identifier": "trezor-wallet-test", diff --git a/package.json b/package.json index 19b50848..bffb8177 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "build:stable": "rimraf build/stable && npx webpack --config webpack/production.babel.js --output-path build/stable --progress --bail", "build:beta": "rimraf build/beta && cross-env BUILD=beta npx webpack --config webpack/production.babel.js --output-path build/beta --progress --bail", "build:dev": "rimraf build.dev && cross-env BUILD=development npx webpack --config webpack/production.babel.js --output-path build/dev --progress --bail", - "translations:extract": "cross-env NODE_ENV=translations npx babel src", + "translations:extract": "cross-env NODE_ENV=translations babel src", + "translations:sync": "yarn ttm merge-msgs && yarn ttm build-csv && yarn ttm upload && yarn ttm build-translations && yarn ttm export-translations", "flow": "flow check src", "lint": "run-s lint:*", "lint:js": "npx eslint ./src ./webpack", @@ -125,7 +126,7 @@ "stylelint-custom-processor-loader": "^0.6.0", "stylelint-processor-styled-components": "^1.5.2", "stylelint-webpack-plugin": "^0.10.5", - "trezor-translations-manager": "slowbackspace/trezor-translations-manager", + "trezor-translations-manager": "^1.0.2", "webpack-cli": "^3.2.3", "webpack-dev-server": "^3.1.14", "yargs": "11.0.0" diff --git a/webpack/constants.js b/webpack/constants.js index b7381548..87e19e0d 100644 --- a/webpack/constants.js +++ b/webpack/constants.js @@ -8,7 +8,7 @@ const constants: Object = Object.freeze({ BUILD: path.join(ABSOLUTE_BASE, 'build/'), PUBLIC: path.join(ABSOLUTE_BASE, 'public/'), SRC: path.join(ABSOLUTE_BASE, 'src/'), - TRANSLATIONS: path.join(ABSOLUTE_BASE, 'translations/'), + TRANSLATIONS: path.join(ABSOLUTE_BASE, 'public/l10n'), PORT: 8081, INDEX: path.join(ABSOLUTE_BASE, 'src/index.html'), TREZOR_CONNECT_ROOT: path.join(ABSOLUTE_BASE, '../trezor-connect/'), diff --git a/yarn.lock b/yarn.lock index dfc901b9..a0d5e5f3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10701,9 +10701,10 @@ trezor-connect@7.0.0-beta.2: events "^1.1.1" whatwg-fetch "^2.0.4" -trezor-translations-manager@slowbackspace/trezor-translations-manager: - version "1.0.0" - resolved "https://codeload.github.com/slowbackspace/trezor-translations-manager/tar.gz/0f479a38ca79f239c5f98dc1227b3da9915219c3" +trezor-translations-manager@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/trezor-translations-manager/-/trezor-translations-manager-1.0.2.tgz#49f46380f11801ee223d930cf596417b3e697c56" + integrity sha512-gZbCj1FBuXc7GdqIJslT6HcBCjPcFYqiPMYPs+yAOBfCXDKdV2sQKxbtfMHi1xdv97XTuUydRhk3tvyW7BcaSA== dependencies: csv-stringify "^5.3.0" csvtojson "^2.0.8" From 7716d7460595cde49f13620a5a452b53b90ed870 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Wed, 13 Feb 2019 22:51:54 +0100 Subject: [PATCH 021/118] import all locales to IntlProvider --- src/support/ConnectedIntlProvider.js | 45 ++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/src/support/ConnectedIntlProvider.js b/src/support/ConnectedIntlProvider.js index 65ec53c8..5b579733 100644 --- a/src/support/ConnectedIntlProvider.js +++ b/src/support/ConnectedIntlProvider.js @@ -1,3 +1,4 @@ +/* eslint-disable global-require */ /* @flow */ import * as React from 'react'; import { connect } from 'react-redux'; @@ -5,17 +6,44 @@ import type { MapStateToProps } from 'react-redux'; import type { State } from 'flowtype'; import { IntlProvider, addLocaleData } from 'react-intl'; + import en from 'react-intl/locale-data/en'; +import cs from 'react-intl/locale-data/cs'; +import bn from 'react-intl/locale-data/bn'; import de from 'react-intl/locale-data/de'; +import el from 'react-intl/locale-data/el'; +import es from 'react-intl/locale-data/es'; +import fr from 'react-intl/locale-data/fr'; +import id from 'react-intl/locale-data/id'; +import it from 'react-intl/locale-data/it'; +import ja from 'react-intl/locale-data/ja'; +import nl from 'react-intl/locale-data/nl'; +import pl from 'react-intl/locale-data/pl'; +import pt from 'react-intl/locale-data/pt'; +import ru from 'react-intl/locale-data/ru'; +import uk from 'react-intl/locale-data/uk'; +import zh from 'react-intl/locale-data/zh'; -import messagesEn from '../../translations/en.json'; -import messagesDe from '../../translations/de.json'; - -addLocaleData([...en, ...de]); +addLocaleData([...en, ...cs, ...bn, ...de, ...el, ...es, ...fr, ...id, ...it, ...ja, ...nl, ...pl, ...pt, ...ru, ...uk, ...zh]); const messages = { - en: messagesEn, - de: messagesDe, + en: require('public/l10n/en.json'), + bn: require('public/l10n/bn.json'), + cs: require('public/l10n/cs.json'), + de: require('public/l10n/de.json'), + el: require('public/l10n/el.json'), + es: require('public/l10n/es-ES.json'), + fr: require('public/l10n/fr.json'), + id: require('public/l10n/id.json'), + it: require('public/l10n/it.json'), + ja: require('public/l10n/ja.json'), + nl: require('public/l10n/nl.json'), + pl: require('public/l10n/pl.json'), + pt: require('public/l10n/pt-PT.json'), + ru: require('public/l10n/ru.json'), + uk: require('public/l10n/uk.json'), + zh: require('public/l10n/zh-CN.json'), + zh_TW: require('public/l10n/zh-TW.json'), }; type OwnProps = { @@ -34,13 +62,12 @@ const mapStateToProps: MapStateToProps = (state: St const ReactIntlProvider = ({ children, locale }: Props) => { + const localeMessages = messages[locale]; console.log(locale); - console.log(messages); return ( {children} From 43f174156e709b0730a751cdca4df05b302841a8 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Wed, 13 Feb 2019 22:52:42 +0100 Subject: [PATCH 022/118] update content of translations folder --- translations/de.json | 4 --- translations/en.json | 4 --- .../views/Dashboard/index.messages.json | 30 +++++++++++++++++++ translations/master.csv | 3 ++ translations/master.json | 20 +++++++++++++ 5 files changed, 53 insertions(+), 8 deletions(-) delete mode 100644 translations/de.json delete mode 100644 translations/en.json create mode 100644 translations/extractedMessages/src/views/Wallet/views/Dashboard/index.messages.json create mode 100644 translations/master.csv create mode 100644 translations/master.json diff --git a/translations/de.json b/translations/de.json deleted file mode 100644 index df1039fa..00000000 --- a/translations/de.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "dashboard.selectyourcoin.title": "Willkommen bei react-intl", - "dashboard.selectyourcoin.body": "Zum Loslegen editiere src/App.js." -} diff --git a/translations/en.json b/translations/en.json deleted file mode 100644 index 5c2bbefb..00000000 --- a/translations/en.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "dashboard.selectyourcoin.title": "Please select your coin EN", - "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" -} diff --git a/translations/extractedMessages/src/views/Wallet/views/Dashboard/index.messages.json b/translations/extractedMessages/src/views/Wallet/views/Dashboard/index.messages.json new file mode 100644 index 00000000..ad3e09a9 --- /dev/null +++ b/translations/extractedMessages/src/views/Wallet/views/Dashboard/index.messages.json @@ -0,0 +1,30 @@ +[ + { + "id": "dashboard.selectyourcoin.title", + "description": "Title of the dashboard component if coin was not selected", + "defaultMessage": "Please select your coin", + "file": "src/views/Wallet/views/Dashboard/index.messages.js", + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 10, + "column": 5 + } + }, + { + "id": "dashboard.selectyourcoin.body", + "description": "Content of the dashboard component if coin was not selected", + "defaultMessage": "You will gain access to receiving & sending selected coin", + "file": "src/views/Wallet/views/Dashboard/index.messages.js", + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 15, + "column": 5 + } + } +] \ No newline at end of file diff --git a/translations/master.csv b/translations/master.csv new file mode 100644 index 00000000..2d47f42e --- /dev/null +++ b/translations/master.csv @@ -0,0 +1,3 @@ +"key","source","context","af","ar","bn","zh-CN","zh-TW","cs","nl","en","et","fr","de","el","he","hi","hu","id","it","ja","ko","no","fa","pl","pt-PT","ru","es-ES","sv-SE","tr","uk","vi" +"dashboard.selectyourcoin.title","Please select your coin","Title of the dashboard component if coin was not selected","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" +"dashboard.selectyourcoin.body","You will gain access to receiving & sending selected coin","Content of the dashboard component if coin was not selected","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" diff --git a/translations/master.json b/translations/master.json new file mode 100644 index 00000000..a136fe4e --- /dev/null +++ b/translations/master.json @@ -0,0 +1,20 @@ +{ + "dashboard.selectyourcoin.title": { + "source": "Please select your coin", + "meta": { + "comment": "Title of the dashboard component if coin was not selected", + "occurrences": [ + "src/views/Wallet/views/Dashboard/index.messages.js" + ] + } + }, + "dashboard.selectyourcoin.body": { + "source": "You will gain access to receiving & sending selected coin", + "meta": { + "comment": "Content of the dashboard component if coin was not selected", + "occurrences": [ + "src/views/Wallet/views/Dashboard/index.messages.js" + ] + } + } +} \ No newline at end of file From c086fa231a0a29cf3a161eb17801588b240a0f72 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Wed, 13 Feb 2019 23:05:11 +0100 Subject: [PATCH 023/118] hack to make "earth icon" open select on click --- src/components/Header/components/LanguagePicker/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/Header/components/LanguagePicker/index.js b/src/components/Header/components/LanguagePicker/index.js index fbdc52da..24ec4a84 100644 --- a/src/components/Header/components/LanguagePicker/index.js +++ b/src/components/Header/components/LanguagePicker/index.js @@ -15,9 +15,12 @@ const SelectWrapper = styled.div` const SelectIcon = styled.span` padding: 0px 6px; + margin-right: -20px; `; const StyledSelect = styled.select` + height: 100%; + padding-left: 20px; border: 0; background: transparent; cursor: pointer; From af1e229945cbfd002fa7f40b769e946c5b0f2d7a Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 14 Feb 2019 10:37:42 +0100 Subject: [PATCH 024/118] support dynamic import --- babel.config.js | 2 ++ package.json | 2 ++ yarn.lock | 14 ++++++++++++++ 3 files changed, 18 insertions(+) diff --git a/babel.config.js b/babel.config.js index d35cc679..f336bdba 100644 --- a/babel.config.js +++ b/babel.config.js @@ -18,6 +18,8 @@ module.exports = (api) => { '@babel/plugin-transform-flow-strip-types', '@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-object-rest-spread', + '@babel/plugin-syntax-dynamic-import', + 'dynamic-import-node', [ '@babel/plugin-transform-runtime', { diff --git a/package.json b/package.json index bffb8177..57d0a713 100644 --- a/package.json +++ b/package.json @@ -92,6 +92,7 @@ "@babel/core": "^7.2.2", "@babel/plugin-proposal-class-properties": "^7.3.0", "@babel/plugin-proposal-object-rest-spread": "^7.3.2", + "@babel/plugin-syntax-dynamic-import": "^7.2.0", "@babel/plugin-transform-flow-strip-types": "^7.2.3", "@babel/plugin-transform-runtime": "^7.2.0", "@babel/preset-env": "^7.3.1", @@ -101,6 +102,7 @@ "babel-eslint": "^10.0.1", "babel-jest": "^24.1.0", "babel-loader": "^8.0.5", + "babel-plugin-dynamic-import-node": "^2.2.0", "babel-plugin-module-resolver": "^3.1.3", "babel-plugin-react-intl": "^3.0.1", "babel-plugin-styled-components": "^1.10.0", diff --git a/yarn.lock b/yarn.lock index a0d5e5f3..715f8be3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -329,6 +329,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-syntax-dynamic-import@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz#69c159ffaf4998122161ad8ebc5e6d1f55df8612" + integrity sha512-mVxuJ0YroI/h/tbFTPGZR8cv6ai+STMKNBq0f8hFxsxWjl94qqhsb+wXbpNMDPU3cfR1TIsVFzU3nXyZMqyK4w== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-flow@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.2.0.tgz#a765f061f803bc48f240c26f8747faf97c26bf7c" @@ -1719,6 +1726,13 @@ babel-plugin-check-es2015-constants@^6.22.0: dependencies: babel-runtime "^6.22.0" +babel-plugin-dynamic-import-node@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.2.0.tgz#c0adfb07d95f4a4495e9aaac6ec386c4d7c2524e" + integrity sha512-fP899ELUnTaBcIzmrW7nniyqqdYWrWuJUyPWHxFa/c7r7hS6KC8FscNfLlBNIoPSc55kYMGEEKjPjJGCLbE1qA== + dependencies: + object.assign "^4.1.0" + babel-plugin-emotion@^9.2.11: version "9.2.11" resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-9.2.11.tgz#319c005a9ee1d15bb447f59fe504c35fd5807728" From 285b37f825840a122a91f2c4b005d06d2df10622 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 14 Feb 2019 15:51:39 +0100 Subject: [PATCH 025/118] add test translations --- public/l10n/af.json | 8 ++++++++ public/l10n/ar.json | 8 ++++++++ public/l10n/bn.json | 8 ++++++++ public/l10n/cs.json | 8 ++++++++ public/l10n/de.json | 8 ++++++++ public/l10n/el.json | 8 ++++++++ public/l10n/en.json | 8 ++++++++ public/l10n/es-ES.json | 8 ++++++++ public/l10n/et.json | 8 ++++++++ public/l10n/fa.json | 8 ++++++++ public/l10n/fr.json | 8 ++++++++ public/l10n/he.json | 8 ++++++++ public/l10n/hi.json | 8 ++++++++ public/l10n/hu.json | 8 ++++++++ public/l10n/id.json | 8 ++++++++ public/l10n/it.json | 8 ++++++++ public/l10n/ja.json | 8 ++++++++ public/l10n/ko.json | 8 ++++++++ public/l10n/nl.json | 8 ++++++++ public/l10n/no.json | 8 ++++++++ public/l10n/pl.json | 8 ++++++++ public/l10n/pt-PT.json | 8 ++++++++ public/l10n/ru.json | 8 ++++++++ public/l10n/sv-SE.json | 8 ++++++++ public/l10n/tr.json | 8 ++++++++ public/l10n/uk.json | 8 ++++++++ public/l10n/vi.json | 8 ++++++++ public/l10n/zh-CN.json | 8 ++++++++ public/l10n/zh-TW.json | 8 ++++++++ 29 files changed, 232 insertions(+) diff --git a/public/l10n/af.json b/public/l10n/af.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/af.json +++ b/public/l10n/af.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/ar.json b/public/l10n/ar.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/ar.json +++ b/public/l10n/ar.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/bn.json b/public/l10n/bn.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/bn.json +++ b/public/l10n/bn.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/cs.json b/public/l10n/cs.json index 519eafe7..77bd99d4 100644 --- a/public/l10n/cs.json +++ b/public/l10n/cs.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet je komfortní rozhraní pro Vaše zařízení Trezor. Z rozhraní Wallet můžete snadno spravovat své účty, přijímat a odesílat platby.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "Soukromá banka ve Vašich rukou.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Pro pokračování připojte Trezor", + "TR_AND": "a", + "TR_CHECK_FOR_DEVICES": "Hledat zařízení", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Zařízení nebylo rozpoznáno? Zkuste nainstalovat Trezor Bridge.", + "TR_DONT_HAVE_A_TREZOR_GET": "Ještě nemáte Trezor? Jeden si pořiďte", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/de.json b/public/l10n/de.json index 519eafe7..7a55e9b2 100644 --- a/public/l10n/de.json +++ b/public/l10n/de.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet bietet ein einfaches Interface für Ihren Trezor. Mit diesem Wallet können Sie Ihre Geldmittel kontrollieren, das Saldo verwalten und Zahlungen vornehmen.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "Eine private Bank in Ihren Händen.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Schließen Sie Ihren Trezor an, um fortzufahren", + "TR_AND": "und", + "TR_CHECK_FOR_DEVICES": "Geräteerkennung", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Gerät nicht erkannt? Installieren Sie {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Sie haben noch keinen Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/el.json b/public/l10n/el.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/el.json +++ b/public/l10n/el.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/en.json b/public/l10n/en.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/en.json +++ b/public/l10n/en.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/es-ES.json b/public/l10n/es-ES.json index 519eafe7..def06f02 100644 --- a/public/l10n/es-ES.json +++ b/public/l10n/es-ES.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "El monedero Trezor Wallet es una interfaz fácil de usar para su dispositivo Trezor. Desde éste monedero, puede controlar fácilmente sus monedas, gestionar su saldo e iniciar transferencias.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "La banca privada en sus manos.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Conecte el dispositivo Trezor para continuar", + "TR_AND": "y", + "TR_CHECK_FOR_DEVICES": "Buscar dispositivos", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "¿Dispositivo no reconocido? Pruebe instalar el {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "¿No tiene Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/et.json b/public/l10n/et.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/et.json +++ b/public/l10n/et.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/fa.json b/public/l10n/fa.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/fa.json +++ b/public/l10n/fa.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/fr.json b/public/l10n/fr.json index 519eafe7..27a2bd02 100644 --- a/public/l10n/fr.json +++ b/public/l10n/fr.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet est une interface facile à utiliser pour votre Trezor et qui vous permet de contrôler facilement vos fonds, de gérer votre solde et d'opérer des virements.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "La banque privée entre vos mains.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connectez Trezor pour continuer", + "TR_AND": "et", + "TR_CHECK_FOR_DEVICES": "Recherchez des appareils", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "L'appareil n'est pas reconnu ? Essayez d'installer {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Vous n'avez pas de Trezor ? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/he.json b/public/l10n/he.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/he.json +++ b/public/l10n/he.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/hi.json b/public/l10n/hi.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/hi.json +++ b/public/l10n/hi.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/hu.json b/public/l10n/hu.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/hu.json +++ b/public/l10n/hu.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/id.json b/public/l10n/id.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/id.json +++ b/public/l10n/id.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/it.json b/public/l10n/it.json index 519eafe7..d11ab823 100644 --- a/public/l10n/it.json +++ b/public/l10n/it.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Il Portafoglio Trezor è una interfaccia semplice da utilizzare per il tuo dispositivo Trezor. Da questo Portafoglio potrai facilmente controllare le tue monete, gestire il tuo conto ed avviare trasferimenti.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connetti Trezor per continuare", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Non hai Trezor? Acquistane uno", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/ja.json b/public/l10n/ja.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/ja.json +++ b/public/l10n/ja.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/ko.json b/public/l10n/ko.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/ko.json +++ b/public/l10n/ko.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/nl.json b/public/l10n/nl.json index 519eafe7..31ebfa4f 100644 --- a/public/l10n/nl.json +++ b/public/l10n/nl.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "De Trezor Portemonnee is een gebruiksvriendelijke interface voor uw Trezor apparaat. Vanaf deze Portemonnee kunt u uw munten controleren, uw balans beheren en betalingen verrichten.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Sluit uw Trezor aan om door te gaan", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Heb je geen Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/no.json b/public/l10n/no.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/no.json +++ b/public/l10n/no.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/pl.json b/public/l10n/pl.json index 519eafe7..73709c61 100644 --- a/public/l10n/pl.json +++ b/public/l10n/pl.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Portfel Trezor oferuje łatwy w użyciu interfejs. Z łatwością możesz kontrolować swoje pieniądze, zarządzać balansem konta i wysyłać transakcje.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Podłącz Trezor, aby kontynuować", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Nie masz Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/pt-PT.json b/public/l10n/pt-PT.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/pt-PT.json +++ b/public/l10n/pt-PT.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/ru.json b/public/l10n/ru.json index 519eafe7..356605c4 100644 --- a/public/l10n/ru.json +++ b/public/l10n/ru.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet – это простой и удобный интерфейс для Trezor, позволяющий контролировать средства, управлять остатками и отправлять средства.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "Частный банк у вас в руках.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Для продолжения подключите Trezor", + "TR_AND": "и", + "TR_CHECK_FOR_DEVICES": "Ручной поиск устройств", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Устройство не опознано? Установите {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Нет Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/sv-SE.json b/public/l10n/sv-SE.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/sv-SE.json +++ b/public/l10n/sv-SE.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/tr.json b/public/l10n/tr.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/tr.json +++ b/public/l10n/tr.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/uk.json b/public/l10n/uk.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/uk.json +++ b/public/l10n/uk.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/vi.json b/public/l10n/vi.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/vi.json +++ b/public/l10n/vi.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/zh-CN.json b/public/l10n/zh-CN.json index 519eafe7..8fc2fbb5 100644 --- a/public/l10n/zh-CN.json +++ b/public/l10n/zh-CN.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file diff --git a/public/l10n/zh-TW.json b/public/l10n/zh-TW.json index 519eafe7..4f804c16 100644 --- a/public/l10n/zh-TW.json +++ b/public/l10n/zh-TW.json @@ -1,4 +1,12 @@ { + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor錢包是專門為你的Trezor設計的簡單易用的介面。從這個錢包,你可以輕易的管理你的錢幣、檢查你的收支和發送付款。", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "請連接Trezor以繼續", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" } \ No newline at end of file From 571af4527fd628fa317047d329a5fde647da5a27 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 14 Feb 2019 15:51:59 +0100 Subject: [PATCH 026/118] add key to IntlProvider so it rerenders on locale change --- src/support/ConnectedIntlProvider.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/support/ConnectedIntlProvider.js b/src/support/ConnectedIntlProvider.js index 5b579733..c6507397 100644 --- a/src/support/ConnectedIntlProvider.js +++ b/src/support/ConnectedIntlProvider.js @@ -7,6 +7,8 @@ import type { State } from 'flowtype'; import { IntlProvider, addLocaleData } from 'react-intl'; +// import { LANGUAGE } from 'config/variables'; + import en from 'react-intl/locale-data/en'; import cs from 'react-intl/locale-data/cs'; import bn from 'react-intl/locale-data/bn'; @@ -62,10 +64,13 @@ const mapStateToProps: MapStateToProps = (state: St const ReactIntlProvider = ({ children, locale }: Props) => { + // const localeData = await import(`react-intl/locale-data/${locale}`); + // addLocaleData(localeData); const localeMessages = messages[locale]; console.log(locale); return ( From 9426d7dbacc0eb1c585c4a4a1777e07600dd37d3 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 14 Feb 2019 15:52:22 +0100 Subject: [PATCH 027/118] messages for landing screen --- .../Landing/components/ConnectDevice/index.js | 56 +++++---- .../ConnectDevice/index.messages.js | 41 +++++++ .../ConnectDevice/index.messages.json | 107 ++++++++++++++++++ 3 files changed, 185 insertions(+), 19 deletions(-) create mode 100644 src/views/Landing/components/ConnectDevice/index.messages.js create mode 100644 translations/extractedMessages/src/views/Landing/components/ConnectDevice/index.messages.json diff --git a/src/views/Landing/components/ConnectDevice/index.js b/src/views/Landing/components/ConnectDevice/index.js index 0e417cff..64719114 100644 --- a/src/views/Landing/components/ConnectDevice/index.js +++ b/src/views/Landing/components/ConnectDevice/index.js @@ -12,6 +12,9 @@ import { FONT_SIZE, FONT_WEIGHT, SCREEN_SIZE } from 'config/variables'; import CaseImage from 'images/macbook.png'; import Link from 'components/Link'; +import { FormattedMessage } from 'react-intl'; +import l10nMessages from './index.messages'; + type Props = { deviceLabel: string, showWebUsb: boolean, @@ -24,6 +27,8 @@ const StyledConnectDevice = styled.div` const Title = styled.div` margin-top: 60px; + max-width: 800px; + text-align: center; `; const Wrapper = styled.div` @@ -60,7 +65,7 @@ const StyledButton = styled(Button)` const Image = styled.img` width: 100%; - max-width: 777px; + max-width: 850px; height: auto; margin: auto; background-repeat: no-repeat; @@ -126,9 +131,8 @@ class ConnectDevice extends PureComponent { return ( - <H2 claim>The private bank in your hands.</H2> - <P>Trezor Wallet is an easy-to-use interface for your Trezor.</P> - <P>Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.</P> + <H2 claim><FormattedMessage {...l10nMessages.TR_THE_PRIVATE_BANK_IN_YOUR_HANDS} /></H2> + <P><FormattedMessage {...l10nMessages.TR_TREZOR_WALLET_IS_AN_EASY_DASH} /></P> @@ -137,15 +141,15 @@ class ConnectDevice extends PureComponent { {!this.props.showDisconnect && ( {this.getTrezorDeviceImage()} - Connect Trezor + )} {this.props.showWebUsb && !this.props.showDisconnect && ( - and + - Check for devices + )} @@ -156,23 +160,37 @@ class ConnectDevice extends PureComponent {
{this.props.showWebUsb && (

- Device not recognized? - Try installing the Trezor Bridge. - + + Trezor Bridge + + ), + }} + /> +

)}

- Don't have Trezor? + + + ), + }} + /> - Get one -

diff --git a/src/views/Landing/components/ConnectDevice/index.messages.js b/src/views/Landing/components/ConnectDevice/index.messages.js new file mode 100644 index 00000000..a1be83b0 --- /dev/null +++ b/src/views/Landing/components/ConnectDevice/index.messages.js @@ -0,0 +1,41 @@ +/* @flow */ +import { defineMessages } from 'react-intl'; +import type { Messages } from 'flowtype/npm/react-intl'; + +const definedMessages: Messages = defineMessages({ + TR_TREZOR_WALLET_IS_AN_EASY_DASH: { + id: 'TR_TREZOR_WALLET_IS_AN_EASY_DASH', + defaultMessage: 'Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.', + }, + TR_THE_PRIVATE_BANK_IN_YOUR_HANDS: { + id: 'TR_THE_PRIVATE_BANK_IN_YOUR_HANDS', + defaultMessage: 'The private bank in your hands.', + }, + TR_CONNECT_TREZOR_TO_CONTINUE: { + id: 'TR_CONNECT_TREZOR_TO_CONTINUE', + defaultMessage: 'Connect Trezor to continue', + }, + TR_AND: { + id: 'TR_AND', + defaultMessage: 'and', + }, + TR_CHECK_FOR_DEVICES: { + id: 'TR_CHECK_FOR_DEVICES', + defaultMessage: 'Check for devices', + }, + TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING: { + id: 'TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING', + defaultMessage: 'Device not recognized? Try installing the {link}.', + }, + TR_DONT_HAVE_A_TREZOR: { + id: 'TR_DONT_HAVE_A_TREZOR_GET', + defaultMessage: 'Don\'t have a Trezor? {getOne}', + }, + TR_GET_ONE: { + id: 'TR_GET_ONE', + description: 'Part of the sentence: Dont have a Trezor? Get one', + defaultMessage: 'Get one', + }, +}); + +export default definedMessages; \ No newline at end of file diff --git a/translations/extractedMessages/src/views/Landing/components/ConnectDevice/index.messages.json b/translations/extractedMessages/src/views/Landing/components/ConnectDevice/index.messages.json new file mode 100644 index 00000000..ac5cef6d --- /dev/null +++ b/translations/extractedMessages/src/views/Landing/components/ConnectDevice/index.messages.json @@ -0,0 +1,107 @@ +[ + { + "id": "TR_TREZOR_WALLET_IS_AN_EASY_DASH", + "defaultMessage": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "file": "src/views/Landing/components/ConnectDevice/index.messages.js", + "start": { + "line": 6, + "column": 38 + }, + "end": { + "line": 9, + "column": 5 + } + }, + { + "id": "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS", + "defaultMessage": "The private bank in your hands.", + "file": "src/views/Landing/components/ConnectDevice/index.messages.js", + "start": { + "line": 10, + "column": 39 + }, + "end": { + "line": 13, + "column": 5 + } + }, + { + "id": "TR_CONNECT_TREZOR_TO_CONTINUE", + "defaultMessage": "Connect Trezor to continue", + "file": "src/views/Landing/components/ConnectDevice/index.messages.js", + "start": { + "line": 14, + "column": 35 + }, + "end": { + "line": 17, + "column": 5 + } + }, + { + "id": "TR_AND", + "defaultMessage": "and", + "file": "src/views/Landing/components/ConnectDevice/index.messages.js", + "start": { + "line": 18, + "column": 12 + }, + "end": { + "line": 21, + "column": 5 + } + }, + { + "id": "TR_CHECK_FOR_DEVICES", + "defaultMessage": "Check for devices", + "file": "src/views/Landing/components/ConnectDevice/index.messages.js", + "start": { + "line": 22, + "column": 26 + }, + "end": { + "line": 25, + "column": 5 + } + }, + { + "id": "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING", + "defaultMessage": "Device not recognized? Try installing the {link}.", + "file": "src/views/Landing/components/ConnectDevice/index.messages.js", + "start": { + "line": 26, + "column": 45 + }, + "end": { + "line": 29, + "column": 5 + } + }, + { + "id": "TR_DONT_HAVE_A_TREZOR_GET", + "defaultMessage": "Don't have a Trezor? {getOne}", + "file": "src/views/Landing/components/ConnectDevice/index.messages.js", + "start": { + "line": 30, + "column": 27 + }, + "end": { + "line": 33, + "column": 5 + } + }, + { + "id": "TR_GET_ONE", + "description": "Part of the sentence: Dont have a Trezor? Get one", + "defaultMessage": "Get one", + "file": "src/views/Landing/components/ConnectDevice/index.messages.js", + "start": { + "line": 34, + "column": 16 + }, + "end": { + "line": 38, + "column": 5 + } + } +] \ No newline at end of file From afa1a53bd10f965786100e625ee42f5f4fbc039c Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 14 Feb 2019 18:06:22 +0100 Subject: [PATCH 028/118] localized beta disclaimer --- .../components/BetaDisclaimer/index.js | 32 ++++++++++++++--- .../BetaDisclaimer/index.messages.js | 36 +++++++++++++++++++ 2 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 src/views/Landing/components/BetaDisclaimer/index.messages.js diff --git a/src/views/Landing/components/BetaDisclaimer/index.js b/src/views/Landing/components/BetaDisclaimer/index.js index 6c983e4c..b395e451 100644 --- a/src/views/Landing/components/BetaDisclaimer/index.js +++ b/src/views/Landing/components/BetaDisclaimer/index.js @@ -4,6 +4,7 @@ import React from 'react'; import styled from 'styled-components'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; +import { FormattedMessage } from 'react-intl'; import colors from 'config/colors'; import icons from 'config/icons'; @@ -14,6 +15,7 @@ import Button from 'components/Button'; import P from 'components/Paragraph'; import { H2 } from 'components/Heading'; import * as WalletActions from 'actions/WalletActions'; +import l10nMessages from './index.messages'; const Wrapper = styled.div` width: 100%; @@ -57,18 +59,38 @@ const StyledIcon = styled(Icon)` const BetaDisclaimer = (props: { close: () => void }) => ( -

You are opening Trezor Beta Wallet

- Trezor Beta Wallet is a public feature-testing version of the Trezor Wallet, offering the newest features before they are available to the general public. - In contrast, Trezor Wallet is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public. +

+ , + trezorBetaWallet: , + }} + /> + + , + trezorBetaWallet: , + }} + /> + - Please note that the Trezor Beta Wallet might be collecting anonymized usage data, especially error logs, for development purposes. The Trezor Wallet does not log any data. + , + trezorBetaWallet: , + }} + /> - OK, I understand +
); diff --git a/src/views/Landing/components/BetaDisclaimer/index.messages.js b/src/views/Landing/components/BetaDisclaimer/index.messages.js new file mode 100644 index 00000000..326e4054 --- /dev/null +++ b/src/views/Landing/components/BetaDisclaimer/index.messages.js @@ -0,0 +1,36 @@ +/* @flow */ +import { defineMessages } from 'react-intl'; +import type { Messages } from 'flowtype/npm/react-intl'; + +const definedMessages: Messages = defineMessages({ + TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET: { + id: 'TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET', + defaultMessage: 'You are opening Trezor Beta Wallet', + }, + TR_TREZOR_BETA_WALLET_IS: { + id: 'TR_TREZOR_BETA_WALLET_IS', + defaultMessage: '{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.', + }, + TR_IN_CONTRAST_COMMA_TREZOR: { + id: 'TR_IN_CONTRAST_COMMA_TREZOR', + defaultMessage: 'In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.', + }, + TR_PLEASE_NOTE_THAT_THE_TREZOR: { + id: 'TR_PLEASE_NOTE_THAT_THE_TREZOR', + defaultMessage: 'Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.', + }, + TR_OK_COMMA_I_UNDERSTAND: { + id: 'TR_OK_COMMA_I_UNDERSTAND', + defaultMessage: 'OK, I understand', + }, + TR_TREZOR_WALLET: { + id: 'TR_TREZOR_WALLET', + defaultMessage: 'Trezor Wallet', + }, + TR_TREZOR_BETA_WALLET: { + id: 'TR_TREZOR_BETA_WALLET', + defaultMessage: 'Trezor Beta Wallet', + }, +}); + +export default definedMessages; \ No newline at end of file From fd45bbe4af179a69e48bf464a35524ad27a95500 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Fri, 15 Feb 2019 15:24:01 +0100 Subject: [PATCH 029/118] update ttm --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 57d0a713..0cc8a747 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "stylelint-custom-processor-loader": "^0.6.0", "stylelint-processor-styled-components": "^1.5.2", "stylelint-webpack-plugin": "^0.10.5", - "trezor-translations-manager": "^1.0.2", + "trezor-translations-manager": "^1.0.3", "webpack-cli": "^3.2.3", "webpack-dev-server": "^3.1.14", "yargs": "11.0.0" diff --git a/yarn.lock b/yarn.lock index 715f8be3..27c230b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10715,10 +10715,10 @@ trezor-connect@7.0.0-beta.2: events "^1.1.1" whatwg-fetch "^2.0.4" -trezor-translations-manager@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/trezor-translations-manager/-/trezor-translations-manager-1.0.2.tgz#49f46380f11801ee223d930cf596417b3e697c56" - integrity sha512-gZbCj1FBuXc7GdqIJslT6HcBCjPcFYqiPMYPs+yAOBfCXDKdV2sQKxbtfMHi1xdv97XTuUydRhk3tvyW7BcaSA== +trezor-translations-manager@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/trezor-translations-manager/-/trezor-translations-manager-1.0.3.tgz#94795fb9fd062f8b90ab2818f69ca41b931a5b58" + integrity sha512-DNsssJL61iHcNxwW/LMfsml1ZCeZYDv/oe6NyRcf55ImGIPYesUM/fyeNz4Z+dzsSy0oTEE+/IfK5oF5u4IWCw== dependencies: csv-stringify "^5.3.0" csvtojson "^2.0.8" From 3217517050e1609bf1c4d02868d8e6134d305b94 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Fri, 15 Feb 2019 20:52:56 +0100 Subject: [PATCH 030/118] handle fetching locale in refux action --- src/actions/LocalStorageActions.js | 6 +-- src/actions/WalletActions.js | 38 +++++++++++-- .../components/LanguagePicker/Container.js | 4 +- .../Header/components/LanguagePicker/index.js | 4 +- src/reducers/WalletReducer.js | 5 +- src/support/ConnectedIntlProvider.js | 53 +++++-------------- 6 files changed, 56 insertions(+), 54 deletions(-) diff --git a/src/actions/LocalStorageActions.js b/src/actions/LocalStorageActions.js index 5cb91059..b73e3a63 100644 --- a/src/actions/LocalStorageActions.js +++ b/src/actions/LocalStorageActions.js @@ -11,6 +11,7 @@ import * as WALLET from 'actions/constants/wallet'; import { httpRequest } from 'utils/networkUtils'; import * as buildUtils from 'utils/build'; import * as storageUtils from 'utils/storage'; +import * as WalletActions from 'actions/WalletActions'; import { getAccountTokens } from 'reducers/utils'; import type { Account } from 'reducers/AccountsReducer'; @@ -239,10 +240,7 @@ const loadStorageData = (): ThunkAction => (dispatch: Dispatch): void => { const language: ?string = storageUtils.get(TYPE, KEY_LANGUAGE); if (language) { - dispatch({ - type: WALLET.SET_LANGUAGE, - language: JSON.parse(language), - }); + dispatch(WalletActions.fetchLocale(language)); } }; diff --git a/src/actions/WalletActions.js b/src/actions/WalletActions.js index a17cb3cf..70519b75 100644 --- a/src/actions/WalletActions.js +++ b/src/actions/WalletActions.js @@ -44,7 +44,8 @@ export type WalletAction = { type: typeof WALLET.TOGGLE_SIDEBAR, } | { type: typeof WALLET.SET_LANGUAGE, - language: string + locale: string, + messages: { [string]: string }, } export const init = (): ThunkAction => (dispatch: Dispatch): void => { @@ -71,10 +72,37 @@ export const toggleSidebar = (): WalletAction => ({ type: WALLET.TOGGLE_SIDEBAR, }); -export const setLanguage = (language: string): WalletAction => ({ - type: WALLET.SET_LANGUAGE, - language, -}); +export const fetchLocale = (locale: string): ThunkAction => (dispatch: Dispatch): void => { + const mapLocaleToFileName = { + en: 'en', + bn: 'bn', + cs: 'cs', + de: 'de', + el: 'el', + es: 'es-ES', + fr: 'fr', + id: 'id', + it: 'it', + ja: 'ja', + nl: 'nl', + pl: 'pl', + pt: 'pt-PT', + ru: 'ru', + uk: 'uk', + zh: 'zh-CN', + zh_TW: 'zh-TW', + }; + const filename = mapLocaleToFileName[locale]; + fetch(`/l10n/${filename}.json`) + .then(response => response.json()) + .then((messages) => { + dispatch({ + type: WALLET.SET_LANGUAGE, + locale, + messages, + }); + }); +}; // This method will be called after each DEVICE.CONNECT action // if connected device has different "passphrase_protection" settings than saved instances diff --git a/src/components/Header/components/LanguagePicker/Container.js b/src/components/Header/components/LanguagePicker/Container.js index 0b076d3e..78287134 100644 --- a/src/components/Header/components/LanguagePicker/Container.js +++ b/src/components/Header/components/LanguagePicker/Container.js @@ -14,7 +14,7 @@ type StateProps = { } type DispatchProps = { - setLanguage: typeof WalletActions.setLanguage, + fetchLocale: typeof WalletActions.fetchLocale, }; type OwnProps = { @@ -28,7 +28,7 @@ const mapStateToProps: MapStateToProps = (state: St }); const mapDispatchToProps: MapDispatchToProps = (dispatch: Dispatch): DispatchProps => ({ - setLanguage: bindActionCreators(WalletActions.setLanguage, dispatch), + fetchLocale: bindActionCreators(WalletActions.fetchLocale, dispatch), }); export default withRouter( diff --git a/src/components/Header/components/LanguagePicker/index.js b/src/components/Header/components/LanguagePicker/index.js index 24ec4a84..c444fe11 100644 --- a/src/components/Header/components/LanguagePicker/index.js +++ b/src/components/Header/components/LanguagePicker/index.js @@ -31,11 +31,11 @@ const StyledSelect = styled.select` `; -const LanguagePicker = ({ language, setLanguage }: Props) => ( +const LanguagePicker = ({ language, fetchLocale }: Props) => ( 🌎 setLanguage(e.target.value)} + onChange={e => fetchLocale(e.target.value)} value={language} > {LANGUAGE.map(lang => ( diff --git a/src/reducers/WalletReducer.js b/src/reducers/WalletReducer.js index 23ef6c82..e0a2c187 100644 --- a/src/reducers/WalletReducer.js +++ b/src/reducers/WalletReducer.js @@ -14,6 +14,7 @@ type State = { ready: boolean; online: boolean; language: string; + messages: { [string]: string }; dropdownOpened: boolean; showBetaDisclaimer: boolean; showSidebar: boolean; @@ -28,6 +29,7 @@ const initialState: State = { ready: false, online: navigator.onLine, language: 'en', + messages: {}, dropdownOpened: false, firstLocationChange: true, showBetaDisclaimer: false, @@ -124,7 +126,8 @@ export default function wallet(state: State = initialState, action: Action): Sta case WALLET.SET_LANGUAGE: return { ...state, - language: action.language, + language: action.locale, + messages: action.messages ? action.messages : state.messages, }; default: diff --git a/src/support/ConnectedIntlProvider.js b/src/support/ConnectedIntlProvider.js index c6507397..dcd35d11 100644 --- a/src/support/ConnectedIntlProvider.js +++ b/src/support/ConnectedIntlProvider.js @@ -1,14 +1,12 @@ -/* eslint-disable global-require */ /* @flow */ import * as React from 'react'; import { connect } from 'react-redux'; + import type { MapStateToProps } from 'react-redux'; import type { State } from 'flowtype'; import { IntlProvider, addLocaleData } from 'react-intl'; -// import { LANGUAGE } from 'config/variables'; - import en from 'react-intl/locale-data/en'; import cs from 'react-intl/locale-data/cs'; import bn from 'react-intl/locale-data/bn'; @@ -28,55 +26,30 @@ import zh from 'react-intl/locale-data/zh'; addLocaleData([...en, ...cs, ...bn, ...de, ...el, ...es, ...fr, ...id, ...it, ...ja, ...nl, ...pl, ...pt, ...ru, ...uk, ...zh]); -const messages = { - en: require('public/l10n/en.json'), - bn: require('public/l10n/bn.json'), - cs: require('public/l10n/cs.json'), - de: require('public/l10n/de.json'), - el: require('public/l10n/el.json'), - es: require('public/l10n/es-ES.json'), - fr: require('public/l10n/fr.json'), - id: require('public/l10n/id.json'), - it: require('public/l10n/it.json'), - ja: require('public/l10n/ja.json'), - nl: require('public/l10n/nl.json'), - pl: require('public/l10n/pl.json'), - pt: require('public/l10n/pt-PT.json'), - ru: require('public/l10n/ru.json'), - uk: require('public/l10n/uk.json'), - zh: require('public/l10n/zh-CN.json'), - zh_TW: require('public/l10n/zh-TW.json'), -}; - type OwnProps = { children: React.Node } type StateProps = { - locale: string + locale: string, + messages: { [string]: string } } type Props = StateProps & OwnProps; const mapStateToProps: MapStateToProps = (state: State): StateProps => ({ locale: state.wallet.language, + messages: state.wallet.messages, }); - -const ReactIntlProvider = ({ children, locale }: Props) => { - // const localeData = await import(`react-intl/locale-data/${locale}`); - // addLocaleData(localeData); - const localeMessages = messages[locale]; - console.log(locale); - return ( - - {children} - - ); -}; +const ReactIntlProvider = ({ children, locale, messages }: Props) => ( + + {children} + +); export default connect(mapStateToProps, null)(ReactIntlProvider); \ No newline at end of file From 241ba37f44207c52947d1f04f1d6b02a3a3e626c Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Fri, 15 Feb 2019 20:56:15 +0100 Subject: [PATCH 031/118] dont run file loader on locales jsons --- webpack/local.babel.js | 3 ++- webpack/production.babel.js | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/webpack/local.babel.js b/webpack/local.babel.js index 2fec2086..5f5d7951 100644 --- a/webpack/local.babel.js +++ b/webpack/local.babel.js @@ -13,6 +13,7 @@ import { SRC, BUILD, PUBLIC, + TRANSLATIONS, PORT, } from './constants'; @@ -83,7 +84,7 @@ module.exports = { { type: 'javascript/auto', test: /\.json/, - exclude: /(node_modules)/, + exclude: [/(node_modules)/, TRANSLATIONS], loader: 'file-loader', options: { outputPath: './data', diff --git a/webpack/production.babel.js b/webpack/production.babel.js index 0a6bc979..aba7935d 100644 --- a/webpack/production.babel.js +++ b/webpack/production.babel.js @@ -3,7 +3,9 @@ import GitRevisionPlugin from 'git-revision-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import FriendlyErrorsWebpackPlugin from 'friendly-errors-webpack-plugin'; import CopyWebpackPlugin from 'copy-webpack-plugin'; -import { SRC, BUILD, PUBLIC } from './constants'; +import { + SRC, BUILD, PUBLIC, TRANSLATIONS, +} from './constants'; const gitRevisionPlugin = new GitRevisionPlugin(); @@ -44,7 +46,7 @@ module.exports = { { type: 'javascript/auto', test: /\.json/, - exclude: /(node_modules)/, + exclude: [/(node_modules)/, TRANSLATIONS], loader: 'file-loader', options: { outputPath: './data', From a656b0d7083cb09c1a5098d31e001b7f864e2ef5 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Fri, 15 Feb 2019 21:18:07 +0100 Subject: [PATCH 032/118] handle locale to filename mapping by TTM --- l10n.config.json | 21 ++- public/l10n/af.json | 7 + public/l10n/ar.json | 7 + public/l10n/bn.json | 7 + public/l10n/cs.json | 11 +- public/l10n/de.json | 7 + public/l10n/el.json | 7 + public/l10n/en.json | 7 + public/l10n/es-ES.json | 12 -- public/l10n/es.json | 19 +++ public/l10n/et.json | 7 + public/l10n/fa.json | 7 + public/l10n/fr.json | 7 + public/l10n/he.json | 7 + public/l10n/hi.json | 7 + public/l10n/hu.json | 7 + public/l10n/id.json | 7 + public/l10n/it.json | 7 + public/l10n/ja.json | 7 + public/l10n/ko.json | 7 + public/l10n/nl.json | 7 + public/l10n/no.json | 7 + public/l10n/pl.json | 7 + public/l10n/pt-PT.json | 12 -- public/l10n/pt.json | 19 +++ public/l10n/ru.json | 7 + public/l10n/sv-SE.json | 7 + public/l10n/tr.json | 7 + public/l10n/uk.json | 7 + public/l10n/vi.json | 7 + public/l10n/zh-CN.json | 12 -- public/l10n/zh-TW.json | 12 -- public/l10n/zh.json | 19 +++ public/l10n/zh_TW.json | 19 +++ src/actions/WalletActions.js | 22 +--- .../BetaDisclaimer/index.messages.json | 93 ++++++++++++++ translations/master.csv | 15 +++ translations/master.json | 121 ++++++++++++++++++ 38 files changed, 503 insertions(+), 72 deletions(-) delete mode 100644 public/l10n/es-ES.json create mode 100644 public/l10n/es.json delete mode 100644 public/l10n/pt-PT.json create mode 100644 public/l10n/pt.json delete mode 100644 public/l10n/zh-CN.json delete mode 100644 public/l10n/zh-TW.json create mode 100644 public/l10n/zh.json create mode 100644 public/l10n/zh_TW.json create mode 100644 translations/extractedMessages/src/views/Landing/components/BetaDisclaimer/index.messages.json diff --git a/l10n.config.json b/l10n.config.json index 6a444913..ebcd878a 100644 --- a/l10n.config.json +++ b/l10n.config.json @@ -36,5 +36,24 @@ "tr", "uk", "vi" - ] + ], + "langToFileNameMap": { + "en": "en", + "bn": "bn", + "cs": "cs", + "de": "de", + "el": "el", + "es-ES": "es", + "fr": "fr", + "id": "id", + "it": "it", + "ja": "ja", + "nl": "nl", + "pl": "pl", + "pt-PT": "pt", + "ru": "ru", + "uk": "uk", + "zh-CN": "zh", + "zh-TW": "zh_TW" + } } diff --git a/public/l10n/af.json b/public/l10n/af.json index 8fc2fbb5..03fd386f 100644 --- a/public/l10n/af.json +++ b/public/l10n/af.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", diff --git a/public/l10n/ar.json b/public/l10n/ar.json index 8fc2fbb5..03fd386f 100644 --- a/public/l10n/ar.json +++ b/public/l10n/ar.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", diff --git a/public/l10n/bn.json b/public/l10n/bn.json index 8fc2fbb5..03fd386f 100644 --- a/public/l10n/bn.json +++ b/public/l10n/bn.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", diff --git a/public/l10n/cs.json b/public/l10n/cs.json index 77bd99d4..d5616c85 100644 --- a/public/l10n/cs.json +++ b/public/l10n/cs.json @@ -1,11 +1,18 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet je komfortní rozhraní pro Vaše zařízení Trezor. Z rozhraní Wallet můžete snadno spravovat své účty, přijímat a odesílat platby.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "Soukromá banka ve Vašich rukou.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Pro pokračování připojte Trezor", "TR_AND": "a", "TR_CHECK_FOR_DEVICES": "Hledat zařízení", - "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Zařízení nebylo rozpoznáno? Zkuste nainstalovat Trezor Bridge.", - "TR_DONT_HAVE_A_TREZOR_GET": "Ještě nemáte Trezor? Jeden si pořiďte", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Zařízení nebylo rozpoznáno? Zkuste nainstalovat {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Ještě nemáte Trezor? {getOne}", "TR_GET_ONE": "Get one", "dashboard.selectyourcoin.title": "Please select your coin", "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" diff --git a/public/l10n/de.json b/public/l10n/de.json index 7a55e9b2..1857ee77 100644 --- a/public/l10n/de.json +++ b/public/l10n/de.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet bietet ein einfaches Interface für Ihren Trezor. Mit diesem Wallet können Sie Ihre Geldmittel kontrollieren, das Saldo verwalten und Zahlungen vornehmen.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "Eine private Bank in Ihren Händen.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Schließen Sie Ihren Trezor an, um fortzufahren", diff --git a/public/l10n/el.json b/public/l10n/el.json index 8fc2fbb5..03fd386f 100644 --- a/public/l10n/el.json +++ b/public/l10n/el.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", diff --git a/public/l10n/en.json b/public/l10n/en.json index 8fc2fbb5..03fd386f 100644 --- a/public/l10n/en.json +++ b/public/l10n/en.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", diff --git a/public/l10n/es-ES.json b/public/l10n/es-ES.json deleted file mode 100644 index def06f02..00000000 --- a/public/l10n/es-ES.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "El monedero Trezor Wallet es una interfaz fácil de usar para su dispositivo Trezor. Desde éste monedero, puede controlar fácilmente sus monedas, gestionar su saldo e iniciar transferencias.", - "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "La banca privada en sus manos.", - "TR_CONNECT_TREZOR_TO_CONTINUE": "Conecte el dispositivo Trezor para continuar", - "TR_AND": "y", - "TR_CHECK_FOR_DEVICES": "Buscar dispositivos", - "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "¿Dispositivo no reconocido? Pruebe instalar el {link}.", - "TR_DONT_HAVE_A_TREZOR_GET": "¿No tiene Trezor? {getOne}", - "TR_GET_ONE": "Get one", - "dashboard.selectyourcoin.title": "Please select your coin", - "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" -} \ No newline at end of file diff --git a/public/l10n/es.json b/public/l10n/es.json new file mode 100644 index 00000000..0d638b76 --- /dev/null +++ b/public/l10n/es.json @@ -0,0 +1,19 @@ +{ + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "El monedero Trezor Wallet es una interfaz fácil de usar para su dispositivo Trezor. Desde éste monedero, puede controlar fácilmente sus monedas, gestionar su saldo e iniciar transferencias.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "La banca privada en sus manos.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Conecte el dispositivo Trezor para continuar", + "TR_AND": "y", + "TR_CHECK_FOR_DEVICES": "Buscar dispositivos", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "¿Dispositivo no reconocido? Pruebe instalar el {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "¿No tiene Trezor? {getOne}", + "TR_GET_ONE": "Get one", + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/et.json b/public/l10n/et.json index 8fc2fbb5..03fd386f 100644 --- a/public/l10n/et.json +++ b/public/l10n/et.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", diff --git a/public/l10n/fa.json b/public/l10n/fa.json index 8fc2fbb5..03fd386f 100644 --- a/public/l10n/fa.json +++ b/public/l10n/fa.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", diff --git a/public/l10n/fr.json b/public/l10n/fr.json index 27a2bd02..01320d3e 100644 --- a/public/l10n/fr.json +++ b/public/l10n/fr.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet est une interface facile à utiliser pour votre Trezor et qui vous permet de contrôler facilement vos fonds, de gérer votre solde et d'opérer des virements.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "La banque privée entre vos mains.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connectez Trezor pour continuer", diff --git a/public/l10n/he.json b/public/l10n/he.json index 8fc2fbb5..03fd386f 100644 --- a/public/l10n/he.json +++ b/public/l10n/he.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", diff --git a/public/l10n/hi.json b/public/l10n/hi.json index 8fc2fbb5..03fd386f 100644 --- a/public/l10n/hi.json +++ b/public/l10n/hi.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", diff --git a/public/l10n/hu.json b/public/l10n/hu.json index 8fc2fbb5..03fd386f 100644 --- a/public/l10n/hu.json +++ b/public/l10n/hu.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", diff --git a/public/l10n/id.json b/public/l10n/id.json index 8fc2fbb5..03fd386f 100644 --- a/public/l10n/id.json +++ b/public/l10n/id.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", diff --git a/public/l10n/it.json b/public/l10n/it.json index d11ab823..e13f8ca5 100644 --- a/public/l10n/it.json +++ b/public/l10n/it.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Il Portafoglio Trezor è una interfaccia semplice da utilizzare per il tuo dispositivo Trezor. Da questo Portafoglio potrai facilmente controllare le tue monete, gestire il tuo conto ed avviare trasferimenti.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connetti Trezor per continuare", diff --git a/public/l10n/ja.json b/public/l10n/ja.json index 8fc2fbb5..03fd386f 100644 --- a/public/l10n/ja.json +++ b/public/l10n/ja.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", diff --git a/public/l10n/ko.json b/public/l10n/ko.json index 8fc2fbb5..03fd386f 100644 --- a/public/l10n/ko.json +++ b/public/l10n/ko.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", diff --git a/public/l10n/nl.json b/public/l10n/nl.json index 31ebfa4f..dbbb9ee9 100644 --- a/public/l10n/nl.json +++ b/public/l10n/nl.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "De Trezor Portemonnee is een gebruiksvriendelijke interface voor uw Trezor apparaat. Vanaf deze Portemonnee kunt u uw munten controleren, uw balans beheren en betalingen verrichten.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Sluit uw Trezor aan om door te gaan", diff --git a/public/l10n/no.json b/public/l10n/no.json index 8fc2fbb5..03fd386f 100644 --- a/public/l10n/no.json +++ b/public/l10n/no.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", diff --git a/public/l10n/pl.json b/public/l10n/pl.json index 73709c61..1e5f0be3 100644 --- a/public/l10n/pl.json +++ b/public/l10n/pl.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Portfel Trezor oferuje łatwy w użyciu interfejs. Z łatwością możesz kontrolować swoje pieniądze, zarządzać balansem konta i wysyłać transakcje.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Podłącz Trezor, aby kontynuować", diff --git a/public/l10n/pt-PT.json b/public/l10n/pt-PT.json deleted file mode 100644 index 8fc2fbb5..00000000 --- a/public/l10n/pt-PT.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", - "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", - "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", - "TR_AND": "and", - "TR_CHECK_FOR_DEVICES": "Check for devices", - "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", - "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", - "TR_GET_ONE": "Get one", - "dashboard.selectyourcoin.title": "Please select your coin", - "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" -} \ No newline at end of file diff --git a/public/l10n/pt.json b/public/l10n/pt.json new file mode 100644 index 00000000..03fd386f --- /dev/null +++ b/public/l10n/pt.json @@ -0,0 +1,19 @@ +{ + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/ru.json b/public/l10n/ru.json index 356605c4..4bda9a31 100644 --- a/public/l10n/ru.json +++ b/public/l10n/ru.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet – это простой и удобный интерфейс для Trezor, позволяющий контролировать средства, управлять остатками и отправлять средства.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "Частный банк у вас в руках.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Для продолжения подключите Trezor", diff --git a/public/l10n/sv-SE.json b/public/l10n/sv-SE.json index 8fc2fbb5..03fd386f 100644 --- a/public/l10n/sv-SE.json +++ b/public/l10n/sv-SE.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", diff --git a/public/l10n/tr.json b/public/l10n/tr.json index 8fc2fbb5..03fd386f 100644 --- a/public/l10n/tr.json +++ b/public/l10n/tr.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", diff --git a/public/l10n/uk.json b/public/l10n/uk.json index 8fc2fbb5..03fd386f 100644 --- a/public/l10n/uk.json +++ b/public/l10n/uk.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", diff --git a/public/l10n/vi.json b/public/l10n/vi.json index 8fc2fbb5..03fd386f 100644 --- a/public/l10n/vi.json +++ b/public/l10n/vi.json @@ -1,4 +1,11 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", diff --git a/public/l10n/zh-CN.json b/public/l10n/zh-CN.json deleted file mode 100644 index 8fc2fbb5..00000000 --- a/public/l10n/zh-CN.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", - "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", - "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", - "TR_AND": "and", - "TR_CHECK_FOR_DEVICES": "Check for devices", - "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", - "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", - "TR_GET_ONE": "Get one", - "dashboard.selectyourcoin.title": "Please select your coin", - "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" -} \ No newline at end of file diff --git a/public/l10n/zh-TW.json b/public/l10n/zh-TW.json deleted file mode 100644 index 4f804c16..00000000 --- a/public/l10n/zh-TW.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor錢包是專門為你的Trezor設計的簡單易用的介面。從這個錢包,你可以輕易的管理你的錢幣、檢查你的收支和發送付款。", - "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", - "TR_CONNECT_TREZOR_TO_CONTINUE": "請連接Trezor以繼續", - "TR_AND": "and", - "TR_CHECK_FOR_DEVICES": "Check for devices", - "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", - "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", - "TR_GET_ONE": "Get one", - "dashboard.selectyourcoin.title": "Please select your coin", - "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" -} \ No newline at end of file diff --git a/public/l10n/zh.json b/public/l10n/zh.json new file mode 100644 index 00000000..03fd386f --- /dev/null +++ b/public/l10n/zh.json @@ -0,0 +1,19 @@ +{ + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "Connect Trezor to continue", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/public/l10n/zh_TW.json b/public/l10n/zh_TW.json new file mode 100644 index 00000000..50cc2abc --- /dev/null +++ b/public/l10n/zh_TW.json @@ -0,0 +1,19 @@ +{ + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": "You are opening Trezor Beta Wallet", + "TR_TREZOR_BETA_WALLET_IS": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "TR_IN_CONTRAST_COMMA_TREZOR": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "TR_PLEASE_NOTE_THAT_THE_TREZOR": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "TR_OK_COMMA_I_UNDERSTAND": "OK, I understand", + "TR_TREZOR_WALLET": "Trezor Wallet", + "TR_TREZOR_BETA_WALLET": "Trezor Beta Wallet", + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": "Trezor錢包是專門為你的Trezor設計的簡單易用的介面。從這個錢包,你可以輕易的管理你的錢幣、檢查你的收支和發送付款。", + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": "The private bank in your hands.", + "TR_CONNECT_TREZOR_TO_CONTINUE": "請連接Trezor以繼續", + "TR_AND": "and", + "TR_CHECK_FOR_DEVICES": "Check for devices", + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": "Device not recognized? Try installing the {link}.", + "TR_DONT_HAVE_A_TREZOR_GET": "Don't have a Trezor? {getOne}", + "TR_GET_ONE": "Get one", + "dashboard.selectyourcoin.title": "Please select your coin", + "dashboard.selectyourcoin.body": "You will gain access to receiving & sending selected coin" +} \ No newline at end of file diff --git a/src/actions/WalletActions.js b/src/actions/WalletActions.js index 70519b75..0b34fa52 100644 --- a/src/actions/WalletActions.js +++ b/src/actions/WalletActions.js @@ -73,27 +73,7 @@ export const toggleSidebar = (): WalletAction => ({ }); export const fetchLocale = (locale: string): ThunkAction => (dispatch: Dispatch): void => { - const mapLocaleToFileName = { - en: 'en', - bn: 'bn', - cs: 'cs', - de: 'de', - el: 'el', - es: 'es-ES', - fr: 'fr', - id: 'id', - it: 'it', - ja: 'ja', - nl: 'nl', - pl: 'pl', - pt: 'pt-PT', - ru: 'ru', - uk: 'uk', - zh: 'zh-CN', - zh_TW: 'zh-TW', - }; - const filename = mapLocaleToFileName[locale]; - fetch(`/l10n/${filename}.json`) + fetch(`/l10n/${locale}.json`) .then(response => response.json()) .then((messages) => { dispatch({ diff --git a/translations/extractedMessages/src/views/Landing/components/BetaDisclaimer/index.messages.json b/translations/extractedMessages/src/views/Landing/components/BetaDisclaimer/index.messages.json new file mode 100644 index 00000000..2147fa02 --- /dev/null +++ b/translations/extractedMessages/src/views/Landing/components/BetaDisclaimer/index.messages.json @@ -0,0 +1,93 @@ +[ + { + "id": "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET", + "defaultMessage": "You are opening Trezor Beta Wallet", + "file": "src/views/Landing/components/BetaDisclaimer/index.messages.js", + "start": { + "line": 6, + "column": 43 + }, + "end": { + "line": 9, + "column": 5 + } + }, + { + "id": "TR_TREZOR_BETA_WALLET_IS", + "defaultMessage": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "file": "src/views/Landing/components/BetaDisclaimer/index.messages.js", + "start": { + "line": 10, + "column": 30 + }, + "end": { + "line": 13, + "column": 5 + } + }, + { + "id": "TR_IN_CONTRAST_COMMA_TREZOR", + "defaultMessage": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "file": "src/views/Landing/components/BetaDisclaimer/index.messages.js", + "start": { + "line": 14, + "column": 33 + }, + "end": { + "line": 17, + "column": 5 + } + }, + { + "id": "TR_PLEASE_NOTE_THAT_THE_TREZOR", + "defaultMessage": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "file": "src/views/Landing/components/BetaDisclaimer/index.messages.js", + "start": { + "line": 18, + "column": 36 + }, + "end": { + "line": 21, + "column": 5 + } + }, + { + "id": "TR_OK_COMMA_I_UNDERSTAND", + "defaultMessage": "OK, I understand", + "file": "src/views/Landing/components/BetaDisclaimer/index.messages.js", + "start": { + "line": 22, + "column": 30 + }, + "end": { + "line": 25, + "column": 5 + } + }, + { + "id": "TR_TREZOR_WALLET", + "defaultMessage": "Trezor Wallet", + "file": "src/views/Landing/components/BetaDisclaimer/index.messages.js", + "start": { + "line": 26, + "column": 22 + }, + "end": { + "line": 29, + "column": 5 + } + }, + { + "id": "TR_TREZOR_BETA_WALLET", + "defaultMessage": "Trezor Beta Wallet", + "file": "src/views/Landing/components/BetaDisclaimer/index.messages.js", + "start": { + "line": 30, + "column": 27 + }, + "end": { + "line": 33, + "column": 5 + } + } +] \ No newline at end of file diff --git a/translations/master.csv b/translations/master.csv index 2d47f42e..c0441354 100644 --- a/translations/master.csv +++ b/translations/master.csv @@ -1,3 +1,18 @@ "key","source","context","af","ar","bn","zh-CN","zh-TW","cs","nl","en","et","fr","de","el","he","hi","hu","id","it","ja","ko","no","fa","pl","pt-PT","ru","es-ES","sv-SE","tr","uk","vi" +"TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET","You are opening Trezor Beta Wallet","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" +"TR_TREZOR_BETA_WALLET_IS","{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" +"TR_IN_CONTRAST_COMMA_TREZOR","In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" +"TR_PLEASE_NOTE_THAT_THE_TREZOR","Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" +"TR_OK_COMMA_I_UNDERSTAND","OK, I understand","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" +"TR_TREZOR_WALLET","Trezor Wallet","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" +"TR_TREZOR_BETA_WALLET","Trezor Beta Wallet","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" +"TR_TREZOR_WALLET_IS_AN_EASY_DASH","Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" +"TR_THE_PRIVATE_BANK_IN_YOUR_HANDS","The private bank in your hands.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" +"TR_CONNECT_TREZOR_TO_CONTINUE","Connect Trezor to continue","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" +"TR_AND","and","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" +"TR_CHECK_FOR_DEVICES","Check for devices","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" +"TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING","Device not recognized? Try installing the {link}.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" +"TR_DONT_HAVE_A_TREZOR_GET","Don't have a Trezor? {getOne}","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" +"TR_GET_ONE","Get one","Part of the sentence: Dont have a Trezor? Get one","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" "dashboard.selectyourcoin.title","Please select your coin","Title of the dashboard component if coin was not selected","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" "dashboard.selectyourcoin.body","You will gain access to receiving & sending selected coin","Content of the dashboard component if coin was not selected","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" diff --git a/translations/master.json b/translations/master.json index a136fe4e..eadf6220 100644 --- a/translations/master.json +++ b/translations/master.json @@ -1,4 +1,125 @@ { + "TR_YOU_ARE_OPENING_TREZOR_BETA_WALLET": { + "source": "You are opening Trezor Beta Wallet", + "meta": { + "occurrences": [ + "src/views/Landing/components/BetaDisclaimer/index.messages.js" + ] + } + }, + "TR_TREZOR_BETA_WALLET_IS": { + "source": "{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.", + "meta": { + "occurrences": [ + "src/views/Landing/components/BetaDisclaimer/index.messages.js" + ] + } + }, + "TR_IN_CONTRAST_COMMA_TREZOR": { + "source": "In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.", + "meta": { + "occurrences": [ + "src/views/Landing/components/BetaDisclaimer/index.messages.js" + ] + } + }, + "TR_PLEASE_NOTE_THAT_THE_TREZOR": { + "source": "Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.", + "meta": { + "occurrences": [ + "src/views/Landing/components/BetaDisclaimer/index.messages.js" + ] + } + }, + "TR_OK_COMMA_I_UNDERSTAND": { + "source": "OK, I understand", + "meta": { + "occurrences": [ + "src/views/Landing/components/BetaDisclaimer/index.messages.js" + ] + } + }, + "TR_TREZOR_WALLET": { + "source": "Trezor Wallet", + "meta": { + "occurrences": [ + "src/views/Landing/components/BetaDisclaimer/index.messages.js" + ] + } + }, + "TR_TREZOR_BETA_WALLET": { + "source": "Trezor Beta Wallet", + "meta": { + "occurrences": [ + "src/views/Landing/components/BetaDisclaimer/index.messages.js" + ] + } + }, + "TR_TREZOR_WALLET_IS_AN_EASY_DASH": { + "source": "Trezor Wallet is an easy-to-use interface for your Trezor. Trezor Wallet allows you to easily control your funds, manage your balance and initiate transfers.", + "meta": { + "occurrences": [ + "src/views/Landing/components/ConnectDevice/index.messages.js" + ] + } + }, + "TR_THE_PRIVATE_BANK_IN_YOUR_HANDS": { + "source": "The private bank in your hands.", + "meta": { + "occurrences": [ + "src/views/Landing/components/ConnectDevice/index.messages.js" + ] + } + }, + "TR_CONNECT_TREZOR_TO_CONTINUE": { + "source": "Connect Trezor to continue", + "meta": { + "occurrences": [ + "src/views/Landing/components/ConnectDevice/index.messages.js" + ] + } + }, + "TR_AND": { + "source": "and", + "meta": { + "occurrences": [ + "src/views/Landing/components/ConnectDevice/index.messages.js" + ] + } + }, + "TR_CHECK_FOR_DEVICES": { + "source": "Check for devices", + "meta": { + "occurrences": [ + "src/views/Landing/components/ConnectDevice/index.messages.js" + ] + } + }, + "TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING": { + "source": "Device not recognized? Try installing the {link}.", + "meta": { + "occurrences": [ + "src/views/Landing/components/ConnectDevice/index.messages.js" + ] + } + }, + "TR_DONT_HAVE_A_TREZOR_GET": { + "source": "Don't have a Trezor? {getOne}", + "meta": { + "occurrences": [ + "src/views/Landing/components/ConnectDevice/index.messages.js" + ] + } + }, + "TR_GET_ONE": { + "source": "Get one", + "meta": { + "comment": "Part of the sentence: Dont have a Trezor? Get one", + "occurrences": [ + "src/views/Landing/components/ConnectDevice/index.messages.js" + ] + } + }, "dashboard.selectyourcoin.title": { "source": "Please select your coin", "meta": { From 1eb9f71fdc325041ff18dda17d6d9a254e35879b Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Mon, 18 Feb 2019 12:49:27 +0100 Subject: [PATCH 033/118] auto detect browser locale if lang not stored in localstorage --- src/actions/LocalStorageActions.js | 5 ++++- src/utils/l10n.js | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/utils/l10n.js diff --git a/src/actions/LocalStorageActions.js b/src/actions/LocalStorageActions.js index b73e3a63..c718d0dc 100644 --- a/src/actions/LocalStorageActions.js +++ b/src/actions/LocalStorageActions.js @@ -12,6 +12,7 @@ import { httpRequest } from 'utils/networkUtils'; import * as buildUtils from 'utils/build'; import * as storageUtils from 'utils/storage'; import * as WalletActions from 'actions/WalletActions'; +import * as l10nUtils from 'utils/l10n'; import { getAccountTokens } from 'reducers/utils'; import type { Account } from 'reducers/AccountsReducer'; @@ -240,7 +241,9 @@ const loadStorageData = (): ThunkAction => (dispatch: Dispatch): void => { const language: ?string = storageUtils.get(TYPE, KEY_LANGUAGE); if (language) { - dispatch(WalletActions.fetchLocale(language)); + dispatch(WalletActions.fetchLocale(JSON.parse(language))); + } else { + dispatch(WalletActions.fetchLocale(l10nUtils.getInitialLocale())); } }; diff --git a/src/utils/l10n.js b/src/utils/l10n.js new file mode 100644 index 00000000..6e60550c --- /dev/null +++ b/src/utils/l10n.js @@ -0,0 +1,11 @@ +import { LANGUAGE } from 'config/variables'; + +export const getInitialLocale = (defaultLocale = 'en') => { + const browserLocale = navigator.language.split('-')[0]; + if (LANGUAGE.some(e => e.code === browserLocale)) { + // Array of supported languages contains the locale we're looking for + return browserLocale; + } + // if browser lang is not supported return en as default locale + return defaultLocale; +}; \ No newline at end of file From bd638b966fd459d93416d93acae41ad2cc4269cb Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Mon, 18 Feb 2019 12:55:40 +0100 Subject: [PATCH 034/118] updated msgs var names --- src/views/Landing/components/BetaDisclaimer/index.js | 12 ++++++------ .../components/BetaDisclaimer/index.messages.js | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/views/Landing/components/BetaDisclaimer/index.js b/src/views/Landing/components/BetaDisclaimer/index.js index b395e451..ed876ae4 100644 --- a/src/views/Landing/components/BetaDisclaimer/index.js +++ b/src/views/Landing/components/BetaDisclaimer/index.js @@ -63,16 +63,16 @@ const BetaDisclaimer = (props: { close: () => void }) => ( , - trezorBetaWallet: , + TR_TREZOR_WALLET: , + TR_TREZOR_BETA_WALLET: , }} /> , - trezorBetaWallet: , + TR_TREZOR_WALLET: , + TR_TREZOR_BETA_WALLET: , }} /> @@ -85,8 +85,8 @@ const BetaDisclaimer = (props: { close: () => void }) => ( , - trezorBetaWallet: , + TR_TREZOR_WALLET: , + TR_TREZOR_BETA_WALLET: , }} /> diff --git a/src/views/Landing/components/BetaDisclaimer/index.messages.js b/src/views/Landing/components/BetaDisclaimer/index.messages.js index 326e4054..ad70f587 100644 --- a/src/views/Landing/components/BetaDisclaimer/index.messages.js +++ b/src/views/Landing/components/BetaDisclaimer/index.messages.js @@ -9,15 +9,15 @@ const definedMessages: Messages = defineMessages({ }, TR_TREZOR_BETA_WALLET_IS: { id: 'TR_TREZOR_BETA_WALLET_IS', - defaultMessage: '{trezorBetaWallet} is a public feature-testing version of the {trezorWallet}, offering the newest features before they are available to the general public.', + defaultMessage: '{TR_TREZOR_BETA_WALLET} is a public feature-testing version of the {TR_TREZOR_WALLET}, offering the newest features before they are available to the general public.', }, TR_IN_CONTRAST_COMMA_TREZOR: { id: 'TR_IN_CONTRAST_COMMA_TREZOR', - defaultMessage: 'In contrast, {trezorWallet} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.', + defaultMessage: 'In contrast, {TR_TREZOR_WALLET} is feature-conservative, making sure that its functionality is maximally reliable and dependable for the general public.', }, TR_PLEASE_NOTE_THAT_THE_TREZOR: { id: 'TR_PLEASE_NOTE_THAT_THE_TREZOR', - defaultMessage: 'Please note that the {trezorBetaWallet} might be collecting anonymized usage data, especially error logs, for development purposes. The {trezorWallet} does not log any data.', + defaultMessage: 'Please note that the {TR_TREZOR_BETA_WALLET} might be collecting anonymized usage data, especially error logs, for development purposes. The {TR_TREZOR_WALLET} does not log any data.', }, TR_OK_COMMA_I_UNDERSTAND: { id: 'TR_OK_COMMA_I_UNDERSTAND', From 15fb502adc3cd4ce6265a9acccb20115a1844329 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Mon, 18 Feb 2019 20:36:27 +0100 Subject: [PATCH 035/118] delete extract dir before extraction --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e1437947..f825bf4a 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "build:stable": "rimraf build/stable && npx webpack --config webpack/production.babel.js --output-path build/stable --progress --bail", "build:beta": "rimraf build/beta && cross-env BUILD=beta npx webpack --config webpack/production.babel.js --output-path build/beta --progress --bail", "build:dev": "rimraf build.dev && cross-env BUILD=development npx webpack --config webpack/production.babel.js --output-path build/dev --progress --bail", - "translations:extract": "cross-env NODE_ENV=translations babel src", + "translations:extract": "rimraf translations/extractedMessages && cross-env NODE_ENV=translations babel src", "translations:sync": "yarn ttm merge-msgs && yarn ttm build-csv && yarn ttm upload && yarn ttm build-translations && yarn ttm export-translations", "flow": "flow check src", "lint": "run-s lint:*", From dd99ab69d3bc2a6e76c1b1b23a86308fbbd30a8a Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Mon, 18 Feb 2019 20:37:15 +0100 Subject: [PATCH 036/118] add intl messages part 1 --- .../components/BrowserNotSupported/index.js | 10 +- .../BrowserNotSupported/index.messages.js | 24 + .../Landing/components/ConnectDevice/index.js | 3 +- .../ConnectDevice/index.messages.js | 4 - .../Landing/views/InstallBridge/index.js | 59 +- .../views/InstallBridge/index.messages.js | 37 ++ .../components/FirmwareUnsupported/index.js | 7 +- .../FirmwareUnsupported/index.messages.js | 16 + src/views/Wallet/components/Content/index.js | 5 +- .../components/Content/index.messages.js | 12 + .../components/AccountMenu/index.js | 21 +- .../components/AccountMenu/index.messages.js | 29 + .../components/CoinMenu/index.js | 7 +- .../components/CoinMenu/index.messages.js | 16 + .../DeviceMenu/components/MenuItems/index.js | 12 +- .../components/MenuItems/index.messages.js | 21 + .../components/DeviceMenu/index.js | 6 +- .../components/DeviceMenu/index.messages.js | 9 + .../components/Divider/index.js | 4 +- .../Wallet/components/LeftNavigation/index.js | 36 +- .../LeftNavigation/index.messages.js | 36 ++ src/views/Wallet/components/Title/index.js | 2 +- .../components/TopNavigationAccount/index.js | 10 +- .../TopNavigationAccount/index.messages.js | 24 + .../TopNavigationDeviceSettings/index.js | 4 +- .../views/Account/Receive/common.messages.js | 20 + .../components/VerifyAddressTooltip/index.js | 11 +- .../VerifyAddressTooltip/index.messages.js | 24 + .../views/Account/Receive/ethereum/index.js | 12 +- .../Receive/ethereum/index.messages.js | 12 + .../views/Account/Receive/ripple/index.js | 12 +- .../Account/Receive/ripple/index.messages.js | 12 + .../views/Account/Send/common.messages.js | 36 ++ .../ethereum/components/AdvancedForm/index.js | 45 +- .../components/AdvancedForm/index.messages.js | 48 ++ .../views/Account/Send/ethereum/index.js | 25 +- .../Account/Send/ethereum/index.messages.js | 16 + .../ripple/components/AdvancedForm/index.js | 19 +- .../components/AdvancedForm/index.messages.js | 20 + .../Wallet/views/Account/Send/ripple/index.js | 28 +- .../Account/Send/ripple/index.messages.js | 17 + src/views/common.messages.js | 21 + .../BetaDisclaimer/index.messages.json | 6 +- .../BrowserNotSupported/index.messages.json | 54 ++ .../ConnectDevice/index.messages.json | 25 +- .../views/InstallBridge/index.messages.json | 94 +++ .../FirmwareUnsupported/index.messages.json | 28 + .../components/Content/index.messages.json | 15 + .../AccountMenu/index.messages.json | 68 ++ .../components/CoinMenu/index.messages.json | 28 + .../components/MenuItems/index.messages.json | 42 ++ .../LeftNavigation/index.messages.json | 93 +++ .../TopNavigationAccount/index.messages.json | 54 ++ .../Account/Receive/common.messages.json | 41 ++ .../VerifyAddressTooltip/index.messages.json | 54 ++ .../Receive/ethereum/index.messages.json | 15 + .../Receive/ripple/index.messages.json | 15 + .../views/Account/Send/common.messages.json | 84 +++ .../AdvancedForm/index.messages.json | 132 ++++ .../Account/Send/ethereum/index.messages.json | 28 + .../AdvancedForm/index.messages.json | 41 ++ .../Account/Send/ripple/index.messages.json | 29 + .../src/views/common.messages.json | 42 ++ translations/master.csv | 77 ++- translations/master.json | 583 +++++++++++++++++- 65 files changed, 2274 insertions(+), 166 deletions(-) create mode 100644 src/views/Landing/components/BrowserNotSupported/index.messages.js create mode 100644 src/views/Landing/views/InstallBridge/index.messages.js create mode 100644 src/views/Wallet/components/Content/components/FirmwareUnsupported/index.messages.js create mode 100644 src/views/Wallet/components/Content/index.messages.js create mode 100644 src/views/Wallet/components/LeftNavigation/components/AccountMenu/index.messages.js create mode 100644 src/views/Wallet/components/LeftNavigation/components/CoinMenu/index.messages.js create mode 100644 src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.messages.js create mode 100644 src/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.messages.js create mode 100644 src/views/Wallet/components/LeftNavigation/index.messages.js create mode 100644 src/views/Wallet/components/TopNavigationAccount/index.messages.js create mode 100644 src/views/Wallet/views/Account/Receive/common.messages.js create mode 100644 src/views/Wallet/views/Account/Receive/components/VerifyAddressTooltip/index.messages.js create mode 100644 src/views/Wallet/views/Account/Receive/ethereum/index.messages.js create mode 100644 src/views/Wallet/views/Account/Receive/ripple/index.messages.js create mode 100644 src/views/Wallet/views/Account/Send/common.messages.js create mode 100644 src/views/Wallet/views/Account/Send/ethereum/components/AdvancedForm/index.messages.js create mode 100644 src/views/Wallet/views/Account/Send/ethereum/index.messages.js create mode 100644 src/views/Wallet/views/Account/Send/ripple/components/AdvancedForm/index.messages.js create mode 100644 src/views/Wallet/views/Account/Send/ripple/index.messages.js create mode 100644 src/views/common.messages.js create mode 100644 translations/extractedMessages/src/views/Landing/components/BrowserNotSupported/index.messages.json create mode 100644 translations/extractedMessages/src/views/Landing/views/InstallBridge/index.messages.json create mode 100644 translations/extractedMessages/src/views/Wallet/components/Content/components/FirmwareUnsupported/index.messages.json create mode 100644 translations/extractedMessages/src/views/Wallet/components/Content/index.messages.json create mode 100644 translations/extractedMessages/src/views/Wallet/components/LeftNavigation/components/AccountMenu/index.messages.json create mode 100644 translations/extractedMessages/src/views/Wallet/components/LeftNavigation/components/CoinMenu/index.messages.json create mode 100644 translations/extractedMessages/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.messages.json create mode 100644 translations/extractedMessages/src/views/Wallet/components/LeftNavigation/index.messages.json create mode 100644 translations/extractedMessages/src/views/Wallet/components/TopNavigationAccount/index.messages.json create mode 100644 translations/extractedMessages/src/views/Wallet/views/Account/Receive/common.messages.json create mode 100644 translations/extractedMessages/src/views/Wallet/views/Account/Receive/components/VerifyAddressTooltip/index.messages.json create mode 100644 translations/extractedMessages/src/views/Wallet/views/Account/Receive/ethereum/index.messages.json create mode 100644 translations/extractedMessages/src/views/Wallet/views/Account/Receive/ripple/index.messages.json create mode 100644 translations/extractedMessages/src/views/Wallet/views/Account/Send/common.messages.json create mode 100644 translations/extractedMessages/src/views/Wallet/views/Account/Send/ethereum/components/AdvancedForm/index.messages.json create mode 100644 translations/extractedMessages/src/views/Wallet/views/Account/Send/ethereum/index.messages.json create mode 100644 translations/extractedMessages/src/views/Wallet/views/Account/Send/ripple/components/AdvancedForm/index.messages.json create mode 100644 translations/extractedMessages/src/views/Wallet/views/Account/Send/ripple/index.messages.json create mode 100644 translations/extractedMessages/src/views/common.messages.json diff --git a/src/views/Landing/components/BrowserNotSupported/index.js b/src/views/Landing/components/BrowserNotSupported/index.js index 5ba7904a..f4499dd3 100644 --- a/src/views/Landing/components/BrowserNotSupported/index.js +++ b/src/views/Landing/components/BrowserNotSupported/index.js @@ -4,9 +4,11 @@ import Link from 'components/Link'; import Button from 'components/Button'; import P from 'components/Paragraph'; import { H2 } from 'components/Heading'; +import { FormattedMessage } from 'react-intl'; import ChromeImage from 'images/browser-chrome.png'; import FirefoxImage from 'images/browser-firefox.png'; +import l10nMessages from './index.messages'; const Wrapper = styled.div` padding: 24px 0px; @@ -32,21 +34,21 @@ const Browser = styled.div` const BrowserNotSupported = () => ( -

Your browser is not supported

-

Please choose one of the supported browsers

+

+

Google Chrome

- +

Mozzila Firefox

- +
diff --git a/src/views/Landing/components/BrowserNotSupported/index.messages.js b/src/views/Landing/components/BrowserNotSupported/index.messages.js new file mode 100644 index 00000000..4f42bce2 --- /dev/null +++ b/src/views/Landing/components/BrowserNotSupported/index.messages.js @@ -0,0 +1,24 @@ +/* @flow */ +import { defineMessages } from 'react-intl'; +import type { Messages } from 'flowtype/npm/react-intl'; + +const definedMessages: Messages = defineMessages({ + TR_YOUR_BROWSER_IS_NOT_SUPPORTED: { + id: 'TR_YOUR_BROWSER_IS_NOT_SUPPORTED', + defaultMessage: 'Your browser is not supported', + }, + TR_PLEASE_CHOOSE_ONE_OF_THE_SUPPORTED: { + id: 'TR_PLEASE_CHOOSE_ONE_OF_THE_SUPPORTED', + defaultMessage: 'Please choose one of the supported browsers', + }, + TR_GET_CHROME: { + id: 'TR_GET_CHROME', + defaultMessage: 'Get Chrome', + }, + TR_GET_FIREFOX: { + id: 'TR_GET_FIREFOX', + defaultMessage: 'Get Firefox', + }, +}); + +export default definedMessages; \ No newline at end of file diff --git a/src/views/Landing/components/ConnectDevice/index.js b/src/views/Landing/components/ConnectDevice/index.js index 64719114..4748d7fc 100644 --- a/src/views/Landing/components/ConnectDevice/index.js +++ b/src/views/Landing/components/ConnectDevice/index.js @@ -3,6 +3,7 @@ import React, { PureComponent } from 'react'; import styled, { keyframes } from 'styled-components'; import TrezorConnect from 'trezor-connect'; +import l10nCommonMessages from 'views/common.messages'; import P from 'components/Paragraph'; import Button from 'components/Button'; import { H2 } from 'components/Heading'; @@ -149,7 +150,7 @@ class ConnectDevice extends PureComponent { - + )} diff --git a/src/views/Landing/components/ConnectDevice/index.messages.js b/src/views/Landing/components/ConnectDevice/index.messages.js index a1be83b0..0e7e80ab 100644 --- a/src/views/Landing/components/ConnectDevice/index.messages.js +++ b/src/views/Landing/components/ConnectDevice/index.messages.js @@ -19,10 +19,6 @@ const definedMessages: Messages = defineMessages({ id: 'TR_AND', defaultMessage: 'and', }, - TR_CHECK_FOR_DEVICES: { - id: 'TR_CHECK_FOR_DEVICES', - defaultMessage: 'Check for devices', - }, TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING: { id: 'TR_DEVICE_NOT_RECOGNIZED_TRY_INSTALLING', defaultMessage: 'Device not recognized? Try installing the {link}.', diff --git a/src/views/Landing/views/InstallBridge/index.js b/src/views/Landing/views/InstallBridge/index.js index 3eb65953..237dab70 100644 --- a/src/views/Landing/views/InstallBridge/index.js +++ b/src/views/Landing/views/InstallBridge/index.js @@ -6,7 +6,7 @@ import colors from 'config/colors'; import { FONT_SIZE, FONT_WEIGHT } from 'config/variables'; import { Select } from 'components/Select'; import Link from 'components/Link'; -import { H1, H2 } from 'components/Heading'; +import { H1 } from 'components/Heading'; import Button from 'components/Button'; import P from 'components/Paragraph'; import Icon from 'components/Icon'; @@ -14,7 +14,9 @@ import ICONS from 'config/icons'; import LandingWrapper from 'views/Landing/components/LandingWrapper'; import * as RouterActions from 'actions/RouterActions'; +import { FormattedMessage } from 'react-intl'; import type { State as TrezorConnectState } from 'reducers/TrezorConnectReducer'; +import l10nMessages from './index.messages'; type InstallTarget = { value: string; @@ -112,17 +114,17 @@ const GoBack = styled.span` } `; -const Ol = styled.ul` - margin: 0 auto; - color: ${colors.TEXT_SECONDARY}; - font-size: ${FONT_SIZE.BIG}; - padding: 0px 0 15px 25px; - text-align: left; -`; +// const Ol = styled.ul` +// margin: 0 auto; +// color: ${colors.TEXT_SECONDARY}; +// font-size: ${FONT_SIZE.BIG}; +// padding: 0px 0 15px 25px; +// text-align: left; +// `; -const Li = styled.li` - text-align: justify; -`; +// const Li = styled.li` +// text-align: justify; +// `; class InstallBridge extends PureComponent { constructor(props: Props) { @@ -161,7 +163,7 @@ class InstallBridge extends PureComponent { Trezor Bridge{this.state.currentVersion} -

New communication tool to facilitate the connection between your Trezor and your internet browser.

+

{ color={colors.WHITE} size={30} /> - Download latest Bridge {this.state.latestVersion} + -

Changelog

+ {/*

    {this.props.transport.bridge.changelog.map(entry => (
  1. {entry}
  2. ))} -
+ */}

- Learn more about latest versions in - Changelog - + + + + + ), + }} + /> +

{target.signature && ( Check PGP signature + > )}

@@ -208,8 +219,8 @@ class InstallBridge extends PureComponent { {this.props.transport.type && (

- No, i dont want to upgrade Bridge now
- Take me this.props.selectFirstAvailableDevice()}>back to the wallet +
+ this.props.selectFirstAvailableDevice()}>

)}
diff --git a/src/views/Landing/views/InstallBridge/index.messages.js b/src/views/Landing/views/InstallBridge/index.messages.js new file mode 100644 index 00000000..5ea6518d --- /dev/null +++ b/src/views/Landing/views/InstallBridge/index.messages.js @@ -0,0 +1,37 @@ +/* @flow */ +import { defineMessages } from 'react-intl'; +import type { Messages } from 'flowtype/npm/react-intl'; + +const definedMessages: Messages = defineMessages({ + TR_NEW_COMMUNICATION_TOOL: { + id: 'TR_NEW_COMMUNICATION_TOOL', + defaultMessage: 'New communication tool to facilitate the connection between your Trezor and your internet browser.', + }, + TR_DOWNLOAD_LATEST_BRIDGE: { + id: 'TR_DOWNLOAD_LATEST_BRIDGE', + defaultMessage: 'Download latest Bridge {version}', + }, + TR_LEARN_MORE_ABOUT_LATEST_VERSION: { + id: 'TR_LEARN_MORE_ABOUT_LATEST_VERSION', + defaultMessage: 'Learn more about latest version in {TR_CHANGELOG}.', + }, + TR_CHANGELOG: { + id: 'TR_CHANGELOG', + defaultMessage: 'Changelog', + description: 'Part of the sentence: Learn more about latest version in {TR_CHANGELOG}.', + }, + TR_CHECK_PGP_SIGNATURE: { + id: 'TR_CHECK_PGP_SIGNATURE', + defaultMessage: 'Check PGP signature', + }, + TR_DONT_UPGRADE_BRIDGE: { + id: 'TR_DONT_UPGRADE_BRIDGE', + defaultMessage: 'No, I don\'t want to upgrade Bridge now', + }, + TR_TAKE_ME_BACK_TO_WALLET: { + id: 'TR_TAKE_ME_BACK_TO_WALLET', + defaultMessage: 'Take me back to the wallet', + }, +}); + +export default definedMessages; \ No newline at end of file diff --git a/src/views/Wallet/components/Content/components/FirmwareUnsupported/index.js b/src/views/Wallet/components/Content/components/FirmwareUnsupported/index.js index b48f562b..1f8f55db 100644 --- a/src/views/Wallet/components/Content/components/FirmwareUnsupported/index.js +++ b/src/views/Wallet/components/Content/components/FirmwareUnsupported/index.js @@ -9,6 +9,10 @@ import Button from 'components/Button'; import Link from 'components/Link'; import CoinLogo from 'components/images/CoinLogo'; +import { FormattedMessage } from 'react-intl'; +import l10nMessages from './index.messages'; + + const getInfoUrl = (networkShortcut: ?string) => { const urls = { default: 'https://wiki.trezor.io', @@ -54,13 +58,14 @@ const Message = styled(Paragraph)` `; const FirmwareUnsupported = (props: Props) => ( + //TODO: localization {props.networkShortcut && }

{props.title}

{props.message} - +
diff --git a/src/views/Wallet/components/Content/components/FirmwareUnsupported/index.messages.js b/src/views/Wallet/components/Content/components/FirmwareUnsupported/index.messages.js new file mode 100644 index 00000000..d574bee4 --- /dev/null +++ b/src/views/Wallet/components/Content/components/FirmwareUnsupported/index.messages.js @@ -0,0 +1,16 @@ +/* @flow */ +import { defineMessages } from 'react-intl'; +import type { Messages } from 'flowtype/npm/react-intl'; + +const definedMessages: Messages = defineMessages({ + TR_FIND_OUT_MORE_INFO: { + id: 'TR_FIND_OUT_MORE_INFO', + defaultMessage: 'Find out more info', + }, + TR_MODEL_DOES_NOT_SUPPORT_COIN: { + id: 'TR_MODEL_DOES_NOT_SUPPORT_COIN', + defaultMessage: 'The coin {coin} is not supported by your Trezor model.', + }, +}); + +export default definedMessages; \ No newline at end of file diff --git a/src/views/Wallet/components/Content/index.js b/src/views/Wallet/components/Content/index.js index 3cfbd133..1c2b3c25 100644 --- a/src/views/Wallet/components/Content/index.js +++ b/src/views/Wallet/components/Content/index.js @@ -12,8 +12,11 @@ import colors from 'config/colors'; import type { State } from 'flowtype'; import FirmwareUpdate from 'views/Wallet/views/FirmwareUpdate'; +import { FormattedMessage } from 'react-intl'; import FirmwareUnsupported from './components/FirmwareUnsupported'; +import l10nMessages from './index.messages'; + type Props = { children?: React.Node, isLoading?: boolean, @@ -81,7 +84,7 @@ const Content = ({ {loader.type === 'progress' && } - {loader.title || 'Initializing accounts'} + {loader.title || <FormattedMessage {...l10nMessages.TR_INITIALIZING_ACCOUNTS} />} {loader.message && {loader.message}} diff --git a/src/views/Wallet/components/Content/index.messages.js b/src/views/Wallet/components/Content/index.messages.js new file mode 100644 index 00000000..cc0691a9 --- /dev/null +++ b/src/views/Wallet/components/Content/index.messages.js @@ -0,0 +1,12 @@ +/* @flow */ +import { defineMessages } from 'react-intl'; +import type { Messages } from 'flowtype/npm/react-intl'; + +const definedMessages: Messages = defineMessages({ + TR_INITIALIZING_ACCOUNTS: { + id: 'TR_INITIALIZING_ACCOUNTS', + defaultMessage: 'Initializing accounts', + }, +}); + +export default definedMessages; \ No newline at end of file diff --git a/src/views/Wallet/components/LeftNavigation/components/AccountMenu/index.js b/src/views/Wallet/components/LeftNavigation/components/AccountMenu/index.js index a89f980a..8175b961 100644 --- a/src/views/Wallet/components/LeftNavigation/components/AccountMenu/index.js +++ b/src/views/Wallet/components/LeftNavigation/components/AccountMenu/index.js @@ -8,6 +8,7 @@ import styled, { css } from 'styled-components'; import * as stateUtils from 'reducers/utils'; import Tooltip from 'components/Tooltip'; import ICONS from 'config/icons'; +import { FormattedMessage } from 'react-intl'; import { NavLink } from 'react-router-dom'; import { findDeviceAccounts } from 'reducers/AccountsReducer'; @@ -19,6 +20,8 @@ import type { Accounts } from 'flowtype'; import type { Props } from '../common'; import Row from '../Row'; import RowCoin from '../RowCoin'; +import l10nMessages from './index.messages'; + const Wrapper = styled.div``; @@ -105,7 +108,7 @@ const AccountMenu = (props: Props) => { // const url: string = `${baseUrl}/network/${location.state.network}/account/${i}`; const url: string = location.pathname.replace(/account+\/([0-9]*)/, `account/${i}`); - let balance: string = 'Loading...'; + let balance: ?string = null; if (account.balance !== '') { const pending = stateUtils.getAccountPendingTx(props.pending, account); const pendingAmount: BigNumber = stateUtils.getPendingAmount(pending, network.symbol); @@ -130,9 +133,9 @@ const AccountMenu = (props: Props) => { isSelected={urlAccountIndex === account.index} borderTop={account.index === 0} > - Account #{account.index + 1} + {balance && {balance}} - {!balance && Loading...} + {!balance && }
@@ -148,7 +151,7 @@ const AccountMenu = (props: Props) => { discoveryStatus = ( } placement="bottom" > @@ -160,7 +163,7 @@ const AccountMenu = (props: Props) => { color={colors.TEXT_SECONDARY} /> - Add account + @@ -176,7 +179,7 @@ const AccountMenu = (props: Props) => { color={colors.TEXT_SECONDARY} /> - Add account + ); @@ -184,7 +187,7 @@ const AccountMenu = (props: Props) => { discoveryStatus = ( } placement="bottom" > @@ -196,7 +199,7 @@ const AccountMenu = (props: Props) => { color={colors.TEXT_SECONDARY} /> - Add account + @@ -208,7 +211,7 @@ const AccountMenu = (props: Props) => { - Loading... + diff --git a/src/views/Wallet/components/LeftNavigation/components/AccountMenu/index.messages.js b/src/views/Wallet/components/LeftNavigation/components/AccountMenu/index.messages.js new file mode 100644 index 00000000..e3b4ddb9 --- /dev/null +++ b/src/views/Wallet/components/LeftNavigation/components/AccountMenu/index.messages.js @@ -0,0 +1,29 @@ +/* @flow */ +import { defineMessages } from 'react-intl'; +import type { Messages } from 'flowtype/npm/react-intl'; + +const definedMessages: Messages = defineMessages({ + TR_ACCOUNT_HASH: { + id: 'TR_ACCOUNT_HASH', + defaultMessage: 'Account #{number}', + description: 'Used in auto-generated account label', + }, + TR_LOADING_DOT_DOT_DOT: { + id: 'TR_LOADING_DOT_DOT_DOT', + defaultMessage: 'Loading...', + }, + TR_TO_ADD_A_NEW_ACCOUNT_LAST: { + id: 'TR_TO_ADD_A_NEW_ACCOUNT_LAST', + defaultMessage: 'To add a new account, last account must have some transactions.', + }, + TR_TO_ADD_ACCOUNTS: { + id: 'TR_TO_ADD_ACCOUNTS', + defaultMessage: 'To add accounts, make sure your device is connected.', + }, + TR_ADD_ACCOUNT: { + id: 'TR_ADD_ACCOUNT', + defaultMessage: 'Add account', + }, +}); + +export default definedMessages; \ No newline at end of file diff --git a/src/views/Wallet/components/LeftNavigation/components/CoinMenu/index.js b/src/views/Wallet/components/LeftNavigation/components/CoinMenu/index.js index 194932e7..dbfbad14 100644 --- a/src/views/Wallet/components/LeftNavigation/components/CoinMenu/index.js +++ b/src/views/Wallet/components/LeftNavigation/components/CoinMenu/index.js @@ -8,9 +8,12 @@ import PropTypes from 'prop-types'; import React, { PureComponent } from 'react'; import { NavLink } from 'react-router-dom'; import Link from 'components/Link'; +import { FormattedMessage } from 'react-intl'; import Divider from '../Divider'; import RowCoin from '../RowCoin'; +import l10nMessages from './index.messages'; + import type { Props } from '../common'; const Wrapper = styled.div``; @@ -73,8 +76,8 @@ class CoinMenu extends PureComponent { ))} } + textRight={} hasBorder /> {this.getOtherCoins()} diff --git a/src/views/Wallet/components/LeftNavigation/components/CoinMenu/index.messages.js b/src/views/Wallet/components/LeftNavigation/components/CoinMenu/index.messages.js new file mode 100644 index 00000000..e0a09530 --- /dev/null +++ b/src/views/Wallet/components/LeftNavigation/components/CoinMenu/index.messages.js @@ -0,0 +1,16 @@ +/* @flow */ +import { defineMessages } from 'react-intl'; +import type { Messages } from 'flowtype/npm/react-intl'; + +const definedMessages: Messages = defineMessages({ + TR_OTHER_COINS: { + id: 'TR_OTHER_COINS', + defaultMessage: 'Other coins', + }, + TR_YOU_WILL_BE_REDIRECTED: { + id: 'TR_YOU_WILL_BE_REDIRECTED', + defaultMessage: '(You will be redirected)', + }, +}); + +export default definedMessages; \ No newline at end of file diff --git a/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.js b/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.js index b3f42a41..40ca2989 100644 --- a/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.js +++ b/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.js @@ -3,11 +3,15 @@ import styled from 'styled-components'; import PropTypes from 'prop-types'; import Icon from 'components/Icon'; import DeviceIcon from 'components/images/DeviceIcon'; +import { FormattedMessage } from 'react-intl'; import icons from 'config/icons'; import colors from 'config/colors'; import { FONT_SIZE } from 'config/variables'; +// import l10nCommonMessages from 'views/common.messages'; +import l10nMessages from './index.messages'; + const Wrapper = styled.div` background: ${colors.WHITE}; `; @@ -58,7 +62,7 @@ class MenuItems extends PureComponent { size={25} color={colors.TEXT_SECONDARY} /> - + */} {this.showClone() && ( this.props.duplicateDevice(device)}> @@ -67,7 +71,7 @@ class MenuItems extends PureComponent { size={25} color={colors.TEXT_SECONDARY} /> - + )} {this.showRenewSession() && ( @@ -75,7 +79,7 @@ class MenuItems extends PureComponent { onClick={() => this.props.acquireDevice()} > - + )} this.props.forgetDevice(device)}> @@ -84,7 +88,7 @@ class MenuItems extends PureComponent { size={25} color={colors.TEXT_SECONDARY} /> - +
); diff --git a/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.messages.js b/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.messages.js new file mode 100644 index 00000000..cb2a4df5 --- /dev/null +++ b/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.messages.js @@ -0,0 +1,21 @@ +/* @flow */ +import { defineMessages } from 'react-intl'; +import type { Messages } from 'flowtype/npm/react-intl'; + +const definedMessages: Messages = defineMessages({ + TR_CHANGE_WALLET_TYPE: { + id: 'TR_CHANGE_WALLET_TYPE', + defaultMessage: 'Change wallet type', + }, + TR_RENEW_SESSION: { + id: 'TR_RENEW_SESSION', + defaultMessage: 'Renew session', + description: 'TODO', + }, + TR_FORGET_DEVICE: { + id: 'TR_FORGET_DEVICE', + defaultMessage: 'Forget device', + }, +}); + +export default definedMessages; \ No newline at end of file diff --git a/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js b/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js index 0d0b4cc5..29c027ea 100644 --- a/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js +++ b/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js @@ -2,6 +2,7 @@ import React, { PureComponent } from 'react'; import styled from 'styled-components'; import TrezorConnect from 'trezor-connect'; +import { FormattedMessage } from 'react-intl'; import COLORS from 'config/colors'; import { FONT_SIZE, FONT_WEIGHT } from 'config/variables'; @@ -9,6 +10,7 @@ import { SLIDE_DOWN } from 'config/animations'; import Button from 'components/Button'; import * as deviceUtils from 'utils/device'; +import l10nCommonMessages from 'views/common.messages'; import MenuItems from './components/MenuItems'; import DeviceList from './components/DeviceList'; @@ -124,7 +126,9 @@ class DeviceMenu extends PureComponent { /> {deviceUtils.isWebUSB(transport) && ( - Check for devices + + + )} diff --git a/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.messages.js b/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.messages.js new file mode 100644 index 00000000..7f59eeb4 --- /dev/null +++ b/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.messages.js @@ -0,0 +1,9 @@ +/* @flow */ +import { defineMessages } from 'react-intl'; +import type { Messages } from 'flowtype/npm/react-intl'; + +const definedMessages: Messages = defineMessages({ + +}); + +export default definedMessages; \ No newline at end of file diff --git a/src/views/Wallet/components/LeftNavigation/components/Divider/index.js b/src/views/Wallet/components/LeftNavigation/components/Divider/index.js index b848e4bd..4eba6caa 100644 --- a/src/views/Wallet/components/LeftNavigation/components/Divider/index.js +++ b/src/views/Wallet/components/LeftNavigation/components/Divider/index.js @@ -37,8 +37,8 @@ const Divider = ({ Divider.propTypes = { className: PropTypes.string, - textLeft: PropTypes.string, - textRight: PropTypes.string, + textLeft: PropTypes.node, + textRight: PropTypes.node, hasBorder: PropTypes.bool, testId: PropTypes.string, }; diff --git a/src/views/Wallet/components/LeftNavigation/index.js b/src/views/Wallet/components/LeftNavigation/index.js index 459e1055..30e85b35 100644 --- a/src/views/Wallet/components/LeftNavigation/index.js +++ b/src/views/Wallet/components/LeftNavigation/index.js @@ -13,12 +13,14 @@ import DeviceHeader from 'components/DeviceHeader'; import * as deviceUtils from 'utils/device'; import Tooltip from 'components/Tooltip'; +import { FormattedMessage } from 'react-intl'; import AccountMenu from './components/AccountMenu'; import CoinMenu from './components/CoinMenu'; import DeviceMenu from './components/DeviceMenu'; import Sidebar from './components/Sidebar'; import type { Props } from './components/common'; +import l10nMessages from './index.messages'; const Header = styled(DeviceHeader)` border-right: 1px solid ${colors.BACKGROUND}; @@ -115,6 +117,26 @@ const TransitionMenu = (props: TransitionMenuProps): React$Element ); +const WalletTooltipMsg = ({ walletType, isDeviceReady }: { walletType: string, isDeviceReady: ?boolean}): any => { + let secondPart = ''; + if (isDeviceReady) { + secondPart = walletType === 'standard' + ? + : ; + } else { + secondPart = ; + } + return ( + <> + {walletType === 'standard' + ? + : } + {' '}{secondPart} + + ); +}; + + type State = { animationType: ?string; clicked: boolean; @@ -211,14 +233,6 @@ class LeftNavigation extends React.PureComponent { const showWalletType = selectedDevice && selectedDevice.features && selectedDevice.features.passphrase_protection; const isDeviceReady = selectedDevice && selectedDevice.connected && selectedDevice.available; - let walletTooltipMsg = `You are in your ${walletType} wallet.`; - if (isDeviceReady) { - walletTooltipMsg = walletType === 'standard' - ? `${walletTooltipMsg} Click here to access your hidden wallet.` - : `${walletTooltipMsg} Click here to access your standard or another hidden wallet`; - } else { - walletTooltipMsg = `${walletTooltipMsg} To access other wallets please connect your device.`; - } return ( @@ -238,7 +252,7 @@ class LeftNavigation extends React.PureComponent { {showWalletType && ( } maxWidth={200} placement="bottom" enterDelayMs={0.5} @@ -262,7 +276,7 @@ class LeftNavigation extends React.PureComponent { } {this.props.devices.length > 1 && ( } maxWidth={200} placement="bottom" enterDelayMs={0.5} @@ -292,7 +306,7 @@ class LeftNavigation extends React.PureComponent { target="_blank" rel="noreferrer noopener" > - Need help? + diff --git a/src/views/Wallet/components/LeftNavigation/index.messages.js b/src/views/Wallet/components/LeftNavigation/index.messages.js new file mode 100644 index 00000000..f613fc8a --- /dev/null +++ b/src/views/Wallet/components/LeftNavigation/index.messages.js @@ -0,0 +1,36 @@ +/* @flow */ +import { defineMessages } from 'react-intl'; +import type { Messages } from 'flowtype/npm/react-intl'; + +const definedMessages: Messages = defineMessages({ + TR_YOU_ARE_IN_YOUR_STANDARD_WALLET: { + id: 'TR_YOU_ARE_IN_YOUR_STANDARD_WALLET', + defaultMessage: 'You are in your standard wallet.', + }, + TR_YOU_ARE_IN_YOUR_HIDDEN_WALLET: { + id: 'TR_YOU_ARE_IN_YOUR_WALLET', + defaultMessage: 'You are in your hidden wallet.', + }, + TR_CLICK_HERE_TO_ACCESS_YOUR_HIDDEN: { + id: 'TR_CLICK_HERE_TO_ACCESS_YOUR_HIDDEN', + defaultMessage: 'Click here to access your hidden wallet.', + }, + TR_CLICK_HERE_TO_ACCESS_YOUR_STANDARD: { + id: 'TR_CLICK_HERE_TO_ACCESS_YOUR_STANDARD', + defaultMessage: 'Click here to access your standard or another hidden wallet.', + }, + TR_TO_ACCESS_OTHER_WALLETS: { + id: 'TR_TO_ACCESS_OTHER_WALLETS', + defaultMessage: 'To access other wallets please connect your device.', + }, + TR_NEED_HELP: { + id: 'TR_NEED_HELP', + defaultMessage: 'Need help?', + }, + TR_NUMBER_OF_DEVICES: { + id: 'TR_NUMBER_OF_DEVICES', + defaultMessage: 'Number of devices', + }, +}); + +export default definedMessages; \ No newline at end of file diff --git a/src/views/Wallet/components/Title/index.js b/src/views/Wallet/components/Title/index.js index edc7b1f4..e72bf32a 100644 --- a/src/views/Wallet/components/Title/index.js +++ b/src/views/Wallet/components/Title/index.js @@ -20,7 +20,7 @@ const Title = ({ ); Title.propTypes = { - children: PropTypes.string, + children: PropTypes.node, }; export default Title; diff --git a/src/views/Wallet/components/TopNavigationAccount/index.js b/src/views/Wallet/components/TopNavigationAccount/index.js index 94977803..15fd708a 100644 --- a/src/views/Wallet/components/TopNavigationAccount/index.js +++ b/src/views/Wallet/components/TopNavigationAccount/index.js @@ -7,7 +7,9 @@ import { NavLink } from 'react-router-dom'; import { connect } from 'react-redux'; import colors from 'config/colors'; import type { State } from 'flowtype'; +import { FormattedMessage } from 'react-intl'; +import l10nMessages from './index.messages'; import Indicator from './components/Indicator'; type Props = { @@ -83,11 +85,11 @@ class TopNavigationAccount extends React.PureComponent { return ( - Summary - Receive - Send + + + {network.type === 'ethereum' - && Sign & Verify + && } this.wrapper} /> diff --git a/src/views/Wallet/components/TopNavigationAccount/index.messages.js b/src/views/Wallet/components/TopNavigationAccount/index.messages.js new file mode 100644 index 00000000..ed851523 --- /dev/null +++ b/src/views/Wallet/components/TopNavigationAccount/index.messages.js @@ -0,0 +1,24 @@ +/* @flow */ +import { defineMessages } from 'react-intl'; +import type { Messages } from 'flowtype/npm/react-intl'; + +const definedMessages: Messages = defineMessages({ + TR_SUMMARY: { + id: 'TR_SUMMARY', + defaultMessage: 'Summary', + }, + TR_RECEIVE: { + id: 'TR_RECEIVE', + defaultMessage: 'Receive', + }, + TR_SEND: { + id: 'TR_SEND', + defaultMessage: 'Send', + }, + TR_SIGN_AND_VERIFY: { + id: 'TR_SIGN_AND_VERIFY', + defaultMessage: 'Sign & Verify', + }, +}); + +export default definedMessages; \ No newline at end of file diff --git a/src/views/Wallet/components/TopNavigationDeviceSettings/index.js b/src/views/Wallet/components/TopNavigationDeviceSettings/index.js index d721c6f3..cb37524e 100644 --- a/src/views/Wallet/components/TopNavigationDeviceSettings/index.js +++ b/src/views/Wallet/components/TopNavigationDeviceSettings/index.js @@ -1,11 +1,13 @@ import styled from 'styled-components'; import React from 'react'; +import { FormattedMessage } from 'react-intl'; +import l10nCommonMessages from 'views/common.messages'; const Wrapper = styled.div``; const AccountTabs = () => ( - Device settings + ); diff --git a/src/views/Wallet/views/Account/Receive/common.messages.js b/src/views/Wallet/views/Account/Receive/common.messages.js new file mode 100644 index 00000000..c941ade3 --- /dev/null +++ b/src/views/Wallet/views/Account/Receive/common.messages.js @@ -0,0 +1,20 @@ +/* @flow */ +import { defineMessages } from 'react-intl'; +import type { Messages } from 'flowtype/npm/react-intl'; + +const definedMessages: Messages = defineMessages({ + TR_CHECK_ADDRESS_ON_TREZOR: { + id: 'TR_CHECK_ADDRESS_ON_TREZOR', + defaultMessage: 'Check address on Trezor', + }, + TR_SHOW_FULL_ADDRESS: { + id: 'TR_SHOW_FULL_ADDRESS', + defaultMessage: 'Show full address', + }, + TR_QR_CODE: { + id: 'TR_QR_CODE', + defaultMessage: 'QR Code', + }, +}); + +export default definedMessages; \ No newline at end of file diff --git a/src/views/Wallet/views/Account/Receive/components/VerifyAddressTooltip/index.js b/src/views/Wallet/views/Account/Receive/components/VerifyAddressTooltip/index.js index b1db5630..08ccbb56 100644 --- a/src/views/Wallet/views/Account/Receive/components/VerifyAddressTooltip/index.js +++ b/src/views/Wallet/views/Account/Receive/components/VerifyAddressTooltip/index.js @@ -1,6 +1,9 @@ import React from 'react'; import styled from 'styled-components'; import PropTypes from 'prop-types'; +import { FormattedMessage } from 'react-intl'; +import l10nMessages from './index.messages'; + const Wrapper = styled.div``; const Content = styled.div``; @@ -9,12 +12,16 @@ const VerifyAddressTooltip = ({ isConnected, isAvailable, addressUnverified }) = {addressUnverified && ( - Unverified address. {isConnected && isAvailable ? 'Show on Trezor' : 'Connect your Trezor to verify it.'} + {isConnected && isAvailable + ? + : } )} {!addressUnverified && ( - {isConnected ? 'Show on Trezor' : 'Connect your Trezor to verify address.'} + {isConnected + ? + : } )} diff --git a/src/views/Wallet/views/Account/Receive/components/VerifyAddressTooltip/index.messages.js b/src/views/Wallet/views/Account/Receive/components/VerifyAddressTooltip/index.messages.js new file mode 100644 index 00000000..628ce4cc --- /dev/null +++ b/src/views/Wallet/views/Account/Receive/components/VerifyAddressTooltip/index.messages.js @@ -0,0 +1,24 @@ +/* @flow */ +import { defineMessages } from 'react-intl'; +import type { Messages } from 'flowtype/npm/react-intl'; + +const definedMessages: Messages = defineMessages({ + TR_UNVERIFIED_ADDRESS_COMMA_CONNECT: { + id: 'TR_UNVERIFIED_ADDRESS_COMMA_CONNECT', + defaultMessage: 'Unverified address, connect your Trezor to verify it', + }, + TR_UNVERIFIED_ADDRESS_COMMA_SHOW: { + id: 'TR_UNVERIFIED_ADDRESS_COMMA_SHOW', + defaultMessage: 'Unverified address, show on Trezor.', + }, + TR_SHOW_ON_TREZOR: { + id: 'TR_SHOW_ON_TREZOR', + defaultMessage: 'Show on Trezor', + }, + TR_CONNECT_YOUR_TREZOR_TO_CHECK: { + id: 'TR_CONNECT_YOUR_TREZOR_TO_CHECK', + defaultMessage: 'Connect your Trezor to verify this address', + }, +}); + +export default definedMessages; \ No newline at end of file diff --git a/src/views/Wallet/views/Account/Receive/ethereum/index.js b/src/views/Wallet/views/Account/Receive/ethereum/index.js index f700b1a9..c727a8e5 100644 --- a/src/views/Wallet/views/Account/Receive/ethereum/index.js +++ b/src/views/Wallet/views/Account/Receive/ethereum/index.js @@ -2,6 +2,7 @@ import React from 'react'; import { QRCode } from 'react-qr-svg'; import styled from 'styled-components'; +import { FormattedMessage } from 'react-intl'; import Title from 'views/Wallet/components/Title'; import Button from 'components/Button'; @@ -17,6 +18,9 @@ import { CONTEXT_DEVICE } from 'actions/constants/modal'; import Content from 'views/Wallet/components/Content'; import VerifyAddressTooltip from '../components/VerifyAddressTooltip'; +import l10nMessages from './index.messages'; +import l10nCommonMessages from '../common.messages'; + import type { Props } from './Container'; const Label = styled.div` @@ -120,7 +124,7 @@ const AccountReceive = (props: Props) => { return ( - Receive Ethereum or tokens + <FormattedMessage {...l10nMessages.TR_RECEIVE_ETHEREUM_OR_TOKENS} /> { trezorAction={isAddressVerifying ? ( - Check address on your Trezor + ) : null} icon={((addressVerified || addressUnverified) && !isAddressVerifying) && ( @@ -158,13 +162,13 @@ const AccountReceive = (props: Props) => { /> {!(addressVerified || addressUnverified) && ( props.showAddress(account.accountPath)} isDisabled={device.connected && !discovery.completed}> - Show full address + )} {(addressVerified || addressUnverified) && !isAddressVerifying && ( - + { return ( - Receive Ripple + <FormattedMessage {...l10nMessages.TR_RECEIVE_RIPPLE} /> { trezorAction={isAddressVerifying ? ( - Check address on your Trezor + ) : null} icon={((addressVerified || addressUnverified) && !isAddressVerifying) && ( @@ -158,13 +162,13 @@ const AccountReceive = (props: Props) => { /> {!(addressVerified || addressUnverified) && ( props.showAddress(account.accountPath)} isDisabled={device.connected && !discovery.completed}> - Show full address + )} {(addressVerified || addressUnverified) && !isAddressVerifying && ( - + { topLabel={( - Gas limit + - Gas limit refers to the maximum amount of gas user is willing to spendon a particular transaction.{' '} - Transaction fee = gas limit * gas price.{' '}Increasing the gas limit will not get the transaction confirmed sooner. - Default value for sending {gasLimitTooltipCurrency} is {gasLimitTooltipValue}. - + , + gasLimitTooltipValue: {gasLimitTooltipValue}, + gasLimitTooltipCurrency, + }} + /> )} maxWidth={410} readMoreLink="https://wiki.trezor.io/Ethereum_Wallet#Gas_limit" @@ -199,14 +205,14 @@ const AdvancedForm = (props: Props) => { { showDefaultGasLimitButton && ( - Set default + ) } )} bottomText={errors.gasLimit || warnings.gasLimit || infos.gasLimit} - value={calculatingGasLimit ? 'Calculating...' : gasLimit} + value={calculatingGasLimit ? 'Calculating...' : gasLimit} // TODO: figure out translations in inputs isDisabled={networkSymbol === currency && data.length > 0} onChange={event => onGasLimitChange(event.target.value)} /> @@ -220,14 +226,17 @@ const AdvancedForm = (props: Props) => { topLabel={( - Gas price + - Gas price refers to the amount of ether you are willing to pay for every - unit of gas, and is usually measured in “Gwei”. Transaction fee = gas limit * gas price. Increasing the gas price will get the transaction confirmed sooner but - makes it more expensive. The recommended gas price is {recommendedGasPrice} GWEI. - + , + recommendedGasPrice: {recommendedGasPrice}, + }} + + /> )} maxWidth={400} readMoreLink="https://wiki.trezor.io/Ethereum_Wallet#Gas_price" @@ -252,13 +261,9 @@ const AdvancedForm = (props: Props) => { topLabel={( - Data + - Data is usually used when you send transactions to contracts. - - )} + content={} placement="top" > { return ( - Send Ethereum or tokens + <FormattedMessage {...l10nMessages.TR_SEND_ETHEREUM_OR_TOKENS} /> { spellCheck="false" topLabel={( - Amount + {(isCurrentCurrencyToken && selectedToken) && ( - You have: {selectedTokenBalance} {selectedToken.symbol} + + + )} )} @@ -360,7 +369,7 @@ const AccountSend = (props: Props) => { color={colors.WHITE} /> )} - Set max + ), ( @@ -388,7 +397,7 @@ const AccountSend = (props: Props) => { color={colors.WARNING_PRIMARY} size={20} /> - Recommended fees updated. Click here to use them + )} @@ -414,7 +423,7 @@ const AccountSend = (props: Props) => { isTransparent onClick={toggleAdvanced} > - Advanced settings + { isWhite onClick={() => onClear()} > - Clear + { isWhite onClick={() => onClear()} > - Clear + { topLabel={( - Fee + - Transfer cost in XRP drops - - )} + content={} maxWidth={100} readMoreLink="https://developers.ripple.com/transaction-cost.html" placement="top" @@ -161,13 +160,9 @@ const AdvancedForm = (props: Props) => { topLabel={( - Destination tag + - An arbitrary unsigned 32-bit integer that identifies a reason for payment or a non-Ripple account. - - )} + content={} maxWidth={200} readMoreLink="https://developers.ripple.com/rippleapi-reference.html#payment" placement="top" diff --git a/src/views/Wallet/views/Account/Send/ripple/components/AdvancedForm/index.messages.js b/src/views/Wallet/views/Account/Send/ripple/components/AdvancedForm/index.messages.js new file mode 100644 index 00000000..240aed2f --- /dev/null +++ b/src/views/Wallet/views/Account/Send/ripple/components/AdvancedForm/index.messages.js @@ -0,0 +1,20 @@ +/* @flow */ +import { defineMessages } from 'react-intl'; +import type { Messages } from 'flowtype/npm/react-intl'; + +const definedMessages: Messages = defineMessages({ + TR_XRP_TRANSFER_COST: { + id: 'TR_XRP_TRANSFER_COST', + defaultMessage: 'Transfer cost in XRP drops', + }, + TR_XRP_DESTINATION_TAG: { + id: 'TR_XRP_DESTINATION_TAG', + defaultMessage: 'Destination tag', + }, + TR_XRP_DESTINATION_TAG_EXPLAINED: { + id: 'TR_XRP_DESTINATION_TAG_EXPLAINED', + defaultMessage: 'Number that identifies a reason for payment or a non-Ripple account.', + }, +}); + +export default definedMessages; \ No newline at end of file diff --git a/src/views/Wallet/views/Account/Send/ripple/index.js b/src/views/Wallet/views/Account/Send/ripple/index.js index 096a63ef..ec1fa56f 100644 --- a/src/views/Wallet/views/Account/Send/ripple/index.js +++ b/src/views/Wallet/views/Account/Send/ripple/index.js @@ -3,6 +3,7 @@ import React from 'react'; import styled, { css } from 'styled-components'; import { Select } from 'components/Select'; +import { FormattedMessage } from 'react-intl'; import Button from 'components/Button'; import Input from 'components/inputs/Input'; import Icon from 'components/Icon'; @@ -12,10 +13,14 @@ import { FONT_SIZE, FONT_WEIGHT, TRANSITION } from 'config/variables'; import colors from 'config/colors'; import Title from 'views/Wallet/components/Title'; import P from 'components/Paragraph'; +import l10nCommonMessages from 'views/common.messages'; import Content from 'views/Wallet/components/Content'; import PendingTransactions from '../components/PendingTransactions'; import AdvancedForm from './components/AdvancedForm'; +import l10nMessages from './index.messages'; +import l10nSendMessages from '../common.messages'; + import type { Props } from './Container'; // TODO: Decide on a small screen width for the whole app @@ -268,7 +273,7 @@ const AccountSend = (props: Props) => { return ( - Send Ripple + <FormattedMessage {...l10nMessages.TR_SEND_RIPPLE} /> { spellCheck="false" topLabel={( - Amount + {accountReserve && ( - Reserve: {accountReserve} {network.symbol} + + + )} )} @@ -334,7 +344,7 @@ const AccountSend = (props: Props) => { color={colors.WHITE} /> )} - Set max + ), ( @@ -353,7 +363,7 @@ const AccountSend = (props: Props) => { - Fee + {feeNeedsUpdate && ( { color={colors.WARNING_PRIMARY} size={20} /> - Recommended fees updated. Click here to use them + )} @@ -387,7 +397,7 @@ const AccountSend = (props: Props) => { isTransparent onClick={toggleAdvanced} > - Advanced settings + { isWhite onClick={() => onClear()} > - Clear + { isWhite onClick={() => onClear()} > - Clear + )} bottomText={errors.gasLimit || warnings.gasLimit || infos.gasLimit} - value={calculatingGasLimit ? 'Calculating...' : gasLimit} // TODO: figure out translations in inputs + value={calculatingGasLimit ? props.intl.formatMessage(l10nMessages.TR_CALCULATING_DOT_DOT) : gasLimit} // TODO: figure out translations in inputs isDisabled={networkSymbol === currency && data.length > 0} onChange={event => onGasLimitChange(event.target.value)} /> @@ -289,4 +290,4 @@ const AdvancedForm = (props: Props) => { ); }; -export default AdvancedForm; \ No newline at end of file +export default injectIntl(AdvancedForm); \ No newline at end of file diff --git a/src/views/Wallet/views/Account/Send/ethereum/components/AdvancedForm/index.messages.js b/src/views/Wallet/views/Account/Send/ethereum/components/AdvancedForm/index.messages.js index 94293760..170815fb 100644 --- a/src/views/Wallet/views/Account/Send/ethereum/components/AdvancedForm/index.messages.js +++ b/src/views/Wallet/views/Account/Send/ethereum/components/AdvancedForm/index.messages.js @@ -22,6 +22,7 @@ const definedMessages: Messages = defineMessages({ TR_CALCULATING_DOT_DOT: { id: 'TR_CALCULATING_DOT_DOT', defaultMessage: 'Calculating...', + description: 'Used when calculating gas limit based on data input in ethereum advanced send form', }, TR_GAS_PRICE: { id: 'TR_GAS_PRICE', From 8a904b4e062778ce8d823ab2ffbf0e42b8d4e304 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 21 Feb 2019 14:25:11 +0100 Subject: [PATCH 038/118] add intl support for Send and Sign n Verify components --- .../views/Account/Send/common.messages.js | 16 ++++++++ .../views/Account/Send/ethereum/Container.js | 9 +++-- .../views/Account/Send/ethereum/index.js | 16 ++++---- .../views/Account/Send/ripple/Container.js | 9 +++-- .../Wallet/views/Account/Send/ripple/index.js | 11 +++--- .../views/Account/SignVerify/Container.js | 9 +++-- .../Wallet/views/Account/SignVerify/index.js | 30 +++++++++------ .../Account/SignVerify/index.messages.js | 38 +++++++++++++++++++ src/views/common.messages.js | 5 +++ 9 files changed, 109 insertions(+), 34 deletions(-) create mode 100644 src/views/Wallet/views/Account/SignVerify/index.messages.js diff --git a/src/views/Wallet/views/Account/Send/common.messages.js b/src/views/Wallet/views/Account/Send/common.messages.js index 3f5ea00d..5d76be3a 100644 --- a/src/views/Wallet/views/Account/Send/common.messages.js +++ b/src/views/Wallet/views/Account/Send/common.messages.js @@ -31,6 +31,22 @@ const definedMessages: Messages = defineMessages({ defaultMessage: 'Advanced settings', description: 'Shows advanced sending form', }, + TR_DEVICE_IS_NOT_CONNECTED: { + id: 'TR_DEVICE_IS_NOT_CONNECTED', + defaultMessage: 'Device is not connected', + }, + TR_DEVICE_IS_UNAVAILABLE: { + id: 'TR_DEVICE_IS_UNAVAILABLE', + defaultMessage: 'Device is not unavailable', + }, + TR_LOADING_ACCOUNTS: { + id: 'TR_LOADING_ACCOUNTS', + defaultMessage: 'Loading accounts', + }, + TR_SEND: { + id: 'TR_SEND', + defaultMessage: 'Send {amount}', + }, }); export default definedMessages; \ No newline at end of file diff --git a/src/views/Wallet/views/Account/Send/ethereum/Container.js b/src/views/Wallet/views/Account/Send/ethereum/Container.js index baa378d2..7e03a1d4 100644 --- a/src/views/Wallet/views/Account/Send/ethereum/Container.js +++ b/src/views/Wallet/views/Account/Send/ethereum/Container.js @@ -3,13 +3,16 @@ import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; +import { injectIntl } from 'react-intl'; import SendFormActions from 'actions/ethereum/SendFormActions'; import { openQrModal } from 'actions/ModalActions'; import type { MapStateToProps, MapDispatchToProps } from 'react-redux'; import type { State, Dispatch } from 'flowtype'; import AccountSend from './index'; -type OwnProps = {} +type OwnProps = { + intl: any +} export type StateProps = { selectedAccount: $ElementType, @@ -24,7 +27,7 @@ export type DispatchProps = { openQrModal: typeof openQrModal, } -export type Props = StateProps & DispatchProps; +export type Props = OwnProps & StateProps & DispatchProps; const mapStateToProps: MapStateToProps = (state: State): StateProps => ({ selectedAccount: state.selectedAccount, @@ -40,4 +43,4 @@ const mapDispatchToProps: MapDispatchToProps }); -export default connect(mapStateToProps, mapDispatchToProps)(AccountSend); \ No newline at end of file +export default injectIntl(connect(mapStateToProps, mapDispatchToProps)(AccountSend)); \ No newline at end of file diff --git a/src/views/Wallet/views/Account/Send/ethereum/index.js b/src/views/Wallet/views/Account/Send/ethereum/index.js index 36f3f94d..58e6c79a 100644 --- a/src/views/Wallet/views/Account/Send/ethereum/index.js +++ b/src/views/Wallet/views/Account/Send/ethereum/index.js @@ -21,6 +21,7 @@ import l10nCommonMessages from 'views/common.messages'; import AdvancedForm from './components/AdvancedForm'; import PendingTransactions from '../components/PendingTransactions'; + import l10nMessages from './index.messages'; import l10nSendMessages from '../common.messages'; import type { Props } from './Container'; @@ -274,21 +275,22 @@ const AccountSend = (props: Props) => { } let isSendButtonDisabled: boolean = Object.keys(errors).length > 0 || total === '0' || amount.length === 0 || address.length === 0 || sending; - let sendButtonText: string = 'Send'; + let amountText = ''; if (networkSymbol !== currency && amount.length > 0 && !errors.amount) { - sendButtonText += ` ${amount} ${currency.toUpperCase()}`; + amountText = `${amount} ${currency.toUpperCase()}`; } else if (networkSymbol === currency && total !== '0') { - sendButtonText += ` ${total} ${network.symbol}`; + amountText = `${total} ${network.symbol}`; } + let sendButtonText = ; if (!device.connected) { - sendButtonText = 'Device is not connected'; + sendButtonText = ; isSendButtonDisabled = true; } else if (!device.available) { - sendButtonText = 'Device is unavailable'; + sendButtonText = ; isSendButtonDisabled = true; } else if (!discovery.completed) { - sendButtonText = 'Loading accounts'; + sendButtonText = ; isSendButtonDisabled = true; } @@ -306,7 +308,7 @@ const AccountSend = (props: Props) => { autoCorrect="off" autoCapitalize="off" spellCheck="false" - topLabel="Address" + topLabel={props.intl.formatMessage(l10nCommonMessages.TR_ADDRESS)} bottomText={errors.address || warnings.address || infos.address} value={address} onChange={event => onAddressChange(event.target.value)} diff --git a/src/views/Wallet/views/Account/Send/ripple/Container.js b/src/views/Wallet/views/Account/Send/ripple/Container.js index aeebe926..8228e61a 100644 --- a/src/views/Wallet/views/Account/Send/ripple/Container.js +++ b/src/views/Wallet/views/Account/Send/ripple/Container.js @@ -2,6 +2,7 @@ import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; +import { injectIntl } from 'react-intl'; import SendFormActions from 'actions/ripple/SendFormActions'; import { openQrModal } from 'actions/ModalActions'; @@ -9,7 +10,9 @@ import type { MapStateToProps, MapDispatchToProps } from 'react-redux'; import type { State, Dispatch } from 'flowtype'; import AccountSend from './index'; -type OwnProps = {} +type OwnProps = { + intl: any +} export type StateProps = { selectedAccount: $ElementType, @@ -24,7 +27,7 @@ export type DispatchProps = { openQrModal: typeof openQrModal, } -export type Props = StateProps & DispatchProps; +export type Props = OwnProps & StateProps & DispatchProps; const mapStateToProps: MapStateToProps = (state: State): StateProps => ({ selectedAccount: state.selectedAccount, @@ -39,4 +42,4 @@ const mapDispatchToProps: MapDispatchToProps openQrModal: bindActionCreators(openQrModal, dispatch), }); -export default connect(mapStateToProps, mapDispatchToProps)(AccountSend); \ No newline at end of file +export default injectIntl(connect(mapStateToProps, mapDispatchToProps)(AccountSend)); \ No newline at end of file diff --git a/src/views/Wallet/views/Account/Send/ripple/index.js b/src/views/Wallet/views/Account/Send/ripple/index.js index ec1fa56f..3806cde1 100644 --- a/src/views/Wallet/views/Account/Send/ripple/index.js +++ b/src/views/Wallet/views/Account/Send/ripple/index.js @@ -253,16 +253,15 @@ const AccountSend = (props: Props) => { } let isSendButtonDisabled: boolean = Object.keys(errors).length > 0 || total === '0' || amount.length === 0 || address.length === 0 || sending; - let sendButtonText: string = ` ${total} ${network.symbol}`; - + let sendButtonText = ; if (!device.connected) { - sendButtonText = 'Device is not connected'; + sendButtonText = ; isSendButtonDisabled = true; } else if (!device.available) { - sendButtonText = 'Device is unavailable'; + sendButtonText = ; isSendButtonDisabled = true; } else if (!discovery.completed) { - sendButtonText = 'Loading accounts'; + sendButtonText = ; isSendButtonDisabled = true; } @@ -281,7 +280,7 @@ const AccountSend = (props: Props) => { autoCorrect="off" autoCapitalize="off" spellCheck="false" - topLabel="Address" + topLabel={props.intl.formatMessage(l10nCommonMessages.TR_ADDRESS)} bottomText={errors.address || warnings.address || infos.address} value={address} onChange={event => onAddressChange(event.target.value)} diff --git a/src/views/Wallet/views/Account/SignVerify/Container.js b/src/views/Wallet/views/Account/SignVerify/Container.js index f2103fdc..4d6d6435 100644 --- a/src/views/Wallet/views/Account/SignVerify/Container.js +++ b/src/views/Wallet/views/Account/SignVerify/Container.js @@ -2,13 +2,16 @@ import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; +import { injectIntl } from 'react-intl'; import SignVerifyActions from 'actions/SignVerifyActions'; import type { MapStateToProps, MapDispatchToProps } from 'react-redux'; import type { State, Dispatch } from 'flowtype'; import Component from './index'; -type OwnProps = {} +type OwnProps = { + intl: any, +} export type Error = { inputName: string, @@ -25,7 +28,7 @@ export type DispatchProps = { signVerifyActions: typeof SignVerifyActions, } -export type Props = StateProps & DispatchProps; +export type Props = OwnProps & StateProps & DispatchProps; const mapStateToProps: MapStateToProps = (state: State): StateProps => ({ wallet: state.wallet, @@ -37,4 +40,4 @@ const mapDispatchToProps: MapDispatchToProps signVerifyActions: bindActionCreators(SignVerifyActions, dispatch), }); -export default connect(mapStateToProps, mapDispatchToProps)(Component); \ No newline at end of file +export default injectIntl(connect(mapStateToProps, mapDispatchToProps)(Component)); \ No newline at end of file diff --git a/src/views/Wallet/views/Account/SignVerify/index.js b/src/views/Wallet/views/Account/SignVerify/index.js index 85817467..d772cf03 100644 --- a/src/views/Wallet/views/Account/SignVerify/index.js +++ b/src/views/Wallet/views/Account/SignVerify/index.js @@ -8,7 +8,10 @@ import Button from 'components/Button'; import Content from 'views/Wallet/components/Content'; import colors from 'config/colors'; import { SCREEN_SIZE } from 'config/variables'; +import { FormattedMessage } from 'react-intl'; +import l10nCommonMessages from 'views/common.messages'; +import l10nMessages from './index.messages'; import type { Props } from './Container'; @@ -110,10 +113,10 @@ class SignVerify extends Component { - Sign Message + <FormattedMessage {...l10nMessages.TR_SIGN_MESSAGE} /> {