feat(legal): bilingual (RU + EN) legal pages with a language + theme switcher
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 10s
CI / integration (pull_request) Successful in 21s
CI / ui (pull_request) Successful in 1m14s
CI / conformance (pull_request) Successful in 10s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m48s
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 10s
CI / integration (pull_request) Successful in 21s
CI / ui (pull_request) Successful in 1m14s
CI / conformance (pull_request) Successful in 10s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m48s
Add English versions of the privacy policy, EULA and offer (ui/legal/*_en.md) and render each legal page as one self-contained bilingual document: both language bodies plus a header language toggle and theme toggle (no back), a small inline ES5 script that switches language client-side (no reload, default Russian + persisted) and applies the theme (system default + persisted override) — mirroring the landing. The offer's English view transliterates the Russian product names spliced from the live catalog. renderLegalHtml now takes both language sources; renderOffer splices the price list into both; the renderer bakes and reads the _en sources and pre-renders the static pages at boot. Also wrap the /offer/ contour probe in the same retry+timeout as the legal probe (the offer page is now bilingual and larger). Docs + renderer/ui tests updated.
This commit is contained in:
@@ -970,9 +970,11 @@ image option is not offered.
|
||||
The same sidecar also serves the **public legal pages** — the offer at `/offer/`, the privacy
|
||||
policy at `/privacy/` and the EULA at `/eula/` — the edge-exposed routes on it (caddy routes them
|
||||
here; its `/render` stays internal). All three reuse the shared `ui/src/lib/offer.ts`
|
||||
`renderLegalHtml` (one renderer, no drift) over their owner-edited `ui/legal/*_ru.md`, baked into
|
||||
the image. `/privacy/` and `/eula/` are static; the offer additionally splices in the **live price
|
||||
list** (§4.4): it
|
||||
`renderLegalHtml` (one renderer, no drift) over their owner-edited `ui/legal/*_{ru,en}.md` — each is
|
||||
**bilingual (RU + EN)** with a client-side language + theme switcher (default Russian, persisted;
|
||||
the offer's EN view transliterates the Russian product names) — baked into the image. `/privacy/`
|
||||
and `/eula/` are static; the offer additionally splices in the **live price list** (§4.4) into both
|
||||
languages: it
|
||||
fetches the two catalog tables as markdown from the backend's internal
|
||||
`/api/v1/internal/offer/pricing` at the `<#pricing_template#>` marker, then renders the page. The
|
||||
backend projects the tables from the active catalog through `payments.Money` (no float reaches the
|
||||
|
||||
+4
-3
@@ -33,9 +33,10 @@ pinned to the production origin, JSON-LD, the favicon set and `robots.txt`), whi
|
||||
shell is `noindex` — the landing is the only indexable page. The footer links to the three **legal
|
||||
documents** — the **user agreement** (`/eula/`), the **privacy policy** (`/privacy/`) and the
|
||||
**public offer** (`/offer/`) — and, beside them, **feedback** (the Telegram bot the documents name as
|
||||
the seller's contact). Each is rendered on demand from its `ui/legal/*_ru.md` source by the render
|
||||
sidecar; the offer additionally splices in its **price list** (§4.4) generated from the live product
|
||||
catalog, so the published prices always match what is currently on sale — no redeploy to update them.
|
||||
the seller's contact). Each is **bilingual (RU/EN)** with a language + theme switcher and is rendered
|
||||
from its `ui/legal/*_{ru,en}.md` sources by the render sidecar; the offer additionally splices in its
|
||||
**price list** (§4.4) generated from the live product catalog, so the published prices always match
|
||||
what is currently on sale — no redeploy to update them.
|
||||
|
||||
On the plain web the client is an **installable PWA**: a logged-out player sees an install
|
||||
call-to-action under the login form (and at the bottom of Settings) that installs the app to the
|
||||
|
||||
@@ -35,10 +35,10 @@ Open Graph, которую используют превью ссылок в Tel
|
||||
`noindex` — индексируется только посадочная страница. В подвале — ссылки на три **юридических
|
||||
документа** — **пользовательское соглашение** (`/eula/`), **политику конфиденциальности**
|
||||
(`/privacy/`) и **публичную оферту** (`/offer/`) — и рядом на **обратную связь** (тот самый
|
||||
Telegram-бот, который документы указывают как контакт Продавца). Каждый рендерится по запросу из
|
||||
своего исходника `ui/legal/*_ru.md` сайдкаром-рендерером; оферта дополнительно подставляет
|
||||
**перечень стоимости** (§4.4), формируемый из живого каталога товаров, поэтому опубликованные цены
|
||||
всегда совпадают с тем, что сейчас в продаже — без передеплоя.
|
||||
Telegram-бот, который документы указывают как контакт Продавца). Каждый — **двуязычный (RU/EN)** с
|
||||
переключателем языка и темы, рендерится из исходников `ui/legal/*_{ru,en}.md` сайдкаром-рендерером;
|
||||
оферта дополнительно подставляет **перечень стоимости** (§4.4), формируемый из живого каталога
|
||||
товаров, поэтому опубликованные цены всегда совпадают с тем, что сейчас в продаже — без передеплоя.
|
||||
|
||||
В обычном вебе клиент — **устанавливаемое PWA**: незалогиненный игрок видит призыв к установке
|
||||
под формой входа (и внизу «Настроек»), который в один тап ставит приложение на рабочий стол
|
||||
|
||||
Reference in New Issue
Block a user