Commit Graph

6 Commits

Author SHA1 Message Date
Urtzi Alfaro
5c45164c8e Improve backend 2025-11-18 07:17:17 +01:00
Urtzi Alfaro
54b7a5e080 Improve the UI and tests 2025-11-15 21:21:06 +01:00
Claude
7f397240e5 feat: Add CustomerOrderWizard translation keys (en/es/eu)
- Add 170+ translation keys for CustomerOrderWizard in all languages
- Customer selection section with search and form fields
- Order items section with product management
- Delivery and payment section with comprehensive options
- Advanced options: pricing, production, fulfillment, notifications, quality
- Support for dropdown options: order types, priorities, statuses, payment methods, etc.
2025-11-10 13:37:20 +00:00
Claude
45d18ef980 feat: Add comprehensive i18n support to QualityTemplateWizard
Added full internationalization support for the Quality Template wizard:

Translation keys added (en/es/eu):
- Scoring methods (weighted average, pass/fail, percentage, points-based)
- Advanced fields (check points, parameters, thresholds, scoring criteria)
- Section headers (check points config, advanced config, responsibility, control settings)
- Control settings (active template, photo evidence, critical control point, notify on failure)

Component updates:
- Translated all hardcoded strings in QualityTemplateWizard.tsx
- Implemented useTranslation hook
- Updated all labels, placeholders, tooltips, and section headers
- Added translations for scoring configuration section
- Translated advanced options including JSONB configuration fields
- Translated responsibility & requirements section
- Translated control settings checkboxes

Follows established pattern from InventoryWizard.tsx for consistency.
2025-11-10 13:16:49 +00:00
Claude
ebabe4cd40 feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.

Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
  * Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
  * Inventory management fields (lowStockThreshold, reorderPoint, etc.)
  * Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
  * Storage fields (storageInstructions, handlingInstructions, isPerishable)
  * Supplier fields (preferredSupplierId, supplierProductCode)
  * Quality fields (allergenInfo, nutritionalInfo, certifications)
  * Physical properties (weight, volume, dimensions, color)
  * Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
  * Additional fields (notes, tags, customFields)

- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)

InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title

Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
Claude
36a62a2a71 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