fix(localize): set default fallback locale "en-GB" (fix #152)

This commit is contained in:
Mikhail Bashkirov 2019-07-15 14:34:03 +02:00
parent e7ea9cb6f4
commit 270de8a296
2 changed files with 5 additions and 0 deletions

View file

@ -3,6 +3,7 @@ import { LocalizeManager } from './LocalizeManager.js';
// eslint-disable-next-line import/no-mutable-exports
export let localize = LocalizeManager.getInstance({
autoLoadOnLocaleChange: true,
fallbackLocale: 'en-GB',
});
export function setLocalize(newLocalize) {

View file

@ -38,4 +38,8 @@ describe('localize', () => {
it('is configured to automatically load namespaces if locale is changed', () => {
expect(localize._autoLoadOnLocaleChange).to.equal(true);
});
it('is configured to fallback to the locale "en-GB"', () => {
expect(localize._fallbackLocale).to.equal('en-GB');
});
});