Move i18n setup to TypeScript
This commit is contained in:
parent
4dcbb7352f
commit
829e42ca6e
155 changed files with 182 additions and 182 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue