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

@@ -1,7 +1,7 @@
import { UpdateField } from '@components/options/ToolOptions';
import { getToolsByCategory } from '@tools/index';
import { ToolCategory } from '@tools/defineTool';
import { I18nNamespaces } from '../i18n';
import { I18nNamespaces, validNamespaces } from '../i18n';
// Here starting the shared values for string manipulation.
@@ -115,20 +115,6 @@ export const getToolCategoryTitle = (categoryName: string): string =>
// Type guard to check if a value is a valid I18nNamespaces
const isValidI18nNamespace = (value: string): value is I18nNamespaces => {
const validNamespaces: I18nNamespaces[] = [
'string',
'number',
'video',
'list',
'json',
'time',
'csv',
'pdf',
'audio',
'xml',
'translation',
'image'
];
return validNamespaces.includes(value as I18nNamespaces);
};