Files
bakery-ia/frontend/src/locales/index.ts

176 lines
5.9 KiB
TypeScript
Raw Normal View History

2025-08-28 10:41:04 +02:00
// Spanish translations
import commonEs from './es/common.json';
import authEs from './es/auth.json';
import inventoryEs from './es/inventory.json';
import foodSafetyEs from './es/foodSafety.json';
import suppliersEs from './es/suppliers.json';
2025-09-19 11:44:38 +02:00
import ordersEs from './es/orders.json';
import recipesEs from './es/recipes.json';
2025-08-28 10:41:04 +02:00
import errorsEs from './es/errors.json';
2025-09-22 11:04:03 +02:00
import dashboardEs from './es/dashboard.json';
import productionEs from './es/production.json';
2025-09-23 19:24:22 +02:00
import equipmentEs from './es/equipment.json';
2025-10-17 18:14:28 +02:00
import landingEs from './es/landing.json';
2025-10-24 13:05:04 +02:00
import settingsEs from './es/settings.json';
2025-10-27 16:33:26 +01:00
import ajustesEs from './es/ajustes.json';
2025-11-07 22:51:26 +00:00
import reasoningEs from './es/reasoning.json';
feat: Add comprehensive i18n support for wizards (en/es/eu) INTERNATIONALIZATION: Implemented full multi-language support for wizard components in English, Spanish, and Basque (Euskara). IMPLEMENTATION DETAILS: **New Translation Files Created:** 1. frontend/src/locales/en/wizards.json - English translations 2. frontend/src/locales/es/wizards.json - Spanish translations 3. frontend/src/locales/eu/wizards.json - Basque translations **Translation Coverage:** - Common wizard strings (optional, required, auto-generated, etc.) - Inventory Wizard (all fields, sections, tooltips) - Quality Template Wizard (all fields, check types, sections) - Customer Order Wizard (all 3 steps, fields, customer types) - Item Type Selector (all 9 item types with descriptions) - Comprehensive tooltips for all complex fields **Total Translation Keys:** ~200+ keys per language **Structure:** ``` wizards: common: {optional, required, autoGenerated, ...} inventory: {title, fields, sections, productTypes, units, ...} qualityTemplate: {title, fields, checkTypes, sections, ...} customerOrder: {title, steps, customerSelection, orderItems, ...} itemTypeSelector: {title, types, ...} tooltips: {averageCost, lowStockThreshold, allergenInfo, ...} ``` **Integration:** - Updated frontend/src/locales/index.ts to register 'wizards' namespace - Added imports for wizardsEs, wizardsEn, wizardsEu - Registered in resources for all three languages - Added 'wizards' to namespaces array **Documentation:** Created comprehensive implementation guide: - WIZARD_I18N_IMPLEMENTATION_GUIDE.md - Complete usage examples for all wizard types - Migration patterns for existing components - Best practices and testing guidelines - Step-by-step implementation checklist **Usage Pattern:** ```typescript import { useTranslation } from 'react-i18next'; const MyWizard = () => { const { t } = useTranslation('wizards'); return ( <div> <h2>{t('inventory.title')}</h2> <label>{t('inventory.fields.name')}</label> <input placeholder={t('inventory.fields.namePlaceholder')} /> </div> ); }; ``` **Translation Quality:** - English: Native professional translations - Spanish: Professional translations with bakery-specific terminology - Basque: Professional Euskara translations maintaining formal tone **Benefits:** ✅ Full multi-language support (en/es/eu) ✅ Consistent terminology across all wizards ✅ Easy maintenance - all strings in JSON ✅ Type-safe with i18next TypeScript support ✅ Scalable - easy to add new languages ✅ Works with existing language switcher ✅ Comprehensive coverage of all wizard fields ✅ Professional translations for bakery domain **Next Steps:** Individual wizard components need to be updated to use these translations following the patterns documented in WIZARD_I18N_IMPLEMENTATION_GUIDE.md This establishes the foundation for complete multilingual wizard support. Components can be migrated incrementally using the provided examples.
2025-11-10 12:28:03 +00:00
import wizardsEs from './es/wizards.json';
2025-11-15 15:20:10 +01:00
import subscriptionEs from './es/subscription.json';
2025-11-15 21:21:06 +01:00
import purchaseOrdersEs from './es/purchase_orders.json';
2025-09-22 11:04:03 +02:00
// English translations
import commonEn from './en/common.json';
2025-09-22 16:10:08 +02:00
import authEn from './en/auth.json';
import inventoryEn from './en/inventory.json';
import foodSafetyEn from './en/foodSafety.json';
import suppliersEn from './en/suppliers.json';
import ordersEn from './en/orders.json';
2025-09-22 11:04:03 +02:00
import recipesEn from './en/recipes.json';
2025-09-22 16:10:08 +02:00
import errorsEn from './en/errors.json';
2025-09-22 11:04:03 +02:00
import dashboardEn from './en/dashboard.json';
import productionEn from './en/production.json';
2025-09-23 19:24:22 +02:00
import equipmentEn from './en/equipment.json';
2025-10-17 18:14:28 +02:00
import landingEn from './en/landing.json';
2025-10-24 13:05:04 +02:00
import settingsEn from './en/settings.json';
2025-10-27 16:33:26 +01:00
import ajustesEn from './en/ajustes.json';
2025-11-07 22:51:26 +00:00
import reasoningEn from './en/reasoning.json';
feat: Add comprehensive i18n support for wizards (en/es/eu) INTERNATIONALIZATION: Implemented full multi-language support for wizard components in English, Spanish, and Basque (Euskara). IMPLEMENTATION DETAILS: **New Translation Files Created:** 1. frontend/src/locales/en/wizards.json - English translations 2. frontend/src/locales/es/wizards.json - Spanish translations 3. frontend/src/locales/eu/wizards.json - Basque translations **Translation Coverage:** - Common wizard strings (optional, required, auto-generated, etc.) - Inventory Wizard (all fields, sections, tooltips) - Quality Template Wizard (all fields, check types, sections) - Customer Order Wizard (all 3 steps, fields, customer types) - Item Type Selector (all 9 item types with descriptions) - Comprehensive tooltips for all complex fields **Total Translation Keys:** ~200+ keys per language **Structure:** ``` wizards: common: {optional, required, autoGenerated, ...} inventory: {title, fields, sections, productTypes, units, ...} qualityTemplate: {title, fields, checkTypes, sections, ...} customerOrder: {title, steps, customerSelection, orderItems, ...} itemTypeSelector: {title, types, ...} tooltips: {averageCost, lowStockThreshold, allergenInfo, ...} ``` **Integration:** - Updated frontend/src/locales/index.ts to register 'wizards' namespace - Added imports for wizardsEs, wizardsEn, wizardsEu - Registered in resources for all three languages - Added 'wizards' to namespaces array **Documentation:** Created comprehensive implementation guide: - WIZARD_I18N_IMPLEMENTATION_GUIDE.md - Complete usage examples for all wizard types - Migration patterns for existing components - Best practices and testing guidelines - Step-by-step implementation checklist **Usage Pattern:** ```typescript import { useTranslation } from 'react-i18next'; const MyWizard = () => { const { t } = useTranslation('wizards'); return ( <div> <h2>{t('inventory.title')}</h2> <label>{t('inventory.fields.name')}</label> <input placeholder={t('inventory.fields.namePlaceholder')} /> </div> ); }; ``` **Translation Quality:** - English: Native professional translations - Spanish: Professional translations with bakery-specific terminology - Basque: Professional Euskara translations maintaining formal tone **Benefits:** ✅ Full multi-language support (en/es/eu) ✅ Consistent terminology across all wizards ✅ Easy maintenance - all strings in JSON ✅ Type-safe with i18next TypeScript support ✅ Scalable - easy to add new languages ✅ Works with existing language switcher ✅ Comprehensive coverage of all wizard fields ✅ Professional translations for bakery domain **Next Steps:** Individual wizard components need to be updated to use these translations following the patterns documented in WIZARD_I18N_IMPLEMENTATION_GUIDE.md This establishes the foundation for complete multilingual wizard support. Components can be migrated incrementally using the provided examples.
2025-11-10 12:28:03 +00:00
import wizardsEn from './en/wizards.json';
2025-11-15 15:20:10 +01:00
import subscriptionEn from './en/subscription.json';
2025-11-15 21:21:06 +01:00
import purchaseOrdersEn from './en/purchase_orders.json';
2025-09-22 11:04:03 +02:00
// Basque translations
import commonEu from './eu/common.json';
2025-09-22 16:10:08 +02:00
import authEu from './eu/auth.json';
import inventoryEu from './eu/inventory.json';
import foodSafetyEu from './eu/foodSafety.json';
import suppliersEu from './eu/suppliers.json';
import ordersEu from './eu/orders.json';
import recipesEu from './eu/recipes.json';
import errorsEu from './eu/errors.json';
2025-09-22 11:04:03 +02:00
import dashboardEu from './eu/dashboard.json';
import productionEu from './eu/production.json';
2025-09-23 19:24:22 +02:00
import equipmentEu from './eu/equipment.json';
2025-10-17 18:14:28 +02:00
import landingEu from './eu/landing.json';
2025-10-24 13:05:04 +02:00
import settingsEu from './eu/settings.json';
2025-10-27 16:33:26 +01:00
import ajustesEu from './eu/ajustes.json';
2025-11-07 22:51:26 +00:00
import reasoningEu from './eu/reasoning.json';
feat: Add comprehensive i18n support for wizards (en/es/eu) INTERNATIONALIZATION: Implemented full multi-language support for wizard components in English, Spanish, and Basque (Euskara). IMPLEMENTATION DETAILS: **New Translation Files Created:** 1. frontend/src/locales/en/wizards.json - English translations 2. frontend/src/locales/es/wizards.json - Spanish translations 3. frontend/src/locales/eu/wizards.json - Basque translations **Translation Coverage:** - Common wizard strings (optional, required, auto-generated, etc.) - Inventory Wizard (all fields, sections, tooltips) - Quality Template Wizard (all fields, check types, sections) - Customer Order Wizard (all 3 steps, fields, customer types) - Item Type Selector (all 9 item types with descriptions) - Comprehensive tooltips for all complex fields **Total Translation Keys:** ~200+ keys per language **Structure:** ``` wizards: common: {optional, required, autoGenerated, ...} inventory: {title, fields, sections, productTypes, units, ...} qualityTemplate: {title, fields, checkTypes, sections, ...} customerOrder: {title, steps, customerSelection, orderItems, ...} itemTypeSelector: {title, types, ...} tooltips: {averageCost, lowStockThreshold, allergenInfo, ...} ``` **Integration:** - Updated frontend/src/locales/index.ts to register 'wizards' namespace - Added imports for wizardsEs, wizardsEn, wizardsEu - Registered in resources for all three languages - Added 'wizards' to namespaces array **Documentation:** Created comprehensive implementation guide: - WIZARD_I18N_IMPLEMENTATION_GUIDE.md - Complete usage examples for all wizard types - Migration patterns for existing components - Best practices and testing guidelines - Step-by-step implementation checklist **Usage Pattern:** ```typescript import { useTranslation } from 'react-i18next'; const MyWizard = () => { const { t } = useTranslation('wizards'); return ( <div> <h2>{t('inventory.title')}</h2> <label>{t('inventory.fields.name')}</label> <input placeholder={t('inventory.fields.namePlaceholder')} /> </div> ); }; ``` **Translation Quality:** - English: Native professional translations - Spanish: Professional translations with bakery-specific terminology - Basque: Professional Euskara translations maintaining formal tone **Benefits:** ✅ Full multi-language support (en/es/eu) ✅ Consistent terminology across all wizards ✅ Easy maintenance - all strings in JSON ✅ Type-safe with i18next TypeScript support ✅ Scalable - easy to add new languages ✅ Works with existing language switcher ✅ Comprehensive coverage of all wizard fields ✅ Professional translations for bakery domain **Next Steps:** Individual wizard components need to be updated to use these translations following the patterns documented in WIZARD_I18N_IMPLEMENTATION_GUIDE.md This establishes the foundation for complete multilingual wizard support. Components can be migrated incrementally using the provided examples.
2025-11-10 12:28:03 +00:00
import wizardsEu from './eu/wizards.json';
2025-11-15 15:20:10 +01:00
import subscriptionEu from './eu/subscription.json';
2025-11-15 21:21:06 +01:00
import purchaseOrdersEu from './eu/purchase_orders.json';
2025-08-28 10:41:04 +02:00
// Translation resources by language
export const resources = {
2025-10-27 16:33:26 +01:00
es: {
2025-08-28 10:41:04 +02:00
common: commonEs,
auth: authEs,
inventory: inventoryEs,
foodSafety: foodSafetyEs,
suppliers: suppliersEs,
2025-09-19 11:44:38 +02:00
orders: ordersEs,
recipes: recipesEs,
2025-08-28 10:41:04 +02:00
errors: errorsEs,
2025-09-22 11:04:03 +02:00
dashboard: dashboardEs,
production: productionEs,
2025-09-23 19:24:22 +02:00
equipment: equipmentEs,
2025-10-17 18:14:28 +02:00
landing: landingEs,
2025-10-24 13:05:04 +02:00
settings: settingsEs,
2025-10-27 16:33:26 +01:00
ajustes: ajustesEs,
2025-11-07 22:51:26 +00:00
reasoning: reasoningEs,
feat: Add comprehensive i18n support for wizards (en/es/eu) INTERNATIONALIZATION: Implemented full multi-language support for wizard components in English, Spanish, and Basque (Euskara). IMPLEMENTATION DETAILS: **New Translation Files Created:** 1. frontend/src/locales/en/wizards.json - English translations 2. frontend/src/locales/es/wizards.json - Spanish translations 3. frontend/src/locales/eu/wizards.json - Basque translations **Translation Coverage:** - Common wizard strings (optional, required, auto-generated, etc.) - Inventory Wizard (all fields, sections, tooltips) - Quality Template Wizard (all fields, check types, sections) - Customer Order Wizard (all 3 steps, fields, customer types) - Item Type Selector (all 9 item types with descriptions) - Comprehensive tooltips for all complex fields **Total Translation Keys:** ~200+ keys per language **Structure:** ``` wizards: common: {optional, required, autoGenerated, ...} inventory: {title, fields, sections, productTypes, units, ...} qualityTemplate: {title, fields, checkTypes, sections, ...} customerOrder: {title, steps, customerSelection, orderItems, ...} itemTypeSelector: {title, types, ...} tooltips: {averageCost, lowStockThreshold, allergenInfo, ...} ``` **Integration:** - Updated frontend/src/locales/index.ts to register 'wizards' namespace - Added imports for wizardsEs, wizardsEn, wizardsEu - Registered in resources for all three languages - Added 'wizards' to namespaces array **Documentation:** Created comprehensive implementation guide: - WIZARD_I18N_IMPLEMENTATION_GUIDE.md - Complete usage examples for all wizard types - Migration patterns for existing components - Best practices and testing guidelines - Step-by-step implementation checklist **Usage Pattern:** ```typescript import { useTranslation } from 'react-i18next'; const MyWizard = () => { const { t } = useTranslation('wizards'); return ( <div> <h2>{t('inventory.title')}</h2> <label>{t('inventory.fields.name')}</label> <input placeholder={t('inventory.fields.namePlaceholder')} /> </div> ); }; ``` **Translation Quality:** - English: Native professional translations - Spanish: Professional translations with bakery-specific terminology - Basque: Professional Euskara translations maintaining formal tone **Benefits:** ✅ Full multi-language support (en/es/eu) ✅ Consistent terminology across all wizards ✅ Easy maintenance - all strings in JSON ✅ Type-safe with i18next TypeScript support ✅ Scalable - easy to add new languages ✅ Works with existing language switcher ✅ Comprehensive coverage of all wizard fields ✅ Professional translations for bakery domain **Next Steps:** Individual wizard components need to be updated to use these translations following the patterns documented in WIZARD_I18N_IMPLEMENTATION_GUIDE.md This establishes the foundation for complete multilingual wizard support. Components can be migrated incrementally using the provided examples.
2025-11-10 12:28:03 +00:00
wizards: wizardsEs,
2025-11-15 15:20:10 +01:00
subscription: subscriptionEs,
2025-11-15 21:21:06 +01:00
purchase_orders: purchaseOrdersEs,
2025-09-22 11:04:03 +02:00
},
en: {
common: commonEn,
2025-09-22 16:10:08 +02:00
auth: authEn,
inventory: inventoryEn,
foodSafety: foodSafetyEn,
suppliers: suppliersEn,
orders: ordersEn,
2025-09-22 11:04:03 +02:00
recipes: recipesEn,
2025-09-22 16:10:08 +02:00
errors: errorsEn,
2025-09-22 11:04:03 +02:00
dashboard: dashboardEn,
production: productionEn,
2025-09-23 19:24:22 +02:00
equipment: equipmentEn,
2025-10-17 18:14:28 +02:00
landing: landingEn,
2025-10-24 13:05:04 +02:00
settings: settingsEn,
2025-10-27 16:33:26 +01:00
ajustes: ajustesEn,
2025-11-07 22:51:26 +00:00
reasoning: reasoningEn,
feat: Add comprehensive i18n support for wizards (en/es/eu) INTERNATIONALIZATION: Implemented full multi-language support for wizard components in English, Spanish, and Basque (Euskara). IMPLEMENTATION DETAILS: **New Translation Files Created:** 1. frontend/src/locales/en/wizards.json - English translations 2. frontend/src/locales/es/wizards.json - Spanish translations 3. frontend/src/locales/eu/wizards.json - Basque translations **Translation Coverage:** - Common wizard strings (optional, required, auto-generated, etc.) - Inventory Wizard (all fields, sections, tooltips) - Quality Template Wizard (all fields, check types, sections) - Customer Order Wizard (all 3 steps, fields, customer types) - Item Type Selector (all 9 item types with descriptions) - Comprehensive tooltips for all complex fields **Total Translation Keys:** ~200+ keys per language **Structure:** ``` wizards: common: {optional, required, autoGenerated, ...} inventory: {title, fields, sections, productTypes, units, ...} qualityTemplate: {title, fields, checkTypes, sections, ...} customerOrder: {title, steps, customerSelection, orderItems, ...} itemTypeSelector: {title, types, ...} tooltips: {averageCost, lowStockThreshold, allergenInfo, ...} ``` **Integration:** - Updated frontend/src/locales/index.ts to register 'wizards' namespace - Added imports for wizardsEs, wizardsEn, wizardsEu - Registered in resources for all three languages - Added 'wizards' to namespaces array **Documentation:** Created comprehensive implementation guide: - WIZARD_I18N_IMPLEMENTATION_GUIDE.md - Complete usage examples for all wizard types - Migration patterns for existing components - Best practices and testing guidelines - Step-by-step implementation checklist **Usage Pattern:** ```typescript import { useTranslation } from 'react-i18next'; const MyWizard = () => { const { t } = useTranslation('wizards'); return ( <div> <h2>{t('inventory.title')}</h2> <label>{t('inventory.fields.name')}</label> <input placeholder={t('inventory.fields.namePlaceholder')} /> </div> ); }; ``` **Translation Quality:** - English: Native professional translations - Spanish: Professional translations with bakery-specific terminology - Basque: Professional Euskara translations maintaining formal tone **Benefits:** ✅ Full multi-language support (en/es/eu) ✅ Consistent terminology across all wizards ✅ Easy maintenance - all strings in JSON ✅ Type-safe with i18next TypeScript support ✅ Scalable - easy to add new languages ✅ Works with existing language switcher ✅ Comprehensive coverage of all wizard fields ✅ Professional translations for bakery domain **Next Steps:** Individual wizard components need to be updated to use these translations following the patterns documented in WIZARD_I18N_IMPLEMENTATION_GUIDE.md This establishes the foundation for complete multilingual wizard support. Components can be migrated incrementally using the provided examples.
2025-11-10 12:28:03 +00:00
wizards: wizardsEn,
2025-11-15 15:20:10 +01:00
subscription: subscriptionEn,
2025-11-15 21:21:06 +01:00
purchase_orders: purchaseOrdersEn,
2025-09-22 11:04:03 +02:00
},
eu: {
common: commonEu,
2025-09-22 16:10:08 +02:00
auth: authEu,
inventory: inventoryEu,
foodSafety: foodSafetyEu,
suppliers: suppliersEu,
orders: ordersEu,
recipes: recipesEu,
errors: errorsEu,
2025-09-22 11:04:03 +02:00
dashboard: dashboardEu,
production: productionEu,
2025-09-23 19:24:22 +02:00
equipment: equipmentEu,
2025-10-17 18:14:28 +02:00
landing: landingEu,
2025-10-24 13:05:04 +02:00
settings: settingsEu,
2025-10-27 16:33:26 +01:00
ajustes: ajustesEu,
2025-11-07 22:51:26 +00:00
reasoning: reasoningEu,
feat: Add comprehensive i18n support for wizards (en/es/eu) INTERNATIONALIZATION: Implemented full multi-language support for wizard components in English, Spanish, and Basque (Euskara). IMPLEMENTATION DETAILS: **New Translation Files Created:** 1. frontend/src/locales/en/wizards.json - English translations 2. frontend/src/locales/es/wizards.json - Spanish translations 3. frontend/src/locales/eu/wizards.json - Basque translations **Translation Coverage:** - Common wizard strings (optional, required, auto-generated, etc.) - Inventory Wizard (all fields, sections, tooltips) - Quality Template Wizard (all fields, check types, sections) - Customer Order Wizard (all 3 steps, fields, customer types) - Item Type Selector (all 9 item types with descriptions) - Comprehensive tooltips for all complex fields **Total Translation Keys:** ~200+ keys per language **Structure:** ``` wizards: common: {optional, required, autoGenerated, ...} inventory: {title, fields, sections, productTypes, units, ...} qualityTemplate: {title, fields, checkTypes, sections, ...} customerOrder: {title, steps, customerSelection, orderItems, ...} itemTypeSelector: {title, types, ...} tooltips: {averageCost, lowStockThreshold, allergenInfo, ...} ``` **Integration:** - Updated frontend/src/locales/index.ts to register 'wizards' namespace - Added imports for wizardsEs, wizardsEn, wizardsEu - Registered in resources for all three languages - Added 'wizards' to namespaces array **Documentation:** Created comprehensive implementation guide: - WIZARD_I18N_IMPLEMENTATION_GUIDE.md - Complete usage examples for all wizard types - Migration patterns for existing components - Best practices and testing guidelines - Step-by-step implementation checklist **Usage Pattern:** ```typescript import { useTranslation } from 'react-i18next'; const MyWizard = () => { const { t } = useTranslation('wizards'); return ( <div> <h2>{t('inventory.title')}</h2> <label>{t('inventory.fields.name')}</label> <input placeholder={t('inventory.fields.namePlaceholder')} /> </div> ); }; ``` **Translation Quality:** - English: Native professional translations - Spanish: Professional translations with bakery-specific terminology - Basque: Professional Euskara translations maintaining formal tone **Benefits:** ✅ Full multi-language support (en/es/eu) ✅ Consistent terminology across all wizards ✅ Easy maintenance - all strings in JSON ✅ Type-safe with i18next TypeScript support ✅ Scalable - easy to add new languages ✅ Works with existing language switcher ✅ Comprehensive coverage of all wizard fields ✅ Professional translations for bakery domain **Next Steps:** Individual wizard components need to be updated to use these translations following the patterns documented in WIZARD_I18N_IMPLEMENTATION_GUIDE.md This establishes the foundation for complete multilingual wizard support. Components can be migrated incrementally using the provided examples.
2025-11-10 12:28:03 +00:00
wizards: wizardsEu,
2025-11-15 15:20:10 +01:00
subscription: subscriptionEu,
2025-11-15 21:21:06 +01:00
purchase_orders: purchaseOrdersEu,
2025-08-28 10:41:04 +02:00
},
};
// Supported languages
2025-09-22 11:04:03 +02:00
export const supportedLanguages = ['es', 'en', 'eu'] as const;
2025-08-28 10:41:04 +02:00
export type SupportedLanguage = typeof supportedLanguages[number];
// Default language
export const defaultLanguage: SupportedLanguage = 'es';
// Language configuration
export const languageConfig = {
es: {
name: 'Español',
nativeName: 'Español',
code: 'es',
2025-09-24 19:15:29 +02:00
flag: 'es', // Using language code instead of flag for proper language identification
2025-08-28 10:41:04 +02:00
rtl: false,
},
2025-09-22 11:04:03 +02:00
en: {
name: 'English',
nativeName: 'English',
code: 'en',
2025-09-24 19:15:29 +02:00
flag: 'en', // Using language code instead of flag for proper language identification
2025-09-22 11:04:03 +02:00
rtl: false,
},
eu: {
2025-09-24 19:15:29 +02:00
name: 'Basque',
2025-09-22 11:04:03 +02:00
nativeName: 'Euskera',
code: 'eu',
2025-09-24 19:15:29 +02:00
flag: 'eu', // Using language code instead of flag for proper language identification
2025-09-22 11:04:03 +02:00
rtl: false,
},
2025-08-28 10:41:04 +02:00
};
// Namespaces available in translations
2025-11-15 21:21:06 +01:00
export const namespaces = ['common', 'auth', 'inventory', 'foodSafety', 'suppliers', 'orders', 'recipes', 'errors', 'dashboard', 'production', 'equipment', 'landing', 'settings', 'ajustes', 'reasoning', 'wizards', 'subscription', 'purchase_orders'] as const;
2025-08-28 10:41:04 +02:00
export type Namespace = typeof namespaces[number];
// Helper function to get language display name
export const getLanguageDisplayName = (language: SupportedLanguage): string => {
return languageConfig[language]?.nativeName || language;
};
// Helper function to check if language is supported
export const isSupportedLanguage = (language: string): language is SupportedLanguage => {
return supportedLanguages.includes(language as SupportedLanguage);
};
// Export individual language modules for direct imports
feat: Add comprehensive i18n support for wizards (en/es/eu) INTERNATIONALIZATION: Implemented full multi-language support for wizard components in English, Spanish, and Basque (Euskara). IMPLEMENTATION DETAILS: **New Translation Files Created:** 1. frontend/src/locales/en/wizards.json - English translations 2. frontend/src/locales/es/wizards.json - Spanish translations 3. frontend/src/locales/eu/wizards.json - Basque translations **Translation Coverage:** - Common wizard strings (optional, required, auto-generated, etc.) - Inventory Wizard (all fields, sections, tooltips) - Quality Template Wizard (all fields, check types, sections) - Customer Order Wizard (all 3 steps, fields, customer types) - Item Type Selector (all 9 item types with descriptions) - Comprehensive tooltips for all complex fields **Total Translation Keys:** ~200+ keys per language **Structure:** ``` wizards: common: {optional, required, autoGenerated, ...} inventory: {title, fields, sections, productTypes, units, ...} qualityTemplate: {title, fields, checkTypes, sections, ...} customerOrder: {title, steps, customerSelection, orderItems, ...} itemTypeSelector: {title, types, ...} tooltips: {averageCost, lowStockThreshold, allergenInfo, ...} ``` **Integration:** - Updated frontend/src/locales/index.ts to register 'wizards' namespace - Added imports for wizardsEs, wizardsEn, wizardsEu - Registered in resources for all three languages - Added 'wizards' to namespaces array **Documentation:** Created comprehensive implementation guide: - WIZARD_I18N_IMPLEMENTATION_GUIDE.md - Complete usage examples for all wizard types - Migration patterns for existing components - Best practices and testing guidelines - Step-by-step implementation checklist **Usage Pattern:** ```typescript import { useTranslation } from 'react-i18next'; const MyWizard = () => { const { t } = useTranslation('wizards'); return ( <div> <h2>{t('inventory.title')}</h2> <label>{t('inventory.fields.name')}</label> <input placeholder={t('inventory.fields.namePlaceholder')} /> </div> ); }; ``` **Translation Quality:** - English: Native professional translations - Spanish: Professional translations with bakery-specific terminology - Basque: Professional Euskara translations maintaining formal tone **Benefits:** ✅ Full multi-language support (en/es/eu) ✅ Consistent terminology across all wizards ✅ Easy maintenance - all strings in JSON ✅ Type-safe with i18next TypeScript support ✅ Scalable - easy to add new languages ✅ Works with existing language switcher ✅ Comprehensive coverage of all wizard fields ✅ Professional translations for bakery domain **Next Steps:** Individual wizard components need to be updated to use these translations following the patterns documented in WIZARD_I18N_IMPLEMENTATION_GUIDE.md This establishes the foundation for complete multilingual wizard support. Components can be migrated incrementally using the provided examples.
2025-11-10 12:28:03 +00:00
export { commonEs, authEs, inventoryEs, foodSafetyEs, suppliersEs, ordersEs, recipesEs, errorsEs, equipmentEs, landingEs, settingsEs, ajustesEs, reasoningEs, wizardsEs, wizardsEn, wizardsEu };
2025-08-28 10:41:04 +02:00
// Default export with all translations
2025-10-27 16:33:26 +01:00
export default resources;