WTC-47: подсказка, что у своих блюд рецепта нет
All checks were successful
peppa/lint lint: success за 0с
peppa/test test: success за 0с
peppa/build build: success за 0с
ci / checks (pull_request) Successful in 4s
deploy / deploy (pull_request) Successful in 8s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Peppa 2026-11-16 08:11:11 +05:00
parent 6f528c42dc
commit afb574393b
4 changed files with 19 additions and 3 deletions

View File

@ -0,0 +1,4 @@
## Why
На пустом экране подсказка не говорила прямо, что у своих блюд рецепта нет.
## What Changes
Переписан текст noRecipeHint (ru/kk/en): у вписанных вручную блюд рецепта нет, рядом будет пометка.

View File

@ -0,0 +1,2 @@
- [x] Переписать noRecipeHint
- [x] Тест test/own-dish-hint.test.js

View File

@ -19,7 +19,7 @@ export const messages = {
exampleAdded: "«{name}» — добавлено",
examplesAllAdded: "Все примеры добавлены. Впишите своё блюдо в поле выше.",
examplesNote: "Это только примеры из нашей базы — можно вписать и своё блюдо.",
noRecipeHint: "Подпись «Рецепта для этого блюда пока нет» стоит у блюд, которых нет в нашей базе. Рецепты есть только у блюд из базы.",
noRecipeHint: "У блюд, которые вы вписали сами, рецепта нет — рядом с ними будет пометка «Рецепта для этого блюда пока нет». Рецепты есть только у блюд из базы.",
pick: "Что приготовить?",
yourDishes: "Ваши блюда",
today: "Сегодня готовим:",
@ -64,7 +64,7 @@ export const messages = {
exampleAdded: "«{name}» — қосылды",
examplesAllAdded: "Барлық мысал қосылды. Өз тағамыңызды жоғарыдағы жолға жазыңыз.",
examplesNote: "Бұл біздің қордағы мысалдар ғана — өз тағамыңызды да жаза аласыз.",
noRecipeHint: "«Бұл тағамның рецепті әзірге жоқ» жазуы біздің қорда жоқ тағамдарда тұрады. Рецепт тек қордағы тағамдарда бар.",
noRecipeHint: "Өзіңіз жазған тағамдардың рецепті жоқ — қасында «Бұл тағамның рецепті әзірге жоқ» деген жазу болады. Рецепт тек біздің қордағы тағамдарда бар.",
pick: "Не дайындаймыз?",
yourDishes: "Сіздің тағамдарыңыз",
today: "Бүгін дайындаймыз:",
@ -109,7 +109,7 @@ export const messages = {
exampleAdded: "“{name}” — added",
examplesAllAdded: "All examples are added. Type your own dish in the field above.",
examplesNote: "These are just examples from our collection — you can type your own dish too.",
noRecipeHint: "“No recipe for this dish yet” marks dishes that are not in our collection. Only dishes from the collection have a recipe.",
noRecipeHint: "Dishes you type in yourself have no recipe — they get the note “No recipe for this dish yet”. Only dishes from our collection have a recipe.",
pick: "What to cook?",
yourDishes: "Your dishes",
today: "Today you cook:",

View File

@ -0,0 +1,10 @@
import test from "node:test";
import assert from "node:assert/strict";
import { messages } from "../src/i18n.js";
// WTC-47: подсказка говорит, что у своих блюд рецепта нет, и называет пометку
test("подсказка про свои блюда на всех языках", () => {
for (const l of ["ru", "kk", "en"]) assert.ok(messages[l].noRecipeHint, l);
assert.match(messages.ru.noRecipeHint, /сами, рецепта нет/);
assert.ok(messages.ru.noRecipeHint.includes(messages.ru.noRecipe));
assert.ok(!/PR|API|CI|localStorage/.test(messages.ru.noRecipeHint));
});