chore(release): promote development to master #258

Merged
developer merged 18 commits from development into master 2026-07-13 22:22:00 +00:00
Showing only changes of commit 25b5ed5516 - Show all commits
+15 -3
View File
@@ -177,8 +177,18 @@ export function renderLegalHtml(doc: { ru: LegalDoc; en: LegalDoc; canonical: st
var langBtn = document.getElementById('legal-lang');
var themeBtn = document.getElementById('legal-theme');
// Offer only: the price list is spliced in Russian, so transliterate the Cyrillic that
// survives in the English body (the product names) to keep it in-language.
// Offer only: the price list is spliced in Russian. Its section headings and column headers
// are translated to English (PRICE_TR — the exact strings the backend projects); the product
// names fall through to transliteration.
var PRICE_TR = {
'Приобретение внутриигровой валюты «Фишка»:': 'Purchase of the «Chip» in-game currency:',
'Использование внутриигровой валюты «Фишка»:': 'Use of the «Chip» in-game currency:',
'Наименование': 'Item',
'Рубли': 'Roubles',
'Голоса в VK': 'VK Votes',
'Stars в Telegram': 'Telegram Stars',
'«Фишки»': '«Chips»'
};
function translit(s) {
var m = { 'а':'a','б':'b','в':'v','г':'g','д':'d','е':'e','ё':'e','ж':'zh','з':'z','и':'i',
'й':'y','к':'k','л':'l','м':'m','н':'n','о':'o','п':'p','р':'r','с':'s','т':'t','у':'u',
@@ -193,8 +203,10 @@ export function renderLegalHtml(doc: { ru: LegalDoc; en: LegalDoc; canonical: st
function translitEn() {
var en = document.querySelector('main[data-lang="en"]');
if (!en || !document.createTreeWalker) return;
var w = document.createTreeWalker(en, NodeFilter.SHOW_TEXT, null, false), n;
var w = document.createTreeWalker(en, NodeFilter.SHOW_TEXT, null, false), n, tr;
while ((n = w.nextNode())) {
tr = PRICE_TR[n.nodeValue];
if (typeof tr === 'string') { n.nodeValue = tr; continue; }
if (/[а-яё]/i.test(n.nodeValue)) n.nodeValue = translit(n.nodeValue);
}
}