diff --git a/openspec/changes/qlfw-42-where-to-buy-kk-en/proposal.md b/openspec/changes/qlfw-42-where-to-buy-kk-en/proposal.md new file mode 100644 index 0000000..2c96608 --- /dev/null +++ b/openspec/changes/qlfw-42-where-to-buy-kk-en/proposal.md @@ -0,0 +1,4 @@ +## Why +На kk/en в блоке «Где купить книгу» стояла пометка «нужно уточнить», хотя магазины известны (как на ru). +## What +Добавить перевод `book.buy` для kk и en; названия магазинов как на ru. Решение: пустой `buy` по-прежнему скрывает список (пометка остаётся только если данных нет). diff --git a/openspec/changes/qlfw-42-where-to-buy-kk-en/tasks.md b/openspec/changes/qlfw-42-where-to-buy-kk-en/tasks.md new file mode 100644 index 0000000..1ac29bf --- /dev/null +++ b/openspec/changes/qlfw-42-where-to-buy-kk-en/tasks.md @@ -0,0 +1 @@ +- [x] kk/en book.buy, тест diff --git a/src/components/BookWhere.tsx b/src/components/BookWhere.tsx index 185462d..9623265 100644 --- a/src/components/BookWhere.tsx +++ b/src/components/BookWhere.tsx @@ -1,12 +1,13 @@ import React from 'react' import type { Dict } from '@/i18n' -export function BookWhere({ t, tbc }: { t: Dict['book']; tbc: string }) { +export function BookWhere({ t }: { t: Dict['book']; tbc?: string }) { const buy = t.buy + if (!buy) return null return (
{buy.intro}
{buy.stores}
{buy.note}
> - ) : ( -{tbc}
)}Наличие и стоимость книги уточняйте непосредственно у продавцов.
') expect(html).not.toContain(' { + it.each(['kk', 'en'] as const)('язык %s: те же магазины, без пометок', (l) => { const html = render(l) - expect(html).toContain(getDict(l).tbc) - expect(html).not.toContain('Marwin') + expect(html).toContain('