mirror of
https://github.com/documenso/documenso.git
synced 2025-11-18 02:32:00 +10:00
fix: wip
This commit is contained in:
@ -1,24 +1,17 @@
|
||||
import { StrictMode, startTransition } from 'react';
|
||||
|
||||
import { i18n } from '@lingui/core';
|
||||
import { detect, fromHtmlTag } from '@lingui/detect-locale';
|
||||
import { I18nProvider } from '@lingui/react';
|
||||
import { hydrateRoot } from 'react-dom/client';
|
||||
import { HydratedRouter } from 'react-router/dom';
|
||||
|
||||
import { dynamicActivate } from '@documenso/lib/utils/i18n';
|
||||
|
||||
async function main() {
|
||||
// const locale = detect(fromHtmlTag('lang')) || 'en';
|
||||
const locale = detect(fromHtmlTag('lang')) || 'en';
|
||||
|
||||
// await dynamicActivate(locale);
|
||||
|
||||
// await new Promise((resolve) => setTimeout(resolve, 100));
|
||||
|
||||
// Todo: i18n
|
||||
const locale = 'en';
|
||||
|
||||
// const { messages } = await import(`../../../packages/lib/translations/en/web.po`);
|
||||
// const { messages } = await import(`../../../packages/lib/translations/${locale}/web.po`);
|
||||
|
||||
i18n.loadAndActivate({ locale, messages: {} });
|
||||
await dynamicActivate(locale);
|
||||
|
||||
startTransition(() => {
|
||||
hydrateRoot(
|
||||
|
||||
Reference in New Issue
Block a user