refactor: change errors list structure

This commit is contained in:
Georgi Krustev 2016-09-17 12:49:53 +03:00
Родитель 81520905b0
Коммит 879a81d574
2 изменённых файлов: 13 добавлений и 10 удалений

13
src/error-details.js Normal file
Просмотреть файл

@ -0,0 +1,13 @@
//The error is represented by unique name and corresponding message
//The message can contain placeholders with index, e.g. {0}, {1}
export default {
"NoLocale": "Missing locale info for '{0}'",
"NoCurrency": "Cannot determine currency information. Please load the locale currencies data.",
"NoSupplementalCurrency": "Cannot determine currency. Please load the supplemental currencyData.",
"NoCurrencyRegion": "No currency data for region '{0}'",
"NoCurrencyDisplay": "Cannot determine currency display information. Please load the locale currencies data. The default culture does not include the all currencies data.",
"NoGMTInfo": "Cannot determine locale GMT format. Please load the locale timeZoneNames data.",
"NoWeekData": "Cannot determine locale first day of week. Please load the supplemental weekData.",
"NoFirstDay": "Cannot determine locale first day of week. Please load the supplemental weekData. The default culture includes only the 'en-US' first day info."
};

Просмотреть файл

@ -1,10 +0,0 @@
export default [
{ "name": "NoLocaleError", "code": "101", "message": "Missing locale info for '{0}'" },
{ "name": "NoCurrencyError","code": "201", "message": "Cannot determine currency information. Please load the locale currencies data." },
{ "name": "NoSupplementalCurrencyError", "code": "202", "message": "Cannot determine currency. Please load the supplemental currencyData." },
{ "name": "NoCurrencyRegionError", "code": "203", "message": "No currency data for region '{0}'" },
{ "name": "NoCurrencyDisplayError", "code": "204", "message": "Cannot determine currency display information. Please load the locale currencies data. The default culture does not include the all currencies data." },
{ "name": "NoGMTInfoError", "code": "301", "message": "Cannot determine locale GMT format. Please load the locale timeZoneNames data." },
{ "name": "NoWeekDataError", "code": "302", "message": "Cannot determine locale first day of week. Please load the supplemental weekData." },
{ "name": "NoFirstDayError", "code": "303", "message": "Cannot determine locale first day of week. Please load the supplemental weekData. The default culture includes only the 'en-US' first day info." }
];