From 22c2d261b9db6327868287b354c0a481a74660f5 Mon Sep 17 00:00:00 2001 From: ryanml Date: Sat, 12 Jun 2021 15:25:24 -0700 Subject: [PATCH] Fixing unlocalized strings (#11281) --- app/_locales/en/messages.json | 15 +++++++++++++++ .../confirm-page-container-content.component.js | 12 ++++++++++-- .../loading-network-error.component.js | 2 +- .../transaction-breakdown.component.js | 2 +- .../confirm-transaction-base.component.js | 15 +++++++-------- ui/pages/mobile-sync/mobile-sync.component.js | 2 +- .../send-hex-data-row.component.js | 2 +- 7 files changed, 36 insertions(+), 14 deletions(-) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 40f8bd8ac..18c01c274 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -150,6 +150,9 @@ "amount": { "message": "Amount" }, + "amountGasFee": { + "message": "Amount + Gas Fee" + }, "amountWithColon": { "message": "Amount:" }, @@ -492,6 +495,9 @@ "customToken": { "message": "Custom Token" }, + "data": { + "message": "Data" + }, "dataBackupFoundInfo": { "message": "Some of your account data was backed up during a previous installation of MetaMask. This could include your settings, contacts, and tokens. Would you like to restore this data now?" }, @@ -777,6 +783,9 @@ "functionType": { "message": "Function Type" }, + "gasFee": { + "message": "Gas Fee" + }, "gasLimit": { "message": "Gas Limit" }, @@ -1355,6 +1364,9 @@ "onlyConnectTrust": { "message": "Only connect with sites you trust." }, + "optional": { + "message": "Optional" + }, "optionalBlockExplorerUrl": { "message": "Block Explorer URL (optional)" }, @@ -2189,6 +2201,9 @@ "symbolBetweenZeroTwelve": { "message": "Symbol must be 11 characters or fewer." }, + "syncInProgress": { + "message": "Sync in progress" + }, "syncWithMobile": { "message": "Sync with mobile" }, diff --git a/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js index e47bfaf78..28d5f578e 100644 --- a/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js +++ b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js @@ -7,6 +7,10 @@ import { PageContainerFooter } from '../../../ui/page-container'; import { ConfirmPageContainerSummary, ConfirmPageContainerWarning } from '.'; export default class ConfirmPageContainerContent extends Component { + static contextTypes = { + t: PropTypes.func.isRequired, + }; + static propTypes = { action: PropTypes.string, dataComponent: PropTypes.node, @@ -44,14 +48,18 @@ export default class ConfirmPageContainerContent extends Component { } renderTabs() { + const { t } = this.context; const { detailsComponent, dataComponent } = this.props; return ( - + {detailsComponent} - + {dataComponent} diff --git a/ui/components/app/modals/loading-network-error/loading-network-error.component.js b/ui/components/app/modals/loading-network-error/loading-network-error.component.js index 0b473f5f4..17c45376e 100644 --- a/ui/components/app/modals/loading-network-error/loading-network-error.component.js +++ b/ui/components/app/modals/loading-network-error/loading-network-error.component.js @@ -8,7 +8,7 @@ const LoadingNetworkError = (props, context) => { return ( hideModal()} submitText={t('tryAgain')}> - + ); }; diff --git a/ui/components/app/transaction-breakdown/transaction-breakdown.component.js b/ui/components/app/transaction-breakdown/transaction-breakdown.component.js index 4698819cf..cba7803c9 100644 --- a/ui/components/app/transaction-breakdown/transaction-breakdown.component.js +++ b/ui/components/app/transaction-breakdown/transaction-breakdown.component.js @@ -46,7 +46,7 @@ export default class TransactionBreakdown extends PureComponent { return (
{t('transaction')}
- + {typeof nonce === 'undefined' ? null : (
this.handleEditGas() } secondaryText={ - hideFiatConversion - ? this.context.t('noConversionRateAvailable') - : '' + hideFiatConversion ? t('noConversionRateAvailable') : '' } /> {advancedInlineGasShown || @@ -336,15 +335,15 @@ export default class ConfirmTransactionBase extends Component { } > @@ -353,7 +352,7 @@ export default class ConfirmTransactionBase extends Component {
- {this.context.t('nonceFieldHeading')} + {t('nonceFieldHeading')}
; + return ; } if (completed) { diff --git a/ui/pages/send/send-content/send-hex-data-row/send-hex-data-row.component.js b/ui/pages/send/send-content/send-hex-data-row/send-hex-data-row.component.js index 080b97b37..497b7e5e3 100644 --- a/ui/pages/send/send-content/send-hex-data-row/send-hex-data-row.component.js +++ b/ui/pages/send/send-content/send-hex-data-row/send-hex-data-row.component.js @@ -32,7 +32,7 @@ export default class SendHexDataRow extends Component { >