Move i18n setup to TypeScript

This commit is contained in:
Josh Perez 2021-09-17 20:30:08 -04:00 committed by GitHub
parent 4dcbb7352f
commit 829e42ca6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
155 changed files with 182 additions and 182 deletions

View file

@ -4,10 +4,11 @@
import { join } from 'path';
import { readFileSync } from 'fs';
import { merge } from 'lodash';
import { setup } from '../js/modules/i18n';
import { setupI18n } from '../ts/util/setupI18n';
import { LoggerType } from '../ts/types/Logging';
import { LocalizerType, LocaleMessagesType } from '../ts/types/I18N';
import { LocaleMessagesType } from '../ts/types/I18N';
import { LocalizerType } from '../ts/types/Util';
function normalizeLocaleName(locale: string): string {
if (/^en-/.test(locale)) {
@ -75,7 +76,7 @@ export function load({
messages = english;
}
const i18n = setup(appLocale, messages);
const i18n = setupI18n(appLocale, messages);
return {
i18n,