mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 04:09:49 +00:00
22 lines
618 B
TypeScript
22 lines
618 B
TypeScript
// Copyright 2023 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
import { config } from './config.preload.js';
|
|
import { localeMessages } from './localeMessages.preload.js';
|
|
import { setupI18n } from '../util/setupI18n.dom.js';
|
|
import { strictAssert } from '../util/assert.std.js';
|
|
|
|
const { resolvedTranslationsLocale } = config;
|
|
strictAssert(
|
|
resolvedTranslationsLocale,
|
|
'locale could not be parsed from config'
|
|
);
|
|
strictAssert(
|
|
typeof resolvedTranslationsLocale === 'string',
|
|
'locale is not a string'
|
|
);
|
|
|
|
const i18n = setupI18n(resolvedTranslationsLocale, localeMessages);
|
|
|
|
export { i18n };
|