Fix missing i18n module in IO review screen (#3223)

This commit is contained in:
Abdo 2024-06-06 13:20:40 +03:00 committed by GitHub
parent e0a3768bf3
commit 548066f92c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -3,6 +3,7 @@
import * as tr from "@generated/ftl";
import { ModuleName, setupI18n } from "@tslib/i18n";
import { optimumPixelSizeForCanvas } from "./canvas-scale";
import { Shape } from "./shapes";
import { Ellipse, extractShapesFromRenderedClozes, Polygon, Rectangle, Text } from "./shapes";
@ -43,6 +44,11 @@ interface SetupImageOcclusionOptions {
async function setupImageOcclusion(setupOptions?: SetupImageOcclusionOptions): Promise<void> {
await waitForImage();
await setupI18n({
modules: [
ModuleName.NOTETYPES,
],
});
window.addEventListener("load", () => {
window.addEventListener("resize", () => setupImageOcclusion(setupOptions));
});