From cf1c78b0ae04543a9fcac7312c6e0976efb4d8f6 Mon Sep 17 00:00:00 2001 From: Peppa Date: Thu, 19 Nov 2026 14:42:38 +0500 Subject: [PATCH 1/3] =?UTF-8?q?QLFW-67:=20=D0=BF=D0=BE=D1=8F=D1=81=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=83=20=D0=BC=D0=B0=D0=B3=D0=B0?= =?UTF-8?q?=D0=B7=D0=B8=D0=BD=D0=B0=20=D0=B1=D0=B5=D0=B7=20=D1=81=D1=81?= =?UTF-8?q?=D1=8B=D0=BB=D0=BA=D0=B8=20=D0=BD=D0=B0=20ru/kk/en?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- src/components/BookWhere.tsx | 6 +++--- src/components/book-where.test.ts | 2 ++ src/i18n/en.ts | 1 + src/i18n/kk.ts | 1 + src/i18n/ru.ts | 1 + src/i18n/types.ts | 2 +- 6 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/BookWhere.tsx b/src/components/BookWhere.tsx index 9483850..25cf0dd 100644 --- a/src/components/BookWhere.tsx +++ b/src/components/BookWhere.tsx @@ -2,9 +2,9 @@ import React from 'react' import type { Dict } from '@/i18n' import { bookShopLinks } from '@/lib/book-links' -function Shop({ name }: { name: string }) { +function Shop({ name, hint }: { name: string; hint?: string }) { const href = bookShopLinks[name] - if (!href) return <>{name} + if (!href) return <>{name}{hint ? — {hint} : null} return {name} } @@ -20,7 +20,7 @@ export function BookWhere({ t }: { t: Dict['book']; tbc?: string }) {

{buy.storesIntro}

{buy.note}

diff --git a/src/components/book-where.test.ts b/src/components/book-where.test.ts index bfe5126..4ac7046 100644 --- a/src/components/book-where.test.ts +++ b/src/components/book-where.test.ts @@ -18,6 +18,7 @@ describe('Сценарий: где купить книгу', () => { expect(html).toContain('href="https://www.flip.kz/catalog?prod=6364653') expect(html).toContain('href="https://erudit.kz/"') expect(html).toContain('Книжный мир') + expect(html).toContain('Ссылки на магазин нет') expect(html).toContain('

Наличие и стоимость книги уточняйте непосредственно у продавцов.

') }) it.each(['kk', 'en'] as const)('язык %s: те же магазины, без пометок', (l) => { @@ -26,6 +27,7 @@ describe('Сценарий: где купить книгу', () => { expect(html).toContain('href="https://www.flip.kz/catalog?prod=6364653') expect(html).toContain('Эрудит') expect(html).toContain('Книжный мир') + expect(html).toContain(getDict(l).book.buy!.noLink) expect(html).not.toContain(getDict(l).tbc) }) }) diff --git a/src/i18n/en.ts b/src/i18n/en.ts index 33c188c..de6901d 100644 --- a/src/i18n/en.ts +++ b/src/i18n/en.ts @@ -91,6 +91,7 @@ export const en: Dict = { "platforms": ["Marwin", "Flip.kz"], "storesIntro": "It is also sold in the bookshops:", "stores": ["Эрудит", "Книжный мир"], + "noLink": "No store link yet: you can order the book on Marwin or Flip.kz, or ask the store about availability.", "note": "Please check availability and price directly with the sellers." }, "cover": "Cover", diff --git a/src/i18n/kk.ts b/src/i18n/kk.ts index e75e635..779a3c5 100644 --- a/src/i18n/kk.ts +++ b/src/i18n/kk.ts @@ -91,6 +91,7 @@ export const kk: Dict = { "platforms": ["Marwin", "Flip.kz"], "storesIntro": "Сондай-ақ кітап дүкендерінен:", "stores": ["Эрудит", "Книжный мир"], + "noLink": "Дүкеннің сілтемесі жоқ: кітапты Marwin немесе Flip.kz арқылы тапсыруға болады не дүкеннен бар-жоғын нақтылаңыз.", "note": "Кітаптың бар-жоғы мен бағасын сатушылардан тікелей нақтылаңыз." }, "cover": "Мұқаба", diff --git a/src/i18n/ru.ts b/src/i18n/ru.ts index 2fbd2b1..8286be6 100644 --- a/src/i18n/ru.ts +++ b/src/i18n/ru.ts @@ -91,6 +91,7 @@ export const ru: Dict = { "platforms": ["Marwin", "Flip.kz"], "storesIntro": "А также в книжных магазинах:", "stores": ["Эрудит", "Книжный мир"], + "noLink": "Ссылки на магазин нет: книгу можно заказать на Marwin или Flip.kz либо уточнить наличие в самом магазине.", "note": "Наличие и стоимость книги уточняйте непосредственно у продавцов." }, "cover": "Обложка", diff --git a/src/i18n/types.ts b/src/i18n/types.ts index 1e599f9..21dcdc5 100644 --- a/src/i18n/types.ts +++ b/src/i18n/types.ts @@ -13,7 +13,7 @@ export type Dict = { mission: { title: string; text: string; missing: string } directions: { title: string; items: { title: string; text: string }[] } projects: { title: string; more: string } - book: { title: string; author: string; paragraphs: string[]; get: string; getNote: string; buy: { intro: string; platforms: string[]; storesIntro: string; stores: string[]; note: string } | null; cover: string; photo: string; photoClose: string; photoPrev: string; photoNext: string; role: string; translationReview: string; gallery: string; additions: string[] } + book: { title: string; author: string; paragraphs: string[]; get: string; getNote: string; buy: { intro: string; platforms: string[]; storesIntro: string; stores: string[]; noLink: string; note: string } | null; cover: string; photo: string; photoClose: string; photoPrev: string; photoNext: string; role: string; translationReview: string; gallery: string; additions: string[] } news: { title: string; news: string; event: string } collaboration: { title: string; text: string; write: string; instagram: string } contacts: { title: string; description: string; lead: string; emailLabel: string; phoneLabel: string; addressLabel: string; socialsLabel: string } -- 2.45.2 From f737d769931d441b9abfe4efb27c96b283668660 Mon Sep 17 00:00:00 2001 From: Peppa Date: Fri, 20 Nov 2026 15:40:05 +0500 Subject: [PATCH 2/3] =?UTF-8?q?QLFW-67:=20=D0=BC=D0=B5=D0=BD=D1=8C=D1=88?= =?UTF-8?q?=D0=B5=20=D0=BF=D0=B0=D0=BC=D1=8F=D1=82=D0=B8=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B5=20(=D1=80=D0=B0?= =?UTF-8?q?=D0=BD=D0=BD=D0=B5=D1=80=20=D1=83=D0=B1=D0=B8=D0=B2=D0=B0=D0=BB?= =?UTF-8?q?=20build,=20=D0=BA=D0=BE=D0=B4=20137)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- next.config.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/next.config.mjs b/next.config.mjs index 7474899..ffd16ba 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -3,6 +3,8 @@ import { withPayload } from '@payloadcms/next/withPayload' /** @type {import('next').NextConfig} */ const nextConfig = { poweredByHeader: false, + // Сборка на слабом раннере упиралась в память (код 137): меньше потоков и экономия памяти webpack. + experimental: { webpackMemoryOptimizations: true, cpus: 1, workerThreads: false }, async redirects() { return [{ source: '/', destination: '/ru', permanent: false }] }, -- 2.45.2 From ee1cd8c28faa6318aea78e89505cdc897eef992d Mon Sep 17 00:00:00 2001 From: Peppa Date: Fri, 20 Nov 2026 17:35:27 +0500 Subject: [PATCH 3/3] =?UTF-8?q?QLFW-67:=20=C2=AB=D0=AD=D1=80=D1=83=D0=B4?= =?UTF-8?q?=D0=B8=D1=82=C2=BB=20=D0=B8=20=C2=AB=D0=9A=D0=BD=D0=B8=D0=B6?= =?UTF-8?q?=D0=BD=D1=8B=D0=B9=20=D0=BC=D0=B8=D1=80=C2=BB=20=E2=80=94=20?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D1=81=D1=82=D0=BE=20=D1=82=D0=B5=D0=BA=D1=81?= =?UTF-8?q?=D1=82=20=D0=B2=20=D1=81=D1=82=D0=BE=D0=BB=D0=B1=D0=B8=D0=BA,?= =?UTF-8?q?=20=D0=B1=D0=B5=D0=B7=20=D1=81=D1=81=D1=8B=D0=BB=D0=BE=D0=BA=20?= =?UTF-8?q?=D0=B8=20=D0=BF=D0=BE=D1=8F=D1=81=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- src/components/BookWhere.tsx | 6 +++--- src/components/book-where.test.ts | 11 +++++------ src/i18n/en.ts | 1 - src/i18n/kk.ts | 1 - src/i18n/ru.ts | 1 - src/i18n/types.ts | 2 +- src/lib/book-links.ts | 4 +--- 7 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/components/BookWhere.tsx b/src/components/BookWhere.tsx index 25cf0dd..b96f74a 100644 --- a/src/components/BookWhere.tsx +++ b/src/components/BookWhere.tsx @@ -2,9 +2,9 @@ import React from 'react' import type { Dict } from '@/i18n' import { bookShopLinks } from '@/lib/book-links' -function Shop({ name, hint }: { name: string; hint?: string }) { +function Shop({ name }: { name: string }) { const href = bookShopLinks[name] - if (!href) return <>{name}{hint ? — {hint} : null} + if (!href) return <>{name} return {name} } @@ -20,7 +20,7 @@ export function BookWhere({ t }: { t: Dict['book']; tbc?: string }) {

{buy.storesIntro}

    - {buy.stores.map((p) =>
  • )} + {buy.stores.map((p) =>
  • {p}
  • )}

{buy.note}

diff --git a/src/components/book-where.test.ts b/src/components/book-where.test.ts index 4ac7046..308816d 100644 --- a/src/components/book-where.test.ts +++ b/src/components/book-where.test.ts @@ -16,18 +16,17 @@ describe('Сценарий: где купить книгу', () => { expect(html).toContain('можно приобрести онлайн на платформах:') expect(html).toContain('href="https://www.marwin.kz/product/serkebaeva-i-ermek-serkebaev-i-zhizn-i-molodost-i-schaste-220988"') expect(html).toContain('href="https://www.flip.kz/catalog?prod=6364653') - expect(html).toContain('href="https://erudit.kz/"') - expect(html).toContain('Книжный мир') - expect(html).toContain('Ссылки на магазин нет') + expect(html).toContain('
  • Эрудит
  • ') + expect(html).toContain('
  • Книжный мир
  • ') + expect(html).not.toContain('erudit.kz') expect(html).toContain('

    Наличие и стоимость книги уточняйте непосредственно у продавцов.

    ') }) it.each(['kk', 'en'] as const)('язык %s: те же магазины, без пометок', (l) => { const html = render(l) expect(html).toContain('href="https://www.marwin.kz/product/serkebaeva-i-ermek-serkebaev-i-zhizn-i-molodost-i-schaste-220988"') expect(html).toContain('href="https://www.flip.kz/catalog?prod=6364653') - expect(html).toContain('Эрудит') - expect(html).toContain('Книжный мир') - expect(html).toContain(getDict(l).book.buy!.noLink) + expect(html).toContain('
  • Эрудит
  • ') + expect(html).toContain('
  • Книжный мир
  • ') expect(html).not.toContain(getDict(l).tbc) }) }) diff --git a/src/i18n/en.ts b/src/i18n/en.ts index de6901d..33c188c 100644 --- a/src/i18n/en.ts +++ b/src/i18n/en.ts @@ -91,7 +91,6 @@ export const en: Dict = { "platforms": ["Marwin", "Flip.kz"], "storesIntro": "It is also sold in the bookshops:", "stores": ["Эрудит", "Книжный мир"], - "noLink": "No store link yet: you can order the book on Marwin or Flip.kz, or ask the store about availability.", "note": "Please check availability and price directly with the sellers." }, "cover": "Cover", diff --git a/src/i18n/kk.ts b/src/i18n/kk.ts index 779a3c5..e75e635 100644 --- a/src/i18n/kk.ts +++ b/src/i18n/kk.ts @@ -91,7 +91,6 @@ export const kk: Dict = { "platforms": ["Marwin", "Flip.kz"], "storesIntro": "Сондай-ақ кітап дүкендерінен:", "stores": ["Эрудит", "Книжный мир"], - "noLink": "Дүкеннің сілтемесі жоқ: кітапты Marwin немесе Flip.kz арқылы тапсыруға болады не дүкеннен бар-жоғын нақтылаңыз.", "note": "Кітаптың бар-жоғы мен бағасын сатушылардан тікелей нақтылаңыз." }, "cover": "Мұқаба", diff --git a/src/i18n/ru.ts b/src/i18n/ru.ts index 8286be6..2fbd2b1 100644 --- a/src/i18n/ru.ts +++ b/src/i18n/ru.ts @@ -91,7 +91,6 @@ export const ru: Dict = { "platforms": ["Marwin", "Flip.kz"], "storesIntro": "А также в книжных магазинах:", "stores": ["Эрудит", "Книжный мир"], - "noLink": "Ссылки на магазин нет: книгу можно заказать на Marwin или Flip.kz либо уточнить наличие в самом магазине.", "note": "Наличие и стоимость книги уточняйте непосредственно у продавцов." }, "cover": "Обложка", diff --git a/src/i18n/types.ts b/src/i18n/types.ts index 21dcdc5..1e599f9 100644 --- a/src/i18n/types.ts +++ b/src/i18n/types.ts @@ -13,7 +13,7 @@ export type Dict = { mission: { title: string; text: string; missing: string } directions: { title: string; items: { title: string; text: string }[] } projects: { title: string; more: string } - book: { title: string; author: string; paragraphs: string[]; get: string; getNote: string; buy: { intro: string; platforms: string[]; storesIntro: string; stores: string[]; noLink: string; note: string } | null; cover: string; photo: string; photoClose: string; photoPrev: string; photoNext: string; role: string; translationReview: string; gallery: string; additions: string[] } + book: { title: string; author: string; paragraphs: string[]; get: string; getNote: string; buy: { intro: string; platforms: string[]; storesIntro: string; stores: string[]; note: string } | null; cover: string; photo: string; photoClose: string; photoPrev: string; photoNext: string; role: string; translationReview: string; gallery: string; additions: string[] } news: { title: string; news: string; event: string } collaboration: { title: string; text: string; write: string; instagram: string } contacts: { title: string; description: string; lead: string; emailLabel: string; phoneLabel: string; addressLabel: string; socialsLabel: string } diff --git a/src/lib/book-links.ts b/src/lib/book-links.ts index 55d511e..28fec62 100644 --- a/src/lib/book-links.ts +++ b/src/lib/book-links.ts @@ -1,9 +1,7 @@ import { bookUrl } from './home-model' -/** Адреса магазинов, где продаётся книга. Ключ — название на экране. */ +/** Адреса онлайн-площадок, где продаётся книга. Книжные магазины («Эрудит», «Книжный мир») — только текст, без ссылок (решение PM, QLFW-67). Ключ — название на экране. */ export const bookShopLinks: Record = { Marwin: 'https://www.marwin.kz/product/serkebaeva-i-ermek-serkebaev-i-zhizn-i-molodost-i-schaste-220988', 'Flip.kz': bookUrl, - 'Эрудит': 'https://erudit.kz/', - 'Книжный мир': null, // адрес не подтверждён — показываем без ссылки } -- 2.45.2