Полностью поддерживает английский язык

This commit is contained in:
AidarKC
2026-11-10 14:02:34 +03:00
parent 405b9a91a7
commit 9c30b33b39
71 changed files with 2658 additions and 1445 deletions
@@ -1,3 +1,4 @@
import { t } from '../i18n/index.js';
import { renderUserAvatar } from '../components/avatar-image.js';
// Minimal public preview sidebar, shown only to visitors without a session.
export function mountPublicChannelSidebar(screen, { owner = '', channel = '', subscribers = null, avatar = null, navigate }) {
@@ -11,17 +12,17 @@ export function mountPublicChannelSidebar(screen, { owner = '', channel = '', su
face.replaceChildren(renderUserAvatar({ login: owner || 'unknown', size: 'sm' }));
const details = document.createElement('div');
const author = document.createElement('strong');
author.textContent = owner || 'Автор';
author.textContent = owner || t('remaining.public_channel.author');
details.append(author);
identity.append(face, details);
const name = document.createElement('h2');
name.textContent = channel || 'Канал';
name.textContent = channel || t('remaining.public_channel.channel');
const count = document.createElement('p');
count.textContent = subscribers == null ? '' : `${Math.max(0, Number(subscribers) || 0)} подписчиков`;
count.textContent = subscribers == null ? '' : t('remaining.public_channel.subscribers', { count: Math.max(0, Number(subscribers) || 0) });
const button = document.createElement('button');
button.type = 'button';
button.className = 'primary-btn';
button.textContent = 'Открыть в SHiNE';
button.textContent = t('remaining.public_channel.open_in_shine');
button.addEventListener('click', () => {
window.sessionStorage.setItem('shine-public-return-path', window.location.pathname);
navigate('login-view');