Browse Source

Fix errors

master
Gaëtan Renaudeau 7 years ago
parent
commit
34b30c5681
  1. 2
      src/components/TranslatedError.js
  2. 9
      static/i18n/en/errors.yml
  3. 13
      static/i18n/fr/errors.yml

2
src/components/TranslatedError.js

@ -24,7 +24,7 @@ class TranslatedError extends PureComponent<Props> {
return translation return translation
} }
logger.warn('TranslatedError: no transation!', error.name, error) logger.warn('TranslatedError: no transation!', error.name, error)
return error.message || error.name || '' return error.message || error.name || t('errors:generic')
} }
} }

9
static/i18n/en/errors.yml

@ -1,7 +1,8 @@
RangeError: {{message}} generic: An error occurred
Error: {{message}} RangeError: '{{message}}'
LedgerAPIErrorWithMessage: {{message}} Error: '{{message}}'
TransportStatusError: {{message}} LedgerAPIErrorWithMessage: '{{message}}'
TransportStatusError: '{{message}}'
FeeEstimationFailed: 'fee estimation failed (status: {{status}})' FeeEstimationFailed: 'fee estimation failed (status: {{status}})'
NotEnoughBalance: 'Not enough balance' NotEnoughBalance: 'Not enough balance'
BtcUnmatchedApp: 'You must open application ‘{{currencyName}}’ on the device' BtcUnmatchedApp: 'You must open application ‘{{currencyName}}’ on the device'

13
static/i18n/fr/errors.yml

@ -1,12 +1,9 @@
--- ---
RangeError: generic: An error occurred
- message RangeError: '{{message}}'
Error: Error: '{{message}}'
- message LedgerAPIErrorWithMessage: '{{message}}'
LedgerAPIErrorWithMessage: TransportStatusError: '{{message}}'
- message
TransportStatusError:
- message
FeeEstimationFailed: 'fee estimation failed (status: {{status}})' FeeEstimationFailed: 'fee estimation failed (status: {{status}})'
NotEnoughBalance: 'Not enough balance' NotEnoughBalance: 'Not enough balance'
BtcUnmatchedApp: 'You must open application ‘{{currencyName}}’ on the device' BtcUnmatchedApp: 'You must open application ‘{{currencyName}}’ on the device'

Loading…
Cancel
Save