Add en for numeral locale setting (#25948) (#26077)

This commit is contained in:
Tim Roes 2018-11-22 11:00:27 +01:00 committed by GitHub
parent 465adb9166
commit 79f0eeec49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,9 +23,11 @@ import numeralLanguages from '@elastic/numeral/languages';
export function getUiSettingDefaults() {
const weekdays = moment.weekdays().slice();
const [defaultWeekday] = weekdays;
const numeralLanguageIds = numeralLanguages.map(function (numeralLanguage) {
// We add the `en` key manually here, since that's not a real numeral locale, but the
// default fallback in case the locale is not found.
const numeralLanguageIds = ['en', ...numeralLanguages.map(function (numeralLanguage) {
return numeralLanguage.id;
});
})];
// wrapped in provider so that a new instance is given to each app/test
return {