14c83e182a
Add react-i18next with two key-parity-checked catalogs (sq default/fallback, en). Active language driven by the logged-in user's stored preference (applied after /me resolves); SQ/EN toggle in the header persists via PUT /api/auth/language. Translate the booth (screen, pay/exit modal, active sessions, snapshots, status), Login, ShiftControl, SiteSettings, PermitManager, TariffComposer. SetupWizard deferred (its content is server-provided; needs backend catalog i18n).
15 lines
392 B
TypeScript
15 lines
392 B
TypeScript
import { StrictMode } from "react";
|
|
import { createRoot } from "react-dom/client";
|
|
import "./index.css";
|
|
import "./lib/i18n/index.js"; // initialize i18next before the app renders
|
|
import { App } from "./App.js";
|
|
|
|
const rootEl = document.getElementById("root");
|
|
if (!rootEl) throw new Error("root element not found");
|
|
|
|
createRoot(rootEl).render(
|
|
<StrictMode>
|
|
<App />
|
|
</StrictMode>,
|
|
);
|