diff --git a/assets/js/main.js b/assets/js/main.js index a855134..02cd044 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -113,11 +113,11 @@ const app = { app.state.recipes = data.recipes; } else { console.error('Failed to load recipes:', data.error); - app.dom.recipeCardsContainer.innerHTML = '

Ошибка загрузки рецептов.

'; + app.dom.recipeCardsContainer.innerHTML = '

Error loading recipes.

'; } } catch (error) { console.error('Error:', error); - app.dom.recipeCardsContainer.innerHTML = '

Не удалось подключиться к серверу.

'; + app.dom.recipeCardsContainer.innerHTML = '

Could not connect to the server.

'; } }, async saveRecipe(formData) { @@ -156,7 +156,7 @@ const app = { renderRecipeCards(recipes) { app.dom.recipeCardsContainer.innerHTML = ''; if (!recipes || recipes.length === 0) { - app.dom.recipeCardsContainer.innerHTML = '

Ваши сохраненные рецепты появятся здесь.

'; + app.dom.recipeCardsContainer.innerHTML = '

Your saved recipes will appear here.

'; return; } @@ -197,14 +197,14 @@ const app = { const text = document.createElement('p'); text.className = 'card-text text-muted'; - text.textContent = `${recipe.ingredients.length} ингредиентов`; + text.textContent = `${recipe.ingredients.length} ingredients`; const buttonGroup = document.createElement('div'); buttonGroup.className = 'mt-auto pt-2'; buttonGroup.innerHTML = ` - - - + + + `; cardBody.appendChild(titleWrapper); @@ -280,7 +280,7 @@ const app = { } const item = combinedIngredients.get(key); item.additionalQty += prod.quantity; - const source = prod.source || 'Дополнительный продукт'; + const source = prod.source || 'Additional product'; if (!item.sources.includes(source)) { item.sources.push(source); } @@ -292,10 +292,10 @@ const app = { // 3. Group for display const groups = { - 'Food': { ingredients: [], label: 'Еда' }, - 'Drinks': { ingredients: [], label: 'Напитки' }, - 'Cooking and serving': { ingredients: [], label: 'Приготовление и сервировка' }, - 'Tableware and consumables': { ingredients: [], label: 'Посуда и расходники' } + 'Food': { ingredients: [] }, + 'Drinks': { ingredients: [] }, + 'Cooking and serving': { ingredients: [] }, + 'Tableware and consumables': { ingredients: [] } }; combinedIngredients.forEach((item, key) => { @@ -321,7 +321,7 @@ const app = { const group = groups[groupName]; if (group.ingredients.length > 0) { totalIngredients += group.ingredients.length; - html += `

${group.label}

`; + html += `

${groupName}

`; html += '