Локализовать интерфейс SHiNE на русский и английский

This commit is contained in:
AidarKC
2026-11-09 16:45:21 +03:00
parent 526941eb33
commit 405b9a91a7
133 changed files with 12464 additions and 3296 deletions
+3 -2
View File
@@ -1,3 +1,4 @@
import { t } from '../../i18n/index.js';
// Карта связей на canvas: точки-люди, нити-связи, перетаскивание, масштаб и панорама.
//
// Почему canvas, а не DOM: прежний движок держал на каждого человека DOM-узел с PNG-«стеклом»,
@@ -47,7 +48,7 @@ const AURA_PERIOD_MS = 4200; // медленное «дыхание» аур
const AURA_FRAME_MS = 50; // для одной только ауры хватает ~20 кадров в секунду
const EDGE_WIDTH = { family: 2.4, close_friend: 2.4, friend: 1.6, contact: 1.1 };
const GROUP_ORDER = ['family', 'close_friend', 'friend', 'contact'];
const GROUP_CAPTION = { 0: 'Близкие', 1: 'Друзья', 2: 'Контакты' };
const GROUP_CAPTION = { get 0() { return t('screens.graph_canvas.text_002'); }, get 1() { return t('screens.graph_canvas.text_003'); }, get 2() { return t('screens.graph_canvas.text_004'); } };
const ISLAND_MODES = new Set(['companies', 'interests', 'cities']);
const HULL_PAD = 40; // подложка острова: от центра крайней точки до края
const MAX_LABEL_CHARS = 18;
@@ -551,7 +552,7 @@ export function computeLayout({ focusId, nodes, edges, fixed = new Map(), mode =
const radii = ringRadii(second.length, Math.max(outer, 100) + 96);
fillRings(second, radii, pos, stretch, prefs, focusId, 100);
if (guides?.kind === 'rings') {
guides.items.push({ key: 'fof', caption: 'Друзья друзей', count: second.length, from: radii[0], to: radii[radii.length - 1] });
guides.items.push({ key: 'fof', caption: t('screens.graph_canvas.text_001'), count: second.length, from: radii[0], to: radii[radii.length - 1] });
}
}