Skip to content

Commit 708fe3b

Browse files
authored
fix default namespace language loader not working (#12)
1 parent 7adcc83 commit 708fe3b

4 files changed

Lines changed: 17 additions & 17 deletions

File tree

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pistonite/celera",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"type": "module",
55
"private": true,
66
"description": "In-house UI framework",
@@ -16,8 +16,8 @@
1616
},
1717
"dependencies": {
1818
"@pistonite/pure": "^0.29.7",
19-
"i18next": "^26.0.10",
20-
"react-i18next": "^17.0.7"
19+
"i18next": "^26.2.0",
20+
"react-i18next": "^17.0.8"
2121
},
2222
"peerDependencies": {
2323
"@fluentui/react-components": "^9",

pnpm-lock.yaml

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/i18n/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const initLocaleInternal = async <TLocale extends string>(options: LocaleOptions
4545
const backend = createBackend(loader, defaultLocale);
4646
instance = instance.use(backend);
4747
await instance.init({
48-
ns: [CELERA_NAMESPACE],
48+
ns: ["translation", CELERA_NAMESPACE],
4949
});
5050
};
5151
/**

src/i18n/integration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const useTranslation = (
1414
namespace?: string,
1515
options?: UseTranslationOptions,
1616
): TranslatorFn => {
17-
const { t } = useTranslation_(namespace, options);
17+
const { t } = useTranslation_(namespace || "translation", options);
1818
return t;
1919
};
2020

0 commit comments

Comments
 (0)