fix: translation related behaviors

This commit is contained in:
Ibrahima G. Coulibaly
2025-07-14 18:04:30 +01:00
parent a6a2c1f3a1
commit 3b5f852287
112 changed files with 401 additions and 648 deletions

View File

@@ -22,19 +22,21 @@ const locizeOptions = {
version: 'latest'
};
export type I18nNamespaces =
| 'translation'
| 'list'
| 'string'
| 'csv'
| 'json'
| 'pdf'
| 'image'
| 'audio'
| 'video'
| 'number'
| 'time'
| 'xml';
export const validNamespaces: string[] = [
'string',
'number',
'video',
'list',
'json',
'time',
'csv',
'pdf',
'audio',
'xml',
'translation',
'image'
];
export type I18nNamespaces = (typeof validNamespaces)[number];
export type FullI18nKey = {
[K in I18nNamespaces]: `${K}:${ParseKeys<K>}`;
}[I18nNamespaces];
@@ -42,7 +44,7 @@ export type FullI18nKey = {
i18n.use(initReactI18next).init({
lng: 'en',
fallbackLng: 'en',
debug: useLocize,
debug: false,
backend: useLocize
? locizeOptions
: {