New i18n with dynamic imports

This commit is contained in:
garronej
2022-07-31 18:57:30 +02:00
parent 2be40816b2
commit 69c15bd473
34 changed files with 135 additions and 32032 deletions

View File

@ -3,10 +3,10 @@ import Template from "./Template";
import type { KcProps } from "./KcProps";
import { assert } from "../tools/assert";
import type { KcContextBase } from "../getKcContext/KcContextBase";
import { getMsg } from "../i18n";
import { useI18n } from "../i18n";
const Info = memo(({ kcContext, ...props }: { kcContext: KcContextBase.Info } & KcProps) => {
const { msg, msgStr } = getMsg(kcContext);
const { msg, msgStr } = useI18n();
assert(kcContext.message !== undefined);