From 173db6be8f6c600dc2c3eb2103f7e9004aa3a634 Mon Sep 17 00:00:00 2001 From: ryanml Date: Sat, 5 Oct 2019 13:33:39 -0700 Subject: [PATCH] Using translated strings on welcome page --- brave/app/_locales/en/messages.json | 18 +++++++++++++++--- .../connect-wallet/connect-wallet.component.js | 2 +- .../welcome/welcome.component.js | 10 ++++++++-- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/brave/app/_locales/en/messages.json b/brave/app/_locales/en/messages.json index e57f85abe0..6bf15f7762 100644 --- a/brave/app/_locales/en/messages.json +++ b/brave/app/_locales/en/messages.json @@ -5,15 +5,24 @@ "braveRewards": { "message": "Brave Rewards" }, + "connect": { + "message": "Connect" + }, "cryptoWalletsDisclosure": { "message": "Crypto Wallets in Brave is completely separate from Brave Rewards. This is a standalone component which lets you send, receive, and use BAT and other Ethereum assets and collectibles — as well as interacting with Ðapps and other smart contracts. This feature is meant for people who are already familiar with Ethereum or are excited to learn. If that doesn't sound like you, head over to" }, + "cryptoWalletsTitle": { + "message": "Crypto Wallets" + }, "disclosureConfirm": { "message": "I understand" }, "ledgerCreateSubText": { "message": "Connect your Ledger hardware wallet to interact with dApps and make transfers to other connected wallets." }, + "metamaskImportSubText": { + "message": "Note: If importing from a Metamask wallet, enter 12 words instead of 24." + }, "newLocalWallet": { "message": "New Local Wallet" }, @@ -26,15 +35,18 @@ "passWarningTwo": { "message": "before using this tool." }, + "restore": { + "message": "Restore" + }, "riskDisclosure": { "message": "risk disclosure" }, + "setupSubTitle": { + "message": "Choose a type to set up:" + }, "trezorCreateSubText": { "message": "Connect your Trezor hardware wallet to interact with dApps and make transfers to other connected wallets." }, - "metamaskImportSubText": { - "message": "Note: If importing from a Metamask wallet, enter 12 words instead of 24." - }, "welcomeCryptoWallets": { "message": "Welcome to Brave Crypto Wallets" } diff --git a/brave/ui/app/components/app/connect-wallet/connect-wallet.component.js b/brave/ui/app/components/app/connect-wallet/connect-wallet.component.js index dee3bb9194..8b1f6f9394 100644 --- a/brave/ui/app/components/app/connect-wallet/connect-wallet.component.js +++ b/brave/ui/app/components/app/connect-wallet/connect-wallet.component.js @@ -98,7 +98,7 @@ module.exports = class ConnectWallet extends PureComponent { onClick={this.onAction.bind(this, onRestore)} className={'restore'} > - {'Restore'} + {t('restore')} : null } diff --git a/brave/ui/app/pages/first-time-flow/welcome/welcome.component.js b/brave/ui/app/pages/first-time-flow/welcome/welcome.component.js index cee9d169d4..995379af5f 100644 --- a/brave/ui/app/pages/first-time-flow/welcome/welcome.component.js +++ b/brave/ui/app/pages/first-time-flow/welcome/welcome.component.js @@ -9,6 +9,10 @@ import { } from '../../../../../../ui/app/helpers/constants/routes' module.exports = class BraveWelcome extends PureComponent { + static contextTypes = { + t: PropTypes.func, + } + static propTypes = { history: PropTypes.object, } @@ -22,16 +26,18 @@ module.exports = class BraveWelcome extends PureComponent { } render () { + const { t } = this.context + return (
- {'Crypto Wallets'} + {t('cryptoWalletsTitle')}
- {'Choose a type to set up:'} + {t('setupSubTitle')}