Files
food-ai/client/lib/l10n/app_ru.arb
dbastrikin c7317c4335 feat: async product/receipt recognition via Kafka
Backend:
- Migration 002: product_recognition_jobs table with JSONB images column
  and job_type CHECK ('receipt' | 'products')
- New Kafka topics: ai.products.paid / ai.products.free
- ProductJob model, ProductJobRepository (mirrors dish job pattern)
- itemEnricher extracted from Handler — shared by HTTP handler and worker
- ProductSSEBroker: PG LISTEN on product_job_update channel
- ProductWorkerPool: 5 workers, branches on job_type to call
  RecognizeReceipt or RecognizeProducts per image in parallel
- Handler: RecognizeReceipt and RecognizeProducts now return 202 Accepted
  instead of blocking; 4 new endpoints: GET /ai/product-jobs,
  /product-jobs/history, /product-jobs/{id}, /product-jobs/{id}/stream
- cmd/worker: extended to run ProductWorkerPool alongside dish WorkerPool
- cmd/server: wires productJobRepository + productSSEBroker; both SSE
  brokers started in App.Start()

Flutter client:
- ProductJobCreated, ProductJobResult, ProductJobSummary, ProductJobEvent
  models + submitReceiptRecognition/submitProductsRecognition/stream methods
- Shared _openSseStream helper eliminates duplicate SSE parsing loop
- ScanScreen: replace blocking AI calls with async submit + navigate to
  ProductJobWatchScreen
- ProductJobWatchScreen: watches SSE stream, navigates to /scan/confirm
  when done, shows error on failure
- ProductsScreen: prepends _RecentScansSection (hidden when empty); compact
  horizontal list of recent scans with "See all" → history
- ProductJobHistoryScreen: full list of all product recognition jobs
- New routes: /scan/product-job-watch, /products/job-history
- L10n: 7 new keys in all 12 ARB files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 23:01:30 +02:00

