From 3cca6fc8862673eb96a04586c5d31438f875431a Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Wed, 12 Dec 2018 12:43:53 -0330 Subject: Add missing translation to the gas customization component. --- .../advanced-tab-content/advanced-tab-content.component.js | 14 ++++++++------ .../tests/advanced-tab-content-component.test.js | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content') diff --git a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js b/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js index 7c3142d0d..ba28ba63d 100644 --- a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js +++ b/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js @@ -40,19 +40,20 @@ export default class AdvancedTabContent extends Component { } gasInputError ({ labelKey, insufficientBalance, customPriceIsSafe, isSpeedUp, value }) { + const { t } = this.context let errorText let errorType let isInError = true if (insufficientBalance) { - errorText = 'Insufficient Balance' + errorText = t('insufficientBalance') errorType = 'error' } else if (labelKey === 'gasPrice' && isSpeedUp && value === 0) { - errorText = 'Zero gas price on speed up' + errorText = t('zeroGasPriceOnSpeedUpError') errorType = 'error' } else if (labelKey === 'gasPrice' && !customPriceIsSafe) { - errorText = 'Gas Price Extremely Low' + errorText = t('gasPriceExtremelyLow') errorType = 'warning' } else { isInError = false @@ -164,6 +165,7 @@ export default class AdvancedTabContent extends Component { } render () { + const { t } = this.context const { updateCustomGasPrice, updateCustomGasLimit, @@ -191,14 +193,14 @@ export default class AdvancedTabContent extends Component { customPriceIsSafe, isSpeedUp, }) } -
Live Gas Price Predictions
+
{ t('liveGasPricePredictions') }
{!gasEstimatesLoading ? : }
- Slower - Faster + { t('slower') } + { t('faster') }
diff --git a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js b/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js index 00242e430..932be6290 100644 --- a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js +++ b/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js @@ -315,7 +315,7 @@ describe('AdvancedTabContent Component', function () { }) assert.deepEqual(gasInputError, { isInError: true, - errorText: 'Insufficient Balance', + errorText: 'insufficientBalance', errorType: 'error', }) }) @@ -330,7 +330,7 @@ describe('AdvancedTabContent Component', function () { }) assert.deepEqual(gasInputError, { isInError: true, - errorText: 'Zero gas price on speed up', + errorText: 'zeroGasPriceOnSpeedUpError', errorType: 'error', }) }) @@ -345,7 +345,7 @@ describe('AdvancedTabContent Component', function () { }) assert.deepEqual(gasInputError, { isInError: true, - errorText: 'Gas Price Extremely Low', + errorText: 'gasPriceExtremelyLow', errorType: 'warning', }) }) -- cgit