feat(web): rewrite site copy in plain language and split i18n dictionaries

Move RU/EN strings to src/i18n/{ru,en}.ts, add og/meta tags that follow the
selected language, remove the long dash from all text, add copy guidelines and
tests for key parity, HTML fallback text and dash-free sources and bundle.
This commit is contained in:
Loki 2026-10-24 16:55:05 +02:00
parent 0d80ca9433
commit d3a6dd316b
Signed by: boba
GPG key ID: 253067914055423B
11 changed files with 397 additions and 295 deletions

View file

@ -287,7 +287,15 @@ function setLanguage(next: Language) {
}
document.documentElement.lang = next;
document.title = t(accountPage ? "accountTitle" : "title");
const pageTitle = t(accountPage ? "accountTitle" : "title");
find<HTMLMetaElement>('meta[name="description"]').content = t("description");
find<HTMLMetaElement>('meta[property="og:title"]').content = pageTitle;
find<HTMLMetaElement>('meta[property="og:description"]').content =
t("description");
find<HTMLMetaElement>('meta[property="og:locale"]').content =
next === "ru" ? "ru_RU" : "en_US";
find<HTMLMetaElement>('meta[property="og:locale:alternate"]').content =
next === "ru" ? "en_US" : "ru_RU";
document
.querySelectorAll<HTMLElement>("[data-i18n]")
.forEach(