177 lines
7.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"@@locale": "ru",
"appTitle": "FoodAI",
"greetingMorning": "Доброе утро",
"greetingAfternoon": "Добрый день",
"greetingEvening": "Добрый вечер",
"caloriesUnit": "ккал",
"gramsUnit": "г",
"goalLabel": "цель:",
"consumed": "Потреблено",
"remaining": "Осталось",
"exceeded": "Превышение",
"proteinLabel": "Белки",
"fatLabel": "Жиры",
"carbsLabel": "Углеводы",
"today": "Сегодня",
"yesterday": "Вчера",
"mealsSection": "Приёмы пищи",
"addDish": "Добавить блюдо",
"scanDish": "Сканировать",
"menu": "Меню",
"dishHistory": "История блюд",
"recommendCook": "Рекомендуем приготовить",
"camera": "Камера",
"gallery": "Галерея",
"analyzingPhoto": "Анализируем фото...",
"inQueue": "Вы в очереди",
"queuePosition": "Позиция {position}",
"@queuePosition": {
"placeholders": {
"position": {
"type": "int"
}
}
},
"processing": "Обрабатываем...",
"upgradePrompt": "Хотите без очереди? Upgrade →",
"recognitionFailed": "Не удалось распознать. Попробуйте ещё раз.",
"dishRecognition": "Распознавание блюд",
"all": "Все",
"dishRecognized": "Блюдо распознано",
"recognizing": "Распознаётся…",
"recognitionError": "Ошибка распознавания",
"dishResultTitle": "Распознано блюдо",
"selectDish": "Выберите блюдо",
"dishNotRecognized": "Блюдо не распознано",
"tryAgain": "Попробовать снова",
"nutritionApproximate": "КБЖУ приблизительные — определены по фото.",
"portion": "Порция",
"mealType": "Приём пищи",
"dateLabel": "Дата",
"addToJournal": "Добавить в журнал",
"addFailed": "Не удалось добавить. Попробуйте ещё раз.",
"historyTitle": "История распознавания",
"historyLoadError": "Не удалось загрузить историю",
"retry": "Повторить",
"noHistory": "Нет распознаваний",
"profileTitle": "Профиль",
"edit": "Изменить",
"bodyParams": "ПАРАМЕТРЫ ТЕЛА",
"goalActivity": "ЦЕЛЬ И АКТИВНОСТЬ",
"nutrition": "ПИТАНИЕ",
"settings": "НАСТРОЙКИ",
"height": "Рост",
"weight": "Вес",
"age": "Возраст",
"gender": "Пол",
"genderMale": "Мужской",
"genderFemale": "Женский",
"goalLoss": "Похудение",
"goalMaintain": "Поддержание",
"goalGain": "Набор массы",
"activityLow": "Низкая",
"activityMedium": "Средняя",
"activityHigh": "Высокая",
"calorieGoal": "Норма калорий",
"mealTypes": "Приёмы пищи",
"formulaNote": "Рассчитано по формуле Миффлина-Сан Жеора",
"language": "Язык",
"notSet": "Не задано",
"calorieHint": "Укажите параметры тела для расчёта нормы калорий",
"logout": "Выйти из аккаунта",
"editProfile": "Редактировать профиль",
"cancel": "Отмена",
"save": "Сохранить",
"nameLabel": "Имя",
"heightCm": "Рост (см)",
"weightKg": "Вес (кг)",
"birthDate": "Дата рождения",
"nameRequired": "Введите имя",
"profileUpdated": "Профиль обновлён",
"profileSaveFailed": "Не удалось сохранить",
"mealTypeBreakfast": "Завтрак",
"mealTypeSecondBreakfast": "Второй завтрак",
"mealTypeLunch": "Обед",
"mealTypeAfternoonSnack": "Полдник",
"mealTypeDinner": "Ужин",
"mealTypeSnack": "Перекус",
"navHome": "Главная",
"navProducts": "Продукты",
"navRecipes": "Рецепты",
"addFromReceiptOrPhoto": "Добавить из чека или фото",
"chooseMethod": "Выберите способ",
"photoReceipt": "Сфотографировать чек",
"photoReceiptSubtitle": "Распознаем все продукты из чека",
"photoProducts": "Сфотографировать продукты",
"photoProductsSubtitle": "Холодильник, стол, полка — до 3 фото",
"addPackagedFood": "Добавить готовый продукт",
"scanBarcode": "Сканировать штрихкод",
"portionWeightG": "Вес порции (г)",
"productNotFound": "Продукт не найден",
"enterManually": "Ввести вручную",
"perHundredG": "на 100 г",
"searchFoodHint": "Поиск продуктов и блюд...",
"recentlyUsedLabel": "Недавно использованные",
"productsSection": "Продукты",
"dishesSection": "Блюда",
"noResultsForQuery": "По запросу \"{query}\" ничего не найдено",
"@noResultsForQuery": {
"placeholders": {
"query": {
"type": "String"
}
}
},
"servingsLabel": "Порций",
"addToDiary": "Добавить в дневник",
"scanDishPhoto": "Сканировать фото",
"planningForDate": "Планирование на {date}",
"@planningForDate": {
"placeholders": {
"date": {
"type": "String"
}
}
},
"markAsEaten": "Отметить как съеденное",
"plannedMealLabel": "Запланировано",
"generateWeekLabel": "Запланировать неделю",
"generateWeekSubtitle": "AI составит меню с завтраком, обедом и ужином на всю неделю",
"generatingMenu": "Генерируем меню...",
"dayPlannedLabel": "День запланирован",
"planMenuButton": "Спланировать меню",
"planMenuTitle": "Что запланировать?",
"planOptionSingleMeal": "1 приём пищи",
"planOptionSingleMealDesc": "Выберите день и приём пищи",
"planOptionDay": "1 день",
"planOptionDayDesc": "Все приёмы пищи за день",
"planOptionDays": "Несколько дней",
"planOptionDaysDesc": "Настроить период",
"planOptionWeek": "Неделя",
"planOptionWeekDesc": "7 дней сразу",
"planSelectDate": "Выберите дату",
"planSelectMealType": "Приём пищи",
"planSelectRange": "Выберите период",
"planGenerateButton": "Запланировать",
"planGenerating": "Генерирую план…",
"planSuccess": "Меню запланировано!",
"planProductsTitle": "Продукты для меню",
"planProductsSubtitle": "AI учтёт выбранные продукты при составлении рецептов",
"planProductsEmpty": "Продукты не добавлены",
"planProductsEmptyMessage": "Добавьте продукты, которые есть у вас дома — AI подберёт рецепты из того, что уже есть",
"planProductsAddProducts": "Добавить продукты",
"planProductsContinue": "Продолжить",
"planProductsSkip": "Пропустить выбор продуктов",
"planProductsSkipNoProducts": "Планировать без продуктов",
"planProductsSelectAll": "Выбрать все",
"planProductsDeselectAll": "Снять всё",
"recentScans": "Последние сканирования",
"seeAllScans": "Все",
"productJobHistoryTitle": "История сканирования",
"jobTypeReceipt": "Чек",
"jobTypeProducts": "Продукты",
"scanSubmitting": "Отправка...",
"processingProducts": "Обработка..."
}