Create the forntend API definitions for recipe service

This commit is contained in:
Urtzi Alfaro
2025-09-19 16:03:24 +02:00
parent caf6d92850
commit 2e733abed3
6 changed files with 1399 additions and 7 deletions

View File

@@ -5,6 +5,7 @@ import inventoryEs from './es/inventory.json';
import foodSafetyEs from './es/foodSafety.json';
import suppliersEs from './es/suppliers.json';
import ordersEs from './es/orders.json';
import recipesEs from './es/recipes.json';
import errorsEs from './es/errors.json';
// Translation resources by language
@@ -16,6 +17,7 @@ export const resources = {
foodSafety: foodSafetyEs,
suppliers: suppliersEs,
orders: ordersEs,
recipes: recipesEs,
errors: errorsEs,
},
};
@@ -39,7 +41,7 @@ export const languageConfig = {
};
// Namespaces available in translations
export const namespaces = ['common', 'auth', 'inventory', 'foodSafety', 'suppliers', 'orders', 'errors'] as const;
export const namespaces = ['common', 'auth', 'inventory', 'foodSafety', 'suppliers', 'orders', 'recipes', 'errors'] as const;
export type Namespace = typeof namespaces[number];
// Helper function to get language display name
@@ -53,7 +55,7 @@ export const isSupportedLanguage = (language: string): language is SupportedLang
};
// Export individual language modules for direct imports
export { commonEs, authEs, inventoryEs, foodSafetyEs, suppliersEs, ordersEs, errorsEs };
export { commonEs, authEs, inventoryEs, foodSafetyEs, suppliersEs, ordersEs, recipesEs, errorsEs };
// Default export with all translations
export default resources;