diff --git a/package.json b/package.json index dfa7d97..426f839 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@pistonite/celera", - "version": "0.3.1", + "version": "0.3.2", "type": "module", "private": true, "description": "In-house UI framework", @@ -16,8 +16,8 @@ }, "dependencies": { "@pistonite/pure": "^0.29.7", - "i18next": "^26.0.10", - "react-i18next": "^17.0.7" + "i18next": "^26.2.0", + "react-i18next": "^17.0.8" }, "peerDependencies": { "@fluentui/react-components": "^9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6d856d1..161de09 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,14 +18,14 @@ importers: specifier: ^0.29.7 version: 0.29.7 i18next: - specifier: ^26.0.10 - version: 26.0.10(typescript@6.0.3) + specifier: ^26.2.0 + version: 26.2.0(typescript@6.0.3) react: specifier: ^19 version: 19.2.5 react-i18next: - specifier: ^17.0.7 - version: 17.0.7(i18next@26.0.10(typescript@6.0.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(typescript@6.0.3) + specifier: ^17.0.8 + version: 17.0.8(i18next@26.2.0(typescript@6.0.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(typescript@6.0.3) devDependencies: '@types/react': specifier: ^19.2.14 @@ -1561,8 +1561,8 @@ packages: htmlparser2@10.1.0: resolution: {integrity: sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==} - i18next@26.0.10: - resolution: {integrity: sha512-k3yGPAlWR2RdMYoVXJoDZDT87qeHIWKH7gVksdZMpRty7QX/D9QZeYGvN08KGbKHke9wn01eYT+EEsrqX/YTlw==} + i18next@26.2.0: + resolution: {integrity: sha512-zwBHldHdTmwN7r6UNc7lC6GWNN+YYg3DrRSeHR5PRRBf5QnJZcYHrQc0uaU26qZeYxR7iFZD+Y315dPnKP47wA==} peerDependencies: typescript: ^5 || ^6 peerDependenciesMeta: @@ -1902,10 +1902,10 @@ packages: peerDependencies: react: ^19.2.5 - react-i18next@17.0.7: - resolution: {integrity: sha512-rwtPXsb/zwzDafN+gytcjF5YnqGQQIRmCQ6DctBC1VSipRB8GD/MWEVrFP42vjMyuYydxWxM8CZRt+yiNuuoHg==} + react-i18next@17.0.8: + resolution: {integrity: sha512-0ooKbGLU8JXhe1zwpQUWIeXSgLPOfwJmgheWRIUpcoA0CpyabpGhayjdG+/eA5esC1AQ8h2jWpXjJfzQzeDOCw==} peerDependencies: - i18next: '>= 26.0.10' + i18next: '>= 26.2.0' react: '>= 16.8.0' react-dom: '*' react-native: '*' @@ -4560,7 +4560,7 @@ snapshots: domutils: 3.2.2 entities: 7.0.1 - i18next@26.0.10(typescript@6.0.3): + i18next@26.2.0(typescript@6.0.3): optionalDependencies: typescript: 6.0.3 @@ -4906,11 +4906,11 @@ snapshots: react: 19.2.5 scheduler: 0.27.0 - react-i18next@17.0.7(i18next@26.0.10(typescript@6.0.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(typescript@6.0.3): + react-i18next@17.0.8(i18next@26.2.0(typescript@6.0.3))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(typescript@6.0.3): dependencies: '@babel/runtime': 7.29.2 html-parse-stringify: 3.0.1 - i18next: 26.0.10(typescript@6.0.3) + i18next: 26.2.0(typescript@6.0.3) react: 19.2.5 use-sync-external-store: 1.6.0(react@19.2.5) optionalDependencies: diff --git a/src/i18n/init.ts b/src/i18n/init.ts index 5b37f60..00853cd 100644 --- a/src/i18n/init.ts +++ b/src/i18n/init.ts @@ -45,7 +45,7 @@ const initLocaleInternal = async (options: LocaleOptions const backend = createBackend(loader, defaultLocale); instance = instance.use(backend); await instance.init({ - ns: [CELERA_NAMESPACE], + ns: ["translation", CELERA_NAMESPACE], }); }; /** diff --git a/src/i18n/integration.ts b/src/i18n/integration.ts index 89276e0..c02de5f 100644 --- a/src/i18n/integration.ts +++ b/src/i18n/integration.ts @@ -14,7 +14,7 @@ export const useTranslation = ( namespace?: string, options?: UseTranslationOptions, ): TranslatorFn => { - const { t } = useTranslation_(namespace, options); + const { t } = useTranslation_(namespace || "translation", options); return t; };