From 34b30c56817824d6d079107876a70999ca181ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Tue, 19 Jun 2018 16:28:02 +0200 Subject: [PATCH] Fix errors --- src/components/TranslatedError.js | 2 +- static/i18n/en/errors.yml | 9 +++++---- static/i18n/fr/errors.yml | 13 +++++-------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/components/TranslatedError.js b/src/components/TranslatedError.js index 0fea7a3d..d9d3f8b5 100644 --- a/src/components/TranslatedError.js +++ b/src/components/TranslatedError.js @@ -24,7 +24,7 @@ class TranslatedError extends PureComponent { return translation } logger.warn('TranslatedError: no transation!', error.name, error) - return error.message || error.name || '' + return error.message || error.name || t('errors:generic') } } diff --git a/static/i18n/en/errors.yml b/static/i18n/en/errors.yml index 456fc91a..8f853eb0 100644 --- a/static/i18n/en/errors.yml +++ b/static/i18n/en/errors.yml @@ -1,7 +1,8 @@ -RangeError: {{message}} -Error: {{message}} -LedgerAPIErrorWithMessage: {{message}} -TransportStatusError: {{message}} +generic: An error occurred +RangeError: '{{message}}' +Error: '{{message}}' +LedgerAPIErrorWithMessage: '{{message}}' +TransportStatusError: '{{message}}' FeeEstimationFailed: 'fee estimation failed (status: {{status}})' NotEnoughBalance: 'Not enough balance' BtcUnmatchedApp: 'You must open application ‘{{currencyName}}’ on the device' diff --git a/static/i18n/fr/errors.yml b/static/i18n/fr/errors.yml index 3a00f039..cc7c183b 100644 --- a/static/i18n/fr/errors.yml +++ b/static/i18n/fr/errors.yml @@ -1,12 +1,9 @@ --- -RangeError: - - message -Error: - - message -LedgerAPIErrorWithMessage: - - message -TransportStatusError: - - message +generic: An error occurred +RangeError: '{{message}}' +Error: '{{message}}' +LedgerAPIErrorWithMessage: '{{message}}' +TransportStatusError: '{{message}}' FeeEstimationFailed: 'fee estimation failed (status: {{status}})' NotEnoughBalance: 'Not enough balance' BtcUnmatchedApp: 'You must open application ‘{{currencyName}}’ on the device'