- AddToCollectionModal: all labels, placeholders, toast messages - collection/index.tsx: tab labels (Gear/Planning) - threads/$threadId/index.tsx: thread detail page and AddCandidateModal - items/$itemId.tsx: back links, action buttons, field labels, metadata - setups/$setupId.tsx: all setup detail strings and confirm dialog - users/$userId.tsx: public profile page strings - global-items/index.tsx: discover/catalog filter UI strings - Added catalog.json namespace (en + de) and registered in i18n.ts - Extended en/de threads, setups, collection, common locales with missing keys
57 lines
1.6 KiB
TypeScript
57 lines
1.6 KiB
TypeScript
import i18n from "i18next";
|
|
import LanguageDetector from "i18next-browser-languagedetector";
|
|
import { initReactI18next } from "react-i18next";
|
|
import deCatalog from "../locales/de/catalog.json";
|
|
import deCollection from "../locales/de/collection.json";
|
|
import deCommon from "../locales/de/common.json";
|
|
import deOnboarding from "../locales/de/onboarding.json";
|
|
import deSettings from "../locales/de/settings.json";
|
|
import deSetups from "../locales/de/setups.json";
|
|
import deThreads from "../locales/de/threads.json";
|
|
import enCatalog from "../locales/en/catalog.json";
|
|
import enCollection from "../locales/en/collection.json";
|
|
import enCommon from "../locales/en/common.json";
|
|
import enOnboarding from "../locales/en/onboarding.json";
|
|
import enSettings from "../locales/en/settings.json";
|
|
import enSetups from "../locales/en/setups.json";
|
|
import enThreads from "../locales/en/threads.json";
|
|
|
|
i18n
|
|
.use(LanguageDetector)
|
|
.use(initReactI18next)
|
|
.init({
|
|
resources: {
|
|
en: {
|
|
common: enCommon,
|
|
collection: enCollection,
|
|
threads: enThreads,
|
|
setups: enSetups,
|
|
onboarding: enOnboarding,
|
|
settings: enSettings,
|
|
catalog: enCatalog,
|
|
},
|
|
de: {
|
|
common: deCommon,
|
|
collection: deCollection,
|
|
threads: deThreads,
|
|
setups: deSetups,
|
|
onboarding: deOnboarding,
|
|
settings: deSettings,
|
|
catalog: deCatalog,
|
|
},
|
|
},
|
|
supportedLngs: ["en", "de"],
|
|
fallbackLng: "en",
|
|
defaultNS: "common",
|
|
interpolation: {
|
|
escapeValue: false,
|
|
},
|
|
detection: {
|
|
order: ["localStorage", "navigator"],
|
|
lookupLocalStorage: "gearbox-language",
|
|
caches: ["localStorage"],
|
|
},
|
|
});
|
|
|
|
export default i18n;
|