- Set Sentry user context (id, username) in Journal root for all routes - Tag Planner errors with session_id - Use reactRouterV7BrowserTracingIntegration for route-aware traces - Hidden source maps (no sourceMappingURL in bundles, .map deleted after upload to Sentry) - Privacy manifest at /privacy documenting all data collection - robots.txt blocking all bots on both apps - Suppress i18next promotional console log Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
30 lines
753 B
TypeScript
30 lines
753 B
TypeScript
import i18n from "i18next";
|
|
import { initReactI18next } from "react-i18next";
|
|
import LanguageDetector from "i18next-browser-languagedetector";
|
|
import en from "./locales/en.ts";
|
|
import de from "./locales/de.ts";
|
|
|
|
export const defaultNS = "common";
|
|
|
|
export const resources = {
|
|
en: { common: en.common, planner: en.planner, journal: en.journal },
|
|
de: { common: de.common, planner: de.planner, journal: de.journal },
|
|
} as const;
|
|
|
|
export function initI18n() {
|
|
return i18n
|
|
.use(LanguageDetector)
|
|
.use(initReactI18next)
|
|
.init({
|
|
resources,
|
|
defaultNS,
|
|
fallbackLng: "en",
|
|
supportedLngs: ["en", "de"],
|
|
interpolation: {
|
|
escapeValue: false,
|
|
},
|
|
showSupportNotice: false,
|
|
});
|
|
}
|
|
|
|
export { i18n };
|