Fixing unlocalized strings (#11281)

feature/default_network_editable
ryanml 4 years ago committed by GitHub
parent 108bd7987b
commit 22c2d261b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      app/_locales/en/messages.json
  2. 12
      ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js
  3. 2
      ui/components/app/modals/loading-network-error/loading-network-error.component.js
  4. 2
      ui/components/app/transaction-breakdown/transaction-breakdown.component.js
  5. 15
      ui/pages/confirm-transaction-base/confirm-transaction-base.component.js
  6. 2
      ui/pages/mobile-sync/mobile-sync.component.js
  7. 2
      ui/pages/send/send-content/send-hex-data-row/send-hex-data-row.component.js

@ -150,6 +150,9 @@
"amount": { "amount": {
"message": "Amount" "message": "Amount"
}, },
"amountGasFee": {
"message": "Amount + Gas Fee"
},
"amountWithColon": { "amountWithColon": {
"message": "Amount:" "message": "Amount:"
}, },
@ -492,6 +495,9 @@
"customToken": { "customToken": {
"message": "Custom Token" "message": "Custom Token"
}, },
"data": {
"message": "Data"
},
"dataBackupFoundInfo": { "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?" "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": { "functionType": {
"message": "Function Type" "message": "Function Type"
}, },
"gasFee": {
"message": "Gas Fee"
},
"gasLimit": { "gasLimit": {
"message": "Gas Limit" "message": "Gas Limit"
}, },
@ -1355,6 +1364,9 @@
"onlyConnectTrust": { "onlyConnectTrust": {
"message": "Only connect with sites you trust." "message": "Only connect with sites you trust."
}, },
"optional": {
"message": "Optional"
},
"optionalBlockExplorerUrl": { "optionalBlockExplorerUrl": {
"message": "Block Explorer URL (optional)" "message": "Block Explorer URL (optional)"
}, },
@ -2189,6 +2201,9 @@
"symbolBetweenZeroTwelve": { "symbolBetweenZeroTwelve": {
"message": "Symbol must be 11 characters or fewer." "message": "Symbol must be 11 characters or fewer."
}, },
"syncInProgress": {
"message": "Sync in progress"
},
"syncWithMobile": { "syncWithMobile": {
"message": "Sync with mobile" "message": "Sync with mobile"
}, },

@ -7,6 +7,10 @@ import { PageContainerFooter } from '../../../ui/page-container';
import { ConfirmPageContainerSummary, ConfirmPageContainerWarning } from '.'; import { ConfirmPageContainerSummary, ConfirmPageContainerWarning } from '.';
export default class ConfirmPageContainerContent extends Component { export default class ConfirmPageContainerContent extends Component {
static contextTypes = {
t: PropTypes.func.isRequired,
};
static propTypes = { static propTypes = {
action: PropTypes.string, action: PropTypes.string,
dataComponent: PropTypes.node, dataComponent: PropTypes.node,
@ -44,14 +48,18 @@ export default class ConfirmPageContainerContent extends Component {
} }
renderTabs() { renderTabs() {
const { t } = this.context;
const { detailsComponent, dataComponent } = this.props; const { detailsComponent, dataComponent } = this.props;
return ( return (
<Tabs> <Tabs>
<Tab className="confirm-page-container-content__tab" name="Details"> <Tab
className="confirm-page-container-content__tab"
name={t('details')}
>
{detailsComponent} {detailsComponent}
</Tab> </Tab>
<Tab className="confirm-page-container-content__tab" name="Data"> <Tab className="confirm-page-container-content__tab" name={t('data')}>
{dataComponent} {dataComponent}
</Tab> </Tab>
</Tabs> </Tabs>

@ -8,7 +8,7 @@ const LoadingNetworkError = (props, context) => {
return ( return (
<Modal onSubmit={() => hideModal()} submitText={t('tryAgain')}> <Modal onSubmit={() => hideModal()} submitText={t('tryAgain')}>
<ModalContent description="Oops! Something went wrong." /> <ModalContent description={t('somethingWentWrong')} />
</Modal> </Modal>
); );
}; };

@ -46,7 +46,7 @@ export default class TransactionBreakdown extends PureComponent {
return ( return (
<div className={classnames('transaction-breakdown', className)}> <div className={classnames('transaction-breakdown', className)}>
<div className="transaction-breakdown__title">{t('transaction')}</div> <div className="transaction-breakdown__title">{t('transaction')}</div>
<TransactionBreakdownRow title="Nonce"> <TransactionBreakdownRow title={t('nonce')}>
{typeof nonce === 'undefined' ? null : ( {typeof nonce === 'undefined' ? null : (
<HexToDecimal <HexToDecimal
className="transaction-breakdown__value" className="transaction-breakdown__value"

@ -280,6 +280,7 @@ export default class ConfirmTransactionBase extends Component {
isEthGasPrice, isEthGasPrice,
noGasPrice, noGasPrice,
} = this.props; } = this.props;
const { t } = this.context;
const notMainnetOrTest = !(isMainnet || process.env.IN_TEST); const notMainnetOrTest = !(isMainnet || process.env.IN_TEST);
const gasPriceFetchFailure = isEthGasPrice || noGasPrice; const gasPriceFetchFailure = isEthGasPrice || noGasPrice;
@ -288,7 +289,7 @@ export default class ConfirmTransactionBase extends Component {
<div className="confirm-page-container-content__details"> <div className="confirm-page-container-content__details">
<div className="confirm-page-container-content__gas-fee"> <div className="confirm-page-container-content__gas-fee">
<ConfirmDetailRow <ConfirmDetailRow
label="Gas Fee" label={t('gasFee')}
value={hexTransactionFee} value={hexTransactionFee}
headerText={notMainnetOrTest || gasPriceFetchFailure ? '' : 'Edit'} headerText={notMainnetOrTest || gasPriceFetchFailure ? '' : 'Edit'}
headerTextClassName={ headerTextClassName={
@ -302,9 +303,7 @@ export default class ConfirmTransactionBase extends Component {
: () => this.handleEditGas() : () => this.handleEditGas()
} }
secondaryText={ secondaryText={
hideFiatConversion hideFiatConversion ? t('noConversionRateAvailable') : ''
? this.context.t('noConversionRateAvailable')
: ''
} }
/> />
{advancedInlineGasShown || {advancedInlineGasShown ||
@ -336,15 +335,15 @@ export default class ConfirmTransactionBase extends Component {
} }
> >
<ConfirmDetailRow <ConfirmDetailRow
label="Total" label={t('total')}
value={hexTransactionTotal} value={hexTransactionTotal}
primaryText={primaryTotalTextOverride} primaryText={primaryTotalTextOverride}
secondaryText={ secondaryText={
hideFiatConversion hideFiatConversion
? this.context.t('noConversionRateAvailable') ? t('noConversionRateAvailable')
: secondaryTotalTextOverride : secondaryTotalTextOverride
} }
headerText="Amount + Gas Fee" headerText={t('amountGasFee')}
headerTextClassName="confirm-detail-row__header-text--total" headerTextClassName="confirm-detail-row__header-text--total"
primaryValueTextColor="#2f9ae0" primaryValueTextColor="#2f9ae0"
/> />
@ -353,7 +352,7 @@ export default class ConfirmTransactionBase extends Component {
<div> <div>
<div className="confirm-detail-row"> <div className="confirm-detail-row">
<div className="confirm-detail-row__label"> <div className="confirm-detail-row__label">
{this.context.t('nonceFieldHeading')} {t('nonceFieldHeading')}
</div> </div>
<div className="custom-nonce-input"> <div className="custom-nonce-input">
<TextField <TextField

@ -296,7 +296,7 @@ export default class MobileSyncPage extends Component {
const { t } = this.context; const { t } = this.context;
if (syncing) { if (syncing) {
return <LoadingScreen loadingMessage="Sync in progress" />; return <LoadingScreen loadingMessage={t('syncInProgress')} />;
} }
if (completed) { if (completed) {

@ -32,7 +32,7 @@ export default class SendHexDataRow extends Component {
> >
<textarea <textarea
onInput={this.onInput} onInput={this.onInput}
placeholder="Optional" placeholder={t('optional')}
className="send-v2__hex-data__input" className="send-v2__hex-data__input"
/> />
</SendRowWrapper> </SendRowWrapper>

Loading…
Cancel
Save