diff --git a/VERSION.properties b/VERSION.properties index cb26d38d..066b17d0 100644 --- a/VERSION.properties +++ b/VERSION.properties @@ -1,2 +1,2 @@ -client.version=1.20.26 +client.version=1.20.27 server.version=1.16.19 diff --git a/docs/UI-Design/I18N.md b/docs/UI-Design/I18N.md index d1cc7575..0e3060b1 100644 --- a/docs/UI-Design/I18N.md +++ b/docs/UI-Design/I18N.md @@ -1,8 +1,10 @@ -# Локализация SHiNE — этап 1 (09.11.2026) +# Локализация SHiNE (текущее состояние MVP, 10.11.2026) ## Назначение -Первый этап вводит инфраструктуру локализации без массового перевода экранов. UI остаётся на vanilla JavaScript. В этом этапе переведены только элементы выбора языка и подпись текущего языка в настройках; другие экраны, уведомления и серверные сообщения по-прежнему преимущественно русские. Полнота английского перевода **не заявляется**. +SHiNE использует глобальный язык и JSON-словари. Архитектура и основные переводы RU/EN уже созданы; по ключам `ru.json` и `en.json` синхронизированы. Пользовательские подписи страниц, компонентов, полей профиля, тем, звонков и сервисных уведомлений теперь также вынесены в словари. Остаются технические исключения (журналы, названия городов, протокольные маркеры, резервные сообщения начальной загрузки до `initI18n()`); английский словарь прошёл редакторский проход: исправлены грубые машинные переводы, терминология и разметка встроенных HTML-фрагментов. Окончательная проверка всех редких состояний требует запуска приложения в браузере. Исторические заметки по этапам 1–5 ниже описывают развитие, а не текущие ограничения. + +С 10 ноября в основной PWA добавлен общий форматтер дат, времени, чисел и относительных дат. Диагностика PWA и меню канала больше не принимают решения по переводимым словам. ## Структура и контракты @@ -26,9 +28,24 @@ Название пункта выбора языка **всегда** содержит английское `Language` после косой черты: `Язык / Language`, `Language / Language`; для новых языков также нужно добавить `language.menu` с локальной частью и `/ Language`. -## Следующие этапы +## Правила сопровождения (актуальны для MVP) -Последовательно переводить разделы интерфейса, заменяя строковые литералы на `t('namespace.key')`, и дополнять оба словаря; не переносить сообщения пользователей или контрактные идентификаторы API/блокчейна в локализацию. При добавлении языка требуется запись в `languages.json`, его `locales/{code}.json` и полный перевод существующих ключей. Желательно добавить автоматическую проверку равенства ключей при расширении словарей. +- Новый пользовательский текст — одновременно в `locales/ru.json` и `locales/en.json`, вызов через `t()` или `th()` для HTML (не для пользовательского HTML). Параметры `{name}`, `{amount}` должны совпадать. Для новых ключей использовать осмысленные имена, не `text_###`. +- Долгоживущие массивы описаний полей и палитр создаются до `initI18n()`: их `label`/`placeholder` должны вычисляться через `get label()` / `get placeholder()` или соответствующие функции **в момент отображения**, а не через один `t()` при импорте модуля. Сырой технический id палитры, поля и статус транзакции остаются неизменными. +- Для ошибок сервисов сохраняйте технический код и исходный текст для журнала. В пользовательском интерфейсе используйте `toUserMessage()`: неизвестные русскоязычные технические ошибки в режиме English показываются нейтральным переводимым сообщением. +- Списки языков — в `languages.json`. Выбранный язык один на все профили. Стартовый выбор из браузера, при неизвестном — `en`. +- `js/i18n/format.js`: `formatDate(value, options?)`, `formatTime(value, options?)`, `formatDateTime(value, options?)`, `formatNumber(value, options?)`, `formatRelative(value, unit, options?)`. Локаль берётся из выбранного языка и совпадающего браузерного региона при его наличии. Резервные локали: `ru-RU`, **`en-US`**. Для английских дат при `en-US` по умолчанию используется европейский порядок (в реализации `en-GB` для отображения даты), время 24-часовое; часовой пояс и точные значения не меняются. Отдельной настройки региона нет. +- Вычислять форматированную строку **при отображении**, не хранить её как долгоживущую техническую константу. Для именования, сортировки и группировки использовать стабильный идентификатор (например, `YYYY-MM`), а не локализованную подпись месяца. +- Управление программой — по кодам: `menuItem.id`, `manifestCode`, `swCode`, `installCode`, `subscriptionCode` и т. п., **никогда не по `item.label` / `t(...)` / `textContent`**. Переводы остаются только для вывода. Для старых локально сохранённых текстовых статусов допустима однократная нормализация в код при чтении (например, legacy push статусы). +- В файлах транзакций, ответах API, ключах, адресах и пользовательских сообщениях язык не меняется. Отображение сумм может локализоваться, но парсинг ввода суммы и вычисления — нет. Дополнительный линтер для поиска русских строк пока не вводится. +- После редакторской вычитки английского словаря проверять его в реальных экранах на обрезку надписей, правильность контекста и редкие сценарии. Технические логи, данные и протокольные значения не следует механически переводить как UI. +- Если значение JSON содержит HTML-разметку, **сохранить все теги, вложенность, CSS-классы, `data-*` и остальные атрибуты из RU-оригинала**. Переводить только отображаемые пользователю текстовые узлы. Потеря закрывающего тега или изменение класса в словаре способно сломать UI на одном языке. Для английского использовать единые обозначения: Wallet, Sign in, Appearance, Notifications, Feed, Shining member, Turbo credits, blockchain snapshot. + +Проверки: `node --test shine-UI/tests/*.test.mjs`, `node --check` для изменённых JS, `python3 scripts/check_docs.py`. + +## История этапов 1–5 + +Последующие разделы документируют прошлые шаги. Фразы «английский не готов» относятся к соответствующему **прошлому** этапу, не к текущему состоянию. Проверка инфраструктуры: `node --test shine-UI/tests/i18n-architecture.test.mjs` из корня репозитория. diff --git a/shine-UI/AGENTS.md b/shine-UI/AGENTS.md index 81cb4e5f..d2f57d45 100644 --- a/shine-UI/AGENTS.md +++ b/shine-UI/AGENTS.md @@ -1286,18 +1286,27 @@ feature layout/states ## Локализация UI (обязательно для нового пользовательского текста) -- Перед правкой пользовательских диалогов прочитать `docs/UI-Design/I18N.md`. +- Перед правкой любых пользовательских надписей или дат прочитать `docs/UI-Design/I18N.md`. - Никакие новые видимые человеку строки в `confirmDialog`, `openAuthRequiredModal`, `window.alert/confirm/prompt` и общих модальных компонентах не прописывать напрямую. Добавлять ключ в `shine-UI/js/i18n/locales/ru.json`, использовать `import { t } from '../i18n/index.js'` (путь зависит от расположения файла) и `t('dialogs..')`. - Для динамических значений использовать именованные переменные: `t('dialogs.wallet.send_amount', { amount })`, а в словаре — `{amount}`. Никогда не интерполировать недоверенный HTML в `innerHTML`; при необходимости экранировать его. - Ключи должны быть стабильными: не переименовывать без одновременной правки всех вызовов и словарей. Старые `title_001` и подобные ключи этапа 2 считаются действующими, но новые ключи следует называть по смыслу. -- `ru.json` — базовый русский текст (источник строк). Пока английский перевод диалогов не готов, отсутствие ключа в `en.json` должно приводить к русскому тексту, **не** к показу имени ключа. Системный язык и выбор English при этом сохраняются как на этапе 1. +- `ru.json` — базовый текст, `en.json` — английский. **Каждый новый пользовательский ключ добавлять сразу в оба файла** (включая ошибки, `title`, `aria-label`, `placeholder`, кнопки, сообщения сервисов). Английский словарь прошёл редакторскую вычитку основных пользовательских сообщений; при сбое загрузки работает fallback. Новые строки переводить естественным английским, а не дословной машинной калькой. - После добавления английского перевода конкретного ключа он автоматически используется при выбранном English. Новые языки регистрируются в `languages.json` и соответствующем `locales/.json`. - Смена языка не должна менять данные профилей, пользовательские сообщения, контракты API и формат блокчейна. Не изменять архитектуру рендера: `app.js` остаётся единственным владельцем экранов. - Проверки: `node --test shine-UI/tests/i18n-architecture.test.mjs shine-UI/tests/i18n-dialogs.test.mjs`, синтаксис JS и `python3 scripts/check_docs.py`. +### Форматирование и язык-независимая логика (MVP, 10.11.2026) + +- Единственный источник выбранного языка — `js/i18n/index.js` (`getLanguage()`, `setLanguage()`). Язык общий для всех профилей. Не создавать ещё одну настройку языка/региона. +- Для отображения **дат, времени, чисел и относительных дат** использовать `js/i18n/format.js`: `formatDate`, `formatTime`, `formatDateTime`, `formatNumber`, `formatRelative`. Не фиксировать `ru-RU` или `en-US` в компонентах. Форматтер узнаёт язык при вызове, поэтому не сохранять готовый `Intl.DateTimeFormat` на верхнем уровне модуля. +- Для английского, если в браузере нет подходящего региона, базовая локаль `en-US`; пользовательские даты — европейский порядок день–месяц–год, время — 24 часа; часовой пояс браузера. Никакой дополнительной региональной настройки в MVP. +- **Никогда не сравнивать отображаемую строку (`label`, `title`, `t(...)`, `textContent`) для управления логикой.** Меню — по `id`, статусы — по стабильным кодам (`found`, `missing`, `registered`), подписи — через словари. При сериализации технических данных сохранять существующие протокольные форматы. +- При изменениях ключей поддерживать одинаковые ключи и параметры в `ru.json` и `en.json`. Пользовательские тексты из API и личных сообщений не переводить автоматически. Отдельный новый сканер строк для MVP не внедрён. +- Редакторский проход английского словаря выполнен. Для новых UI-текстов используйте единообразную терминологию: Wallet, Sign in, Appearance, Notifications, Feed, Shining member, Turbo credits, blockchain snapshot. Редкие состояния всё равно требуют ручной проверки в браузере. + ### Нестандартные модальные окна — этап 3 -Для HTML-шаблонов модальных окон (`modal-card`, `role="dialog"`, `openSheet`) все новые видимые русские строки хранить в `js/i18n/locales/ru.json` в группе `dialogs.modals..`, а в JavaScript использовать `t()`. Отдельные `aria-label`, `placeholder`, заголовки и кнопки тоже локализовать. Сохранять HTML-разметку, escape пользовательского контента и динамические параметры. Не встраивать в перевод технические константы, API-значения и тексты сообщений пользователей. Переводы для английского добавлять в `en.json` при соответствующем этапе, до этого русский fallback предусмотрен архитектурой. Подробности: `docs/UI-Design/I18N.md`. +Для HTML-шаблонов модальных окон (`modal-card`, `role="dialog"`, `openSheet`) все новые видимые русские строки хранить в `js/i18n/locales/ru.json` в группе `dialogs.modals..`, а в JavaScript использовать `t()`. Отдельные `aria-label`, `placeholder`, заголовки и кнопки тоже локализовать. Сохранять HTML-разметку, escape пользовательского контента и динамические параметры. Не встраивать в перевод технические константы, API-значения и тексты сообщений пользователей. Переводы для английского добавлять сразу вместе с ключом в `ru.json`; fallback предусмотрен только для сбоев и старых данных. Подробности: `docs/UI-Design/I18N.md`. ### Локализация диалогов — проверка после этапа 4 @@ -1306,4 +1315,11 @@ feature layout/states - **Не вызывать `t()` на верхнем уровне модуля** при создании констант отображаемого текста: словари загружаются асинхронно, а язык можно переключить позже. Собирать данные окна во время открытия (`function steps() { return [...] }`). - Для динамических сообщений один ключ с `{variable}`. Перед передачей в HTML экранировать недоверенные имена/данные; при текстовом DOM использовать `textContent`. - Проверять, что `${t('...')}` находится внутри обратных кавычек (template literal), а не одинарной/двойной строки. +- Если в JSON-переводе есть встроенный HTML, сохранять структуру тегов, CSS-классы, `data-*` и все остальные атрибуты побуквенно как в русском оригинале. Переводить только видимый текст. Не превращать `...` в повреждённый HTML. - При правках локализации обновлять оба словаря и запускать `node --test shine-UI/tests/*.test.mjs`, `node --check` для изменённого JS и `python3 scripts/check_docs.py` из корня репозитория. Проверка `i18n-completeness.test.mjs` требует одинаковых ключей и параметров. Русский fallback сохраняется для повреждённого или недоступного английского словаря. + +## Замечание для локализации (10.11.2026) + +- Не вычислять `t()` при объявлении глобальной константы, если её текст зависит от текущего языка. Для экспортируемых `PALETTE_ROLES`, `PALETTE_PRESETS`, `profileFieldDefs` и других списков использовать ленивые геттеры `get label()` / `get placeholder()` либо вычисление при отрисовке. +- Все новые видимые строки (в том числе `aria-label`, сообщения звонков и подписи HTML-шаблонов) добавлять сразу в **оба** словаря. Для HTML-шаблонов использовать `th()`, если нужен экранированный текст. +- Не менять строки API, содержимое блокчейна, внутренние коды ошибок, сообщения пользователя и маркеры совместимости ради локализации. Сервисные ошибки переводить на границе UI; скрывать неизвестные технические фразы в английском интерфейсе вместо демонстрации русского текста. diff --git a/shine-UI/js/app.js b/shine-UI/js/app.js index 3812846f..66dfea55 100644 --- a/shine-UI/js/app.js +++ b/shine-UI/js/app.js @@ -1,4 +1,4 @@ -import { initI18n, onLanguageChange } from './i18n/index.js'; +import { initI18n, onLanguageChange, t } from './i18n/index.js'; import { navigate, getRoute, @@ -342,7 +342,7 @@ setClientErrorSentNotifier((payload) => { if (!isDeveloperToolsEnabled()) return; const login = String(state.session.login || 'guest').trim(); const isoTs = new Date(Number(payload?.clientTs || Date.now())).toISOString(); - showToast(`Ошибка отправлена на сервер · ${login} · ${isoTs}`); + showToast(t('remaining.app.error_sent_to_server_login_time', { login, time: isoTs })); }); window.__SHINE_SEND_CLIENT_ERROR_TO_SERVER__ = (payload) => authService.reportClientError(payload); window.__SHINE_SEND_CLIENT_ERROR__ = window.__SHINE_SEND_CLIENT_ERROR_TO_SERVER__; @@ -734,7 +734,7 @@ async function tryLockPortraitOrientation() { } async function notifyHiddenIncomingMessage(fromLogin, toLogin, unreadCount, messageKey, notificationVersionMs) { - const title = `Сообщение от ${fromLogin}`; + const title = t('remaining.app.message_from_login', { login: fromLogin }); const body = dmUnreadLabel(unreadCount); try { const registration = await navigator.serviceWorker?.getRegistration?.(); @@ -781,7 +781,7 @@ function ensureConnectionRetryBannerEl() { const el = document.createElement('div'); el.id = 'connection-retry-banner'; el.className = 'connection-retry-banner is-connecting'; - el.textContent = 'Соединяюсь…'; + el.textContent = t('remaining.app.connecting'); el.addEventListener('click', () => { void triggerImmediateConnectionRetry(); }); @@ -835,17 +835,17 @@ function refreshConnectionUi() { } if (state === 'connecting') { - bannerEl.textContent = 'Соединяюсь… Нажмите, чтобы попробовать сразу'; + bannerEl.textContent = t('remaining.app.connecting_tap_to_retry_now'); return; } if (state === 'disconnected') { const secs = getConnectionRetrySecondsLeft(); - bannerEl.textContent = `Нет соединения. Повтор через ${secs}с. Нажмите для попытки сейчас`; + bannerEl.textContent = t('remaining.app.disconnected_retrying_in_secs_s_tap_to_retry_now', { secs }); return; } - bannerEl.textContent = 'Проблема с соединением. Нажмите для повтора'; + bannerEl.textContent = t('remaining.app.connection_problem_tap_to_retry'); } function finishInitialConnectionSplash() { @@ -870,7 +870,7 @@ function startConnectionCountdown() { const secs = getConnectionRetrySecondsLeft(); if (secs <= 0 && !connectionCheckInFlight) { connectionStatusText = ''; - setConnectionStatus('connecting', 'Соединяюсь…'); + setConnectionStatus('connecting', t('remaining.app.connecting')); void checkConnectionHealth(); return; } @@ -970,15 +970,15 @@ async function ensurePushTargetProfile(payload = {}, { action = '' } = {}) { const currentLogin = String(state.session.login || '').trim(); if (!targetLogin || targetLogin.toLowerCase() === currentLogin.toLowerCase()) return true; if (!savedProfileExists(targetLogin)) { - showToast(`Уведомление пришло профилю ${targetLogin}, который не сохранён на этом устройстве.`, { kind: 'info' }); + showToast(t('remaining.app.a_notification_was_sent_to_profile_login_which_is_not_sav', { login: targetLogin }), { kind: 'info' }); return false; } const kind = String(payload?.kind || '').trim(); const question = kind === 'incoming_call' - ? `Входящий звонок для профиля «${targetLogin}». Переключиться на этот профиль?` - : `Это сообщение пришло профилю «${targetLogin}». Переключиться, чтобы открыть его?`; - const confirmed = await confirmDialog({ title: 'Переключить профиль?', text: question, confirmLabel: 'Переключить' }); + ? t('remaining.app.incoming_call_for_profile_login_switch_to_this_profile', { login: targetLogin }) + : t('remaining.app.this_message_was_sent_to_profile_login_switch_profiles_to', { login: targetLogin }); + const confirmed = await confirmDialog({ title: t('remaining.app.switch_profile'), text: question, confirmLabel: t('remaining.app.switch') }); if (!confirmed) return false; try { @@ -991,7 +991,7 @@ async function ensurePushTargetProfile(payload = {}, { action = '' } = {}) { } return false; } catch (error) { - showToast(toUserMessage(error, 'Не удалось переключить профиль.'), { kind: 'error' }); + showToast(toUserMessage(error, t('remaining.app.could_not_switch_profile')), { kind: 'error' }); return false; } } @@ -1059,7 +1059,7 @@ function setConnectionStatus(nextState, text = '') { async function triggerImmediateConnectionRetry() { if (connectionCheckInFlight) return; connectionNextRetryAtMs = Date.now() + CONNECTION_CHECK_INTERVAL_MS; - setConnectionStatus('connecting', 'Соединяюсь…'); + setConnectionStatus('connecting', t('remaining.app.connecting')); await checkConnectionHealth(); } @@ -1308,7 +1308,7 @@ async function ensureSessionAfterWsReconnect() { } catch (error) { if (isSessionInvalidError(error)) { await terminateCurrentSession({ - infoMessage: 'Ваша сессия устарела. Авторизируйтесь заново.', + infoMessage: t('remaining.app.your_session_has_expired_please_sign_in_again'), }); return false; } @@ -1329,7 +1329,7 @@ function showGlobalErrorAlert(title, details = {}) { const now = Date.now(); if (now - lastCrashNoticeAt < 30000) return; lastCrashNoticeAt = now; - showToast('Что-то пошло не так. Сведения об ошибке уже отправлены разработчикам – попробуйте ещё раз.', { kind: 'error' }); + showToast(t('remaining.app.something_went_wrong_error_details_were_sent_to_the_devel'), { kind: 'error' }); return; } const lines = [title]; @@ -1435,16 +1435,16 @@ function renderPageFailureFallback(pageId, error) { card.className = 'card stack channels-status'; const title = document.createElement('strong'); - title.textContent = 'Не удалось отрисовать экран'; + title.textContent = t('remaining.app.could_not_display_this_screen'); const details = document.createElement('p'); details.className = 'meta-muted'; - details.textContent = `Экран: ${pageId || 'неизвестно'}. Попробуйте повторить.`; + details.textContent = t('remaining.app.screen_render', { page: pageId || t('remaining.app.unknown') }); const retry = document.createElement('button'); retry.type = 'button'; retry.className = 'primary-btn'; - retry.textContent = 'Повторить'; + retry.textContent = t('remaining.app.retry'); retry.addEventListener('click', () => renderApp()); card.append(title, details, retry); @@ -1613,7 +1613,7 @@ async function tryAutoLogin() { return; } await terminateCurrentSession({ - infoMessage: 'Сессия на этом устройстве уже завершена. Выполните вход заново.', + infoMessage: t('remaining.app.this_session_has_ended_on_this_device_please_sign_in_agai'), }); } } @@ -1741,7 +1741,7 @@ async function init() { localStorage.setItem('shine-ui-last-push-at-v1', String(now)); localStorage.setItem('shine-ui-last-push-payload-v1', JSON.stringify(payload || {})); if (kind === 'test_push') { - localStorage.setItem('shine-ui-last-test-push-status-v1', 'доставлен'); + localStorage.setItem('shine-ui-last-test-push-status-v1', 'delivered'); localStorage.setItem('shine-ui-last-test-push-at-v1', String(now)); } } catch { diff --git a/shine-UI/js/components/arweave-attachment-manager.js b/shine-UI/js/components/arweave-attachment-manager.js index 2570f0d7..fbffaaa1 100644 --- a/shine-UI/js/components/arweave-attachment-manager.js +++ b/shine-UI/js/components/arweave-attachment-manager.js @@ -1,3 +1,4 @@ +import { formatDateTime, formatNumber } from '../i18n/format.js'; import { t, th } from '../i18n/index.js'; import { buildArweaveDataUrl, @@ -113,13 +114,13 @@ export function formatArweaveHistoryTime(ms) { const minutes = Math.max(1, Math.floor(diffMs / 60000)); return t('screens.arweave_attachment_manager.text_065', { value1: minutes }); } - return new Date(value).toLocaleString('ru-RU'); + return formatDateTime(new Date(value)); } export function formatArweaveHistoryDateTime(ms) { const value = Number(ms || 0); if (!Number.isFinite(value) || value <= 0) return '–'; - return new Date(value).toLocaleString('ru-RU'); + return formatDateTime(new Date(value)); } export async function getArweaveAttachmentAvailability({ gateway, attachment } = {}) { @@ -357,7 +358,7 @@ export function openArweaveAttachmentManager({ return; } button.textContent = balanceInfo - ? t('screens.arweave_attachment_manager.text_067', { value1: Number(balanceInfo.ar || 0).toLocaleString('ru-RU', { maximumFractionDigits: 6 }) }) + ? t('screens.arweave_attachment_manager.text_067', { value1: formatNumber(Number(balanceInfo.ar || 0), { maximumFractionDigits: 6 }) }) : t('screens.arweave_attachment_manager.text_015'); }; @@ -372,14 +373,14 @@ export function openArweaveAttachmentManager({ const fileSize = formatBytes(selectedFile.size); const isFreeSize = Number(selectedFile.size || 0) <= getFreeTurboUploadBytesLimit(); mainMetaEl.innerHTML = ` -
Размер ${escapeHtml(fileSize)} · ${isFreeSize +
${th('remaining.file_upload.size')}${escapeHtml(fileSize)} · ${isFreeSize ? t('screens.arweave_attachment_manager.text_016') : (uploadPrice ? t('screens.arweave_attachment_manager.text_068', { value1: escapeHtml(uploadPrice) }) : t('screens.arweave_attachment_manager.text_017'))}
${th('screens.arweave_attachment_manager.text_070')}
SHA-256: ${escapeHtml(selectedSha256 || '–')}
- ${uploadPrice ? `
Цена Turbo: ${escapeHtml(uploadPrice)}
` : ''} -
Бесплатно до ${escapeHtml(formatBytes(getFreeTurboUploadBytesLimit()))}
+ ${uploadPrice ? `
${th('remaining.file_upload.turbo_price')}${escapeHtml(uploadPrice)}
` : ''} +
${th('remaining.file_upload.free_up_to')}${escapeHtml(formatBytes(getFreeTurboUploadBytesLimit()))}
`; }; @@ -477,7 +478,7 @@ export function openArweaveAttachmentManager({

${t('dialogs.modals.arweave_attachment_manager.label_010')}

${escapeHtml(wallet.address)}
-
${t('dialogs.modals.arweave_attachment_manager.label_011')}${escapeHtml(Number(balanceInfo?.ar || 0).toLocaleString('ru-RU', { maximumFractionDigits: 6 }))} AR
+
${t('dialogs.modals.arweave_attachment_manager.label_011')}${escapeHtml(formatNumber(Number(balanceInfo?.ar || 0), { maximumFractionDigits: 6 }))} AR
@@ -500,10 +501,10 @@ export function openArweaveAttachmentManager({ return; } mainMetaEl.innerHTML = ` - ${isAvatarMode ? '' : `
Имя: ${escapeHtml(selectedFile.name || 'file')}
`} -
Размер: ${escapeHtml(formatBytes(selectedFile.size || 0))}
+ ${isAvatarMode ? '' : `
${th('remaining.file_upload.name')}${escapeHtml(selectedFile.name || 'file')}
`} +
${th('remaining.file_upload.size_label')}${escapeHtml(formatBytes(selectedFile.size || 0))}
SHA-256: ${escapeHtml(selectedSha256 || '–')}
- ${priceInfo ? `
Цена: ${escapeHtml(Number(priceInfo.ar || 0).toLocaleString('ru-RU', { maximumFractionDigits: 6 }))} AR
` : ''} + ${priceInfo ? `
${th('remaining.file_upload.price')}${escapeHtml(formatNumber(Number(priceInfo.ar || 0), { maximumFractionDigits: 6 }))} AR
` : ''} `; }; @@ -847,7 +848,7 @@ export function openArweaveAttachmentManager({ purpose: isAvatarMode ? 'avatar' : 'attachment', }); metaEl.innerHTML = ` -
Размер: ${escapeHtml(formatBytes(item.size))}
+
${th('remaining.file_upload.size_label')}${escapeHtml(formatBytes(item.size))}
SHA-256: ${escapeHtml(item.sha256)}
`; setText(errorEl, ''); diff --git a/shine-UI/js/components/avatar-image.js b/shine-UI/js/components/avatar-image.js index c03225cb..c15271a4 100644 --- a/shine-UI/js/components/avatar-image.js +++ b/shine-UI/js/components/avatar-image.js @@ -36,7 +36,7 @@ export function renderAvatar({ size = 'xl', className = '', title = '', - alt = 'Аватар', + alt = t('remaining.avatar.avatar'), glow = false, official = false, authorLogin = '', diff --git a/shine-UI/js/components/channel-editor.js b/shine-UI/js/components/channel-editor.js index 033a5b22..c639e638 100644 --- a/shine-UI/js/components/channel-editor.js +++ b/shine-UI/js/components/channel-editor.js @@ -47,9 +47,9 @@ function attachmentLabel(item) { export function openChannelEditor({ id = 'channel-editor', - title = 'Ответ', - submitLabel = 'Ответить', - placeholder = 'Напишите ответ', + title = t('remaining.channel_editor.reply'), + submitLabel = t('remaining.channel_editor.reply_2'), + placeholder = t('remaining.channel_editor.write_a_reply'), context = null, destination = '', key = 'reply', diff --git a/shine-UI/js/components/confirm-dialog.js b/shine-UI/js/components/confirm-dialog.js index 8cb9b1bd..0dd3cb88 100644 --- a/shine-UI/js/components/confirm-dialog.js +++ b/shine-UI/js/components/confirm-dialog.js @@ -1,9 +1,10 @@ +import { t } from '../i18n/index.js'; // Возвращает Promise: true — подтвердили, false — отмена, Escape или тап мимо. export function confirmDialog({ - title = 'Подтвердите действие', + title = t('remaining.confirmation.confirm_action'), text = '', - confirmLabel = 'Да', - cancelLabel = 'Отмена', + confirmLabel = t('remaining.confirmation.yes'), + cancelLabel = t('remaining.confirmation.cancel'), danger = false, aboveEditor = false, rememberChoice = null, diff --git a/shine-UI/js/components/consent-steps.js b/shine-UI/js/components/consent-steps.js index 863b68d3..6c649816 100644 --- a/shine-UI/js/components/consent-steps.js +++ b/shine-UI/js/components/consent-steps.js @@ -3,7 +3,7 @@ import { openSheet } from './sheet.js'; // Пошаговое подтверждение перед публичной записью. Ни один шаг не выполняет сетевых запросов. // Текст задаёт вызывающий экран; запись начинается только после прохождения всех шагов. -export function confirmConsentSteps({ title = 'Подтверждение', steps = [] } = {}) { +export function confirmConsentSteps({ title = t('remaining.consent.confirmation'), steps = [] } = {}) { if (!steps.length) return Promise.resolve(false); return new Promise((resolve) => { let completed = false; diff --git a/shine-UI/js/components/feedback.js b/shine-UI/js/components/feedback.js index 5f35ff1a..7b24f005 100644 --- a/shine-UI/js/components/feedback.js +++ b/shine-UI/js/components/feedback.js @@ -4,7 +4,7 @@ import { t } from '../i18n/index.js'; // вовсе, и экран не мелькает. import { iconHtml } from './ui-icon.js'; -export function createSpinner({ size = 'md', label = 'Загрузка' } = {}) { +export function createSpinner({ size = 'md', label = t('remaining.feedback.loading') } = {}) { const el = document.createElement('span'); el.className = `spinner spinner--${size}`; el.setAttribute('role', 'status'); @@ -12,7 +12,7 @@ export function createSpinner({ size = 'md', label = 'Загрузка' } = {}) return el; } -export function createLoadingState({ label = 'Загрузка', delayMs = 350, className = '' } = {}) { +export function createLoadingState({ label = t('remaining.feedback.loading'), delayMs = 350, className = '' } = {}) { const el = document.createElement('div'); el.className = `loading-state${className ? ` ${className}` : ''}`; el.style.setProperty('--loading-delay', `${Math.max(0, Number(delayMs) || 0)}ms`); @@ -61,8 +61,8 @@ export function createStateMessage({ } export function createErrorState({ - title = 'Не удалось загрузить', - text = 'Проверьте соединение и попробуйте ещё раз.', + title = t('remaining.feedback.could_not_load'), + text = t('remaining.feedback.check_your_connection_and_try_again'), onRetry = null, className = '', } = {}) { diff --git a/shine-UI/js/components/profile-card.js b/shine-UI/js/components/profile-card.js index 84ed576b..e25a1436 100644 --- a/shine-UI/js/components/profile-card.js +++ b/shine-UI/js/components/profile-card.js @@ -22,7 +22,7 @@ function statusSideHtml({ kind, title, active, received, given, verb }) { return `
${esc(title)}
- >", - "text_030": "Download the file via Turbo...", - "text_031": "Upload the file to Arweave...", + "text_021": "Upload to history", + "text_022": "Upload", + "text_023": "

Select an image. It will be resized to 512×512 before upload.

", + "text_024": "Select from upload history", + "text_025": "From upload history", + "text_026": "Enter transaction ID", + "text_027": "Already on Arweave (transaction ID)", + "text_028": "", + "text_029": "", + "text_030": "Uploading file via Turbo…", + "text_031": "Uploading file to Arweave…", "text_032": "Avatar", - "text_033": "The file cannot be downloaded via Turbo.", - "text_034": "The file could not be uploaded to Arweave.", + "text_033": "Could not upload file via Turbo.", + "text_034": "Could not upload the file to Arweave.", "text_035": "Arweave's existing avatar", "text_036": "Existing Arweave file", "text_037": "Avatar", - "text_038": "Add to the journal", - "text_039": "Add to the communication", + "text_038": "Add to upload history", + "text_039": "Attach to message", "text_040": "avatar", - "text_041": "Not yet attached>", + "text_041": "Not attached yet", "text_042": "Already added ✓", - "text_043": "Choose.", - "text_044": "
>", + "text_043": "Choose", + "text_044": "
No files uploaded in this session yet.
", "text_045": "Select an image.", - "text_046": "I couldn't read the image.", + "text_046": "Could not read the image.", "text_047": "Could not open the image.", "text_048": "Incorrect image size.", "text_049": "Canvas is unavailable.", "text_050": "Failed to compress the avatar.", "text_051": "No active session.", - "text_052": "It was not possible to download Arweave wallets.", + "text_052": "Could not load Arweave wallets.", "text_053": "There is no blockchain key on the device.", - "text_054": "It was not possible to download the blockchain key for Turbo.", - "text_055": "We failed to get the Turbo balance.", + "text_054": "Could not load blockchain key for Turbo.", + "text_055": "Could not retrieve Turbo balance.", "text_056": "sent", - "text_057": "Couldn't replenish the Turbo.", + "text_057": "Could not add Turbo credits.", "text_058": "Choose an Arweave wallet.", "text_059": "The Turbo price has not been updated.", - "text_060": "It was not possible to check the Arweave balance.", + "text_060": "Could not check Arweave balance.", "text_061": "For an avatar, only an image can be selected.", - "text_062": "Couldn't get the file ready.", + "text_062": "Could not prepare file.", "text_063": "Could not verify the Arweave file.", - "text_064": "I couldn't add an Arweave wallet.", - "text_065": "{value1} Minutes ago", + "text_064": "Could not add an Arweave wallet.", + "text_065": "{value1} min ago", "text_066": "Turbo Balance: {value1}", "text_067": "Arweave balance: {value1} AR", "text_068": "Turbo price: {value1}", - "text_069": "Turbo's full. Tx: {value1}", + "text_069": "Turbo credits added. Tx: {value1}", "text_075": "Select a file", "text_076": "File not selected", "text_079": "Checking...", - "text_070": "Details.", + "text_070": "Details", "text_077": "File name in the message", - "text_078": "report.pdf.", - "text_071": "A more convenient way to upload files to Arweave through a third-party service. Usually cheaper than direct download. Files up to 100 KB are downloaded for free.", + "text_078": "e.g., report.pdf", + "text_071": "— a convenient way to upload files to Arweave through a third-party service. Usually cheaper than direct uploads. Files up to 100 KB can be uploaded for free.", "text_072": "Your Arweave wallet", - "text_073": "+ Add your wallet.", - "text_074": "Download directly to the Arweave network without Turbo. This is a more direct, but usually more complex and expensive way." + "text_073": "+ Add wallet", + "text_074": "Upload directly to the Arweave network without Turbo. This is more direct but usually more expensive and complex." }, "topbar": { "text_001": "Clear", @@ -1151,8 +1151,8 @@ "toolbar": { "text_001": "Personal", "text_002": "Channels", - "text_003": "Relationships", - "text_004": "Notices", + "text_003": "Connections", + "text_004": "Notifications", "text_005": "Profile", "text_006": "Need an account", "text_007": "Need an account", @@ -1163,9 +1163,9 @@ "text_012": "Unread private messages", "text_013": "Unread messages in the channels", "text_014": "New notifications", - "text_015": "To send private messages, log in or sign up.", - "text_016": "Log in or register to access your profile.", - "text_017": "Log in or sign up to receive notifications." + "text_015": "To send private messages, sign in or sign up.", + "text_016": "Sign in or register to access your profile.", + "text_017": "Sign in or sign up to receive notifications." }, "channel_editor": { "text_001": "Draft", @@ -1182,7 +1182,7 @@ "text_012": "File", "text_013": "Recording without text", "text_014": "A textless message", - "text_015": "Guest.", + "text_015": "Guest", "text_016": "Image:", "text_017": "{value1} · {value2}", "text_018": "{value1} · {value2} KB", @@ -1202,16 +1202,16 @@ }, "dm_mute_menu": { "text_001": "Unmute", - "text_002": "No sound", + "text_002": "Muted", "text_003": "Notifications included", "text_004": "Notifications from this chat are off", "text_005": "No sound {value1}", "text_006": "Notifications disabled by {value1}", - "text_011": "Forever.", - "text_007": "1 hour.", + "text_011": "Forever", + "text_007": "1 hour", "text_008": "8 o'clock", - "text_009": "One day.", - "text_010": "For a week." + "text_009": "One day", + "text_010": "For a week" }, "twemoji_travel_places": { "text_001": "Travel", @@ -1247,51 +1247,51 @@ "text_001": "Settings", "text_002": "Settings", "text_003": "End of current session requested", - "text_004": "Decoration", - "text_005": "Notices", + "text_004": "Appearance", + "text_005": "Notifications", "text_017": "About the app", - "text_006": "Sound, resolution, chat without sound", + "text_006": "Sounds, permissions, and muted chats", "text_007": "Application settings", - "text_008": "Confirmation of public records", + "text_008": "Confirmations for public records", "text_009": "Devices", - "text_010": "Sessions and device connectivity", - "text_011": "My blockchain.", - "text_012": "Record history, files and external device", + "text_010": "Sessions and device pairing", + "text_011": "My blockchain", + "text_012": "Record history, files, and external device", "text_013": "Server settings", "text_014": "Access Server and Blockchain Servers", "text_015": "Keys and passwords", "text_016": "Viewing keys and changing password", "text_018": "Developer settings", - "text_019": "Application tools and log", - "text_020": "Install the application", - "text_021": "Open SHiNE as a separate application", - "text_022": "motorcar", - "text_023": "Topic: {value1}{value2}", - "text_024": "• {value1} colors", + "text_019": "App tools and logs", + "text_020": "Install app", + "text_021": "Use SHiNE as a standalone app", + "text_022": "Auto", + "text_023": "Theme: {value1}{value2}", + "text_024": " · “{value1}” colors", "text_025": "Version {value1}", - "text_026": "motorcar", - "text_027": "bright", - "text_028": "dark", - "text_029": "Leave the account" + "text_026": "Auto", + "text_027": "Light", + "text_028": "Dark", + "text_029": "Sign out" }, "profile_edit_view": { "text_001": "Edit profile", "text_002": "Male", "text_003": "Female", - "text_004": "Unspecified", + "text_004": "Not specified", "text_005": "Edit profile", "text_006": "Please try again.", - "text_007": "Unable to upload profile", - "text_008": "We couldn't change the gender.", + "text_007": "Could not load profile", + "text_008": "We couldn't change the gender", "text_009": "Official", "text_010": "Informal", - "text_011": "Shining", + "text_011": "Shining member", "text_013": "Male", "text_014": "Female", - "text_015": "Unspecified", - "text_016": "Unspecified", - "text_019": "Not full.", - "text_012": "Not shining.", + "text_015": "Not specified", + "text_016": "Not specified", + "text_019": "Not full", + "text_012": "Not a Shining member", "text_017": "account status", "text_018": "radiance", "text_020": "Account: {value1}", @@ -1303,9 +1303,9 @@ "text_026": "Failed to change {value1} field", "text_027": "Failed to change gender. {value1}", "text_028": "Update", - "text_031": "Paul", + "text_031": "Gender", "text_029": "Account: Informal", - "text_030": "Shining: Not shining." + "text_030": "Shining: not a member" }, "device_pairing_view": { "text_001": "Connect another device", @@ -1316,11 +1316,11 @@ "text_006": "You can access the detailed settings on a separate screen.", "text_007": "Change login settings", "text_008": "There are currently no active tickets.", - "text_012": "We were unable to upload entry requests.", + "text_012": "Could not load sign-in requests.", "text_013": "Code connection is enabled with an additional password.", "text_010": "Additional password removed. The code connection now works without it.", "text_011": "The entry list has been updated.", - "text_014": "It was not possible to save an additional password.", + "text_014": "Could not save an additional password.", "text_015": "Application denied", "text_009": "Connection by code without additional password is enabled.", "text_018": "Could not prepare the pairing screen.", @@ -1340,7 +1340,7 @@ "text_030": "The extra password is set.", "text_031": "There is no full set of working keys on this device. Password login again.", "text_032": "There is no active saved session to restore pairing access.", - "text_034": "Reject.", + "text_034": "Reject", "text_035": "Connecting the device", "text_033": "Connect", "text_040": "What's transferred to the new device", @@ -1356,39 +1356,39 @@ "text_046": "Show password" }, "topup_view": { - "text_001": "Replenishment of solana account", + "text_001": "Fund Solana wallet", "text_002": "Checking your wallet...", "text_003": "Copy", "text_004": "Copied", "text_005": "Copy", "text_006": "Test enrollment top-up", "text_007": "How to top up via devnet faucet", - "text_008": "To replenish, copy the address of the blockchain wallet and use an external trusted Solana devnet faucet. The sender's private key must not be in a public app.", + "text_008": "To add funds, copy your blockchain wallet address and use a trusted external Solana Devnet faucet. Never share the sender’s private keys.", "text_009": "Continue registration", - "text_010": "Replenishment of solana account", + "text_010": "Fund Solana wallet", "text_011": "You could not copy the wallet number – select it and copy it manually.", "text_014": "Current Balance: {value1} SOL", - "text_012": "I failed to get a balance.", + "text_012": "Could not retrieve balance", "text_013": "The keys haven't been generated yet. Return to the registration screen.", - "text_018": "Open the test replenishment page", + "text_018": "Open test top-up page", "text_016": "Blockchain key = Solana wallet", - "text_017": "Or you can open the test replenishment page separately.", + "text_017": "Or open the test top-up page separately.", "text_015": "Refill your account through a trusted devnet faucet and continue to register." }, "communities": { - "text_001": "Without company", + "text_001": "Ungrouped", "text_002": "No Shared Subscriptions", "text_003": "Other cities", "text_004": "No city specified", - "text_012": "Unspecified", - "text_005": "Without company", - "text_006": "Without company", + "text_012": "Not specified", + "text_005": "Ungrouped", + "text_006": "Ungrouped", "text_007": "No Shared Subscriptions", "text_009": "Other cities", "text_010": "Other cities", "text_011": "No city specified", "text_013": "{value1} et al.", - "text_008": "No subscriptions." + "text_008": "No subscriptions" }, "graph_canvas": { "text_001": "Friends of friends", @@ -1409,35 +1409,35 @@ "text_030": "K", "text_007": "Failed to copy the link", "text_008": "Channel marked as remote", - "text_011": "Unknown.", + "text_011": "Unknown", "text_012": "subscriber", "text_015": "subscriber", "text_009": "Couldn't remove the channel.", "text_010": "Check the connection to the server and try again.", "text_013": "subscriber", "text_014": "subscriber", - "text_019": "You unsubscribed from the channel.", + "text_019": "You unsubscribed from the channel", "text_020": "Subscription to the channel completed", "text_021": "Couldn't unsubscribe from the channel.", "text_022": "Couldn't subscribe to the channel.", - "text_023": "Canal owner", - "text_024": "It was not possible to identify the channel from the page address.", + "text_023": "Channel owner", + "text_024": "Could not identify the channel from the page address.", "text_028": "You have to come in for this action.", "text_025": "The owner of the channel has not been found.", - "text_027": "
Download channel data
>", - "text_031": "
Download channel data
>", - "text_016": "You're signed.", - "text_018": "
Channel removed by owner. The story remains accessible.
>", + "text_027": "
Loading channel data…
", + "text_031": "
Loading channel data…
", + "text_016": "You're signed", + "text_018": "
The owner deleted this channel. Its history is still available.
", "text_032": "Description", - "text_034": "Reference", + "text_034": "Link", "text_037": "Support the author", "text_038": "Delete channel", "text_041": "Retry", - "text_035": "Open.", + "text_035": "Open", "text_036": "Change the profile", "text_033": "Created", "text_039": "The channel will remain on the blockchain, but will be marked as deleted. A new publication will restore it.", - "text_040": "Couldn't download channel data." + "text_040": "Couldn't load channel data." }, "messages_list": { "text_001": "Private Messages", @@ -1455,7 +1455,7 @@ "text_013": "Session is outdated", "text_014": "Your session is no longer valid. Please log in again.", "text_015": "OK", - "text_016": "Failed to load chats", + "text_016": "Could not load chats", "text_023": "Close", "text_024": "Friends", "text_022": "All", @@ -1470,19 +1470,19 @@ "text_027": "chat", "text_020": "contact", "text_021": "non-contact", - "text_028": "Hold off", - "text_029": "Secure", + "text_028": "Unpin", + "text_029": "Pin", "text_035": "Profile {value1}", "text_036": "Start correspondence · {value1}", "text_030": "Write to a friend or find someone by name.", "text_032": "Your session is outdated. Re-enter.", "text_037": "No correspondence · {value1}", - "text_038": "No sound", - "text_039": "Fixed." + "text_038": "Muted", + "text_039": "Fixed" }, "register_view": { - "text_001": "Registration", - "text_002": "Registration in SHiNE", + "text_001": "Sign up", + "text_002": "Sign up for SHiNE", "text_003": "Your username", "text_004": "For example, Alice", "text_005": "The case is saved: Alice and alice are considered the same username when checked, but the selected spelling will always be displayed.", @@ -1498,16 +1498,16 @@ "text_027": "Your password has changed, please click 'Continue' again.", "text_018": "There's no namespace available yet.", "text_019": "In a free account, password change is not available. After switching to a full account, it will be possible to change it.", - "text_016": "Come up with a password", - "text_017": "On your device, cryptographic access keys are created from the login and password. Private keys are not stored on the server.", - "text_022": "Login's changed. Press \"Continue\" again.", + "text_016": "Create a password", + "text_017": "On your device, cryptographic access keys are created from the username and password. Private keys are not stored on the server.", + "text_022": "Your username changed. Press “Continue” again.", "text_023": "That login's already taken. Try another one.", "text_015": "This name will remain forever and will be displayed exactly as you choose now. You can't change it later.", "text_020": "For a full account, a password change is supported: the necessary encrypted messages are re-encrypted on your device, not on the server.", - "text_021": "VashLogin", + "text_021": "YourUsername", "text_026": "Login check error.", - "text_028": "Failed to create the keys.", - "text_033": "Unable to upload namespaces: {value1}", + "text_028": "Could not generate keys.", + "text_033": "Could not load namespaces: {value1}", "text_024": "The type of registration has changed. Go back to your account selection.", "text_025": "The registration currency is not yet supported.", "text_029": "The server has not yet provided namespace for the selected type of registration.", @@ -1518,54 +1518,54 @@ "text_037": "Don't lose your password!", "text_038": "We cannot recover it or your keys. If access to keys on all devices is lost, encrypted personal correspondence may not be available.", "text_035": "Any non-empty password will do. For reliability, it is better to choose your long phrase or random code. Do not use known quotes or obvious sequences.", - "text_036": "On a familiar device, you usually do not have to enter a password every time you log in: work keys are stored locally. To sign in from a new device, the password is your backup access method.", + "text_036": "On a familiar device, you usually do not have to enter a password every time you sign in: work keys are stored locally. To sign in from a new device, the password is your backup access method.", "text_039": "Warning: The wallet is already full. Changing your login or password will create a different wallet! The funds will remain at the old address, and the old password will be required to access them. Continue?" }, "network_view": { - "text_001": "Relationships", - "text_002": "Close", - "text_003": "Shining", + "text_001": "Connections", + "text_002": "Close friends", + "text_003": "Shining members", "text_004": "Profile", "text_005": "Message", "text_006": "Profile", "text_007": "Message", - "text_008": "Relationships", + "text_008": "Connections", "text_009": "Find a user", "text_010": "Find a user", - "text_011": "Relationships", + "text_011": "Connections", "text_012": "All", - "text_013": "Close", + "text_013": "Close friends", "text_014": "Friends", - "text_015": "Shining", - "text_016": "Uploading links", - "text_017": "Failed to load links", - "text_018": "Uploading links", + "text_015": "Shining members", + "text_016": "Loading connections…", + "text_017": "Could not load connections", + "text_018": "Loading connections…", "text_019": "No one was found", - "text_020": "My Connections", + "text_020": "My connections", "text_021": "Custom layout", "text_022": "Show full map", "text_023": "Delete your layout", "text_024": "How to read the map", "text_025": "Find a person", "text_026": "Find a person", - "text_027": "Relationships", + "text_027": "Connections", "text_028": "Go to profile", "text_029": "To my connections", "text_030": "To my connections", "text_031": "Retry", "text_032": "Cancel", - "text_033": "Without company", - "text_034": "Without company", - "text_035": "New company…", + "text_033": "Ungrouped", + "text_034": "Ungrouped", + "text_035": "New group…", "text_036": "Cancel", - "text_037": "Redo", + "text_037": "Undo", "text_038": "Friends of friends", - "text_039": "Reading the channel", + "text_039": "Channel readers", "text_040": "Select channel", - "text_041": "Reading the channel", + "text_041": "Channel readers", "text_042": "Profile", "text_043": "Show on map", - "text_044": "His connections", + "text_044": "Their connections", "text_045": "Message", "text_046": "More", "text_047": "Friends of friends", @@ -1585,45 +1585,45 @@ "text_068": "They also read:", "text_069": "Channel", "text_072": "Channel", - "text_117": "Without company", + "text_117": "Ungrouped", "text_118": "No Shared Subscriptions", "text_119": "No city specified", "text_090": "To my connections", - "text_099": "Relationships", + "text_099": "Connections", "text_124": "Name", - "text_128": "Shining", + "text_128": "Shining members", "text_137": "Show full map", "text_140": "Show on map", "text_179": "Close friend", "text_180": "Friend", "text_057": "Check the connection and try again.", - "text_059": "Couldn't download the person's communications. Try it again.", - "text_060": "Downtown.", - "text_063": "Nearby.", - "text_064": "Companies", + "text_059": "Could not load this person’s connections. Try again.", + "text_060": "Downtown", + "text_063": "By connection type", + "text_064": "Groups", "text_065": "Interests", "text_071": "Reading:", - "text_074": "His layout removed.", - "text_081": "Town", + "text_074": "Your custom layout was deleted", + "text_081": "City", "text_082": "center", "text_097": "center", "text_079": "Company", "text_080": "Interest", - "text_089": "Find people.", + "text_089": "Find people", "text_091": "No one fits this filter right now.", "text_142": "No one fits this filter right now.", "text_094": "This guy doesn't have any friends on the map yet.", "text_095": "each other", "text_066": "Cities", - "text_070": "A list.", - "text_073": "A list.", - "text_138": "A list.", + "text_070": "List", + "text_073": "List", + "text_138": "List", "text_087": "Mark friends and acquaintances in their profiles – they will appear here, on the map and in the list.", "text_088": "When this person tags friends or acquaintances, they will appear here.", "text_096": "you", - "text_098": "Hide.", + "text_098": "Hide", "text_075": "Subscriptions recognized", - "text_076": "All over the network.", + "text_076": "All over the network", "text_100": "Close, friends, contacts", "text_101": "Who knows who?", "text_102": "Who reads what?", @@ -1631,14 +1631,14 @@ "text_104": "Drag someone on the map.", "text_105": "Order of the list", "text_107": "Order of the list", - "text_083": "I'll meet you.", - "text_084": "I'll get subscriptions.", + "text_083": "I'll meet you", + "text_084": "I'll get subscriptions", "text_114": "familiarity", "text_115": "subscription", - "text_085": "I will.", - "text_086": "Not yet.", - "text_092": "Show everyone.", - "text_143": "Show everyone.", + "text_085": "I will", + "text_086": "Not yet", + "text_092": "Show all", + "text_143": "Show all", "text_093": "As long as there are no friends, there is nothing to reveal.", "text_106": "Map settings", "text_108": "Map settings", @@ -1646,7 +1646,7 @@ "text_112": "None of your connections have listed the city in your profile yet.", "text_113": "None of this man's connections have yet identified the city.", "text_123": "Familiar with:", - "text_125": "Name it.", + "text_125": "Name it", "text_116": "township", "text_120": "I don't know any of your other connections.", "text_121": "Do not read the channels that read at least two of your connections.", @@ -1659,60 +1659,60 @@ "text_111": "There are no subscriptions yet: no channel is read by at least two people.", "text_129": "Shown - press to hide", "text_130": "Who's friends with your friends", - "text_135": "zoom in", - "text_136": "Far away", + "text_135": "Zoom in", + "text_136": "Zoom out", "text_133": "Highlight readers", "text_134": "Friends of friends are shown", - "text_144": "show off", - "text_146": "formal", + "text_144": "view their connections", + "text_146": "official", "text_126": "The layout has been replaced by this", "text_127": "Save as your own layout", - "text_139": "On the map.", + "text_139": "Map", "text_141": "Check your name or login.", "text_145": "Check your name or login.", - "text_147": "informal", - "text_148": "radiant", + "text_147": "unofficial", + "text_148": "Shining member", "text_155": "Connection", "text_157": "Connection", - "text_156": "linkage", - "text_158": "linkage", + "text_156": "connection", + "text_158": "connection", "text_153": "Show friends of friends.", "text_154": "Group", - "text_151": "The recent ones are off. Press the previous person on the map.", + "text_151": "Recent people are hidden. Tap to keep the previously viewed person on the map.", "text_152": "Friends of friends are shown. Press to hide.", - "text_149": "radiant", - "text_150": "\"Friends of Friends\" shows a separate map - recent ones are temporarily unused.", + "text_149": "Not a Shining member", + "text_150": "“Friends of friends” opens a separate map. Recently viewed people are temporarily hidden.", "text_163": "{value1} at {value2}", - "text_164": "The {value1} is also visible on the map (“In the center”).", - "text_161": "Couldn't download the links. {value1}", - "text_162": "Cannot download {value1} links from {value2} friends", - "text_167": "We were unable to identify {value1}. Check the connection.", + "text_164": "{value1} more — all are shown on their map (“Center”).", + "text_161": "Could not load connections. {value1}", + "text_162": "Cannot load {value1} links from {value2} friends", + "text_167": "Could not identify {value1}. Check the connection.", "text_168": "Moved to {value1}", "text_173": "Reading \"{value1}\"", - "text_174": "{value1} · Show your connections", + "text_174": "{value1} · view their connections", "text_181": "Family", "text_182": "Contact", "text_171": "Other filters {value1}", "text_172": "via {value1}", "text_177": "Recent · {value1}", - "text_178": "On the map are the last {value1} of the person you passed through. Press to change.", + "text_178": "The map keeps the last {value1} people whose connections you explored. Tap to change this setting.", "text_175": "Map · {value1}", - "text_176": "Friends of Friends failed to download {value1} links from {value2} friends{value3}", - "text_165": "Links · {value1}", + "text_176": "Friends of friends: could not load connections for {value1} of {value2} friends{value3}", + "text_165": "Connections · {value1}", "text_166": "{value1} {value2} {value3} is still in {value4}", "text_169": "Readers of the {value1} channel are highlighted. Other filters", "text_170": "{value1}. Other filters", "text_159": "{value1} · {value2} from {value3}", - "text_160": "The {value1} has no connections yet.", + "text_160": "{value1} has no connections yet", "text_184": "people", "text_196": "people", "text_197": "people", "text_208": "people", - "text_185": "radiant", - "text_210": "radiant", - "text_186": "Nearby.", + "text_185": "Shining member", + "text_210": "Shining member", + "text_186": "By connection type", "text_187": "Close, friends, contacts", - "text_188": "Companies", + "text_188": "Groups", "text_189": "Who knows who?", "text_190": "Interests", "text_191": "Who reads what?", @@ -1723,10 +1723,10 @@ "text_209": "answerless", "text_200": "reader", "text_201": "close", - "text_183": "human", - "text_195": "human", - "text_207": "human", - "text_194": "By name.", + "text_183": "people", + "text_195": "people", + "text_207": "people", + "text_194": "By name", "text_202": "close", "text_203": "close", "text_205": "friend", @@ -1747,8 +1747,8 @@ "text_013": "Blockchain Servers", "text_016": "Status untested", "text_017": "Available: {value1}", - "text_014": "It was not possible to save the settings of blockchain servers.", - "text_015": "Available.", + "text_014": "Could not save the settings of blockchain servers.", + "text_015": "Available", "text_018": "Current address: {value1}", "text_009": "How long to wait for a connection with the server before a call (MS)", "text_010": "Before calling, the application checks and, if necessary, restores the connection to the server. This is the waiting time for such a check before the \"Server is temporarily unavailable\" error.", @@ -1757,7 +1757,7 @@ }, "arweave_uploads_view": { "text_003": "Not yet attached to the post", - "text_004": "There are no files yet. Press \"+\" to download the file in advance and attach it to the record later.", + "text_004": "No files yet. Tap “+” to upload a file now and attach it to a post later.", "text_005": "Files on the blockchain", "text_006": "Add file", "text_007": "Add file", @@ -1766,26 +1766,26 @@ "text_010": "Add file", "text_011": "Clear history", "text_012": "Certificate", - "text_013": "Couldn't download the file.", - "text_001": "Downloading files", + "text_013": "Couldn't upload the file.", + "text_001": "File uploads", "text_002": "Checking...", "text_014": "Checking...", "text_015": "Unavailable" }, "appearance_view": { - "text_001": "Decoration", - "text_002": "Decoration", - "text_003": "Subject", + "text_001": "Appearance", + "text_002": "Appearance", + "text_003": "Theme", "text_004": "Colors", - "text_005": "bright", - "text_006": "dark", + "text_005": "Light", + "text_006": "Dark", "text_007": "It does not depend on the device settings.", "text_008": "Each color is separate, for a light and dark theme", - "text_011": "His edits on top of \"{value1}\"", - "text_009": "Tune colors manually>", + "text_011": "Your customizations of “{value1}”", + "text_009": "Customize colors", "text_010": "As in the device system: now {value1}.", "text_013": "Bright", - "text_014": "Dark.", + "text_014": "Dark", "text_012": "Automobile", "text_015": "Subject matter", "text_016": "Palitra" @@ -1799,13 +1799,13 @@ "text_006": "Ticket field cleared.", "text_007": "Ticket queue", "text_015": "Please enter your ticket number.", - "text_011": "paid", - "text_013": "paid", - "text_012": "expectation", - "text_014": "expectation", - "text_009": "Number three.", - "text_010": "First step.", - "text_020": "Failed to load the ticket", + "text_011": "Paid", + "text_013": "Paid", + "text_012": "Pending payout", + "text_014": "Pending payout", + "text_009": "Third queue", + "text_010": "First queue", + "text_020": "Could not load ticket", "text_021": "No {value1} ticket found.", "text_016": "Format: for the first stage just a number, for the second and third - for example 2/7 or 3/8.", "text_017": "No SOL/USD oracle account was found.", @@ -1813,11 +1813,11 @@ "text_019": "The oracle returned the wrong price.", "text_022": "Ticket {value1} found. SOURCE Solana: {value2}", "text_023": "Unable to view the ticket: {value1}", - "text_008": "Second stage.", + "text_008": "Second queue", "text_024": "SOURCE Solana: {value1}", "text_026": "Please enter your ticket number.", "text_031": "Please enter your ticket number.", - "text_028": "Drop it.", + "text_028": "Drop it", "text_025": "Public ticket queue", "text_030": "Use the current SHINE server network", "text_032": "Ticket number:", @@ -1838,8 +1838,8 @@ "text_042": "Already paid in line:" }, "notification_settings_view": { - "text_001": "Notices", - "text_002": "Notices", + "text_001": "Notifications", + "text_002": "Notifications", "text_003": "Messages", "text_004": "Allow", "text_005": "No. You can turn off the chat sound in its “• ••” menu or by long pressing in the chat list.", @@ -1868,31 +1868,31 @@ "text_020": "Checking...", "text_007": "Error on the RPC side", "text_008": "Free tier does not allow mainnet", - "text_013": "Check the lock.", - "text_014": "Drop it.", + "text_013": "Check the lock", + "text_014": "Drop it", "text_009": "Does not pass from the browser", - "text_010": "Answers, but doesn't fit.", + "text_010": "Responds but is incompatible", "text_005": "Access denied", - "text_006": "Rate-limited.", + "text_006": "Rate-limited", "text_024": "Noda responded without a suitable JSON-RPC result.", "text_025": "HTTP {value1} • {value2} ms", "text_004": "Requires a paid plan", "text_021": "Send JSON-RPC getVersion request", "text_022": "Waiting for an answer.", - "text_011": "Waiting for a check.", - "text_017": "Waiting for a check.", + "text_011": "Waiting for a check", + "text_017": "Waiting for a check", "text_012": "We haven't checked yet.", "text_018": "We haven't checked yet.", "text_015": "Until the checks started.", "text_016": "Until the checks started.", - "text_019": "Check out the Shine SolanaRpcGateway...", + "text_019": "Checking SHiNE SolanaRpcGateway…", "text_026": "Done. For the browser suitable: {value1}. With reservations: {value2}. Not suitable: {value3}.", - "text_027": "Check out SolanaRpcGateway", + "text_027": "Check SolanaRpcGateway", "text_028": "This screen checks the RPC gateway of the connected SHiNE server.\nThe RPC provider and network are defined by the SHiNE server." }, "add_personal_public_chat_view": { "text_003": "The session is invalid. Please login again.", - "text_004": "It was not possible to create a personal public chat.", + "text_004": "Could not create a personal public chat.", "text_005": "The description is too long: maximum 200 bytes of UTF-8.", "text_006": "Creating...", "text_007": "Create a chat room", @@ -1901,7 +1901,7 @@ "text_012": "A public chat with {value1} has been created.", "text_008": "Login: 1-20 characters, Latin/numbers/ .", "text_009": "A user with such a login was not found.", - "text_010": "It was not possible to determine the username.", + "text_010": "Could not determine the username.", "text_011": "{value1} / 200 bytes", "text_016": "Example: aidar", "text_021": "Cancel", @@ -1909,7 +1909,7 @@ "text_017": "Add a description to this public chat (optional)", "text_018": "Brief description", "text_014": "The channel type is fixed: personal (100).", - "text_015": "Enter the login of another user", + "text_015": "Enter the username of another user", "text_019": "0/200 bytes", "text_020": "Public chats can be viewed by any user, and messages are stored on the blockchain.\nFor personal private correspondence, use the tab “Personal messages”.", "text_013": "Creating a personal public chat" @@ -1925,7 +1925,7 @@ "text_003": "Update Solana's balance sheet", "text_004": "Enter a password to confirm the source keys", "text_005": "Update...", - "text_017": "Continue and replenish your wallet", + "text_017": "Continue and add funds", "text_018": "Solana registration fee", "text_026": "We get the cost of registration...", "text_027": "Password of a valid account", @@ -1939,7 +1939,7 @@ "text_021": "Wallet address", "text_025": "Devnet only. Test SOLs have no real value.", "text_030": "Check the PDA in Solana and update the status on the server.", - "text_031": "Check again.", + "text_031": "Check again", "text_036": "The PDA is based in Solana. We wait for the server to sync the account.", "text_037": "Cost of registration", "text_015": "You pay the price of your namespace once. The PDA deposit is already included, and only Solana network fees are paid separately.", @@ -1971,24 +1971,24 @@ "text_013": "After fixing in Solana, you will have your own PDA: you can change your password and keys yourself, as well as use compatible servers.", "text_014": "The login, namespace, three public keys, publications and history of Arweave will remain the same. Synchronization is required for the history to be available on another server.", "text_068": "Failed to prepare the transition: {value1}", - "text_058": "Test replenishment (+{value1} SOL)", + "text_058": "Test top-up (+{value1} SOL)", "text_059": "Your {value1} login and namespace have not changed. Registration is confirmed by PDA Solana. The old keys and history are preserved.", "text_060": "Unable to read the balance: {value1}", "text_061": "The server returned an unexpected status: {value1}.", - "text_066": "Not enough SOL. Replenish your wallet with {value1} SOL.", + "text_066": "Insufficient SOL. Add at least {value1} SOL to your wallet.", "text_067": "Registration not completed: {value1} Check your status before trying again.", "text_062": "Check not yet successful: {value1}", "text_063": "Transfer {value1} test SOL to devnet", - "text_064": "Test replenishment +{value1} SOL completed.", - "text_065": "Test replenishment is not available ({value1}). Use the external devnet faucet and update the balance.", + "text_064": "Test top-up complete: +{value1} SOL.", + "text_065": "Test top-up is unavailable ({value1}). Use an external Devnet faucet and refresh your balance.", "text_056": "The certificate does not contain the signature of the registrar", "text_057": "Your {value1} account is registered with a free Arweave certificate. The record is immutable and signed by the registrar server.", "text_069": "Solana wallet address" }, "registration_email_view": { - "text_025": "Registration in SHiNE", + "text_025": "Sign up for SHiNE", "text_001": "Email confirmation", - "text_004": "Your email.", + "text_004": "Your email", "text_005": "Send the code", "text_002": "Confirm the email", "text_003": "Email is only necessary to protect against mass creation of accounts. Only one email account can be registered.", @@ -2019,25 +2019,25 @@ "text_018": "We're sending a new code...", "text_026": "Sorry, this email domain is not supported yet. To protect SHiNE from massive and unfair registrations, we only allow registration from verified email services. Try another email, such as Gmail, Yandex, Mail.ru, Outlook or Proton Mail.", "text_027": "One free SHiNE account is already registered on this email. Registration from the same address is not possible.", - "text_034": "Email is not needed to log in or restore the password.", + "text_034": "Email is not needed to sign in or restore the password.", "text_035": "We do not use email for mailings and only save hash from the email address. One address – one free registration.", "text_036": "Registration is available with the addresses of authorized email services: for example, Gmail, Yandex, Mail.ru, Rambler, Yahoo, Outlook, iCloud or Proton Mail. The server checks the list." }, "login_view": { - "text_001": "Log in", + "text_001": "Sign in", "text_002": "Enter your username", "text_009": "Enter your username.", - "text_003": "Login.", - "text_004": "Password login", + "text_003": "Username", + "text_004": "Sign in with password", "text_007": "This SHiNE user is registered on another access server:", - "text_008": ". Go to his server to enter.", - "text_005": "Enter through another device", - "text_006": "Entrance", + "text_008": ". Open that server to sign in.", + "text_005": "Sign in using another device", + "text_006": "Sign in", "text_012": "The server returned an unknown login verification status.", - "text_013": "Couldn't check the login.", + "text_013": "Couldn't check the username.", "text_010": "A user with such a login is not registered in SHiNE.", - "text_011": "The user is registered in SHiNE, but no valid access server has been found for him.", - "text_014": "access server", + "text_011": "This user is registered on SHiNE, but no active access server could be found.", + "text_014": "another access server", "text_015": "Open the server" }, "contact_search_view": { @@ -2047,12 +2047,12 @@ "text_004": "Looking for", "text_005": "No one was found", "text_006": "New Chat", - "text_007": "Uploading links", + "text_007": "Loading connections…", "text_012": "No one was found", "text_016": "friend", "text_017": "friend", "text_018": "contact", - "text_008": "All over the network.", + "text_008": "All over the network", "text_011": "Check your name or login.", "text_010": "Family and friends", "text_013": "Who should I write?", @@ -2074,14 +2074,14 @@ "text_014": "Show me the key", "text_001": "The keys to this device", "text_002": "The keys to this device", - "text_003": "Downloading the keys.", + "text_003": "Downloading the keys", "text_009": "Access key", "text_010": "Server login, device operation and secure private messages", "text_015": "Both working keys are stored on the device. The recovery key is stored only as a public part in the account and is not stored privately on the device.", "text_016": "Part of the working keys are missing on the device. Password login again.", "text_018": "Recovery key", "text_019": "Account Management, Recovery and Critical Key Change", - "text_020": "Not stored on the device.", + "text_020": "Not stored on the device", "text_021": "Private Recovery key is created from a password only for the duration of protected operations and is not written to the device storage.", "text_022": "N/A" }, @@ -2090,7 +2090,7 @@ "text_005": "Unavailable", "text_007": "Check", "text_010": "Save", - "text_004": "Available.", + "text_004": "Available", "text_001": "Entry settings", "text_011": "Entry settings", "text_003": "Arweave server", @@ -2098,40 +2098,40 @@ "text_008": "Open local test mode", "text_013": "{value1}: {value2}. Check again.", "text_009": "Set up your server ", - "text_012": "The entrance settings were not saved." + "text_012": "Could not save sign-in settings." }, "notifications_view": { - "text_001": "Notices", + "text_001": "Notifications", "text_002": "Likes", - "text_006": "Notices", - "text_028": "Relationships", + "text_006": "Notifications", + "text_028": "Connections", "text_020": "Check the connection and try again.", "text_004": "Reposts", - "text_005": "Sending.", + "text_005": "Sending", "text_009": "Friendship in return", "text_011": "Friendship in return", "text_010": "Save...", - "text_003": "Answers.", - "text_027": "Answers.", - "text_007": "Read everything.", + "text_003": "Answers", + "text_027": "Answers", + "text_007": "Read everything", "text_008": "Mark all notifications read", "text_016": "Couldn't add friends.", - "text_017": "All notices read", - "text_018": "It was not possible to note the notices read.", + "text_017": "All notifications marked as read", + "text_018": "Could not mark notifications as read", "text_019": "The notifications could not be updated.", "text_014": "Previously", - "text_015": "You're friends now.", + "text_015": "You're friends now", "text_029": "Events", "text_030": "User", "text_012": "Downloading notifications", - "text_013": "Failed to upload notifications", + "text_013": "Could not load notifications", "text_031": "Answer without text", "text_032": "{value1}(a)", - "text_023": "No answers yet.", + "text_023": "No answers yet", "text_024": "Subscriptions and subscriptions from your channels will appear here.", "text_041": "{value1} Contacts You", "text_042": "{value1} from your channel", - "text_021": "Not yet.", + "text_021": "Not yet", "text_022": "No news yet on ties", "text_035": "{value1} is your friend.", "text_036": "{value1} is your friend.", @@ -2140,35 +2140,35 @@ "text_040": "{value1} Proof of Official Status", "text_033": "{value1} is your closest friend.", "text_034": "{value1} is a close friend of yours.", - "text_037": "{value1} that you are shining", - "text_038": "{value1} confirms \"shining\"", + "text_037": "{value1} that you are a Shining member", + "text_038": "{value1} Shining confirmation", "text_043": "{value1} to your channel", "text_044": "New: {value1}", "text_025": "When you are added as friends or confirmed status, it will appear here.", "text_026": "When someone responds to your message in a feed or discussion, the response will appear here.", - "text_046": "You're friends.", + "text_046": "You're friends", "text_048": "Added", "text_052": "Added", - "text_049": "Cleaned up.", - "text_053": "Cleaned up.", - "text_050": "Cleared.", - "text_054": "Cleared.", - "text_055": "Confirmed.", - "text_059": "Confirmed.", - "text_058": "Got it.", - "text_062": "Got it.", - "text_063": "Changed.", + "text_049": "Cleaned up", + "text_053": "Cleaned up", + "text_050": "Cleared", + "text_054": "Cleared", + "text_055": "Confirmed", + "text_059": "Confirmed", + "text_058": "Got it", + "text_062": "Got it", + "text_063": "Changed", "text_047": "Added", "text_051": "Added", - "text_064": "Changed.", - "text_065": "Subscribe.", - "text_068": "Signed.", - "text_069": "Signed.", - "text_056": "Confirmed.", - "text_060": "Confirmed.", - "text_057": "Got it.", - "text_061": "Got it.", - "text_066": "Subscribed.", + "text_064": "Changed", + "text_065": "Subscribe", + "text_068": "Signed", + "text_069": "Signed", + "text_056": "Confirmed", + "text_060": "Confirmed", + "text_057": "Got it", + "text_061": "Got it", + "text_066": "Subscribed", "text_067": "Subscribed.", "text_070": "Signed.", "text_071": "Category of notifications" @@ -2184,22 +2184,22 @@ "text_034": "friend", "text_006": "Check the connection and try again.", "text_033": "contact", - "text_010": "formal", + "text_010": "official", "text_014": "Check your name or login.", - "text_009": "radiant", + "text_009": "Shining member", "text_001": "List", "text_015": "List", - "text_004": "Downloading the list", - "text_005": "Unable to download the list", + "text_004": "Loading the list", + "text_005": "Could not load list", "text_012": "radiance confirmed", "text_013": "remotely", - "text_008": "Close friends.", + "text_008": "Close friends", "text_011": "confirmed", "text_016": "No one yet.", "text_019": "Confirmed account", "text_025": "No friends yet.", "text_026": "No close friends yet.", - "text_022": "Confirmed radiant", + "text_022": "Confirmed Shining", "text_024": "Channel subscriptions", "text_020": "Confirmed accounts", "text_021": "Confirmed the radiance", @@ -2215,76 +2215,76 @@ "text_039": "Who to show" }, "chat_view": { - "text_002": "No sound", + "text_002": "Muted", "text_015": "Search", "text_020": "Clear history", "text_023": "Go to date", "text_024": "Go to date", - "text_029": "Submit", - "text_030": "Stop and send voice", - "text_031": "Encrypting and sending voice", + "text_029": "Send", + "text_030": "Stop recording and send voice message", + "text_031": "Encrypting and sending voice message", "text_033": "Retry", "text_035": "Retry", "text_036": "File", "text_056": "Close friend", "text_057": "Friend", - "text_017": "Hold off", - "text_018": "Secure", + "text_017": "Unpin", + "text_018": "Pin", "text_058": "Contact", "text_069": "no", - "text_001": "chat", - "text_003": "Show connections", + "text_001": "Chat", + "text_003": "View connections", "text_004": "Show profile", - "text_005": "Read it.", - "text_006": "Sent.", - "text_007": "Not sent.", - "text_008": "Departing.", + "text_005": "Read", + "text_006": "Sent", + "text_007": "Not sent", + "text_008": "Sending…", "text_009": "Call", "text_010": "Call", "text_014": "Open the chat action menu", "text_016": "Media and files", - "text_022": "Search in correspondence", - "text_025": "Earlier.", - "text_026": "Previous coincidence", - "text_027": "Later.", + "text_022": "Search conversation", + "text_025": "Earlier", + "text_026": "Previous match", + "text_027": "Later", "text_011": "Video call", "text_012": "Video call", - "text_013": "Chat action", + "text_013": "Chat actions", "text_040": "Failed to copy the message.", - "text_041": "We were unable to reproduce the voice message.", - "text_034": "Encrypted data uploaded, but DM with keys not sent", - "text_037": "Could not download the DM history", - "text_051": "Voicemailed.", - "text_052": "No voice mail.", + "text_041": "Could not play voice message", + "text_034": "Encrypted data uploaded, but the key-sharing direct message was not sent.", + "text_037": "Could not load direct-message history", + "text_051": "Voicemailed", + "text_052": "No voice mail", "text_045": "Added to contacts", - "text_046": "Could not be added to the contacts", - "text_042": "I was unable to open a voice message.", - "text_043": "I was unable to open a voice message.", - "text_044": "Couldn't start the call.", - "text_038": "Failed to send proof of reading", - "text_039": "Message copied.", + "text_046": "Could not add to contacts", + "text_042": "Could not open voice message", + "text_043": "Could not open voice message", + "text_044": "Couldn't start the call", + "text_038": "Could not send read receipt", + "text_039": "Message copied", "text_053": "Failed to start recording", "text_054": "File transfer is disabled in additional settings.", - "text_019": "Add in contacts", + "text_019": "Add to contacts", "text_021": "Delete the chat", "text_063": "Subscriber busy", - "text_064": "Call denied.", - "text_059": "✔ Shining account", + "text_064": "Call denied", + "text_059": "✧ Shining account", "text_060": "Subscriber offline", - "text_061": "No answer.", + "text_061": "No answer", "text_062": "Failed to establish connection", - "text_065": "Call incomplete.", + "text_065": "Call incomplete", "text_066": "Message not delivered.", "text_070": "Change not saved", "text_071": "Message not sent", - "text_028": "Next coincidence.", - "text_032": "Hold on for voice recording.", - "text_076": "Files not sent.", - "text_077": "File sent.", - "text_078": "File sent.", - "text_079": "Failed to download the file", + "text_028": "Next match", + "text_032": "Hold to record a voice message", + "text_076": "Files not sent", + "text_077": "File sent", + "text_078": "File sent", + "text_079": "Failed to upload the file", "text_080": "Failed to upload files", - "text_075": "File not sent.", + "text_075": "File not sent", "text_083": "{value1} menu", "text_084": "Open the {value1} user menu", "text_072": "Error of editing a personal message", @@ -2292,8 +2292,8 @@ "text_085": "Files: {value1}", "text_097": "Files: {value1}", "text_086": "Duration: {value1}", - "text_067": "Chat's at the top of the list.", - "text_068": "Chat off.", + "text_067": "Chat's at the top of the list", + "text_068": "Chat off", "text_049": "This browser does not support recording voice messages.", "text_050": "Recording from the microphone interrupted", "text_081": "Not selected chat for forwarding", @@ -2310,7 +2310,7 @@ "text_103": "Files sent: {value1}", "text_101": "Select no more {value1} files per message.", "text_089": "{value1} from {value2}", - "text_090": "Encryption and download of {value1}%", + "text_090": "Encrypting and uploading: {value1}%", "text_105": "Read: {value1}", "text_047": "File and voice transfer is disabled in additional settings.", "text_048": "First, finish editing the message.", @@ -2322,39 +2322,39 @@ "text_106": "Reply", "text_107": "Forward", "text_109": "Edit", - "text_110": "Remove", + "text_110": "Delete", "text_117": "File", "text_118": "File", "text_119": "↑ swipe up to secure", "text_120": "Message", "text_123": "Record Voice Message", "text_124": "Record Voice Message", - "text_111": "Downloading history", + "text_111": "Loading history", "text_112": "Cancel editing", "text_113": "Photo or video", "text_114": "Photo or video", - "text_115": "Camera.", - "text_116": "Camera.", + "text_115": "Camera", + "text_116": "Camera", "text_121": "Emoji", "text_122": "Emoji", - "text_108": "Read it.", + "text_108": "Read it", "text_074": "🎙 Voice message" }, "channel_view": { "text_001": "Channel", - "text_005": "Table of Contents", + "text_005": "Table of contents", "text_015": "Action", "text_024": "Channel Avatar", "text_027": "Back to Channels", "text_031": "Reply", "text_035": "Edit", "text_036": "Edit", - "text_037": "Remove", - "text_038": "Revision History", - "text_041": "New Entry", - "text_042": "Table of Contents", + "text_037": "Delete", + "text_038": "Edit history", + "text_041": "New post", + "text_042": "Table of contents", "text_049": "Reply", - "text_050": "Submit", + "text_050": "Send", "text_051": "Repost", "text_066": "Link copied", "text_071": "Channel profile updated", @@ -2364,43 +2364,43 @@ "text_111": "K", "text_112": "K", "text_113": "K", - "text_053": "Failed to copy.", + "text_053": "Could not copy", "text_091": "deleted", - "text_099": "Remove Like", + "text_099": "Unlike", "text_106": "Edit", "text_107": "About the channel", "text_116": "author", "text_128": "author", "text_129": "No text", - "text_061": "You unsubscribed from the channel.", + "text_061": "You unsubscribed from the channel", "text_059": "Subscription to the channel completed", "text_062": "Couldn't unsubscribe from the channel.", "text_060": "Couldn't subscribe to the channel.", - "text_119": "It was not possible to identify the channel from the page address.", + "text_119": "Could not identify the channel from the page address.", "text_143": "Profile {value1}", "text_004": "Course", - "text_006": "Performed the exercise.", - "text_011": "Studying.", - "text_021": "Studying.", - "text_012": "Dropped it.", - "text_023": "Dropped it.", + "text_006": "Performed the exercise", + "text_011": "Studying", + "text_021": "Studying", + "text_012": "Stopped", + "text_023": "Stopped", "text_002": "Exercise", "text_003": "Service", - "text_016": "Completed.", - "text_017": "Learned.", - "text_009": "Interested.", - "text_019": "Interested.", - "text_010": "Begin.", - "text_020": "Begin.", - "text_013": "Completed.", - "text_022": "Completed.", - "text_014": "Confirmed.", - "text_018": "Passed.", + "text_016": "Completed", + "text_017": "Studied", + "text_009": "Interested", + "text_019": "Interested", + "text_010": "Started", + "text_020": "Started", + "text_013": "Completed", + "text_022": "Completed", + "text_014": "Confirmed", + "text_018": "Completed", "text_025": "Click to remove the attachment", - "text_007": "Learned the exercise.", - "text_008": "Procedure passed", - "text_026": "Couldn't load the channel.", - "text_028": "Discover the history of editing", + "text_007": "Learned the exercise", + "text_008": "Procedure completed", + "text_026": "Couldn't load the channel", + "text_028": "View edit history", "text_034": "Publication data", "text_039": "Channel action", "text_032": "Copy text", @@ -2412,16 +2412,16 @@ "text_052": "Text copied", "text_055": "Blockchain data", "text_056": "Couldn't delete the message.", - "text_044": "Subscribe from the channel", - "text_045": "Subscribe to the channel", - "text_029": "Discover the history of change", - "text_030": "Reference to a message in the tape", - "text_063": "Response sent", - "text_064": "Evaluation sent.", - "text_057": "There's no contents on this channel yet.", + "text_044": "Unsubscribe", + "text_045": "Subscribe", + "text_029": "View edit history", + "text_030": "Link to the post in the feed", + "text_063": "Reply sent", + "text_064": "Rating submitted", + "text_057": "No table of contents for this channel yet", "text_058": "Subscription completed, but could not save how many messages have already been read.", - "text_065": "Reprint published", - "text_067": "Reference transmitted", + "text_065": "Repost published", + "text_067": "Link shared", "text_046": "SHINE · Channels", "text_047": "API/WS error", "text_077": "Failed to record the action.", @@ -2429,30 +2429,30 @@ "text_083": "Exercise completed", "text_084": "Exercise studied", "text_068": "Couldn't send a link.", - "text_069": "Message sent.", + "text_069": "Message sent", "text_089": "Course complete", "text_090": "Course dropped", "text_087": "Course started", "text_088": "Course under study", - "text_096": "Like...", - "text_097": "lik", + "text_096": "Like…", + "text_097": "Like", "text_075": "Couldn't send a reply.", "text_076": "Failed to send an assessment.", - "text_094": "Canal removed.", + "text_094": "Channel deleted", "text_095": "Changed channel description", - "text_073": "We were unable to find the current content", + "text_073": "Could not find the latest table of contents.", "text_074": "Couldn't add a message.", "text_079": "Couldn't add a message.", "text_092": "(empty)", - "text_093": "Diary.", - "text_104": "We await your beginnings.", + "text_093": "Diary", + "text_104": "We await your beginnings", "text_105": "The server will try again automatically.", - "text_085": "Service passed", + "text_085": "Service completed", "text_086": "Course interested", - "text_098": "Like...", - "text_100": "I like it.", + "text_098": "Like…", + "text_100": "Like", "text_070": "Message updated", - "text_072": "I couldn’t find a recording of the tape.", + "text_072": "Could not find the table of contents post in the feed.", "text_081": "Couldn't update the channel.", "text_082": "Couldn't load the channel.", "text_126": "Check the connection and try again.", @@ -2465,14 +2465,14 @@ "text_123": "unknown", "text_125": "unknown", "text_108": "Discussion in SHiNE", - "text_109": "Couldn't get rid of the like.", - "text_134": "It was not possible to identify a channel for unsubmission.", + "text_109": "Could not remove like.", + "text_134": "Could not identify a channel for unsubmission.", "text_135": "Incorrect link to a message for reaction.", "text_136": "You don't have repost channels yet.", - "text_137": "It was not possible to prepare a link to the message.", + "text_137": "Could not prepare a link to the message.", "text_132": "For this action, you need to enter", - "text_133": "It was not possible to identify a subscription channel.", - "text_110": "I couldn't get a like.", + "text_133": "Could not identify a subscription channel.", + "text_110": "Could not like this post.", "text_114": "No server response", "text_115": "No server response", "text_147": "History #{value1}", @@ -2483,27 +2483,27 @@ "text_138": "Channel ID's not ready.", "text_139": "Channel ID's not ready.", "text_140": "Channel ID's not ready.", - "text_141": "Channel>", + "text_141": "Channel ", "text_150": "View statistics and list of likes: {value1}", "text_151": "Open discussion, answers: {value1}", "text_145": "The interlocutor {value1} has not yet created a personal response chat.", "text_146": "modified by {value1}", "text_154": "{value1} saved", - "text_155": "{value1}. On the canal", - "text_142": "Channel>", + "text_155": "{value1}. About channel", + "text_142": "Channel", "text_144": "You can’t keep the channel reading: {value1} is missing.", "text_152": "Publication No{value1} was not found in the channel.", - "text_153": "It was not possible to save how many messages were read. {value1}X{value2}", + "text_153": "Could not save how many messages were read. {value1}X{value2}", "text_130": "The channel screen is already closed.", - "text_131": "Channel >", + "text_131": "Channel ", "text_159": "Reply", "text_156": "Demo mode on.", "text_158": "Discussion", - "text_160": "Submit", + "text_160": "Send", "text_161": "Repost", "text_162": "Original", "text_163": "Blockchain data", - "text_164": "New Entry", + "text_164": "New post", "text_157": "Channel data from the server is not available. Showing demo content." }, "add_channel_view": { @@ -2525,8 +2525,8 @@ "text_004": "Inadmissible symbols are removed: you can Latin, numerals, and -.", "text_019": "{value1}: maximum {value2} characters.", "text_020": "The {value1} channel has been created.", - "text_017": "

Channel avatar is not installed.

>", - "text_018": "

Channel avatar · access server

>", + "text_017": "

No channel avatar set.

", + "text_018": "

Channel avatar · access server

Stored for free on your access server.

", "text_027": "Description", "text_030": "Cancel", "text_023": "Select avatar", @@ -2534,8 +2534,8 @@ "text_031": "Create", "text_026": "Channel address", "text_028": "necessarily", - "text_021": "Remove the avatar.", - "text_022": "Remove the avatar.", + "text_021": "Remove the avatar", + "text_022": "Remove the avatar", "text_025": "Like, my channel.", "text_033": "Address at Arweave", "text_029": "Briefly about the channel", @@ -2546,19 +2546,19 @@ "user_profile_view": { "text_001": "Profile", "text_002": "Profile", - "text_005": "Relationships", + "text_005": "Connections", "text_006": "Message", "text_013": "Close friend", "text_014": "Friend", - "text_007": "Unable to upload profile", + "text_007": "Could not load profile", "text_009": "Check the connection and try again.", "text_015": "Contact", "text_016": "Friendship in return", - "text_003": "Uploading profile", - "text_008": "Uploading profile", + "text_003": "Loading profile…", + "text_008": "Loading profile…", "text_011": "added", "text_012": "added(a)", - "text_004": "Add a link", + "text_004": "Add connection", "text_010": "added", "text_017": "wants to be friends with you", "text_018": "Add in response", @@ -2570,163 +2570,163 @@ "text_017": "For example: 12, 2/5 or 3/8", "text_064": "Ticket field cleared.", "text_131": "Please enter your ticket number.", - "text_086": "I failed to get a balance.", - "text_093": "I failed to get a balance.", - "text_110": "paid", - "text_112": "paid", - "text_111": "expectation", - "text_113": "expectation", - "text_108": "Number three.", - "text_109": "First step.", - "text_139": "Failed to load the ticket", - "text_132": "Format: for the first stage just a number, for the second and third - for example 2/7 or 3/8.", + "text_086": "Could not retrieve balance", + "text_093": "Could not retrieve balance", + "text_110": "Paid", + "text_112": "Paid", + "text_111": "Pending payout", + "text_113": "Pending payout", + "text_108": "Third queue", + "text_109": "First queue", + "text_139": "Could not load ticket", + "text_132": "Format: first queue — ticket number only; second or third queue — e.g., 2/7 or 3/8.", "text_134": "No SOL/USD oracle account was found.", - "text_135": "PDA payment programs have not yet been initialized.", + "text_135": "Payment program PDAs have not been initialized yet.", "text_136": "The oracle returned the wrong price.", - "text_158": "Ticket {value1} found. SOURCE Solana: {value2}", - "text_107": "Second stage.", - "text_159": "SOURCE Solana: {value1}", - "text_001": "purse", - "text_006": "purse", - "text_002": "← The choice of wallet", + "text_158": "Ticket {value1} found. Solana source: {value2}", + "text_107": "Second queue", + "text_159": "Solana source: {value1}", + "text_001": "Wallet", + "text_006": "Wallet", + "text_002": "← Choose wallet", "text_003": "Click to copy the address", - "text_004": "Copyed into a buffer", - "text_005": "Couldn't copy the address.", - "text_009": "The generation time will appear after pressing the button.", + "text_004": "Copied to clipboard", + "text_005": "Could not copy address", + "text_009": "Generation time will appear after you press the button.", "text_015": "The generation time will appear after pressing the button.", "text_010": "Public key", - "text_019": "You can leave it empty.", + "text_019": "You can leave it empty", "text_020": "Wallet address for ticket and payment", "text_011": "Will appear after generation", "text_013": "Will appear after generation", - "text_012": "Secret Key (Base58, shown once)", - "text_023": "It's left.", - "text_024": "Updated:", - "text_036": "Updated:", - "text_040": "Updated:", - "text_045": "Updated:", - "text_014": "Secret key is not stored on the server or written in localStorage.", + "text_012": "Secret key (Base58, shown once)", + "text_023": "Remaining", + "text_024": "Updated: –", + "text_036": "Updated: –", + "text_040": "Updated: –", + "text_045": "Updated: –", + "text_014": "Your secret key is not stored on the server or in localStorage.", "text_018": "Ticket amount in dollars", "text_007": "Additional salt (optional)", - "text_008": "You can leave it empty or add any text as an additional admixture.", - "text_027": "End block: -", - "text_032": "End block: -", - "text_028": "unreleased", + "text_008": "Leave blank or enter any text as additional entropy.", + "text_027": "Last block: –", + "text_032": "Last block: –", + "text_028": "not published", "text_034": "Created:", "text_035": "Balance (Solana)", "text_031": "Method:", "text_033": "Size:-", - "text_021": "Blockchain Limit", + "text_021": "Blockchain limit", "text_022": "Spent (actually on the server)", - "text_029": "published and fully relevant", - "text_030": "Cast: missing", + "text_029": "published and up to date", + "text_030": "Snapshot: none", "text_043": "Turbo's Available Balance", - "text_044": "credits", - "text_025": "Actual status on the server", + "text_044": "– credits", + "text_025": "Actual server state", "text_026": "Chain size: -", "text_037": "Blockchain.key is not available", "text_041": "Blockchain.key is not available", - "text_038": "The Arweave wallet stores an AR balance to upload files directly to the decentralized Arweave network. Direct download is convenient for large files and can be cheaper than Turbo depending on the current rates.", + "text_038": "The Arweave wallet holds AR to upload files directly to the decentralized Arweave network. Direct uploads can be convenient for large files, although they may cost more than Turbo.", "text_050": "Select the action in the support section.", "text_051": "Detailed information open.", - "text_048": "Re-balance", - "text_049": "Replenish.", + "text_048": "Refresh balance", + "text_049": "Add funds", "text_052": "New key pair generated. The secret key is shown on the screen once.", - "text_053": "We were unable to generate a couple of keys.", - "text_059": "I couldn't copy the secret key.", - "text_061": "The key file is downloaded.", - "text_056": "It was not possible to copy the public key.", - "text_058": "Secret key copied.", + "text_053": "Could not generate key pair", + "text_059": "Could not copy secret key", + "text_061": "Key file downloaded", + "text_056": "Could not copy public key", + "text_058": "Secret key copied", "text_067": "The terms of purchase have been updated.", - "text_069": "I couldn't get a ticket.", - "text_046": "Solana balance for replenishment: -", + "text_069": "Could not purchase ticket", + "text_046": "Solana balance available for top-ups: –", "text_047": "Solana address associated with Turbo balance (click to copy)", "text_039": "Balance (Arweave)", - "text_042": "Turbo is a third-party centralized download service on Arweave. Convenient for small files and quick credit deposits directly from your Solana wallet. Turbo balance is measured in credits, not SOL or AR.", + "text_042": "Turbo is a third-party, centralized service for uploading files to Arweave. It is convenient for small files and lets you add upload credits using your Solana wallet.", "text_054": "First, generate a couple of keys.", "text_057": "First, generate a couple of keys.", "text_060": "First, generate a couple of keys.", - "text_055": "Public key copied.", - "text_065": "The terms of purchase are loaded. You can move on to the form of purchase.", - "text_066": "Unable to download the terms of purchase", - "text_068": "Unable to download the terms of purchase", + "text_055": "Public key copied", + "text_065": "Purchase terms loaded. You can proceed to checkout.", + "text_066": "Could not load purchase terms", + "text_068": "Could not load purchase terms", "text_072": "Failed to update the state of the blockchain", - "text_073": "Downloading Blockchain Data SHiNE...", - "text_082": "Local cast removed from the browser.", - "text_083": "Download the state of publication...", + "text_073": "Loading SHiNE blockchain data…", + "text_082": "Local snapshot removed from this browser.", + "text_083": "Loading publication status…", "text_074": "Publication status updated.", - "text_075": "Unable to update publication status", - "text_080": "Failed to make a cast.", + "text_075": "Could not update publication status", + "text_080": "Could not create snapshot", "text_081": "Failed to update Solana", "text_070": "Unable to download client.key", "text_071": "The blockchain limit and status data has been updated.", - "text_089": "The initialization of blockchain.key...", + "text_089": "Initializing blockchain.key…", "text_090": "Failed to initialize the wallet", - "text_076": "Collecting a full cast of the blockchain from the server.", - "text_077": "The cast is assembled. Open the Arweave/Turbo download manager.", - "text_078": "Download of the cast is cancelled.", - "text_079": "The cast is made. It is better to wait 1-2 minutes and then update the PDA in Solana.", - "text_084": "The wallet is not initialized.", + "text_076": "Collecting a full snapshot of the blockchain from the server.", + "text_077": "Snapshot created. Opening the Arweave/Turbo upload manager…", + "text_078": "Snapshot upload canceled.", + "text_079": "Snapshot created. Wait 1–2 minutes before updating the Solana PDA.", + "text_084": "Wallet is not initialized.", "text_085": "Balance updated.", "text_092": "Balance updated.", "text_099": "Balance updated.", "text_091": "Arweave wallet is not initialized.", "text_094": "Transfer not available: Arweave wallet is not initialized.", "text_062": "Key generator's ready. Additional salt is optional.", - "text_063": "I couldn't see the ticket.", - "text_087": "Transfer is not available: blockchain.key is not downloaded.", + "text_063": "Could not view ticket", + "text_087": "Transfer unavailable: blockchain.key has not been loaded.", "text_088": "Transfer error", "text_095": "Transfer error", "text_098": "Could not initialize the Arweave wallet", "text_100": "Unable to get Turbo balance", - "text_116": "Solana purse", + "text_116": "Solana wallet", "text_117": "SOL balance", "text_103": "Sending SOL via Turbo SDK", - "text_104": "Failed to replenish the Turbo", - "text_096": "The Arweave wallet generation...", - "text_097": "Wait – your Arweave key is calculated from the blockchain key. It only happens once, then it will be instantaneous.", + "text_104": "Could not add Turbo credits", + "text_096": "Generating Arweave wallet…", + "text_097": "Please wait while your Arweave key is derived from your blockchain key. This is a one-time setup; subsequent access should be almost instant.", "text_120": "Turbo wallet", - "text_121": "Turbo credits for downloading files", - "text_124": "Support Project SHiNE", - "text_125": "Tickets and reference", - "text_105": "Download Turbo balance...", - "text_106": "There are not enough funds on the Solana wallet to replenish the limit.", + "text_121": "Turbo credits for file uploads", + "text_124": "Support SHiNE", + "text_125": "Tickets and help", + "text_105": "Loading Turbo balance…", + "text_106": "Not enough SOL in your wallet to add credits.", "text_118": "Arweave wallet", - "text_119": "Balance AR", - "text_128": "Solana: the cast is not yet fixed", - "text_129": "Make a cast", - "text_126": "fixed", - "text_127": "There is, but not fixed in Solana", - "text_101": "First upload the Turbo wallet address.", - "text_102": "Specify the positive amount of SOL (no more than 9 decimal places).", - "text_122": "Prepaid SHiNE Place", - "text_123": "Limit, spent and balance", + "text_119": "AR balance", + "text_128": "Solana: snapshot not anchored yet", + "text_129": "Create snapshot", + "text_126": "anchored", + "text_127": "exists but is not anchored in Solana", + "text_101": "Load your Turbo wallet address first.", + "text_102": "Enter a positive SOL amount (up to 9 decimal places).", + "text_122": "Prepaid SHiNE storage", + "text_123": "Limit, used, and remaining", "text_114": "The purchase is within the current limit.", - "text_115": "The amount does not fit into the current limit or entered incorrectly.", + "text_115": "The amount exceeds the current limit or is invalid.", "text_137": "User not found on the server", "text_138": "Operation cancelled by the user", - "text_140": "Failed to upload the condition", - "text_141": "Failed to upload the condition", + "text_140": "Could not load status", + "text_141": "Could not load status", "text_142": "Could not calculate the price", "text_143": "Enter the correct amount in dollars.", "text_144": "The amount exceeds the remainder of the current limit. Reduce the amount or wait for a new limit.", "text_145": "The recipient's wallet is not listed.", - "text_146": "The local cast already matches what is fixed in Solana.", - "text_130": "No active session. Re-enter.", + "text_146": "Local snapshot already matches the one anchored in Solana.", + "text_130": "No active session. Sign in again.", "text_133": "This browser does not support secure key generation.", "text_155": "Public key: {value1}", "text_156": "Secret key: {value1}", - "text_151": "The local cast is outdated. Make a new cast for the current top.", + "text_151": "Local snapshot is outdated. Create a new snapshot for the current tip.", "text_152": "confirmation received", - "text_149": "First, make a cast in Arweave or Turbo.", - "text_150": "The local cast refers to another blockchain.", + "text_149": "Create a snapshot on Arweave or Turbo first.", + "text_150": "This local snapshot belongs to a different blockchain.", "text_157": "Time: {value1}", - "text_160": "Ticket viewing is ready. SOURCE Solana: {value1}", + "text_160": "Ticket details loaded. Solana source: {value1}", "text_163": "Chain size: {value1}", - "text_164": "Extreme block: {value1}", - "text_167": "Extreme block: {value1}", - "text_171": "Extreme block: {value1}", - "text_176": "Extreme block: {value1}", + "text_164": "Last block: {value1}", + "text_167": "Last block: {value1}", + "text_171": "Last block: {value1}", + "text_176": "Last block: {value1}", "text_161": "Ticket {value1}-{value2} purchased. Save the ticket number and secret key of the wallet used.", "text_162": "Updated: {value1}", "text_173": "Updated: {value1}", @@ -2734,45 +2734,45 @@ "text_183": "Updated: {value1}", "text_187": "Updated: {value1}", "text_153": "Failed to increase limit: {value1}", - "text_154": "Generated: {value1}. Used secure browser rand, text and time added as an impurity.", - "text_165": "published, lagging behind on {value1} blocks", + "text_154": "Generated: {value1}. Used cryptographically secure browser randomness, with your text and the current time added as extra input.", + "text_165": "published, {value1} blocks behind", "text_166": "Blockchain: {value1}", "text_170": "Blockchain: {value1}", "text_184": "Transfer sent. Transaction ID: {value1}", - "text_185": "{value1} loans", - "text_147": "The cast is already there, but Solana has not yet been updated. Wait 1-2 minutes and then update your PDA.", - "text_148": "There is a local cast, but it is already outdated relative to the server.", + "text_185": "{value1} credits", + "text_147": "The snapshot exists, but Solana has not been updated. Wait 1–2 minutes, then update the PDA.", + "text_148": "The local snapshot is out of date compared with the server.", "text_178": "Created: {value1}", - "text_179": "Solana Updated: {value1}", - "text_168": "Size: {value1} byte", - "text_172": "Size: {value1} byte", - "text_177": "Size: {value1} byte", - "text_169": "Limit: {value1} byte", - "text_174": "Cast: {value1}", + "text_179": "Solana updated: {value1}", + "text_168": "Size: {value1} bytes", + "text_172": "Size: {value1} bytes", + "text_177": "Size: {value1} bytes", + "text_169": "Limit: {value1} bytes", + "text_174": "Snapshot: {value1}", "text_175": "Method: {value1}", - "text_186": "Solana balance for replenishment: {value1} SOL", - "text_188": "Refill sent. Transaction: {value1}", - "text_180": "The cast is attached to Solana. Tx: {value1}", + "text_186": "Solana balance available for top-ups: {value1} SOL", + "text_188": "Top-up sent. Transaction: {value1}", + "text_180": "Snapshot anchored in Solana. Tx: {value1}", "text_182": "Transfer sent. Signature: {value1}", - "text_266": "Update", + "text_266": "Loading blockchain data…", "text_203": "Please enter your ticket number.", "text_208": "Please enter your ticket number.", - "text_206": "Drop it.", - "text_189": "Support Project SHiNE", + "text_206": "Drop it", + "text_189": "Support SHiNE", "text_227": "Certificate", "text_244": "Certificate", - "text_238": "Loading", - "text_273": "End block: -", - "text_279": "End block: -", - "text_285": "End block: -", + "text_238": "Loading…", + "text_273": "Last block: –", + "text_279": "Last block: –", + "text_285": "Last block: –", "text_274": "Size:-", "text_280": "Size:-", "text_286": "Size:-", - "text_281": "Updated:", + "text_281": "Snapshot", "text_284": "Method:", "text_287": "Created:", - "text_293": "Re-balance", - "text_298": "Re-balance", + "text_293": "Refresh balance", + "text_298": "Refresh balance", "text_294": "Transfer", "text_299": "Transfer", "text_204": "Use the current SHINE server network", @@ -2786,20 +2786,20 @@ "text_217": "These have already been paid:", "text_212": "Amount:", "text_213": "Ticket:", - "text_205": "Show the ticket", + "text_205": "Public key", "text_207": "Enter the ticket number and press the button.", "text_222": "Enter the ticket number and press the button.", - "text_220": "The amount of this ticket:", + "text_220": "Create snapshot", "text_221": "Accumulated before this ticket:", "text_218": "There's still one left:", "text_219": "Already paid in line:", - "text_193": "Generate a new pair of keys", + "text_193": "Generate a new key pair", "text_196": "Generate a new pair of keys", - "text_194": "Ticket purchase certificate", + "text_194": "Help with buying tickets", "text_191": "Buy a ticket", "text_223": "Buy a ticket", - "text_192": "See the queue.", - "text_198": "Generate a pair of keys", + "text_192": "See the queue", + "text_198": "Generate key pair", "text_199": "Copy the public key", "text_200": "Copy the secret key", "text_201": "Download the keys", @@ -2807,10 +2807,10 @@ "text_252": "Coefficient:", "text_229": "Current ratio limit:", "text_253": "Current ratio limit:", - "text_190": "Here you can buy a ticket, watch the queue and see how the purchase is arranged.\nThe payment goes to SOL, and the amount is considered at the USD/USDT rate at the time of the transaction.\nThe ticket number and the private wallet key must be kept separately.", + "text_190": "Here you can buy a ticket, check the queue, and learn how purchases work.\nPayment is made in SOL, with the USD/USDT exchange rate calculated at the time of the transaction.\nKeep your ticket number and the wallet’s secret key in separate, safe places.", "text_225": "Loading conditions ...", "text_226": "Buy in dollars", - "text_232": "How many tickets are in line:", + "text_232": "Snapshot", "text_256": "How many tickets are in line:", "text_233": "Next ticket:", "text_248": "Next ticket:", @@ -2833,8 +2833,8 @@ "text_250": "Maximum at a tolerance of 3%:", "text_267": "Increase the limit", "text_268": "Fixture to Solana", - "text_195": "After purchase, the ticket remains in queue 1. Later, you can open the viewing screen and check how many tickets and amounts have already passed before it.", - "text_197": "Generation uses a secure browser random, and your extra text and current time are added as an impurity.\nIt is not necessary to enter the text: even without it, the keys remain random.", + "text_195": "After purchase, your ticket joins queue 1. You can later check how many tickets and what total amount are ahead of it.", + "text_197": "The key generator uses secure browser randomness. Your additional text and the current time are mixed in as extra input; you can leave the text field empty.", "text_262": "Ticket amount:", "text_263": "Before him was in line:", "text_271": "What is enshrined in the PDA", @@ -2846,22 +2846,22 @@ "text_259": "After filling the limit, there will be a new limit, but with a lower coefficient.", "text_264": "Transaction:", "text_265": "Prepaid Place on the Blockchain SHiNE", - "text_283": "Cast:", - "text_288": "Update.", + "text_283": "snapshot:", + "text_288": "Update", "text_275": "Limit:", "text_276": "Open Arweave", "text_295": "Public address of Arweave (SAWD-v1)", "text_296": "How did you get this address?", "text_277": "What's real on the server", - "text_282": "Local cast in this browser", + "text_282": "Local snapshot in this browser", "text_251": "If the current limit is filled, a new limit with a lower coefficient will open.\nThe purchase is in SOL, but is considered at USD/USDT at the time of the transaction.", "text_260": "Purchase completed:", - "text_291": "Forget the local cast in this browser", + "text_291": "Forget the local snapshot in this browser", "text_292": "Public address (blockchain.key)", - "text_269": "First, we make a full cast of the user blockchain in Arweave or Turbo, then update the link in the PDA.", + "text_269": "First, we make a full snapshot of the user blockchain in Arweave or Turbo, then update the link in the PDA.", "text_270": "Status of publication", - "text_289": "Make a cast in Arweave / Turbo", - "text_290": "Update Solana on the finished cast", + "text_289": "Make a snapshot in Arweave / Turbo", + "text_290": "Update Solana on the finished snapshot", "text_236": "Buy a ticket in the amount of dollars", "text_237": "The purchase amount and address of the recipient are entered here. If the address is not specified, you can buy on the same wallet from which the payment is made.\nPayment is made from the current blockchain key. Technical signatures of the purchase protocol remain a separate part of the transaction.", "text_297": "SHiNE takes your local blockchain key and, according to SAWD-v1, receives a native Arweave wallet from it.\nThe private key is not sent to the server. After the first calculation, it is stored only in an encrypted container of this device.", @@ -2870,7 +2870,7 @@ "text_303": "When the current queue limit is filled, a new limit with a lower coefficient will open.", "text_300": "Tickets are tied to queue 1 and the recipient’s address you specify when you purchase.", "text_301": "The payment is considered in USD, and the write-off goes to SOL at the USDT/SOL rate, which is checked at the time of the transaction.", - "text_305": "Copy the address to the clipboard" + "text_305": "Refresh balance" }, "device_view": { "text_008": "Are you sure you want to close the other sessions?", @@ -2878,11 +2878,11 @@ "text_001": "Devices", "text_002": "Devices", "text_024": "All other devices will be logged out of your account. This device will remain.", - "text_017": "purse", + "text_017": "Wallet", "text_003": "Update the session list", "text_004": "Update the session list", "text_007": "Close all other sessions", - "text_010": "It's a device.", + "text_010": "It's a device", "text_020": "Yandex Browser", "text_021": "net", "text_018": "Annex", @@ -2904,14 +2904,14 @@ "text_029": "yesterday, {value1}", "text_030": "Sessions closed: {value1}", "text_031": "Connect another device", - "text_032": "Confirm entrance on the new device" + "text_032": "Approve sign-in on a new device" }, "registration_payment_view": { "text_002": "Copy address", "text_004": "Copy address", "text_013": "Balance", - "text_015": "Register", - "text_019": "Register", + "text_015": "Sign up", + "text_019": "Sign up", "text_003": "✓ Address copied", "text_010": "Update Solana's balance sheet", "text_011": "Update...", @@ -2920,12 +2920,12 @@ "text_008": "Wallet address", "text_021": "Devnet only. Test SOLs have no real value.", "text_006": "Your Solana wallet in SHiNE", - "text_061": "Test replenishment (+{value1} SOL)", - "text_062": "Test replenishment (+{value1} SOL)", + "text_061": "Test top-up (+{value1} SOL)", + "text_062": "Test top-up (+{value1} SOL)", "text_017": "Registration", "text_018": "Registration with Solana...", - "text_005": "We were unable to copy the wallet address.", - "text_007": "To register, replenish this Solana wallet. It's already made from your Shine keys.", + "text_005": "Could not copy the wallet address.", + "text_007": "To register, add funds to this Solana wallet, which was already generated from your SHiNE keys.", "text_001": "Registration fees", "text_022": "Registration fees", "text_014": "Replenishing...", @@ -2952,7 +2952,7 @@ "text_043": "We are preparing a registration check...", "text_044": "Check to see if you have registered...", "text_045": "Before I go, wait another second...", - "text_048": "It was not possible to complete registration.", + "text_048": "Could not complete registration.", "text_049": "Registration data is missing. Go back and press \"Next.\"", "text_052": "The actual cost has not yet been loaded. Check the connection to Solana.", "text_053": "No keys found. Go back to the previous step.", @@ -2960,57 +2960,57 @@ "text_056": "No connection to Solana's server. Try again later.", "text_051": "The keys haven't been generated yet. Go back to the previous step.", "text_046": "Failed to update the balance. Check the link and try again.", - "text_047": "It was not possible to complete the test replenishment. Try it again.", - "text_058": "Test replenishment is allowed only in devnet", + "text_047": "Test top-up failed. Please try again.", + "text_058": "Test top-up is available only on Devnet", "text_059": "The address of the replenished wallet is not specified.", "text_034": "Confirmation didn't come in time. Perhaps the registration has already passed, and perhaps not yet. Check the Tx ID below: we will continue the automatic check.", "text_035": "No confirmation yet. Wait a little longer, we're still checking the registration.", - "text_054": "This login is already registered. Log in to an existing account or select a different login.", - "text_055": "This login is already registered. Log in to an existing account or select a different login.", + "text_054": "This login is already registered. Sign in to an existing account or select a different login.", + "text_055": "This login is already registered. Sign in to an existing account or select a different login.", "text_057": "Login does not include namespace", "text_068": "Failed to prepare registration: {value1}", - "text_064": "To register, replenish your wallet at least on {value1} SOL. The namespace {value2} SOL price already includes a PDA deposit; the actual network commission is paid separately.", - "text_065": "In devnet, you can use “Test Replenishment”.", + "text_064": "To register, add at least {value1} SOL to your wallet. The namespace price is {value2} SOL, including the PDA deposit. Network transaction fees are extra.", + "text_065": " On Devnet, you can use “Test top-up”.", "text_066": "Registration error in Solana: {value1}", "text_067": "Registration in namespace: {value1} SOL (PDA deposit included). For payment on the wallet: at least {value2} SOL, including a small margin for network commission. The actual commission of the network will be written off, the remainder will remain.", "text_060": "Registration complete. You are automatically logged in as {value1}.", - "text_063": "Test replenishment performed: +{value1} SOL. Balance: {value2} SOL.", + "text_063": "Test top-up complete: +{value1} SOL. Balance: {value2} SOL.", "text_069": "Creating an account with Solana", "text_070": "In Solana, your Independent Record (PDA) will be created. The PDA deposit is included in the namespace price. The Solana network commission is paid separately.", "text_071": "If you have already replenished this wallet, do not change the username and password: this will change the address of the wallet. Back to the password?" }, "channel_thread_view": { "text_001": "Discussion", - "text_005": "Table of Contents", + "text_005": "Table of contents", "text_007": "Channel Avatar", "text_009": "Reply", "text_013": "Edit", "text_014": "Edit", - "text_015": "Remove", - "text_016": "Revision History", + "text_015": "Delete", + "text_016": "Edit history", "text_017": "Reply", "text_018": "Share a comment", - "text_021": "Revision History", + "text_021": "Edit history", "text_022": "Edit", - "text_023": "Remove", + "text_023": "Delete", "text_026": "Channel Avatar", "text_031": "Share", "text_032": "Channel Avatar", "text_033": "Share a comment", "text_034": "Channel Avatar", - "text_035": "Response", + "text_035": "Reply", "text_038": "Reply", - "text_039": "Submit", + "text_039": "Send", "text_040": "Repost", "text_052": "Link copied", "text_083": "K", "text_094": "K", "text_095": "K", "text_096": "K", - "text_042": "Failed to copy.", - "text_047": "Failed to copy.", + "text_042": "Could not copy", + "text_047": "Could not copy", "text_060": "deleted", - "text_065": "Remove Like", + "text_065": "Unlike", "text_082": "author", "text_084": "author", "text_070": "Repost failed.", @@ -3022,7 +3022,7 @@ "text_004": "Course", "text_002": "Exercise", "text_003": "Service", - "text_006": "Discover the history of editing", + "text_006": "View edit history", "text_020": "Publication data", "text_010": "Copy text", "text_019": "Copy text", @@ -3033,28 +3033,28 @@ "text_012": "Blockchain data", "text_044": "Blockchain data", "text_045": "Couldn't delete the message.", - "text_008": "Discover the history of change", - "text_049": "Response sent", - "text_050": "Evaluation sent.", - "text_051": "Reprint published", - "text_053": "Reference transmitted", - "text_037": "Like...", - "text_062": "Like...", - "text_063": "lik", + "text_008": "View edit history", + "text_049": "Reply sent", + "text_050": "Rating submitted", + "text_051": "Repost published", + "text_053": "Link shared", + "text_037": "Like…", + "text_062": "Like…", + "text_063": "Like", "text_061": "(empty)", - "text_064": "Like...", - "text_066": "I like it.", - "text_067": "I like it.", + "text_064": "Like…", + "text_066": "Like", + "text_067": "Like", "text_055": "Message updated", "text_057": "Check the connection and try again.", "text_078": "unknown", "text_087": "unknown", "text_093": "unknown", - "text_069": "Couldn't get rid of the like.", + "text_069": "Could not remove like.", "text_090": "Incorrect link to a message for reaction.", "text_091": "You don't have repost channels yet.", "text_089": "For this action, you need to enter", - "text_071": "I couldn't get a like.", + "text_071": "Could not like this post.", "text_080": "No server response", "text_081": "No server response", "text_100": "History #{value1}", @@ -3065,22 +3065,22 @@ "text_113": "Publication No{value1} was not found in the channel.", "text_025": "SHiNE · Discussion", "text_027": "Open the channel", - "text_036": "It was not possible to upload the discussion", + "text_036": "Could not load discussion", "text_048": "Could not delete the comment.", - "text_028": "Go to the record.", - "text_029": "Share the record.", - "text_030": "Share the record.", + "text_028": "Go to post", + "text_029": "Share post", + "text_030": "Share post", "text_058": "User history", "text_059": "Channel message", "text_024": "Discussion menu", "text_068": "Message from discussion in SHiNE", - "text_072": "Notify responses", - "text_075": "Answers in this discussion will not come in notifications.", + "text_072": "Notify me about replies", + "text_075": "You will no longer receive notifications about replies in this discussion.", "text_079": "channel", "text_054": "Couldn't broadcast the link.", - "text_056": "It was not possible to update the discussion.", - "text_073": "Do not not notify of answers", - "text_074": "Notifications of responses included", + "text_056": "Could not update the discussion.", + "text_073": "Turn off reply notifications", + "text_074": "Reply notifications enabled", "text_086": "No channel or message found.", "text_088": "The discussion screen is closed.", "text_114": "{value1} • Record", @@ -3089,7 +3089,7 @@ "text_119": "Answer {value1}...", "text_103": "View the statistics of likes: {value1}", "text_106": "Answer for {value1}. Turn to his comment", - "text_092": "It was not possible to make a reference to the discussion.", + "text_092": "Could not create a discussion link.", "text_098": "Message in the {value1} channel", "text_109": "Action with the comment by {value1}", "text_110": "Responses to this comment · {value1}", @@ -3101,75 +3101,75 @@ "text_118": "Reply to {value1}...", "text_120": "Reply", "text_122": "Discussion", - "text_121": "Submit", + "text_121": "Send", "text_123": "Repost", "text_124": "Original", "text_125": "Blockchain data", "text_126": "reply", "text_127": "answers", - "text_128": "It was not possible to identify a reference to the discussion." + "text_128": "Could not determine the discussion link." }, "user_relation_manage_view": { - "text_003": "Loading", + "text_003": "Loading…", "text_040": "Close friend", "text_039": "Friend", "text_008": "Check the connection and try again.", "text_038": "Contact", - "text_001": "Add a link", - "text_002": "Add a link", - "text_004": "Save...", + "text_001": "Add connection", + "text_002": "Add connection", + "text_004": "Saving…", "text_014": "Confirm the official account", - "text_015": "This man is marked as shining.", - "text_012": "
>", + "text_015": "This person is marked as a Shining member", + "text_012": "
✓ This user confirmed your official account
", "text_013": "Remove confirmation", "text_019": "Remove confirmation", - "text_010": "Confirm if this is an official account of this person", - "text_011": "
>", - "text_016": "Confirm if you think this person is shining", - "text_017": "
>", - "text_007": "Failed to change the link.", - "text_009": "This account is marked as the main", - "text_021": "Communication down.", + "text_010": "Confirm if this is the person’s official account", + "text_011": "
✓ You confirmed this person’s official account
", + "text_016": "Confirm if you consider this person a Shining member", + "text_017": "
✓ You confirmed this person as a Shining member
", + "text_007": "Could not update connection", + "text_009": "This is marked as the primary account", + "text_021": "Connection removed", "text_022": "Added to contacts", "text_023": "Added as a friend", "text_024": "Added to close friends", "text_005": "Could not identify the user.", - "text_006": "Couldn't download the link.", - "text_031": "Yeah, keep in touch.", + "text_006": "Could not load connection", + "text_031": "Yes, save connection", "text_032": "Confirmation removed", "text_034": "Confirmation removed", "text_041": "contact", - "text_042": "friend", - "text_033": "You have confirmed your official account.", - "text_035": "You confirmed the glow.", + "text_042": "friends", + "text_033": "You confirmed this person’s official account", + "text_035": "You confirmed this person as a Shining member", "text_043": "close friends", "text_029": "Yes, withdraw the confirmation.", "text_030": "Yes, confirm.", - "text_025": "Confirming the other person?", - "text_026": "Changing public communication?", - "text_036": "Communication maintained", - "text_037": "No connection.", - "text_027": "Confirm only the real person you really know or can reasonably recognize as radiant. False confirmations and their subsequent cancellation can forever remain on the blockchain and be considered by independent analyzers.", - "text_028": "Pointing or deleting an acquaintance creates a record in the public history of the social graph. This record can be saved even after the cancellation of the communication.", - "text_018": "
>", - "text_020": "Confirm as radiant", + "text_025": "Confirm another person?", + "text_026": "Change public connection?", + "text_036": "Connection saved", + "text_037": "No connection", + "text_027": "Only confirm someone as Shining if you know them or have a good reason to believe it. False confirmations and later reversals may remain permanently in the public record.", + "text_028": "Adding or removing a social connection creates a public record. It may remain accessible even after the connection is removed.", + "text_018": "
✓ This user confirmed you as a Shining member
", + "text_020": "Confirm Shining status", "text_047": "Official account", - "text_048": "Shining", + "text_048": "Shining member", "text_049": "Connection", - "text_046": "User to you", + "text_046": "This user’s connection to you", "text_050": "Change your attitude towards the user", - "text_044": "Likewise:", - "text_045": "You're a user." + "text_044": "Mutual:", + "text_045": "Your connection to this user" }, "profiles_view": { - "text_007": "Log out", + "text_007": "Sign out", "text_009": "Switch profile?", "text_010": "Toggle", - "text_012": "Log out", + "text_012": "Sign out", "text_006": "Exit all profiles?", "text_017": "All profiles on this device will be closed, the login screen will open.", "text_023": "The {value1} profile will open.", - "text_026": "Log out of {value1} profile?", + "text_026": "Sign out of {value1} profile?", "text_001": "Profiles", "text_002": "Profiles", "text_003": "Add a profile", @@ -3177,34 +3177,34 @@ "text_005": "Exit all profiles", "text_013": "Failed to start adding a profile", "text_014": "Failed to close profiles", - "text_015": "I couldn't change the profile.", + "text_015": "Could not change the profile.", "text_016": "Failed to close the profile", "text_008": "Close profiles...", "text_011": "Get out of profile", "text_020": "The application will switch to the next saved profile.", - "text_021": "After the exit, the entrance screen will open.", + "text_021": "After signing out, you will return to the sign-in screen.", "text_022": "The profile will be closed on this device.", "text_024": "Connect the {value1} profile...", - "text_025": "Log out of {value1} profile", + "text_025": "Sign out of {value1} profile", "text_027": "Close the {value1} profile.", "text_018": "There are no saved profiles on the device.", - "text_019": "Now open>" + "text_019": "Currently active" }, "key_rotation_view": { "text_011": "Transfer", "text_013": "Continue", - "text_045": "Ready.", - "text_010": "Re-balance", + "text_045": "Done", + "text_010": "Refresh balance", "text_009": "Continue changing keys", - "text_012": "Let go", - "text_001": "Change of keys", - "text_002": "Change of keys", - "text_003": "Change of keys", + "text_012": "Skip", + "text_001": "Change keys", + "text_002": "Change keys", + "text_003": "Change keys", "text_004": "Optional Commentary for History", - "text_007": "Continue posting TECH FORK", + "text_007": "Continue publishing TECH_FORK", "text_008": "Repeat/continue", "text_005": "Show earlier blocks", - "text_006": "Start changing keys", + "text_006": "Start key rotation", "text_018": "Current password", "text_025": "Current password", "text_019": "New password", @@ -3217,19 +3217,19 @@ "text_038": "The new chain is ready", "text_039": "Waiting for Solana", "text_036": "Key change complete.", - "text_037": "Publication by TECH FORK", + "text_037": "Publishing TECH_FORK", "text_040": "PDA updated", - "text_041": "Server restructuring", + "text_041": "Rebuilding server state", "text_042": "Transfer of funds", - "text_043": "Transcribing messages", + "text_043": "Re-encrypting messages", "text_044": "Completion", "text_046": "New rotation", - "text_014": "Continue recoding", + "text_014": "Continue re-encryption", "text_015": "Return to key settings", "text_027": "Enter the old and new password. We will restore the keys and continue the existing procedure from the current stage.", - "text_028": "Old password.", - "text_032": "Old password.", - "text_023": "TECH FORK is created and published in Arweave/Turbo. Regular accounts are blocked at this time.", + "text_028": "Old password", + "text_032": "Old password", + "text_023": "Creating and publishing TECH_FORK for the new segment to Arweave/Turbo. Regular account operations are temporarily unavailable.", "text_024": "The new chain is ready. The keys in Solana are automatically changed in the same procedure.", "text_016": "Repeat the check and continue", "text_017": "Choose the last block you trust. The new fork will start after it with one TECH FORK signed by the new blockchain key; the old prefix of the chain will not be republished.", @@ -3247,28 +3247,28 @@ "text_048": "We are waiting for confirmation of the new PDA status in Solana.", "text_053": "Enter your current and new password", "text_054": "New passwords don't match", - "text_057": "Check out old and new wallets. >", + "text_057": "Check the old and new wallets.", "text_058": "Enter old and new passwords", "text_061": "Enter old and new passwords", "text_064": "The server did not return the time to start the migration of messages", "text_065": "Progress: {value1} / {value2}", - "text_051": " Reason>", + "text_051": "Reason", "text_052": "Select the last trusted block", "text_066": "Published by: {value1} / {value2}", "text_067": "Translated by {value1} SOL. Tx: {value2}", "text_070": "Unknown rotation status: {value1}", "text_071": "I could not read the key change state: {value1}. Do not start a new rotation – we will restore the current one.", - "text_034": "Preparing the transcription of personal messages...", - "text_035": "Local incoming and outgoing copies will be brought to the new client key. The client first tries the old key, and for messages that have already arrived after the PDA change, a new one. Re-sending to the interlocutor’s server is not performed.", + "text_034": "Preparing to re-encrypt private messages…", + "text_035": "Local copies of sent and received private messages will be re-encrypted for the new client key. The app first tries the old key; messages received after the rotation may already require the new key.", "text_068": "Recryption of messages: {value1}. Dialogue {value2}/{value3}: {value4}", "text_069": "Recoded messages: {value1}. Dialogue {value2}/{value3}: {value4}", - "text_072": "Old purse.", + "text_072": "Old wallet", "text_073": "New wallet", "text_074": "Once started, all other sessions on this account will be closed. Do you want to continue?" }, "registration_faq_view": { "text_015": "Back", - "text_027": "purse", + "text_027": "Wallet", "text_026": "Connect the device", "text_001": "Registration issues", "text_017": "Registration issues", @@ -3283,7 +3283,7 @@ "text_018": "Where are the keys?", "text_005": "Why do you need three keys?", "text_006": "Why do you need a significant pause during generation?", - "text_021": "Three keys.", + "text_021": "Three keys", "text_022": "Why time?", "text_025": "First server", "text_023": "What's the password?", @@ -3301,7 +3301,7 @@ "text_028": "Brief answers to the most common questions about keys, password, first server, and trusted devices.", "text_045": "The minimum reasonable level now starts at about 8 characters.", "text_046": "A good guide for most people: 12 characters or more. Our password can be up to 256 characters long.", - "text_037": "This means that the login and password are not just checked on the server, but actually participate in the creation of your keys. Different logins even with the same password will have different keys.", + "text_037": "This means that the username and password are not just checked on the server, but actually participate in the creation of your keys. Different logins even with the same password will have different keys.", "text_038": "Recovery key is required for recovery and the most critical operations with the account. Its private part is never saved on the device and, if necessary, is temporarily calculated from the password.", "text_041": "Now, after a normal login, both working keys – the blockchain key and the access key – are saved automatically. There is no separate limited mode in the current version.", "text_042": "Generation is not specifically made instantaneous. This complicates the mass selection of passwords.", @@ -3337,67 +3337,67 @@ "text_016": "Type", "text_035": "Male", "text_036": "Female", - "text_037": "Unspecified", + "text_037": "Not specified", "text_044": "Message", "text_048": "No text", "text_051": "No text", "text_067": "No text", - "text_001": "My blockchain.", - "text_065": "My blockchain.", - "text_032": "Shining", - "text_034": "Unknown.", + "text_001": "My blockchain", + "text_065": "My blockchain", + "text_032": "Shining member", + "text_034": "Unknown", "text_069": "Connection", "text_064": "The history of my blockchain", "text_043": "Course", "text_041": "Exercise", "text_042": "Service", "text_046": "Creation of a channel", - "text_002": "The Beginning of Blockchain", - "text_045": "The Beginning of Blockchain", + "text_002": "Blockchain genesis", + "text_045": "Blockchain genesis", "text_003": "Open the channel", "text_004": "Open the target", "text_007": "Show the history of my blockchain", "text_009": "Use the blockchain key from an external device", "text_005": "Open a profile", "text_014": "Target block", - "text_015": "Hash targets", + "text_015": "Target hash", "text_010": "Show earlier records", "text_011": "No records yet.", - "text_019": "block hash", + "text_019": "Block hash", "text_020": "Line", - "text_021": "Step of the line", + "text_021": "Line step", "text_022": "Parameter", "text_070": "Parameter", - "text_012": "Purpose", - "text_013": "Fork targets", - "text_017": "Block.", - "text_018": "Date.", - "text_023": "Meaning.", + "text_012": "Target", + "text_013": "Target fork", + "text_017": "Block", + "text_018": "Date", + "text_023": "Value", "text_024": "Technical name", "text_025": "Channel type", "text_026": "Old tip", - "text_029": "It was not possible to download the blockchain", + "text_029": "Could not load blockchain", "text_030": "Main account", "text_054": "avatar", - "text_055": "Canal removal", - "text_038": "Changed avatar", + "text_055": "Channel removal", + "text_038": "Avatar changed", "text_039": "channel", "text_052": "Reply deleted", "text_053": "Editing of the reply", "text_056": "Supplied like", - "text_057": "Like's off.", + "text_057": "Like's off", "text_040": "Front page", "text_047": "Change of keys / fork", "text_049": "Message deleted", "text_050": "Editing of the communication", - "text_031": "Not counting my voice.", - "text_033": "The glow is not interesting.", + "text_031": "Exclude my vote", + "text_033": "Not interested in SHiNE", "text_058": "Profile · Changed avatar", "text_059": "Open the answer", - "text_027": "Blocks dropped", - "text_028": "Disassembly of the block", + "text_027": "Discarded blocks", + "text_028": "Block details", "text_066": "The server did not return the raw bytes of the block.", - "text_068": "No comment.", + "text_068": "No comment", "text_078": "{value1} channel created", "text_079": "Cause of {value1}", "text_062": "Open the initial answer", @@ -3441,13 +3441,13 @@ "text_100": "Changed communication ({value1})", "text_006": "Open blockchain record ↗", "text_110": "Address", - "text_111": "References", - "text_112": "Telephone.", - "text_113": "About me.", - "text_114": "Spiritual path", + "text_111": "Links", + "text_112": "Telephone", + "text_113": "About me", + "text_114": "Spiritual journey", "text_115": "Account type", - "text_116": "SHiNE.", - "text_117": "Paul", + "text_116": "SHiNE", + "text_117": "Gender", "text_118": "Avatar", "text_120": "Close friend", "text_122": "Close friend", @@ -3463,14 +3463,14 @@ "text_175": "Course complete", "text_121": "Removed from close friends", "text_123": "Added friend", - "text_125": "Removed from friends.", + "text_125": "Removed from friends", "text_127": "Added contact", "text_129": "Removed from contact", "text_131": "Subscription issued", - "text_108": "Name.", + "text_108": "First name", "text_143": "Added \"child\" link", - "text_144": "Baby.", - "text_146": "Baby.", + "text_144": "Baby", + "text_146": "Baby", "text_140": "Parent", "text_142": "Parent", "text_141": "Parent communication removed", @@ -3479,7 +3479,7 @@ "text_132": "Subscription", "text_134": "Subscription", "text_133": "Subscription cancelled", - "text_109": "Last name.", + "text_109": "Last name", "text_119": "Added a close friend", "text_151": "Obsolete dating mark", "text_152": "Legacy-linkage", @@ -3499,7 +3499,7 @@ "text_160": "The glow mark", "text_162": "The glow mark", "text_169": "Service/procedure passed", - "text_170": "Status confirmed.", + "text_170": "Status confirmed", "text_178": "Recourse after confirmed compromise", "text_179": "Restoration of access", "text_153": "Obsolete cancellation of dating mark", @@ -3514,8 +3514,8 @@ "text_177": "Possible compromise" }, "start_view": { - "text_003": "Log in", - "text_004": "Register", + "text_003": "Sign in", + "text_004": "Sign up", "text_005": "Entry settings", "text_002": "SHiNE logo", "text_001": "Start" @@ -3524,7 +3524,7 @@ "text_002": "Back", "text_001": "Enter the QR code", "text_003": "Enter the QR code", - "text_008": "I couldn't read the QR code.", + "text_008": "Could not read the QR code.", "text_009": "This browser does not support QR scanning through the camera. Use manual QR text input.", "text_010": "The camera is not supported in this browser.", "text_011": "The QR code is used for {value1}.", @@ -3535,18 +3535,18 @@ "text_018": "None", "text_019": "Yes", "text_013": "Received keys:", - "text_014": "Log in under that login and clear the local history of the old login?", + "text_014": "Sign in under that login and clear the local history of the old login?", "text_012": "Scanned login:", "text_015": "Put the QR code of key transfer into the frame", "text_016": "Enter QR text manually", "text_017": "Check the QR text" }, "device_session_view": { - "text_005": "Log out on this device?", - "text_006": "Log out", + "text_005": "Sign out on this device?", + "text_006": "Sign out", "text_007": "Do you want to end the session?", "text_008": "Finish", - "text_011": "You'll need to log in again to use the app here again.", + "text_011": "You'll need to sign in again to use the app here again.", "text_012": "This device will be logged out of your account.", "text_015": "The session on this device has already been completed. Re-enter.", "text_001": "Device session", @@ -3564,22 +3564,22 @@ "text_003": "Profile", "text_007": "Edit", "text_009": "Settings", - "text_011": "Unable to upload profile", + "text_011": "Could not load profile", "text_013": "Check the connection and try again.", - "text_006": "Uploading profile", - "text_012": "Uploading profile", - "text_008": "purse", - "text_002": "Share a profile", - "text_004": "Share a profile", - "text_005": "Share a profile", + "text_006": "Loading profile…", + "text_012": "Loading profile…", + "text_008": "Wallet", + "text_002": "Share profile", + "text_004": "Share profile", + "text_005": "Share profile", "text_010": "Local test mode.", - "text_014": "Profile in SHiNE", + "text_014": "Profile on SHiNE", "text_015": "Change profile", "text_016": "Other accounts on this device" }, "channel_donate_view": { - "text_001": "Donat to the author", - "text_002": "Donat to the author", + "text_001": "Support the creator", + "text_002": "Support the creator", "text_003": "Back", "text_004": "Back", "text_005": "Loading balance…", @@ -3595,22 +3595,22 @@ "text_019": "The recipient's public key is not available", "text_020": "To transfer, you need to enter SHiNE.", "text_013": "Check the connection to the server and try again.", - "text_014": "It was not possible to identify the channel from the page address.", + "text_014": "Could not identify the channel from the page address.", "text_015": "The owner of the channel has not been found.", "text_022": "The owner of the channel has not been found.", - "text_017": "
Download channel data
>", - "text_021": "
Download channel data
>", + "text_017": "
Loading channel data…
", + "text_021": "
Loading channel data…
", "text_028": "Update", "text_033": "Retry", "text_030": "Transfer", - "text_023": "Donat to the author", + "text_023": "Support the creator", "text_024": "Blockchain", "text_025": "Beneficiary account", "text_026": "Transfer from my account", "text_027": "Balance", "text_029": "Amount", "text_031": "Transfer complete ✓", - "text_032": "Could not open the donat to the author." + "text_032": "Could not open creator support page." }, "channels_list": { "text_001": "Channels", @@ -3621,21 +3621,21 @@ "text_037": "Channel", "text_011": "Channel marked as remote", "text_008": "API/WS error", - "text_010": "We await your beginnings.", - "text_039": "We await your beginnings.", + "text_010": "We await your beginnings", + "text_039": "We await your beginnings", "text_007": "Check the connection and try again.", "text_034": "unknown", "text_035": "unknown", - "text_003": "Canals were not loaded.", + "text_003": "Canals were not loaded", "text_004": "Channel menu", "text_005": "Open the channel menu", "text_006": "Create a channel", - "text_012": "D.", - "text_013": "Virtual Diary Tape", - "text_018": "There will be channels.", - "text_019": "Open your first channel.", - "text_016": "No remote channels.", - "text_017": "No subscriptions yet.", + "text_012": "D", + "text_013": "Virtual Diary Feed", + "text_018": "There will be channels", + "text_019": "Open your first channel", + "text_016": "No remote channels", + "text_017": "No subscriptions yet", "text_022": "Local test mode", "text_023": "Demo mode on.", "text_020": "Find the channel by name, address or author – or create your own.", @@ -3656,8 +3656,8 @@ "text_041": "Search for channels", "text_042": "All", "text_043": "Subscriptions", - "text_044": "Mine.", - "text_045": "My remote." + "text_044": "Mine", + "text_045": "My remote" }, "search_view": { "text_002": "Channel Avatar", @@ -3675,7 +3675,7 @@ "text_017": "Failed to perform a search. Check the connection to the server.", "text_018": "Enter the name or address.", "text_020": "{value1} · {value2}", - "text_008": "Search failed.", + "text_008": "Search failed", "text_016": "Try another name or login.", "text_005": "Channel name: Alice@free/channel", "text_006": "Enter the channel name, its address or username.", @@ -3683,11 +3683,11 @@ "text_021": "Search the entire SHINE network" }, "login_password_view": { - "text_005": "Log in", - "text_007": "Log in", + "text_005": "Sign in", + "text_007": "Sign in", "text_001": "Enter the password", "text_003": "Enter the password", - "text_004": "Password.", + "text_004": "Password", "text_002": "Generating a secret...", "text_006": "Checking the password...", "text_008": "Failed to enter.", @@ -3716,14 +3716,14 @@ "text_018": "Hide the key" }, "registration_choice_view": { - "text_004": "Registration in SHiNE", + "text_004": "Sign up for SHiNE", "text_001": "Account type", "text_002": "Select the account type", - "text_006": "Register for free", - "text_018": "Register for free", + "text_006": "Sign up for free", + "text_018": "Sign up for free", "text_007": "≈ 0.02 SOL · one-time payment", - "text_012": "Choose a full account", - "text_013": "0 SOL · Free of charge", + "text_012": "Choose full account", + "text_013": "0 SOL · Free", "text_003": "Choose the method of registration. A full account is independent of a single server.", "text_005": "Register a full account", "text_010": "You can switch between servers or run your own.", @@ -3733,14 +3733,14 @@ "text_008": "Payment for creating a personal record (PDA) on the Solana blockchain. The exact amount is calculated before payment.", "text_009": "The account is not tied to one SHiNE server.", "text_016": "Password change is not available.", - "text_017": "At any time, you can pay for full registration and get full opportunities." + "text_017": "Upgrade to a full account at any time by paying the registration fee." }, "node_menu": { "text_003": "Friend", "text_002": "Family", "text_001": "Contact", "text_005": "Contact", - "text_006": "You.", + "text_006": "You", "text_004": "Business" }, "developer_settings_view": { @@ -3761,7 +3761,7 @@ "text_020": "Log of the annex", "text_021": "Diagnosis of PWA/Push", "text_022": "Installation on the main screen", - "text_023": "Download the avatar", + "text_023": "Upload avatar", "text_014": "Customize the colors", "text_015": "Forced to update UI", "text_019": "Solana: Check the public node", @@ -3778,48 +3778,48 @@ "text_007": "Hidden opportunities. The screen opens with five quick taps under the heading “Settings”." }, "channel_attachment_manager": { - "text_002": "Couldn't download the file.", + "text_002": "Couldn't upload the file.", "text_001": "Failed to open Arweave.", - "text_003": "Add an avatar.", + "text_003": "Add an avatar", "text_004": "Add file", "text_007": "File not selected", "text_006": "Upload to the server and add", "text_005": "Upload the avatar to the server", "text_008": "Close", - "text_018": "Select a file", + "text_018": "Keep your own copies of important attachments. If a server disappears, you can upload the original file to another access server. The matching SHA-256 hash will let older messages find the correct file again.", "text_019": "File not selected", "text_009": "File storage location", - "text_010": "On your own server.", - "text_011": "Free of charge.", + "text_010": "On your own server", + "text_011": "Free of charge", "text_012": "Permanent decentralized storage", "text_013": "The file itself will only be stored on your server.", "text_014": "The SHiNE blockchain records the name, size and SHA-256 hash of the file, but not the file itself. Storage on the access server is free.", "text_015": "If the access server stops working, the file will become unavailable. In the normal transition to another access server in the future files can be transferred automatically.", "text_016": "Keep your own copies of important investments. If the server suddenly disappears, the same source file can be downloaded to a different access server: a matching SHA-256 will allow old messages to find the correct bytes again.", "text_017": "A user can only have one access server. The expanded version of SHiNE will support multiple access servers, including additional paid servers.", - "text_020": "Choose Turbo – a more convenient way to download to Arweave via a third-party service – or upload directly to the Arweave network.", + "text_020": "Choose Turbo to upload files to Arweave through a third-party service, or upload them directly to Arweave.", "text_021": "Open the Arweave settings..." }, "settings_servers_view": { "text_001": "Server settings", "text_002": "Server settings", "text_004": "Blockchain Servers", - "text_003": "My access server." + "text_003": "My access server" }, "chat_media_view": { "text_003": "Undated", "text_001": "Media and files", "text_002": "Media and files", "text_004": "Media", - "text_005": "Files.", + "text_005": "Files", "text_006": "Video", "text_007": "Photo Photo", "text_010": "There are no photos or videos in this correspondence yet.", "text_011": "There are no files in this correspondence yet.", - "text_012": "You.", + "text_012": "You", "text_013": "Correspondence from {value1}", - "text_008": "I couldn’t download the entire story – it shows what is already on the device.", - "text_009": " >", + "text_008": "Could not load the full conversation history. Showing the messages available on this device.", + "text_009": "Loading chat history…", "text_014": "What to show" }, "access_servers_view": { @@ -3827,9 +3827,9 @@ "text_009": "There is no active user session.", "text_014": "There is no active user session.", "text_015": "No Solana RPC endpoint.", - "text_002": "My access server.", + "text_002": "My access server", "text_003": "No username was found in the current session.", - "text_004": "The access server is downloaded from the account record.", + "text_004": "Access server loaded from the account record.", "text_005": "There are no access servers in the account record yet.", "text_006": "The public key must be 32 bytes.", "text_019": "The {value1} server has already been selected.", @@ -3842,14 +3842,14 @@ "text_016": "PDA 1.2 supports only one access server.", "text_017": "User: {value1}", "text_018": "Selected server {value1}{value2}", - "text_020": "My access server.", + "text_020": "My access server", "text_022": "In the future, it will be possible to connect to two or more access servers (RAS) at the same time to improve stability. This opportunity has not yet been realized.", "text_023": "There is not enough SOL on the device key to pay Solana fees when updating your account record in Solana.", - "text_024": "Replenish the DEVNET wallet", + "text_024": "Add funds to Devnet wallet", "text_021": "You work through the access server listed below. It stores encrypted correspondence and settings, and also ensures the operation of calls." }, "connect_device_view": { - "text_003": "I was unable to read the keys on this device.", + "text_003": "Could not read the keys on this device.", "text_001": "Connect the device", "text_002": "Connect the device", "text_006": "No active session", @@ -3869,7 +3869,7 @@ "text_009": "The recovery key is never transferred or saved to devices.", "text_010": "Checking the keys on this device...", "text_012": "Show a QR code for connection", - "text_013": "Connect to code." + "text_013": "Connect to code" }, "login_other_device_view": { "text_020": "Retry", @@ -3877,19 +3877,19 @@ "text_001": "Entry from another device", "text_003": "Entry from another device", "text_007": "Application cancelled", - "text_009": "It was not possible to check if the entrance was confirmed.", - "text_012": "We were unable to enter through another device.", - "text_013": "Get a new code.", - "text_014": "Get a new code.", - "text_015": "Get a new code.", - "text_016": "Get a new code.", - "text_017": "Get a new code.", + "text_009": "Could not verify whether sign-in was approved.", + "text_012": "Could not enter through another device.", + "text_013": "Get a new code", + "text_014": "Get a new code", + "text_015": "Get a new code", + "text_016": "Get a new code", + "text_017": "Get a new code", "text_024": "Unsupported pairing payload received", "text_025": "The server didn't return pairingId.", - "text_002": "Get the code.", - "text_004": "Waiting time is up.", - "text_008": "Waiting time is up.", - "text_026": "Entrance to {value1}", + "text_002": "Get the code", + "text_004": "Waiting time is up", + "text_008": "Waiting time is up", + "text_026": "Sign in as {value1}", "text_027": "Login via another device is made for {value1}.", "text_018": "Device on the network", "text_019": "The device is not on the network – the application will wait", @@ -3903,7 +3903,7 @@ "text_006": "Entry denied on another device", "text_030": "Wallet session connected to {value1}", "text_031": "Entry code: {value1}", - "text_032": "Entry code.", + "text_032": "Entry code", "text_033": "Open SHiNE where you have already entered", "text_034": "Settings → Devices", "text_035": "Click \"Connect another device\", update the list and confirm the desired application.", @@ -3921,7 +3921,7 @@ "trusted_device_login_settings_view": { "text_009": "The additional password could not be removed.", "text_011": "Passwords don't match.", - "text_014": "It was not possible to save an additional password.", + "text_014": "Could not save an additional password.", "text_018": "Login through another device is allowed without an additional password.", "text_016": "Entry through another device is prohibited.", "text_022": "Entry through another device is prohibited.", @@ -3929,20 +3929,20 @@ "text_001": "Entry from another device", "text_005": "Entry from another device", "text_004": "Enter without password", - "text_006": "It was not possible to change the entry mode.", + "text_006": "Could not change the entry mode.", "text_019": "Prohibit entry through another device", "text_020": "Allow entry through another device", - "text_002": "Downloading settings.", + "text_002": "Loading settings…", "text_003": "An additional password does not give you the right to enter by itself. It only cuts off unnecessary applications before confirmation on a trusted device.", "text_010": "Fill in the password and confirmation.", - "text_012": "An additional password to log in via another device is saved.", + "text_012": "An additional password to sign in via another device is saved.", "text_013": "Additional password saved.", - "text_015": "It was not possible to download the input settings through the device.", + "text_015": "Could not load device sign-in settings.", "text_021": "Entry through another device is permitted.", "text_007": "Login through another device now works without an additional password.", "text_008": "Login now works without an additional password.", "text_024": "Enter the password", - "text_026": "Repeat the password.", + "text_026": "Repeat the password", "text_027": "Save a new password", "text_023": "New additional password", "text_025": "Password confirmation" @@ -3961,10 +3961,10 @@ "text_003": "friend", "text_002": "friend", "text_005": "contact", - "text_007": "linkage", + "text_007": "connection", "text_001": "family", "text_004": "business", - "text_006": "- radiant", + "text_006": "- Shining", "text_008": "{value1} links: full {value2} avatars, {value3} points", "text_009": "Link map - list" }, @@ -4044,7 +4044,10 @@ "text_075": "iPhone/Safari: Push only works after Add Home.", "text_076": "No critical problems found. Check the test push for final validation.", "text_073": "Create a push subscription with the “Subscribe to push” button.", - "text_074": "Install the app as a PWA for more stable push delivery in the background." + "text_074": "Install the app as a PWA for more stable push delivery in the background.", + "test_push_sent": "Sent", + "test_push_delivered": "Delivered", + "test_push_error": "Error" }, "my_blockchain_history_view": { "text_001": "The history of my blockchain" @@ -4066,21 +4069,21 @@ }, "registration_intro_view": { "text_003": "SHiNE logo", - "text_004": "SHiNE.", - "text_008": "SHiNE.", + "text_004": "SHiNE", + "text_008": "SHiNE", "text_001": "Meet SHiNE", "text_002": "Rising above the horizon of the planet", "text_007": "Start registration", "text_009": "Your publications - for a long time", - "text_005": "Welcome to SHiNE.", + "text_005": "Welcome to SHiNE", "text_006": "Your posts, messages and likes are stored forever.", "text_016": "Free registration and generous limits for networking.", "text_010": "Public messages are stored in a decentralized Arweave repository.", "text_011": "Transparent assessments", "text_014": "Real user connections allow you to build clear and verifiable ratings.", - "text_015": "You can start for free.", + "text_015": "You can start for free", "text_012": "Public reactions and assessments can be verified, not just trusted with hidden meters.", - "text_013": "A real social graph." + "text_013": "A real social graph" }, "registration_success_view": { "text_001": "Registration completed", @@ -4093,7 +4096,7 @@ "text_007": "Free registration is confirmed by SHiNE server. Now you can use the network without paying.", "text_008": "You have access to almost all the features of SHiNE, as well as users with paid registration. Your account is not completely decentralized and depends on the server you signed up for. The main difference is that your account information is always stored in Arweave, not Solana. Therefore, you cannot update your public keys, change your password, or switch to another access server.", "text_009": "At any time, you can secure your account with Solana by paying for a paid registration and creating a PDA. After that, all the features of a paid account will be available to you, while your login and history will be saved.", - "text_010": "Please do not forget your password!

We do not store your private keys and cannot recover your password. If you forget the password and lose access to the keys on all devices, it will be impossible to restore encrypted personal correspondence.

>" + "text_010": "Please keep your password safe!

We do not store your private keys and cannot recover your password. If you forget it and lose access to your keys on every device, your encrypted private conversations cannot be recovered.

" }, "solana_users_init_view": { "text_003": "Connect the wallet", @@ -4126,7 +4129,7 @@ "text_004": "Homeserver session for remote AddBlock saved.", "text_006": "The list of homeserver sessions has been updated.", "text_008": "Homeserver session selection for remote AddBlock is reset.", - "text_010": ">", + "text_010": "Selected for remote AddBlock", "text_015": "Update the list of homeserver sessions", "text_016": "Reset the choice", "text_014": "If the device does not have a local blockchain key, the UI will be able to send AddBlock to the selected homeserver session. Homeserver will sign the block with its blockchain key and send the usual AddBlock to the server." @@ -4150,7 +4153,7 @@ "text_010": "Recordings: {value1}", "text_011": "Records: {value1} · copied", "text_013": "Clear", - "text_012": "Copy everything." + "text_012": "Copy everything" }, "dropdown_menu": { "text_001": "Back: {value1}" @@ -4164,7 +4167,7 @@ "text_002": "Step {value1} of 3" }, "network_version_switcher": { - "text_001": "Version:>", + "text_001": "Version:", "text_003": "Version 2", "text_002": "Version 1", "text_004": "Communications screen version" @@ -4174,52 +4177,524 @@ "text_002": "Download", "text_003": "Download", "text_004": "Previous", - "text_005": "Next.", + "text_005": "Next", "text_006": "Viewing" }, "shine_wordmark": { - "text_001": "SHiNE." + "text_001": "SHiNE" }, "sheet": { "text_001": "Close" }, "scroll_to_bottom_button": { - "text_001": "Scroll the tape down." + "text_001": "Scroll to bottom of feed" }, "message_menu": { "text_001": "Action of the communication" } }, "errors": { - "text_020": "The session is invalid. Please login again.", - "text_007": "Wrong password.", + "text_020": "Session invalid. Sign in again.", + "text_007": "Incorrect password.", "text_008": "This user belongs to another access server.", - "text_001": "No connection to the server. Check the internet and try again.", - "text_002": "Action not completed. Try it again.", - "text_011": "The connection password doesn't fit.", + "text_001": "Cannot connect to the server. Check your internet connection and try again.", + "text_002": "Action failed. Try again.", + "text_011": "Incorrect pairing password.", "text_012": "This login belongs to the premium category. It requires a separate purchase through the DAO.", - "text_017": "No base line block found. Update the page and repeat the action.", - "text_018": "Canal status conflict. Update the page and repeat the action.", + "text_017": "Base block for this line not found. Refresh the page and try again.", + "text_018": "Channel state conflict. Refresh the page and try again.", "text_015": "Enter the channel name.", "text_016": "That name is already taken. Try changing it a little bit.", - "text_003": "Browser cryptography is not available. Open the app via HTTPS or localhost.", + "text_003": "Browser cryptography is unavailable. Open the app over HTTPS or localhost.", "text_004": "The connection is blocked: the page is open on HTTPS, and the server is listed as ws://. Use wss://.", - "text_024": "No microphone or camera found.", - "text_025": "The microphone or camera is occupied by another application.", - "text_019": "Incorrect channel data. Update the page and repeat the action.", - "text_021": "The session is outdated. Enter again and repeat the action.", - "text_005": "The server takes too long to respond. Try again in a few seconds.", - "text_006": "No user found. Check the login.", - "text_022": "The access key is not supported by the server. Clear the local keys and re-enter.", - "text_023": "No access to the microphone or camera. Allow it in the browser settings.", - "text_009": "Unfortunately, there is currently no active device of this user connected to this server on the network, and therefore it is impossible to log in this way.", - "text_010": "For this, the login is not yet enabled by code connection. On a trusted device, open “Connect by Code” and click “Enable Code Connection” or set an additional password.", - "text_013": "This login refers to the company/brand. It requires a separate coordination process.", - "text_014": "Wrong channel name. Only Latin letters, numbers, and - Length: 4..32 are allowed. The name should not consist only of numbers." + "text_024": "No microphone or camera detected.", + "text_025": "Microphone or camera is being used by another application.", + "text_019": "Invalid channel data. Refresh the page and try again.", + "text_021": "Session expired. Sign in again and retry.", + "text_005": "The server is taking too long to respond. Try again in a few seconds.", + "text_006": "User not found. Check the username.", + "text_022": "The access key is not supported by this server. Clear your local keys and sign in again.", + "text_023": "Microphone or camera access is blocked. Allow access in your browser settings.", + "text_009": "No active device for this user is currently connected to the server, so you cannot sign in using this method.", + "text_010": "Code-based sign-in is not enabled for this account. On a trusted device, open “Connect by code” and enable the feature or set an additional password.", + "text_013": "This username is reserved for a company or brand and requires separate approval.", + "text_014": "Invalid channel name. Use 4–32 Latin letters, digits, underscores (_) or hyphens (-). The name cannot consist only of digits." }, "notifications": { "dm_unread_many": "{count} unread messages", "dm_unread_one": "{count} unread message", "dm_unread_few": "{count} unread messages" + }, + "remaining": { + "theme": { + "background": "Background", + "surfaces_inputs_menus_cards": "Surfaces: inputs, menus, cards", + "selection_and_subtle_highlighting": "Selection and subtle highlighting", + "primary_text": "Primary text", + "secondary_text_time_hints": "Secondary text: time, hints", + "dividers": "Dividers", + "input_and_button_borders": "Input and button borders", + "raised_surfaces_inputs_and_hover": "Raised surfaces: inputs and hover", + "accent_primary_buttons_and_links": "Accent: primary buttons and links", + "secondary_actions_reply_and_links": "Secondary actions: Reply and links", + "outgoing_message": "Outgoing message", + "text_on_accent_buttons": "Text on accent buttons", + "liked_reaction": "Liked reaction", + "errors_and_destructive_actions": "Errors and destructive actions", + "success": "Success", + "warning": "Warning", + "information_and_progress_hints": "Information and progress hints", + "shine": "SHiNE", + "indigo": "Indigo", + "turquoise": "Turquoise", + "monochrome": "Monochrome", + "ocean": "Ocean", + "lavender": "Lavender", + "graphite": "Graphite", + "sakura": "Sakura", + "emerald": "Emerald", + "sunrise": "Sunrise", + "cyberpunk": "Cyberpunk", + "arctic": "Arctic", + "coral": "Coral", + "grape": "Grape", + "forest": "Forest", + "ruby": "Ruby", + "lagoon": "Lagoon", + "copper": "Copper", + "neon": "Neon", + "paper": "Paper", + "cosmos": "Cosmos", + "mint": "Mint", + "sandstone": "Sandstone", + "dusk": "Dusk", + "lemon": "Lemon", + "obsidian": "Obsidian" + }, + "profile_fields": { + "first_name": "First name", + "enter_your_first_name": "Enter your first name", + "last_name": "Last name", + "enter_your_last_name": "Enter your last name", + "city": "City", + "for_example_london": "For example, London", + "address": "Address", + "street_and_house_number": "Street and house number", + "links": "Links", + "website_profile_or_other_link": "Website, profile or other link", + "phone": "Phone", + "about_me": "About me", + "tell_us_a_little_about_yourself": "Tell us a little about yourself", + "spiritual_path": "Spiritual journey", + "share_your_spiritual_journey_experience_practices_and_view": "Share your spiritual journey, experience, practices and views", + "account_role": "Account role", + "shine": "SHiNE" + }, + "note_markers": { + "green_marker": "Green marker", + "yellow_marker": "Yellow marker", + "red_marker": "Red marker", + "blue_marker": "Blue marker", + "purple_marker": "Purple marker" + }, + "confirmation": { + "confirm_action": "Confirm action", + "yes": "Yes", + "cancel": "Cancel" + }, + "feedback": { + "loading": "Loading…", + "could_not_load": "Could not load", + "check_your_connection_and_try_again": "Check your connection and try again." + }, + "avatar": { + "avatar": "Avatar" + }, + "channel_editor": { + "reply": "Reply", + "reply_2": "Reply", + "write_a_reply": "Write a reply" + }, + "consent": { + "confirmation": "Confirmation" + }, + "scroll": { + "scroll_down": "Scroll down" + }, + "navigation": { + "search": "Search" + }, + "profile": { + "add_connection": "Add connection" + }, + "channels": { + "author": "author", + "loading": "Loading…", + "reposts_are_coming_soon": "Reposts are coming soon", + "retry": "Retry", + "diary_display_name": "Journal" + }, + "attachments": { + "text_0_b": "0 B", + "gb": "GB", + "mb": "MB", + "kb": "KB", + "the_file_is_unavailable_on_the_author_s_access_server": "The file is unavailable on the author’s access server.", + "the_file_may_not_have_propagated_to_arweave_yet_please_try": "The file may not have propagated to Arweave yet. Please try again in a few minutes.", + "file_unavailable": "File unavailable.", + "download_file": "Download file", + "open_video": "Open video", + "open_image": "Open image", + "previous_attachment": "Previous attachment", + "next_attachment": "Next attachment", + "loading_file": "Loading file…", + "bytes": "{count} B", + "counter": "{current} of {total}" + }, + "call_ui": { + "user": "user", + "call": "Call", + "other_user_s_profile": "Other user’s profile", + "unmute_microphone": "Unmute microphone", + "mute_microphone": "Mute microphone", + "turn_off_speaker": "Turn off speaker", + "turn_on_speaker": "Turn on speaker", + "turn_off_camera": "Turn off camera", + "turn_on_camera": "Turn on camera", + "minimize_call": "Minimize call", + "answer": "Answer", + "decline": "Decline", + "hang_up": "Hang up", + "call_with": "{kind} with {peer} · {elapsed}", + "profile_of": "Profile of {login}" + }, + "call": { + "video_call": "Video call", + "call": "Call", + "call_in_progress": "Call in progress", + "directly_on_local_network": "Directly on local network", + "directly_over_the_internet": "Directly over the internet", + "connection_lost_reconnecting": "Connection lost. Reconnecting…", + "call_ended": "Call ended", + "user_is_busy": "User is busy", + "connecting": "Connecting…", + "shine_incoming_call": "SHiNE: incoming call", + "another_user": "another user", + "server_temporarily_unavailable": "Server temporarily unavailable", + "finding_user": "Finding user…", + "calling": "Calling…", + "could_not_connect_call_ended": "Could not connect. Call ended.", + "incoming_video": "Incoming video call from {name}", + "incoming_voice": "Incoming call from {name}", + "active_route": "Call in progress ({route}{videoSlotMarker})", + "via_turn": "via TURN", + "via_turn_proto": "via TURN ({protocol})", + "another_active": "An active call with {peer} is already in progress", + "unit_h": "h", + "unit_m": "m", + "unit_s": "s", + "turn_route": "via TURN ({protocol})", + "microphone_error": "Microphone access denied: {error}", + "route_turn_candidate": "via TURN ({address})", + "microphone_error_full": "Cannot access microphone: {error}", + "active_call_already": "There is already an active call with {peer}" + }, + "password": { + "starts_and_ends_with_a_space": "starts and ends with a space", + "starts_with_a_space": "starts with a space", + "ends_with_a_space": "ends with a space", + "space_in_password": "Space in password", + "keep_password_as_entered": "Keep password as entered", + "edit_password": "Edit password", + "warning": "Your password {where}. A leading or trailing space is easy to miss at your next sign-in, but it is part of the password and affects your access keys. Keep it as entered?" + }, + "public_channel": { + "author": "Author", + "channel": "Channel", + "open_in_shine": "Open in SHiNE", + "subscribers": "{count} subscribers" + }, + "file_upload": { + "no_file_selected": "No file selected.", + "cannot_upload_an_empty_file": "Cannot upload an empty file.", + "calculating_sha_256": "Calculating SHA-256…", + "checking_whether_the_file_is_on_the_server": "Checking whether the file is on the server…", + "uploading_to_access_server": "Uploading to access server…", + "size": "Size ", + "turbo_price": "Turbo price: ", + "free_up_to": "Free up to ", + "name": "Name: ", + "size_label": "Size: ", + "price": "Price: " + }, + "arweave_wallet": { + "the_transfer_amount_must_be_a_number": "The transfer amount must be a number", + "too_many_decimal_places_maximum_12": "Too many decimal places (maximum 12)", + "the_transfer_amount_must_be_greater_than_zero": "The transfer amount must be greater than zero", + "enter_your_arweave_wallet_secret": "Enter your Arweave wallet secret.", + "invalid_arweave_jwk": "Invalid Arweave JWK.", + "the_secret_must_be_json_jwk_or_base64url_json_jwk": "The secret must be JSON JWK or base64url(JSON JWK).", + "derived_from_blockchain_key": "Derived from blockchain key", + "no_active_session": "No active session.", + "arweave_wallet_loaded": "Arweave wallet loaded.", + "your_arweave_wallet_is_being_derived_from_the_blockchain_k": "Your Arweave wallet is being derived from the blockchain key for the first time. This may take a moment.", + "arweave_address_missing": "Arweave address missing", + "arweave_gateway_returned_an_invalid_balance": "Arweave gateway returned an invalid balance", + "arweave_recipient_address_missing": "Arweave recipient address missing", + "arweave_wallet_is_not_initialized": "Arweave wallet is not initialized" + }, + "solana_wallet": { + "enter_a_private_key": "Enter a private key", + "only_base58_characters_are_allowed": "Only Base58 characters are allowed", + "no_active_session_to_access_client_key": "No active session to access client.key", + "client_key_not_found_on_this_device": "client.key not found on this device", + "no_active_session_to_access_blockchain_key": "No active session to access blockchain.key", + "blockchain_key_not_found_on_this_device": "blockchain.key not found on this device", + "no_active_session_to_access_root_key": "No active session to access root key", + "root_key_not_found_on_this_device": "Root key not found on this device", + "blockchain_key": "Blockchain key", + "recipient_address_missing": "Recipient address missing", + "transfer_amount_must_be_greater_than_zero": "Transfer amount must be greater than zero", + "amount_is_too_small": "Amount is too small", + "previous_solana_wallet_was_not_provided": "Previous Solana wallet was not provided", + "new_wallet_address_missing": "New wallet address missing", + "old_and_new_wallet_addresses_are_the_same": "Old and new wallet addresses are the same" + }, + "qr_keys": { + "blockchain_key": "blockchain key", + "access_key": "access key", + "both_an_access_key_and_blockchain_key_are_required_to_conn": "Both an access key and blockchain key are required to connect", + "this_is_not_a_shine_key_transfer_qr_code": "This is not a SHiNE key transfer QR code", + "unsupported_qr_code_format": "Unsupported QR code format", + "no_login_found_in_qr_code": "No login found in QR code", + "qr_code_does_not_contain_all_required_keys": "QR code does not contain all required keys" + }, + "connections": { + "user_not_found": "User not found" + }, + "arweave_files": { + "could_not_read_image": "Could not read image", + "select_an_image_file": "Select an image file.", + "only_jpeg_png_and_webp_files_are_supported": "Only JPEG, PNG and WebP files are supported.", + "file_too_large_maximum_size_10_mb": "File too large. Maximum size: 10 MB.", + "could_not_process_the_image": "Could not process the image.", + "arweave_wallet_is_not_initialized": "Arweave wallet is not initialized.", + "select_a_file": "Select a file." + }, + "turbo": { + "top_up_amount_must_be_a_number": "Top-up amount must be a number", + "too_many_decimal_places_for_sol": "Too many decimal places for SOL", + "top_up_amount_must_be_greater_than_zero": "Top-up amount must be greater than zero", + "blockchain_key_for_turbo_not_found_on_this_device": "Blockchain key for Turbo not found on this device.", + "could_not_initialize_turbo_sdk": "Could not initialize Turbo SDK.", + "invalid_file_size_for_turbo": "Invalid file size for Turbo.", + "turbo_did_not_return_an_upload_price": "Turbo did not return an upload price.", + "select_a_file_to_upload_through_turbo": "Select a file to upload through Turbo." + }, + "speech": { + "piper_http_url_is_not_set": "Piper HTTP URL is not set.", + "openai_tts_api_key_is_missing": "OpenAI TTS API key is missing.", + "unknown_text_to_speech_provider": "Unknown text-to-speech provider." + }, + "blockchain_snapshot": { + "server_service_unavailable": "Server service unavailable.", + "login_missing": "Login missing.", + "blockchain_name_missing": "Blockchain name missing.", + "no_blocks_available_on_the_server_for_a_snapshot": "No blocks available on the server for a snapshot.", + "could_not_retrieve_block": "Could not retrieve block." + }, + "server_resolver": { + "user_login_is_required_to_find_an_access_server": "User login is required to find an access server." + }, + "websocket": { + "this_page_uses_https_but_the_server_uses_ws_use_wss_for_th": "This page uses HTTPS but the server uses ws://. Use wss:// for the SHiNE server.", + "websocket_connection_closed": "WebSocket connection closed" + }, + "messages": { + "dm_preview_encrypted": "Encrypted message", + "dm_preview_empty": "No messages" + }, + "channel": { + "diary_channel_display_name": "Journal" + }, + "add_channel": { + "channel_login_hint": "Latin letters, digits, _ and -, 4–32 characters; not numbers only.", + "channel_login_digits_only_hint": "A channel name cannot contain only digits." + }, + "html_add_channel_view": { + "auto_filled_from_the_title_you_can_edit_it": " Auto-filled from the title; you can edit it.", + "direct_link": "Direct link: " + }, + "html_channel_about_view": { + "owner": "Owner · " + }, + "html_device_pairing_view": { + "expires": "Expires: " + }, + "html_key_rotation_view": { + "progress": "Progress: ", + "the_old_wallet_has_no_sol_to_transfer": "The old wallet has no SOL to transfer." + }, + "html_messages_list": { + "show_all": "Show all · " + }, + "html_my_blockchain_view": { + "last_block": "Last block: #" + }, + "html_profile_card": { + "confirmed_by": ": confirmed by ", + "profile": "Profile ", + "close": " close" + }, + "html_access_servers_view": { + "wallet": "Wallet: " + }, + "html_show_keys_view": { + "show_key": "Show key" + }, + "html_attachment_format": { + "file_div": "File
" + }, + "html_wallet_view": { + "ticket": "Ticket ", + "has_not_been_created_yet": " has not been created yet.", + "tickets_div": " tickets
", + "usd_ahead_of_it_in_the_queue_div": " USD ahead of it in the queue
", + "ticket_single": " ticket " + }, + "html_public_support_queue_view": { + "ticket": "Ticket ", + "has_not_been_created_yet": " has not been created yet.", + "tickets_div": " tickets
", + "usd_ahead_of_it_in_the_queue_div": " USD ahead of it in the queue
" + }, + "app": { + "error_sent_to_server_login_time": "Error sent to server · {login} · {time}", + "message_from_login": "Message from {login}", + "connecting": "Connecting…", + "connecting_tap_to_retry_now": "Connecting… Tap to retry now", + "disconnected_retrying_in_secs_s_tap_to_retry_now": "Disconnected. Retrying in {secs}s. Tap to retry now", + "connection_problem_tap_to_retry": "Connection problem. Tap to retry", + "a_notification_was_sent_to_profile_login_which_is_not_sav": "A notification was sent to profile {login}, which is not saved on this device.", + "incoming_call_for_profile_login_switch_to_this_profile": "Incoming call for profile “{login}”. Switch to this profile?", + "this_message_was_sent_to_profile_login_switch_profiles_to": "This message was sent to profile “{login}”. Switch profiles to open it?", + "switch_profile": "Switch profile?", + "switch": "Switch", + "could_not_switch_profile": "Could not switch profile.", + "your_session_has_expired_please_sign_in_again": "Your session has expired. Please sign in again.", + "something_went_wrong_error_details_were_sent_to_the_devel": "Something went wrong. Error details were sent to the developers. Please try again.", + "could_not_display_this_screen": "Could not display this screen", + "unknown": "unknown", + "retry": "Retry", + "this_session_has_ended_on_this_device_please_sign_in_agai": "This session has ended on this device. Please sign in again.", + "screen_render": "Screen: {page}. Try again.", + "connected_peer": "Connecting…" + }, + "wallet": { + "no_local_snapshot": "No local snapshot available." + }, + "profile_errors": { + "session_password_is_unavailable_sign_in_again": "Session password is unavailable. Sign in again.", + "invalid_account_role_value": "Invalid account_role value", + "invalid_shine_value": "Invalid shine value", + "the_official_parameter_is_deprecated_use_account_role": "The official parameter is deprecated. Use account_role.", + "invalid_arweave_transaction_id": "Invalid Arweave transaction ID", + "invalid_avatar_sha_256_hash": "Invalid avatar SHA-256 hash" + }, + "attachment_errors": { + "invalid_arweave_transaction_id": "Invalid Arweave transaction ID.", + "invalid_file_sha_256": "Invalid file SHA-256.", + "invalid_file_size": "Invalid file size." + }, + "file_errors": { + "could_not_determine_the_access_server_http_address": "Could not determine the access server HTTP address.", + "invalid_file_sha_256": "Invalid file SHA-256.", + "no_active_user_session": "No active user session.", + "session_key_for_uploading_files_is_missing_on_this_dev": "Session key for uploading files is missing on this device.", + "saved_session_key_belongs_to_a_different_session": "Saved session key belongs to a different session.", + "server_attachment_author_is_missing": "Server attachment author is missing." + }, + "arweave_wallet_errors": { + "invalid_arweave_gateway_url": "Invalid Arweave gateway URL", + "arweave_gateway_must_use_http_or_https": "Arweave gateway must use HTTP or HTTPS", + "no_active_session_to_access_blockchain_key": "No active session to access blockchain key", + "blockchain_key_not_found_on_this_device": "Blockchain key not found on this device" + }, + "solana_wallet_errors": { + "solana_public_key_must_contain_32_bytes": "Solana public key must contain 32 bytes", + "invalid_base58_character": "Invalid Base58 character", + "private_key_was_not_provided": "Private key was not provided", + "private_key_must_be_exactly_32_bytes_in_base58": "Private key must be exactly 32 bytes in Base58", + "no_active_session_to_access_keys": "No active session to access keys", + "empty_solana_secret_key": "Empty Solana secret key" + }, + "arweave_file_errors": { + "invalid_arweave_gateway_url": "Invalid Arweave gateway URL", + "arweave_gateway_must_use_http_or_https": "Arweave gateway must use HTTP or HTTPS", + "invalid_data_for_sha_256": "Invalid data for SHA-256", + "invalid_arweave_transaction_id": "Invalid Arweave transaction ID", + "invalid_avatar_sha_256_hash": "Invalid avatar SHA-256 hash", + "invalid_file_size": "Invalid file size", + "arweave_gateway_returned_an_invalid_price": "Arweave gateway returned an invalid price" + }, + "channel_validation": { + "enter_a_channel_name": "Enter a channel name.", + "channel_name_is_too_short_minimum_4_characters": "Channel name is too short: minimum 4 characters.", + "channel_name_is_too_long_maximum_32_characters": "Channel name is too long: maximum 32 characters.", + "only_latin_letters_digits_and_are_allowed": "Only Latin letters, digits, _ and - are allowed.", + "a_channel_name_cannot_consist_of_digits_only": "A channel name cannot consist of digits only.", + "invalid_channel_name": "Invalid channel name.", + "description_is_too_long_maximum_200_utf_8_bytes": "Description is too long: maximum 200 UTF-8 bytes." + }, + "call_history": { + "user_is_offline": "User is offline", + "no_answer": "No answer", + "could_not_establish_a_connection": "Could not establish a connection", + "user_is_busy": "User is busy", + "call_declined": "Call declined", + "call_was_not_completed": "Call was not completed", + "call_length": "Call: {duration}" + }, + "auth_required": { + "sign_in_required": "Sign in required", + "this_section_is_available_after_you_sign_in": "This section is available after you sign in.", + "sign_in": "Sign in", + "register": "Sign up" + }, + "key_storage": { + "indexeddb_is_unavailable": "IndexedDB is unavailable", + "could_not_write_to_indexeddb": "Could not write to IndexedDB", + "could_not_read_from_indexeddb": "Could not read from IndexedDB" + }, + "device_pairing": { + "invalid_ed25519_private_key": "Invalid Ed25519 private key", + "unsupported_ed25519_private_key_format": "Unsupported Ed25519 private key format", + "unsupported_requester_session_key": "Unsupported requester session key", + "empty_requester_session_key": "Empty requester session key" + }, + "registration_upgrade": { + "invalid_registration_price": "Invalid registration price", + "price_below_rent": "Namespace price ({price} SOL) is below the PDA deposit ({rent} SOL). Registration is temporarily unavailable. Contact the namespace administrator." + }, + "avatar_errors": { + "indexeddb_is_unavailable": "IndexedDB is unavailable", + "could_not_open_indexeddb": "Could not open IndexedDB", + "indexeddb_transaction_failed": "IndexedDB transaction failed", + "could_not_read_avatar_cache": "Could not read avatar cache", + "could_not_write_avatar_cache": "Could not write avatar cache", + "could_not_read_avatar_cache_entries": "Could not read avatar cache entries", + "could_not_clear_avatar_cache": "Could not clear avatar cache", + "invalid_arweave_transaction_id": "Invalid Arweave transaction ID" + }, + "errors": { + "generic": "Could not complete the action. Please try again.", + "try_again": "{action}. Please try again." + }, + "registration_api": { + "server_error": "{op}: server error" + }, + "attachment_error": { + "hash_mismatch": "The downloaded file SHA-256 does not match the blockchain: {actual} != {expected} ({url})" + } } } diff --git a/shine-UI/js/i18n/locales/ru.json b/shine-UI/js/i18n/locales/ru.json index c3a12fc2..d2daf3a7 100644 --- a/shine-UI/js/i18n/locales/ru.json +++ b/shine-UI/js/i18n/locales/ru.json @@ -2153,7 +2153,10 @@ "text_073": "Создайте push-подписку кнопкой «Подписаться на push».", "text_074": "Установите приложение как PWA для более стабильной доставки push в фоне.", "text_075": "iPhone/Safari: push работает только после «Добавить на экран Домой».", - "text_076": "Критических проблем не найдено. Проверьте тестовый push для финальной валидации." + "text_076": "Критических проблем не найдено. Проверьте тестовый push для финальной валидации.", + "test_push_sent": "Отправлен", + "test_push_delivered": "Доставлен", + "test_push_error": "Ошибка" }, "device_qr_view": { "text_001": "Показать QR-код", @@ -4221,5 +4224,477 @@ "dm_unread_one": "{count} непрочитанное сообщение", "dm_unread_few": "{count} непрочитанных сообщения", "dm_unread_many": "{count} непрочитанных сообщений" + }, + "remaining": { + "theme": { + "background": "Фон", + "surfaces_inputs_menus_cards": "Поверхности: поля, меню, карточки", + "selection_and_subtle_highlighting": "Выбранное и лёгкое выделение", + "primary_text": "Основной текст", + "secondary_text_time_hints": "Вторичный текст: время, подсказки", + "dividers": "Разделители", + "input_and_button_borders": "Рамки полей и кнопок", + "raised_surfaces_inputs_and_hover": "Приподнятое: поля ввода, наведение", + "accent_primary_buttons_and_links": "Акцент: главные кнопки, ссылки", + "secondary_actions_reply_and_links": "Вторичное действие: «Ответить», ссылки", + "outgoing_message": "Исходящее сообщение", + "text_on_accent_buttons": "Текст на акцентной кнопке", + "liked_reaction": "Поставленный лайк", + "errors_and_destructive_actions": "Ошибки и удаление", + "success": "Успех", + "warning": "Предупреждение", + "information_and_progress_hints": "Информация, подсказки о процессе", + "shine": "Сияние", + "indigo": "Индиго", + "turquoise": "Бирюза", + "monochrome": "Монохром", + "ocean": "Океан", + "lavender": "Лаванда", + "graphite": "Графит", + "sakura": "Сакура", + "emerald": "Изумруд", + "sunrise": "Рассвет", + "cyberpunk": "Киберпанк", + "arctic": "Арктика", + "coral": "Коралл", + "grape": "Виноград", + "forest": "Лес", + "ruby": "Рубин", + "lagoon": "Лагуна", + "copper": "Медь", + "neon": "Неон", + "paper": "Бумага", + "cosmos": "Космос", + "mint": "Мята", + "sandstone": "Песчаник", + "dusk": "Сумерки", + "lemon": "Лимон", + "obsidian": "Обсидиан" + }, + "profile_fields": { + "first_name": "Имя", + "enter_your_first_name": "Введите имя", + "last_name": "Фамилия", + "enter_your_last_name": "Введите фамилию", + "city": "Город", + "for_example_london": "Например, Казань", + "address": "Адрес", + "street_and_house_number": "Улица, дом", + "links": "Ссылки", + "website_profile_or_other_link": "Сайт, профиль или другая ссылка", + "phone": "Телефон", + "about_me": "О себе", + "tell_us_a_little_about_yourself": "Коротко расскажите о себе", + "spiritual_path": "Духовный путь", + "share_your_spiritual_journey_experience_practices_and_view": "Расскажите о своём духовном пути, опыте, практиках и взглядах", + "account_role": "Роль аккаунта", + "shine": "Сияние" + }, + "note_markers": { + "green_marker": "Зелёная метка", + "yellow_marker": "Жёлтая метка", + "red_marker": "Красная метка", + "blue_marker": "Синяя метка", + "purple_marker": "Фиолетовая метка" + }, + "confirmation": { + "confirm_action": "Подтвердите действие", + "yes": "Да", + "cancel": "Отмена" + }, + "feedback": { + "loading": "Загрузка", + "could_not_load": "Не удалось загрузить", + "check_your_connection_and_try_again": "Проверьте соединение и попробуйте ещё раз." + }, + "avatar": { + "avatar": "Аватар" + }, + "channel_editor": { + "reply": "Ответ", + "reply_2": "Ответить", + "write_a_reply": "Напишите ответ" + }, + "consent": { + "confirmation": "Подтверждение" + }, + "scroll": { + "scroll_down": "Вниз" + }, + "navigation": { + "search": "Поиск" + }, + "profile": { + "add_connection": "Добавить связь" + }, + "channels": { + "author": "автор", + "loading": "Загрузка", + "reposts_are_coming_soon": "Репосты скоро появятся", + "retry": "Повторить", + "diary_display_name": "Дневник" + }, + "attachments": { + "text_0_b": "0 Б", + "gb": "ГБ", + "mb": "МБ", + "kb": "КБ", + "the_file_is_unavailable_on_the_author_s_access_server": "Файл недоступен на сервере доступа автора.", + "the_file_may_not_have_propagated_to_arweave_yet_please_try": "Скорее всего файл недоступен, потому что сообщение было создано недавно и файл ещё не распространился в Arweave. Попробуйте повторить через несколько минут.", + "file_unavailable": "Файл недоступен.", + "download_file": "Скачать файл", + "open_video": "Открыть видео", + "open_image": "Открыть изображение", + "previous_attachment": "Предыдущее вложение", + "next_attachment": "Следующее вложение", + "loading_file": "Загружаем файл…", + "bytes": "{count} Б", + "counter": "{current} из {total}" + }, + "call_ui": { + "user": "пользователь", + "call": "Звонок", + "other_user_s_profile": "Профиль собеседника", + "unmute_microphone": "Включить микрофон", + "mute_microphone": "Выключить микрофон", + "turn_off_speaker": "Выключить громкую связь", + "turn_on_speaker": "Включить громкую связь", + "turn_off_camera": "Выключить камеру", + "turn_on_camera": "Включить камеру", + "minimize_call": "Свернуть звонок", + "answer": "Ответить", + "decline": "Отклонить", + "hang_up": "Положить трубку", + "call_with": "{kind} с {peer} · {elapsed}", + "profile_of": "Профиль {login}" + }, + "call": { + "video_call": "Видеозвонок", + "call": "Звонок", + "call_in_progress": "Разговор идёт", + "directly_on_local_network": "напрямую в локальной сети", + "directly_over_the_internet": "напрямую через интернет", + "connection_lost_reconnecting": "Связь прервалась. Переподключаем…", + "call_ended": "Звонок завершён", + "user_is_busy": "Пользователь занят", + "connecting": "Соединяем…", + "shine_incoming_call": "SHiNE: входящий звонок", + "another_user": "другим пользователем", + "server_temporarily_unavailable": "Сервер временно недоступен", + "finding_user": "Ищем пользователя…", + "calling": "Вызываем…", + "could_not_connect_call_ended": "Не удалось подключиться, вызов завершён", + "incoming_video": "Входящий видеозвонок от {name}", + "incoming_voice": "Вам звонит {name}", + "active_route": "Разговор идёт ({route}{videoSlotMarker})", + "via_turn": "через TURN", + "via_turn_proto": "через TURN ({protocol})", + "another_active": "Уже есть активный звонок с {peer}", + "unit_h": "ч", + "unit_m": "м", + "unit_s": "с", + "turn_route": "через TURN ({protocol})", + "microphone_error": "Нет доступа к микрофону: {error}", + "route_turn_candidate": "через TURN ({address})", + "microphone_error_full": "Нет доступа к микрофону: {error}", + "active_call_already": "Уже есть активный звонок с {peer}" + }, + "password": { + "starts_and_ends_with_a_space": "начинается и заканчивается пробелом", + "starts_with_a_space": "начинается с пробела", + "ends_with_a_space": "заканчивается пробелом", + "space_in_password": "Пробел в пароле", + "keep_password_as_entered": "Да, оставить пароль", + "edit_password": "Вернуться к паролю", + "warning": "Ваш пароль {where}. Такой пробел трудно заметить при следующем входе, но он является частью пароля и влияет на ключи доступа. Вы уверены, что хотите оставить его?" + }, + "public_channel": { + "author": "Автор", + "channel": "Канал", + "open_in_shine": "Открыть в SHiNE", + "subscribers": "{count} подписчиков" + }, + "file_upload": { + "no_file_selected": "Файл не выбран.", + "cannot_upload_an_empty_file": "Нельзя загрузить пустой файл.", + "calculating_sha_256": "Считаем SHA-256…", + "checking_whether_the_file_is_on_the_server": "Проверяем, есть ли файл на сервере…", + "uploading_to_access_server": "Загружаем на сервер доступа…", + "size": "Размер ", + "turbo_price": "Цена Turbo: ", + "free_up_to": "Бесплатно до ", + "name": "Имя: ", + "size_label": "Размер: ", + "price": "Цена: " + }, + "arweave_wallet": { + "the_transfer_amount_must_be_a_number": "Сумма перевода должна быть числом", + "too_many_decimal_places_maximum_12": "Слишком много знаков после запятой (максимум 12)", + "the_transfer_amount_must_be_greater_than_zero": "Сумма перевода должна быть больше 0", + "enter_your_arweave_wallet_secret": "Введите секрет Arweave-кошелька.", + "invalid_arweave_jwk": "Некорректный JWK Arweave.", + "the_secret_must_be_json_jwk_or_base64url_json_jwk": "Секрет должен быть JSON JWK или base64url(JSON JWK).", + "derived_from_blockchain_key": "Стандартный из ключа блокчейна", + "no_active_session": "Нет активной сессии.", + "arweave_wallet_loaded": "Arweave-кошелёк загружен.", + "your_arweave_wallet_is_being_derived_from_the_blockchain_k": "Сейчас мы впервые получаем Arweave-кошелёк из вашего ключа блокчейна. Это может занять немного времени.", + "arweave_address_missing": "Не указан адрес Arweave", + "arweave_gateway_returned_an_invalid_balance": "Arweave gateway вернул некорректный баланс", + "arweave_recipient_address_missing": "Не указан адрес получателя Arweave", + "arweave_wallet_is_not_initialized": "Кошелёк Arweave не инициализирован" + }, + "solana_wallet": { + "enter_a_private_key": "Введите приватный ключ", + "only_base58_characters_are_allowed": "Разрешены только символы Base58", + "no_active_session_to_access_client_key": "Нет активной сессии для доступа к client.key", + "client_key_not_found_on_this_device": "На устройстве не найден client.key", + "no_active_session_to_access_blockchain_key": "Нет активной сессии для доступа к blockchain.key", + "blockchain_key_not_found_on_this_device": "На устройстве не найден blockchain.key", + "no_active_session_to_access_root_key": "Нет активной сессии для доступа к root key", + "root_key_not_found_on_this_device": "На устройстве не найден root key", + "blockchain_key": "Ключ блокчейна", + "recipient_address_missing": "Не указан адрес получателя", + "transfer_amount_must_be_greater_than_zero": "Сумма перевода должна быть больше 0", + "amount_is_too_small": "Сумма слишком мала", + "previous_solana_wallet_was_not_provided": "Не передан старый Solana-кошелёк", + "new_wallet_address_missing": "Не указан новый адрес кошелька", + "old_and_new_wallet_addresses_are_the_same": "Старый и новый кошельки совпадают" + }, + "qr_keys": { + "blockchain_key": "ключ блокчейна", + "access_key": "ключ доступа", + "both_an_access_key_and_blockchain_key_are_required_to_conn": "Для подключения нужны ключ доступа и ключ блокчейна", + "this_is_not_a_shine_key_transfer_qr_code": "Это не QR-код переноса ключей Сияния", + "unsupported_qr_code_format": "Неподдерживаемый формат QR-кода", + "no_login_found_in_qr_code": "В QR-коде нет логина", + "qr_code_does_not_contain_all_required_keys": "В QR-коде нет полного набора рабочих ключей" + }, + "connections": { + "user_not_found": "Пользователь не найден" + }, + "arweave_files": { + "could_not_read_image": "Не удалось прочитать изображение", + "select_an_image_file": "Выберите файл изображения.", + "only_jpeg_png_and_webp_files_are_supported": "Поддерживаются только JPEG, PNG или WebP.", + "file_too_large_maximum_size_10_mb": "Файл слишком большой. Максимум 10 MB.", + "could_not_process_the_image": "Не удалось подготовить изображение.", + "arweave_wallet_is_not_initialized": "Arweave-кошелёк не инициализирован.", + "select_a_file": "Выберите файл." + }, + "turbo": { + "top_up_amount_must_be_a_number": "Сумма пополнения должна быть числом", + "too_many_decimal_places_for_sol": "Слишком много знаков после запятой для SOL", + "top_up_amount_must_be_greater_than_zero": "Сумма пополнения должна быть больше 0", + "blockchain_key_for_turbo_not_found_on_this_device": "На устройстве не найден blockchain key для Turbo.", + "could_not_initialize_turbo_sdk": "Turbo SDK не удалось инициализировать.", + "invalid_file_size_for_turbo": "Некорректный размер файла для Turbo.", + "turbo_did_not_return_an_upload_price": "Turbo не вернул цену загрузки.", + "select_a_file_to_upload_through_turbo": "Выберите файл для загрузки через Turbo." + }, + "speech": { + "piper_http_url_is_not_set": "Не указан адрес Piper HTTP.", + "openai_tts_api_key_is_missing": "Не заполнен API key для OpenAI TTS.", + "unknown_text_to_speech_provider": "Неизвестный провайдер озвучки." + }, + "blockchain_snapshot": { + "server_service_unavailable": "Сервис сервера недоступен.", + "login_missing": "Не указан логин.", + "blockchain_name_missing": "Не указано имя блокчейна.", + "no_blocks_available_on_the_server_for_a_snapshot": "На сервере нет блоков для слепка.", + "could_not_retrieve_block": "Не удалось получить блок." + }, + "server_resolver": { + "user_login_is_required_to_find_an_access_server": "Не указан логин пользователя для поиска сервера доступа." + }, + "websocket": { + "this_page_uses_https_but_the_server_uses_ws_use_wss_for_th": "Страница открыта по HTTPS, а сервер указан как ws://. Используйте wss:// адрес для Shine сервера.", + "websocket_connection_closed": "Соединение WebSocket закрыто" + }, + "messages": { + "dm_preview_encrypted": "Зашифрованное сообщение", + "dm_preview_empty": "Нет сообщений" + }, + "channel": { + "diary_channel_display_name": "Дневник" + }, + "add_channel": { + "channel_login_hint": "Латиница, цифры, _ и -, от 4 до 32 символов, не только цифры.", + "channel_login_digits_only_hint": "Имя канала не должно состоять только из цифр." + }, + "html_add_channel_view": { + "auto_filled_from_the_title_you_can_edit_it": " Заполняется из названия, можно поправить.", + "direct_link": "Прямая ссылка: " + }, + "html_channel_about_view": { + "owner": "Владелец · " + }, + "html_device_pairing_view": { + "expires": "Истекает: " + }, + "html_key_rotation_view": { + "progress": "Прогресс: ", + "the_old_wallet_has_no_sol_to_transfer": "На старом кошельке нет SOL для переноса." + }, + "html_messages_list": { + "show_all": "Показать всех · " + }, + "html_my_blockchain_view": { + "last_block": "Последний блок: #" + }, + "html_profile_card": { + "confirmed_by": ": подтвердили ", + "profile": "Профиль ", + "close": " близк." + }, + "html_access_servers_view": { + "wallet": "Кошелёк: " + }, + "html_show_keys_view": { + "show_key": "Показать ключ" + }, + "html_attachment_format": { + "file_div": "Файл
" + }, + "html_wallet_view": { + "ticket": "Билет ", + "has_not_been_created_yet": " пока не создан.", + "tickets_div": " билетов
", + "usd_ahead_of_it_in_the_queue_div": " USD в очереди до него", + "ticket_single": " билет " + }, + "html_public_support_queue_view": { + "ticket": "Билет ", + "has_not_been_created_yet": " пока не создан.", + "tickets_div": " билетов", + "usd_ahead_of_it_in_the_queue_div": " USD в очереди до него" + }, + "app": { + "error_sent_to_server_login_time": "Ошибка отправлена на сервер · {login} · {time}", + "message_from_login": "Сообщение от {login}", + "connecting": "Соединяюсь…", + "connecting_tap_to_retry_now": "Соединяюсь… Нажмите, чтобы попробовать сразу", + "disconnected_retrying_in_secs_s_tap_to_retry_now": "Нет соединения. Повтор через {secs}с. Нажмите для попытки сейчас", + "connection_problem_tap_to_retry": "Проблема с соединением. Нажмите для повтора", + "a_notification_was_sent_to_profile_login_which_is_not_sav": "Уведомление пришло профилю {login}, который не сохранён на этом устройстве.", + "incoming_call_for_profile_login_switch_to_this_profile": "Входящий звонок для профиля «{login}». Переключиться на этот профиль?", + "this_message_was_sent_to_profile_login_switch_profiles_to": "Это сообщение пришло профилю «{login}». Переключиться, чтобы открыть его?", + "switch_profile": "Переключить профиль?", + "switch": "Переключить", + "could_not_switch_profile": "Не удалось переключить профиль.", + "your_session_has_expired_please_sign_in_again": "Ваша сессия устарела. Авторизируйтесь заново.", + "something_went_wrong_error_details_were_sent_to_the_devel": "Что-то пошло не так. Сведения об ошибке уже отправлены разработчикам – попробуйте ещё раз.", + "could_not_display_this_screen": "Не удалось отрисовать экран", + "unknown": "неизвестно", + "retry": "Повторить", + "this_session_has_ended_on_this_device_please_sign_in_agai": "Сессия на этом устройстве уже завершена. Выполните вход заново.", + "screen_render": "Экран: {page}. Попробуйте повторить.", + "connected_peer": "Соединяюсь…" + }, + "wallet": { + "no_local_snapshot": "Локального слепка нет." + }, + "profile_errors": { + "session_password_is_unavailable_sign_in_again": "Нет storagePwd в памяти сессии. Выполните вход заново.", + "invalid_account_role_value": "Некорректное значение account_role", + "invalid_shine_value": "Некорректное значение shine", + "the_official_parameter_is_deprecated_use_account_role": "Параметр official устарел. Используйте account_role.", + "invalid_arweave_transaction_id": "Некорректный Transaction ID Arweave", + "invalid_avatar_sha_256_hash": "Некорректный SHA256 хэш аватара" + }, + "attachment_errors": { + "invalid_arweave_transaction_id": "Некорректный Transaction ID Arweave.", + "invalid_file_sha_256": "Некорректный SHA-256 файла.", + "invalid_file_size": "Некорректный размер файла." + }, + "file_errors": { + "could_not_determine_the_access_server_http_address": "Не удалось определить HTTP-адрес сервера доступа.", + "invalid_file_sha_256": "Некорректный SHA-256 файла.", + "no_active_user_session": "Нет активной пользовательской сессии.", + "session_key_for_uploading_files_is_missing_on_this_dev": "На устройстве нет session key для загрузки файла.", + "saved_session_key_belongs_to_a_different_session": "Сохранённый session key относится к другой сессии.", + "server_attachment_author_is_missing": "Не указан автор server-вложения." + }, + "arweave_wallet_errors": { + "invalid_arweave_gateway_url": "Некорректный Arweave gateway URL", + "arweave_gateway_must_use_http_or_https": "Arweave gateway должен использовать http или https", + "no_active_session_to_access_blockchain_key": "Нет активной сессии для доступа к blockchain key", + "blockchain_key_not_found_on_this_device": "На устройстве не найден blockchain key" + }, + "solana_wallet_errors": { + "solana_public_key_must_contain_32_bytes": "Публичный ключ Solana должен содержать 32 байта", + "invalid_base58_character": "Недопустимый символ Base58", + "private_key_was_not_provided": "Не передан приватный ключ", + "private_key_must_be_exactly_32_bytes_in_base58": "Приватный ключ должен быть ровно 32 байта в Base58", + "no_active_session_to_access_keys": "Нет активной сессии для доступа к ключам", + "empty_solana_secret_key": "Пустой Solana secret key" + }, + "arweave_file_errors": { + "invalid_arweave_gateway_url": "Некорректный Arweave gateway URL", + "arweave_gateway_must_use_http_or_https": "Arweave gateway должен использовать http или https", + "invalid_data_for_sha_256": "Некорректные данные для SHA256", + "invalid_arweave_transaction_id": "Некорректный Transaction ID Arweave", + "invalid_avatar_sha_256_hash": "Некорректный SHA256 хэш аватара", + "invalid_file_size": "Некорректный размер файла", + "arweave_gateway_returned_an_invalid_price": "Arweave gateway вернул некорректную цену" + }, + "channel_validation": { + "enter_a_channel_name": "Введите название канала.", + "channel_name_is_too_short_minimum_4_characters": "Название слишком короткое: минимум 4 символа.", + "channel_name_is_too_long_maximum_32_characters": "Название слишком длинное: максимум 32 символа.", + "only_latin_letters_digits_and_are_allowed": "Разрешены только латиница, цифры, _ и -.", + "a_channel_name_cannot_consist_of_digits_only": "Название канала не должно состоять только из цифр.", + "invalid_channel_name": "Некорректное название канала.", + "description_is_too_long_maximum_200_utf_8_bytes": "Описание слишком длинное: максимум 200 байт UTF-8." + }, + "call_history": { + "user_is_offline": "Абонент не в сети", + "no_answer": "Нет ответа", + "could_not_establish_a_connection": "Не удалось установить соединение", + "user_is_busy": "Абонент занят", + "call_declined": "Звонок отклонён", + "call_was_not_completed": "Звонок не завершён", + "call_length": "Звонок: {duration}" + }, + "auth_required": { + "sign_in_required": "Нужен вход", + "this_section_is_available_after_you_sign_in": "Эта часть доступна после входа.", + "sign_in": "Войти", + "register": "Зарегистрироваться" + }, + "key_storage": { + "indexeddb_is_unavailable": "IndexedDB недоступен", + "could_not_write_to_indexeddb": "Ошибка записи в IndexedDB", + "could_not_read_from_indexeddb": "Ошибка чтения из IndexedDB" + }, + "device_pairing": { + "invalid_ed25519_private_key": "Некорректный приватный Ed25519 ключ", + "unsupported_ed25519_private_key_format": "Неподдерживаемый формат приватного Ed25519 ключа", + "unsupported_requester_session_key": "Неподдерживаемый requesterSessionKey", + "empty_requester_session_key": "Пустой requesterSessionKey" + }, + "registration_upgrade": { + "invalid_registration_price": "Некорректная стоимость регистрации", + "price_below_rent": "Цена namespace ({price} SOL) меньше депозита PDA ({rent} SOL). Регистрация временно недоступна: обратитесь к администратору namespace." + }, + "avatar_errors": { + "indexeddb_is_unavailable": "IndexedDB недоступен", + "could_not_open_indexeddb": "Ошибка открытия IndexedDB", + "indexeddb_transaction_failed": "Ошибка транзакции IndexedDB", + "could_not_read_avatar_cache": "Ошибка чтения кэша аватарки", + "could_not_write_avatar_cache": "Ошибка записи кэша аватарки", + "could_not_read_avatar_cache_entries": "Ошибка чтения списка кэша аватарок", + "could_not_clear_avatar_cache": "Ошибка очистки кэша аватарок", + "invalid_arweave_transaction_id": "Некорректный Transaction ID Arweave" + }, + "errors": { + "generic": "Не удалось выполнить действие. Попробуйте ещё раз.", + "try_again": "{action}. Попробуйте ещё раз." + }, + "registration_api": { + "server_error": "{op}: ошибка сервера" + }, + "attachment_error": { + "hash_mismatch": "SHA-256 скачанного файла не совпал с блокчейном: {actual} != {expected} ({url})" + } } } diff --git a/shine-UI/js/pages/access-servers-view.js b/shine-UI/js/pages/access-servers-view.js index 9dcbd15d..5e7e2c9d 100644 --- a/shine-UI/js/pages/access-servers-view.js +++ b/shine-UI/js/pages/access-servers-view.js @@ -435,7 +435,7 @@ export function render({navigate, chrome}) { ${th('screens.access_servers_view.text_023')} - ${address ? `Кошелёк: ${escapeHtml(address)}` : ''} + ${address ? `${th('remaining.html_access_servers_view.wallet')}${escapeHtml(address)}` : ''} ${th('screens.access_servers_view.text_024')} `; }; diff --git a/shine-UI/js/pages/add-channel-view.js b/shine-UI/js/pages/add-channel-view.js index 8d3998ab..d6864665 100644 --- a/shine-UI/js/pages/add-channel-view.js +++ b/shine-UI/js/pages/add-channel-view.js @@ -19,8 +19,8 @@ export const pageMeta = { id: 'add-channel-view', get title() { return t('screen const CREATE_CHANNEL_FLASH_KEY = 'shine-channels-create-success'; const CHANNEL_TYPE_PUBLIC = 1; -const CHANNEL_LOGIN_HINT = 'Латиница, цифры, _ и -, от 4 до 32 символов, не только цифры.'; -const CHANNEL_LOGIN_DIGITS_ONLY_HINT = 'Имя канала не должно состоять только из цифр.'; +const CHANNEL_LOGIN_HINT = () => t('remaining.add_channel.channel_login_hint'); +const CHANNEL_LOGIN_DIGITS_ONLY_HINT = () => t('remaining.add_channel.channel_login_digits_only_hint'); function persistCreateSuccessFlash(message) { try { @@ -138,7 +138,7 @@ export function render({navigate, chrome}) {
- +
@@ -214,7 +214,7 @@ export function render({navigate, chrome}) { ownerBlockchainName, channelName: normalizedChannelName, }); - linkPreviewEl.innerHTML = `Прямая ссылка: ${directUrl}`; + linkPreviewEl.innerHTML = `${th('remaining.html_add_channel_view.direct_link')}${directUrl}`; }; const refreshAvatarAvailability = async () => { @@ -328,7 +328,7 @@ export function render({navigate, chrome}) { const check = updateValidation(); if (check.name && /^[0-9]+$/.test(check.name)) { - nameErrorEl.textContent = CHANNEL_LOGIN_DIGITS_ONLY_HINT; + nameErrorEl.textContent = CHANNEL_LOGIN_DIGITS_ONLY_HINT(); nameEl.focus(); return; } diff --git a/shine-UI/js/pages/app-log-view.js b/shine-UI/js/pages/app-log-view.js index f533cd29..27679e2f 100644 --- a/shine-UI/js/pages/app-log-view.js +++ b/shine-UI/js/pages/app-log-view.js @@ -1,12 +1,13 @@ +import { formatTime } from '../i18n/format.js'; import { t, th } from '../i18n/index.js'; import { createTopBar } from '../components/topbar.js'; import { clearAppLogEntries, getAppLogEntries } from '../state.js'; export const pageMeta = { id: 'app-log-view', get title() { return t('screens.app_log_view.text_001'); } }; -function formatTime(ts) { +function formatLogTime(ts) { try { - return new Date(ts).toLocaleTimeString('ru-RU'); + return formatTime(new Date(ts)); } catch { return String(ts || ''); } @@ -43,7 +44,7 @@ export function render({navigate, chrome}) { .map((entry) => { const level = String(entry.level || 'info').toUpperCase(); const source = String(entry.source || 'ui'); - const header = `[${formatTime(entry.ts)}] ${level} ${source}`; + const header = `[${formatLogTime(entry.ts)}] ${level} ${source}`; const message = String(entry.message || ''); const details = String(entry.details || '').trim(); return details ? `${header}\n${message}\n${details}` : `${header}\n${message}`; @@ -92,7 +93,7 @@ export function render({navigate, chrome}) { const head = document.createElement('div'); head.className = 'meta-muted'; - head.textContent = `[${formatTime(entry.ts)}] ${level} ${source}`; + head.textContent = `[${formatLogTime(entry.ts)}] ${level} ${source}`; const message = document.createElement('div'); message.textContent = entry.message || ''; diff --git a/shine-UI/js/pages/channel-about-view.js b/shine-UI/js/pages/channel-about-view.js index 0cd2308b..095d5093 100644 --- a/shine-UI/js/pages/channel-about-view.js +++ b/shine-UI/js/pages/channel-about-view.js @@ -1,3 +1,4 @@ +import { formatDate } from '../i18n/format.js'; import { t, th } from '../i18n/index.js'; import { iconHtml } from '../components/ui-icon.js'; import { createTopBar } from '../components/topbar.js'; @@ -78,9 +79,9 @@ function formatChannelCreatedAt(value) { const time = Number(value || 0); if (!Number.isFinite(time) || time <= 0) return t('screens.channel_about_view.text_011'); try { - return new Intl.DateTimeFormat('ru-RU', { day: '2-digit', month: 'long', year: 'numeric' }).format(new Date(time)); + return formatDate(new Date(time), { day: '2-digit', month: 'long', year: 'numeric' }); } catch { - return new Date(time).toLocaleDateString('ru-RU'); + return formatDate(new Date(time)); } } @@ -619,7 +620,7 @@ export function render({ navigate, route, chrome }) { ${escapeHtml(ownerName)} - Владелец · ${escapeHtml(ownerLogin)} + ${th('remaining.html_channel_about_view.owner')}${escapeHtml(ownerLogin)} ${iconHtml('chevron')} diff --git a/shine-UI/js/pages/channel-thread-view.js b/shine-UI/js/pages/channel-thread-view.js index c69106c3..df9526ef 100644 --- a/shine-UI/js/pages/channel-thread-view.js +++ b/shine-UI/js/pages/channel-thread-view.js @@ -1,3 +1,4 @@ +import { formatDateTime } from '../i18n/format.js'; import { t, th } from '../i18n/index.js'; import { appendShineMessageLinks } from '../services/shine-message-links.js'; import { confirmDialog } from '../components/confirm-dialog.js'; @@ -477,7 +478,7 @@ function openBlockchainDetailsModal(details, { isActive = () => true } = {}) { ${t('dialogs.modals.channel_thread_view.label_005')}${escapeHtml(details.blockNumber)} ${t('dialogs.modals.channel_thread_view.label_006')}${escapeHtml(details.blockHash)} ${t('dialogs.modals.channel_thread_view.label_007')}${escapeHtml(details.msgSubType)} - ${t('dialogs.modals.channel_thread_view.label_008')}${escapeHtml(details.createdAtMs ? new Date(Number(details.createdAtMs)).toLocaleString('ru-RU') : '–')} + ${t('dialogs.modals.channel_thread_view.label_008')}${escapeHtml(details.createdAtMs ? formatDateTime(new Date(Number(details.createdAtMs))) : '–')} Public key${escapeHtml(details.publicKey)} ${t('dialogs.modals.channel_thread_view.label_009')}${escapeHtml(details.signature)} @@ -634,7 +635,7 @@ function openMessageHistoryModal({ versions = [], title = t('dialogs.remaining.p const text = String(item?.text || '').trim() || t('dialogs.remaining.pages.channel_thread_view.openmessagehistorymodal.udaleno'); row.innerHTML = ` ${t('dialogs.final.history.version', { version: index + 1 })} -
${ts > 0 ? new Date(ts).toLocaleString('ru-RU') : '–'}
+
${ts > 0 ? formatDateTime(new Date(ts)) : '–'}

${text}

`; list.append(row); @@ -730,7 +731,7 @@ function renderNodeCard(node, heading, handlers, localNumber, { focusPost = fals const timestamp = document.createElement('div'); timestamp.className = 'channel-message-time'; timestamp.textContent = node?.createdAtMs ? formatRelativeTime(node.createdAtMs) : '–'; - if (node?.createdAtMs) timestamp.title = new Date(node.createdAtMs).toLocaleString('ru-RU'); + if (node?.createdAtMs) timestamp.title = formatDateTime(new Date(node.createdAtMs)); authorBlock.append(title, timestamp); authorTile.append(avatar, authorBlock); // Запись канала в обсуждении – как открытый пост в Threads: аватар и название канала в шапке, текст на всю ширину. @@ -1143,7 +1144,7 @@ function renderComment({ node, parent, focus, channelOwner, handlers, nested = f } const time = document.createElement('time'); time.textContent = formatShortAge(node?.createdAtMs); - if (node?.createdAtMs) time.title = new Date(node.createdAtMs).toLocaleString('ru-RU'); + if (node?.createdAtMs) time.title = formatDateTime(new Date(node.createdAtMs)); head.append(time); main.append(head); diff --git a/shine-UI/js/pages/channel-view.js b/shine-UI/js/pages/channel-view.js index 82b1f6f2..0237d54d 100644 --- a/shine-UI/js/pages/channel-view.js +++ b/shine-UI/js/pages/channel-view.js @@ -1,3 +1,4 @@ +import { formatDateTime, getIntlLocale } from '../i18n/format.js'; import { t, th } from '../i18n/index.js'; import { appendShineMessageLinks } from '../services/shine-message-links.js'; import { confirmDialog } from '../components/confirm-dialog.js'; @@ -80,7 +81,7 @@ const MSG_SUBTYPE_STATUS_IN_STUDY = 130; const MSG_SUBTYPE_STATUS_ABANDONED = 140; const MSG_SUBTYPE_STATUS_COMPLETED = 150; const DIARY_CHANNEL_NAME = 'diary'; -const DIARY_CHANNEL_DISPLAY_NAME = 'Дневник'; +const DIARY_CHANNEL_DISPLAY_NAME = () => t('remaining.channel.diary_channel_display_name'); const pendingReactionActions = new Set(); const pendingScrollByRoute = new Map(); @@ -661,15 +662,16 @@ function openChannelMetaDetailsModal({ canEdit = false, onEdit = null, changedAtMs = 0, + dateKind = 'updated', } = {}) { const changedAtLabel = changedAtMs - ? new Date(Number(changedAtMs)).toLocaleString('ru-RU') + ? formatDateTime(new Date(Number(changedAtMs))) : '–'; const channelTitle = String(channel.displayTitle || channel.displayName || channel.name || '–').trim(); const ownerLogin = String(channel.ownerLogin || channel.ownerName || extractLoginFromBlockchainName(channel.ownerBlockchainName) || '').trim(); const channelSlug = String(channel.name || '').trim(); const systemName = formatChannelAddress({ ownerLogin, channelName: channelSlug }) || '–'; - const dateLabel = title === t('dialogs.final.channel.created') ? t('dialogs.remaining.pages.channel_view.openchannelmetadetailsmodal.data_sozdaniya') : t('dialogs.remaining.pages.channel_view.openchannelmetadetailsmodal.data_izmeneniya'); + const dateLabel = dateKind === 'created' ? t('dialogs.remaining.pages.channel_view.openchannelmetadetailsmodal.data_sozdaniya') : t('dialogs.remaining.pages.channel_view.openchannelmetadetailsmodal.data_izmeneniya'); const root = document.getElementById('modal-root'); root.innerHTML = ` @@ -1102,7 +1104,7 @@ function openEntrypointHistoryModal({ channelTitle = '', posts = [], onSelect }) item.type = 'button'; item.className = 'ui-button entrypoint-history-item'; item.innerHTML = ` - ${escapeHtml(post.timestampMs ? new Date(post.timestampMs).toLocaleString('ru-RU') : t('dialogs.remaining.pages.channel_view.openentrypointhistorymodal.bez_daty'))} + ${escapeHtml(post.timestampMs ? formatDateTime(new Date(post.timestampMs)) : t('dialogs.remaining.pages.channel_view.openentrypointhistorymodal.bez_daty'))} #${escapeHtml(post.localNumber || '–')}

${escapeHtml(String(parsed.text || '').trim() || t('dialogs.remaining.pages.channel_view.openentrypointhistorymodal.bez_teksta'))}

`; @@ -1373,7 +1375,7 @@ async function loadFromApi(route, channelId) { return { channel: { name: diaryPayload?.channel?.channelName || DIARY_CHANNEL_NAME, - displayTitle: String(diaryPayload?.channel?.displayName || DIARY_CHANNEL_DISPLAY_NAME).trim(), + displayTitle: String(diaryPayload?.channel?.displayName || DIARY_CHANNEL_DISPLAY_NAME()).trim(), displayName: t('screens.channel_view.text_093'), description: String(diaryPayload?.channel?.channelDescription || '').trim(), avaAr: '', @@ -1673,13 +1675,14 @@ function renderChannelMetaEventCard(event, dayLabel = '') { : event.kind === 'deleted' ? t('screens.channel_view.text_094') : t('screens.channel_view.text_095'); - const shownLabel = dayLabel ? `${label} · ${dayLabel.toLocaleLowerCase('ru-RU')}` : label; + const shownLabel = dayLabel ? `${label} · ${dayLabel.toLocaleLowerCase(getIntlLocale())}` : label; card.innerHTML = ` ${escapeHtml(shownLabel)} `; if (event.kind !== 'deleted') card.addEventListener('click', () => { openChannelMetaDetailsModal({ title: label, + dateKind: event.kind === 'created' ? 'created' : 'updated', channel: { name: event.name, ownerLogin: event.ownerLogin, @@ -1858,7 +1861,7 @@ function renderPostCard(post, { const timestamp = document.createElement('div'); timestamp.className = 'channel-message-time'; timestamp.textContent = post.timestampMs ? formatRelativeTime(post.timestampMs) : '–'; - if (post.timestampMs) timestamp.title = new Date(post.timestampMs).toLocaleString('ru-RU'); + if (post.timestampMs) timestamp.title = formatDateTime(new Date(post.timestampMs)); if (versionsTotal > 1) { const editedMarker = document.createElement('span'); editedMarker.type = 'button'; @@ -2597,7 +2600,7 @@ export function render({ navigate, route, chrome }) { const aboutRoute = makeShineChannelAboutRoute(routeArgs); const donateRoute = makeShineChannelDonateRoute(routeArgs); const items = []; - items.push({ label: apiData?.isOwnChannel ? t('screens.channel_view.text_106') : t('screens.channel_view.text_107'), iconHtml: iconHtml(apiData?.isOwnChannel ? 'edit' : 'info'), action: () => { if (aboutRoute) navigate(aboutRoute); } }); + items.push({ id: 'channel-about', label: apiData?.isOwnChannel ? t('screens.channel_view.text_106') : t('screens.channel_view.text_107'), iconHtml: iconHtml(apiData?.isOwnChannel ? 'edit' : 'info'), action: () => { if (aboutRoute) navigate(aboutRoute); } }); if (apiData?.isOwnChannel && !apiData?.isDiary) { items.push({ label: t('screens.channel_view.text_041'), iconHtml: iconHtml('compose'), action: () => activeAddMessage?.() }); } @@ -2626,8 +2629,9 @@ export function render({ navigate, route, chrome }) { }); } } - const aboutIndex = items.findIndex((item) => item.label === 'О канале' || item.label === 'Редактировать'); - if (aboutIndex > 0) items.unshift(...items.splice(aboutIndex, 2)); + // Используем стабильный id, а не надпись, которая зависит от языка. + const aboutIndex = items.findIndex((item) => item.id === 'channel-about'); + if (aboutIndex > 0) items.unshift(...items.splice(aboutIndex, 1)); return items; }, }, diff --git a/shine-UI/js/pages/channels-list.js b/shine-UI/js/pages/channels-list.js index 2ad066c9..9a39bb2c 100644 --- a/shine-UI/js/pages/channels-list.js +++ b/shine-UI/js/pages/channels-list.js @@ -31,7 +31,7 @@ const CREATE_CHANNEL_FLASH_KEY = 'shine-channels-create-success'; const CHANNEL_TYPE_STORIES = 0; const CHANNEL_TYPE_PERSONAL = 100; const DIARY_CHANNEL_NAME = 'diary'; -const DIARY_DISPLAY_NAME = 'Дневник'; +const DIARY_DISPLAY_NAME = () => t('remaining.channels.diary_display_name'); const CHANNELS_VIEW_ALL = 'all'; const CHANNELS_VIEW_OWNED = 'owned'; @@ -676,10 +676,10 @@ function buildDiaryChannelRow(diaryPayload, ownRows = [], notificationsState = { channelRootBlockHash: '0', avatar: t('screens.channels_list.text_012'), avaAr: '', - title: DIARY_DISPLAY_NAME, + title: DIARY_DISPLAY_NAME(), technicalLabel: t('screens.channels_list.text_013'), channelName: DIARY_CHANNEL_NAME, - displayTitle: DIARY_DISPLAY_NAME, + displayTitle: DIARY_DISPLAY_NAME(), channelDescription: t('screens.channels_list.text_014'), channelTypeCode: 900, channelTypeVersion: 1, diff --git a/shine-UI/js/pages/chat-media-view.js b/shine-UI/js/pages/chat-media-view.js index f0123c00..4dfdeb3b 100644 --- a/shine-UI/js/pages/chat-media-view.js +++ b/shine-UI/js/pages/chat-media-view.js @@ -1,3 +1,4 @@ +import { formatDate } from '../i18n/format.js'; import { t } from '../i18n/index.js'; // «Медиа и файлы» личной переписки: сетка фото и видео и список документов по месяцам. // История догружается с сервера целиком; превью расшифровываются, только когда плитка видна. @@ -14,7 +15,7 @@ import { navigateUp } from '../router.js'; export const pageMeta = { id: 'chat-media-view', get title() { return t('screens.chat_media_view.text_001'); } }; -const monthTitle = new Intl.DateTimeFormat('ru-RU', { month: 'long', year: 'numeric' }); +const monthTitle = (date) => formatDate(date, { month: 'long', year: 'numeric' }); // Все вложения переписки, от новых к старым. function collectAttachments(chatId) { @@ -37,11 +38,13 @@ function collectAttachments(chatId) { function groupByMonth(entries) { const groups = []; for (const entry of entries) { - const raw = entry.timeMs ? monthTitle.format(new Date(entry.timeMs)) : t('screens.chat_media_view.text_003'); + const date = entry.timeMs ? new Date(entry.timeMs) : null; + const key = date ? `${date.getFullYear()}-${date.getMonth()}` : 'unknown'; + const raw = date ? monthTitle(date) : t('screens.chat_media_view.text_003'); const label = raw.charAt(0).toUpperCase() + raw.slice(1); const last = groups[groups.length - 1]; - if (last?.label === label) last.items.push(entry); - else groups.push({ label, items: [entry] }); + if (last?.key === key) last.items.push(entry); + else groups.push({ key, label, items: [entry] }); } return groups; } diff --git a/shine-UI/js/pages/chat-view.js b/shine-UI/js/pages/chat-view.js index 681b7ddd..0e34b8c3 100644 --- a/shine-UI/js/pages/chat-view.js +++ b/shine-UI/js/pages/chat-view.js @@ -1,3 +1,4 @@ +import { formatDate, formatDateTime } from '../i18n/format.js'; import { t, th } from '../i18n/index.js'; import { appendShineMessageLinks } from '../services/shine-message-links.js'; import { iconHtml } from '../components/ui-icon.js'; @@ -294,7 +295,7 @@ function capitalize(text) { function openDateJumpModal({ days = new Map(), loading = false, onPick } = {}) { const root = document.getElementById('modal-root'); if (!root) return null; - const monthTitle = new Intl.DateTimeFormat('ru-RU', { month: 'long', year: 'numeric' }); + const monthTitle = (date) => formatDate(date, { month: 'long', year: 'numeric' }); const weekdays = [t('dialogs.remaining.pages.chat_view.opendatejumpmodal.pn'), t('dialogs.remaining.pages.chat_view.opendatejumpmodal.vt'), t('dialogs.remaining.pages.chat_view.opendatejumpmodal.sr'), t('dialogs.remaining.pages.chat_view.opendatejumpmodal.cht'), t('dialogs.remaining.pages.chat_view.opendatejumpmodal.pt'), t('dialogs.remaining.pages.chat_view.opendatejumpmodal.sb'), t('dialogs.remaining.pages.chat_view.opendatejumpmodal.vs')]; let currentDays = days; let isLoading = loading; @@ -326,7 +327,7 @@ function openDateJumpModal({ days = new Map(), loading = false, onPick } = {}) { const monthIndex = (t) => { const d = new Date(t); return d.getFullYear() * 12 + d.getMonth(); }; const renderMonth = () => { - titleEl.textContent = capitalize(monthTitle.format(new Date(viewYear, viewMonth, 1))); + titleEl.textContent = capitalize(monthTitle(new Date(viewYear, viewMonth, 1))); const current = viewYear * 12 + viewMonth; prevBtn.disabled = current <= monthIndex(earliestTime()); nextBtn.disabled = current >= monthIndex(Date.now()); @@ -839,13 +840,13 @@ function openConfirmContactModal(targetLogin = '') { function formatMessageTime(valueMs) { const timeMs = Number(valueMs || 0); if (!Number.isFinite(timeMs) || timeMs <= 0) return ''; - return new Intl.DateTimeFormat('ru-RU', { + return formatDateTime(new Date(timeMs), { day: '2-digit', month: '2-digit', year: '2-digit', hour: '2-digit', minute: '2-digit', - }).format(new Date(timeMs)); + }); } function formatCallDurationCompact(totalSeconds) { diff --git a/shine-UI/js/pages/device-pairing-view.js b/shine-UI/js/pages/device-pairing-view.js index 9c79c9d4..013f0816 100644 --- a/shine-UI/js/pages/device-pairing-view.js +++ b/shine-UI/js/pages/device-pairing-view.js @@ -66,7 +66,7 @@ function requestCardHtml(request) {
${shortCode}
Session name: ${client} Session kind: ${sessionKind} - Истекает: ${expiresText} + ${th('remaining.html_device_pairing_view.expires')}${expiresText}
diff --git a/shine-UI/js/pages/device-session-view.js b/shine-UI/js/pages/device-session-view.js index eeb6e142..aa85df3b 100644 --- a/shine-UI/js/pages/device-session-view.js +++ b/shine-UI/js/pages/device-session-view.js @@ -1,3 +1,4 @@ +import { formatDateTime } from '../i18n/format.js'; import { t, th } from '../i18n/index.js'; import { createTopBar } from '../components/topbar.js'; import { confirmDialog } from '../components/confirm-dialog.js'; @@ -22,7 +23,7 @@ function formatSessionType(sessionType) { } function formatSessionTime(ms) { - return new Date(ms).toLocaleString('ru-RU', { + return formatDateTime(new Date(ms), { day: '2-digit', month: '2-digit', year: 'numeric', diff --git a/shine-UI/js/pages/device-view.js b/shine-UI/js/pages/device-view.js index d94bcf57..31640ff7 100644 --- a/shine-UI/js/pages/device-view.js +++ b/shine-UI/js/pages/device-view.js @@ -1,3 +1,4 @@ +import { formatDate, formatTime } from '../i18n/format.js'; import { t, th } from '../i18n/index.js'; import { showToast } from '../services/channels-ux.js'; import { createTopBar } from '../components/topbar.js'; @@ -46,13 +47,13 @@ function describeClient(userAgent) { // «сегодня, 02:20» / «вчера, 23:10» / «24 сентября, 18:05». function formatSessionTime(ms) { const date = new Date(ms); - const time = date.toLocaleTimeString('ru-RU', { hour: '2-digit', minute: '2-digit' }); + const time = formatTime(date, { hour: '2-digit', minute: '2-digit' }); const startOf = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime(); const days = Math.round((startOf(new Date()) - startOf(date)) / 86400000); if (days === 0) return t('screens.device_view.text_028', { value1: time }); if (days === 1) return t('screens.device_view.text_029', { value1: time }); const sameYear = date.getFullYear() === new Date().getFullYear(); - const day = date.toLocaleDateString('ru-RU', { day: 'numeric', month: 'long', ...(sameYear ? {} : { year: 'numeric' }) }); + const day = formatDate(date, { day: 'numeric', month: 'long', ...(sameYear ? {} : { year: 'numeric' }) }); return `${day}, ${time}`; } diff --git a/shine-UI/js/pages/key-rotation-view.js b/shine-UI/js/pages/key-rotation-view.js index 04ceb8d2..25c4784b 100644 --- a/shine-UI/js/pages/key-rotation-view.js +++ b/shine-UI/js/pages/key-rotation-view.js @@ -1,3 +1,4 @@ +import { formatDateTime } from '../i18n/format.js'; import { t, th } from '../i18n/index.js'; import { createTopBar } from '../components/topbar.js'; import { confirmPasswordBoundarySpaces } from '../services/password-boundary-warning.js'; @@ -37,7 +38,7 @@ export function render({navigate,chrome}){ } function setRoot(...nodes){root.replaceChildren(...nodes);} function exitAfterComplete(){updateTopbar('COMPLETE');navigate('access-keys-view');} - function statusCard(s){const card=document.createElement('div');card.className='card stack';card.innerHTML=`${h(stageText(s.rotationStatus))}${h(s.sourceBlockchainName||'')} → ${h(s.candidateBlockchainName||'')}Прогресс: ${Number(s.progressCurrent||0)} / ${Number(s.progressTotal||0)}${s.lastError?`${h(s.lastError)}`:''}`;return card;} + function statusCard(s){const card=document.createElement('div');card.className='card stack';card.innerHTML=`${h(stageText(s.rotationStatus))}${h(s.sourceBlockchainName||'')} → ${h(s.candidateBlockchainName||'')}${th('remaining.html_key_rotation_view.progress')}${Number(s.progressCurrent||0)} / ${Number(s.progressTotal||0)}${s.lastError?`${h(s.lastError)}`:''}`;return card;} function note(text){const c=document.createElement('div');c.className='card';c.textContent=text;return c;} async function renderNone(){ @@ -48,7 +49,7 @@ export function render({navigate,chrome}){ const comment=document.createElement('textarea');comment.className='text-input';comment.rows=3;comment.maxLength=1024;comment.placeholder=t('screens.key_rotation_view.text_004'); const list=document.createElement('div');list.className='stack';const more=document.createElement('button');more.className='secondary-btn';more.type='button';more.textContent=t('screens.key_rotation_view.text_005'); let selected=null,before=null,loading=false; - async function load(){if(loading)return;loading=true;more.disabled=true;try{const d=await client.getMyBlockchain({beforeBlock:before,limit:100});for(const b of d.blocks||[]){const btn=document.createElement('button');btn.type='button';btn.className='nav-row';btn.innerHTML=`#${b.blockNumber} · ${new Date(Number(b.timestampMs)||0).toLocaleString('ru-RU')}${short(b.blockHash)}`;btn.addEventListener('click',()=>{selected=b;list.querySelectorAll('button').forEach(x=>x.setAttribute('aria-pressed','false'));btn.setAttribute('aria-pressed','true');});if(selected==null && b.blockNumber===d.tipBlockNumber){selected=b;btn.setAttribute('aria-pressed','true');}list.append(btn);}before=d.nextBeforeBlock;more.hidden=before==null;}finally{loading=false;more.disabled=false;}} + async function load(){if(loading)return;loading=true;more.disabled=true;try{const d=await client.getMyBlockchain({beforeBlock:before,limit:100});for(const b of d.blocks||[]){const btn=document.createElement('button');btn.type='button';btn.className='nav-row';btn.innerHTML=`#${b.blockNumber} · ${formatDateTime(new Date(Number(b.timestampMs)||0))}${short(b.blockHash)}`;btn.addEventListener('click',()=>{selected=b;list.querySelectorAll('button').forEach(x=>x.setAttribute('aria-pressed','false'));btn.setAttribute('aria-pressed','true');});if(selected==null && b.blockNumber===d.tipBlockNumber){selected=b;btn.setAttribute('aria-pressed','true');}list.append(btn);}before=d.nextBeforeBlock;more.hidden=before==null;}finally{loading=false;more.disabled=false;}} more.addEventListener('click',()=>void load()); const start=document.createElement('button');start.className='primary-btn';start.type='button';start.textContent=t('screens.key_rotation_view.text_006'); const error=document.createElement('div');error.className='meta-muted'; @@ -124,7 +125,7 @@ export function render({navigate,chrome}){ const result=await transferAllSol({endpoint:solanaEndpoint,fromKeypair:oldWallet.keypair,toAddress:newWallet.address}); details.insertAdjacentHTML('beforeend',`${result.skipped?t('screens.key_rotation_view.text_049'):t('screens.key_rotation_view.text_067', { value1: h(formatSol(Number(result.lamports)/1_000_000_000,9)), value2: h(result.signature) })}`); }else{ - details.insertAdjacentHTML('beforeend','На старом кошельке нет SOL для переноса.'); + details.insertAdjacentHTML('beforeend','${th('remaining.html_key_rotation_view.the_old_wallet_has_no_sol_to_transfer')}'); } transferFinished=true; updateActions(); diff --git a/shine-UI/js/pages/messages-list.js b/shine-UI/js/pages/messages-list.js index 5cad4e06..743e978b 100644 --- a/shine-UI/js/pages/messages-list.js +++ b/shine-UI/js/pages/messages-list.js @@ -134,14 +134,14 @@ function clipPreviewText(text, maxLen = PREVIEW_MAX_LEN) { return `${normalized.slice(0, maxLen - 1)}…`; } -const DM_PREVIEW_ENCRYPTED = 'Зашифрованное сообщение'; -const DM_PREVIEW_EMPTY = 'Нет сообщений'; +const DM_PREVIEW_ENCRYPTED = () => t('remaining.messages.dm_preview_encrypted'); +const DM_PREVIEW_EMPTY = () => t('remaining.messages.dm_preview_empty'); async function resolveDialogPreview(dialog) { const localText = clipPreviewText(String(dialog?.lastMessageText || '').trim()); - if (localText) return localText; + if (localText) return { text: localText, kind: 'message' }; const blobB64 = String(dialog?.lastMessageBlobB64 || '').trim(); - if (!blobB64) return DM_PREVIEW_EMPTY; + if (!blobB64) return { text: DM_PREVIEW_EMPTY(), kind: 'empty' }; const cacheKey = [ blobB64, @@ -151,7 +151,7 @@ async function resolveDialogPreview(dialog) { // После перезагрузки пароля хранилища в памяти нет — расшифровать нечем. Не кэшируем, // чтобы превью появилось, когда пароль снова будет введён. - if (!String(state.session.storagePwdInMemory || '').trim()) return DM_PREVIEW_ENCRYPTED; + if (!String(state.session.storagePwdInMemory || '').trim()) return { text: DM_PREVIEW_ENCRYPTED(), kind: 'encrypted' }; if (DM_BLOB_PREVIEW_CACHE.has(cacheKey)) return DM_BLOB_PREVIEW_CACHE.get(cacheKey); if (DM_BLOB_PREVIEW_PENDING.has(cacheKey)) return DM_BLOB_PREVIEW_PENDING.get(cacheKey); @@ -167,10 +167,11 @@ async function resolveDialogPreview(dialog) { const parsedText = parseDmTechBlocks(String(decrypted?.text || '')); const display = clipPreviewText(String(parsedText.displayText || '').trim()); const result = display || t('screens.messages_list.text_033'); - DM_BLOB_PREVIEW_CACHE.set(cacheKey, result); - return result; + const preview = { text: result, kind: 'message' }; + DM_BLOB_PREVIEW_CACHE.set(cacheKey, preview); + return preview; } catch { - const fallback = DM_PREVIEW_ENCRYPTED; + const fallback = { text: DM_PREVIEW_ENCRYPTED(), kind: 'encrypted' }; DM_BLOB_PREVIEW_CACHE.set(cacheKey, fallback); return fallback; } finally { @@ -418,18 +419,18 @@ function renderRow(item) { row.prepend(avatarWrap); // Текст превью ставится сразу, если известен; иначе строка пустая до расшифровки – // без мелькающего «Загрузка…». - const showPreview = (text) => { + const showPreview = (text, kind = 'message') => { if (!previewEl) return; - previewEl.textContent = String(text || '').trim() || DM_PREVIEW_EMPTY; - previewEl.classList.toggle('is-encrypted', text === DM_PREVIEW_ENCRYPTED); - previewEl.classList.toggle('is-empty', previewEl.textContent === DM_PREVIEW_EMPTY); + previewEl.textContent = String(text || '').trim() || DM_PREVIEW_EMPTY(); + previewEl.classList.toggle('is-encrypted', kind === 'encrypted'); + previewEl.classList.toggle('is-empty', kind === 'empty' || !String(text || '').trim()); }; const knownText = clipPreviewText(String(item.lastMessageText || '').trim()); - if (knownText || !item.lastMessageBlobB64) showPreview(knownText); + if (knownText || !item.lastMessageBlobB64) showPreview(knownText, knownText ? 'message' : 'empty'); else { if (previewEl) previewEl.textContent = '\u00a0'; - void resolveDialogPreview(item).then((text) => { - if (previewEl?.isConnected) showPreview(text); + void resolveDialogPreview(item).then((preview) => { + if (previewEl?.isConnected) showPreview(preview.text, preview.kind); }); } if (item.pinned) row.classList.add('is-pinned'); @@ -545,7 +546,7 @@ function renderRow(item) { const more = document.createElement('button'); more.type = 'button'; more.className = 'list-more'; - more.innerHTML = `${iconHtml('chevron-down')}Показать всех · ${silent.length}`; + more.innerHTML = `${iconHtml('chevron-down')}${th('remaining.html_messages_list.show_all')}${silent.length}`; more.addEventListener('click', () => { startExpanded = true; renderList(); }); frag.append(more); } diff --git a/shine-UI/js/pages/my-blockchain-view.js b/shine-UI/js/pages/my-blockchain-view.js index dc2ae842..9fe03f56 100644 --- a/shine-UI/js/pages/my-blockchain-view.js +++ b/shine-UI/js/pages/my-blockchain-view.js @@ -1,4 +1,5 @@ -import { t } from '../i18n/index.js'; +import { formatDateTime } from '../i18n/format.js'; +import { t, th } from '../i18n/index.js'; import { createTopBar } from '../components/topbar.js'; import { authService } from '../state.js'; import { KeyRotationClient } from '../services/key-rotation-service.js'; @@ -75,7 +76,7 @@ function shortHash(value) { function formatDate(ms) { try { - return new Date(Number(ms) || 0).toLocaleString('ru-RU'); + return formatDateTime(new Date(Number(ms) || 0)); } catch { return ''; } @@ -568,7 +569,7 @@ export function render({ navigate, chrome }, { historyOnly = false } = {}) { if (reset) { const head = document.createElement('div'); head.className = 'card stack'; - head.innerHTML = `${escapeHtml(data.blockchainName || '—')}Последний блок: #${Number(data.tipBlockNumber ?? -1)} · ${shortHash(data.tipBlockHash)}`; + head.innerHTML = `${escapeHtml(data.blockchainName || '—')}${th('remaining.html_my_blockchain_view.last_block')}${Number(data.tipBlockNumber ?? -1)} · ${shortHash(data.tipBlockHash)}`; list.append(head); } diff --git a/shine-UI/js/pages/profile-edit-view.js b/shine-UI/js/pages/profile-edit-view.js index 458b8f3d..b67e4bff 100644 --- a/shine-UI/js/pages/profile-edit-view.js +++ b/shine-UI/js/pages/profile-edit-view.js @@ -330,7 +330,7 @@ export function render({ navigate, chrome }) { genderRow.className = 'nav-row profile-param-item'; genderRow.dataset.editGender = 'true'; const genderText = genderLabel(currentGender); - const genderEmpty = genderText === 'Не указан'; + const genderEmpty = currentGender !== PROFILE_GENDER_MALE && currentGender !== PROFILE_GENDER_FEMALE; genderRow.innerHTML = `${th('screens.profile_edit_view.text_031')}${escapeHtml(genderEmpty ? t('screens.profile_edit_view.text_016') : genderText)}`; listWrap.append(genderRow); } diff --git a/shine-UI/js/pages/public-support-queue-view.js b/shine-UI/js/pages/public-support-queue-view.js index 26d49f28..b980ef2a 100644 --- a/shine-UI/js/pages/public-support-queue-view.js +++ b/shine-UI/js/pages/public-support-queue-view.js @@ -1,3 +1,4 @@ +import { formatNumber } from '../i18n/format.js'; import { t, th } from '../i18n/index.js'; import { getSolanaCluster } from '../services/solana-rpc-gateway.js'; import { createTopBar } from '../components/topbar.js'; @@ -81,7 +82,7 @@ function formatSupportTicketLabel(queueId, index) { function formatUsdCentsText(cents) { const value = Number(cents || 0n) / 100; - return value.toLocaleString('ru-RU', { minimumFractionDigits: 0, maximumFractionDigits: 2 }); + return formatNumber(value, { minimumFractionDigits: 0, maximumFractionDigits: 2 }); } function parsePaymentsCoef(data) { @@ -345,7 +346,7 @@ export function render({navigate, chrome}) { const ticketInfo = await core.connection.getAccountInfo(ticketPda, 'confirmed'); if (!ticketInfo) { result.innerHTML = ` -

Билет ${formatSupportTicketLabel(parsed.queueId, parsed.index)} пока не создан.

+

${th('remaining.html_public_support_queue_view.ticket')}${formatSupportTicketLabel(parsed.queueId, parsed.index)}${th('remaining.html_public_support_queue_view.has_not_been_created_yet')}

`; status.textContent = t('screens.public_support_queue_view.text_021', { value1: formatSupportTicketLabel(parsed.queueId, parsed.index) }); return; @@ -368,12 +369,12 @@ export function render({navigate, chrome}) {
${th('screens.public_support_queue_view.text_036')} ${formatSupportTicketLabel(parsed.queueId, ticket.index)}
${th('screens.public_support_queue_view.text_037')} ${ticket.isPaid ? t('screens.public_support_queue_view.text_013') : t('screens.public_support_queue_view.text_014')}
${th('screens.public_support_queue_view.text_038')} ${ticket.recipientWallet}
-
${th('screens.public_support_queue_view.text_039')} ${ticketsBefore.toString()} билетов
-
${th('screens.public_support_queue_view.text_040')} ${paidBefore.toString()} билетов
-
${th('screens.public_support_queue_view.text_041')} ${remainingBefore.toString()} билетов
+
${th('screens.public_support_queue_view.text_039')} ${ticketsBefore.toString()}${th('remaining.html_public_support_queue_view.tickets_div')} +
${th('screens.public_support_queue_view.text_040')} ${paidBefore.toString()}${th('remaining.html_public_support_queue_view.tickets_div')} +
${th('screens.public_support_queue_view.text_041')} ${remainingBefore.toString()}${th('remaining.html_public_support_queue_view.tickets_div')}
${th('screens.public_support_queue_view.text_042')} ${formatUsdCentsText(queueState.sumPaidUsdCents)} USD
${th('screens.public_support_queue_view.text_043')} ${formatUsdCentsText(ticket.payoutUsdCents)} USD
-
${th('screens.public_support_queue_view.text_044')} ${formatUsdCentsText(ticket.debtBeforeUsdCents)} USD в очереди до него
+
${th('screens.public_support_queue_view.text_044')} ${formatUsdCentsText(ticket.debtBeforeUsdCents)}${th('remaining.html_public_support_queue_view.usd_ahead_of_it_in_the_queue_div')} `; } status.textContent = t('screens.public_support_queue_view.text_022', { value1: formatSupportTicketLabel(ticket.queueId, ticket.index), value2: endpoint }); diff --git a/shine-UI/js/pages/pwa-diagnostics-view.js b/shine-UI/js/pages/pwa-diagnostics-view.js index 03afecf2..19535e5c 100644 --- a/shine-UI/js/pages/pwa-diagnostics-view.js +++ b/shine-UI/js/pages/pwa-diagnostics-view.js @@ -1,3 +1,4 @@ +import { formatDateTime, formatTime } from '../i18n/format.js'; import { t, th } from '../i18n/index.js'; import { createTopBar } from '../components/topbar.js'; import { authService, state } from '../state.js'; @@ -26,7 +27,7 @@ function formatTs(ts) { const num = Number(ts); if (!Number.isFinite(num) || num <= 0) return '–'; try { - return new Date(num).toLocaleString('ru-RU'); + return formatDateTime(new Date(num)); } catch { return String(num); } @@ -41,7 +42,7 @@ function detectLaunchMode() { return 'fullscreen'; } if (window.matchMedia?.('(display-mode: browser)')?.matches) { - return t('screens.pwa_diagnostics_view.text_022'); + return 'browser'; } return 'unknown'; } catch { @@ -57,37 +58,39 @@ function detectIosSafari() { } function buildInstallState({ launchMode, manifestOk, swRegistered }) { - if (launchMode === 'standalone' || launchMode === 'fullscreen') return t('screens.pwa_diagnostics_view.text_023'); - if (canInstallPwa()) return t('screens.pwa_diagnostics_view.text_024'); - if (!window.isSecureContext || !manifestOk || !swRegistered) return t('screens.pwa_diagnostics_view.text_025'); - return t('screens.pwa_diagnostics_view.text_026'); + if (launchMode === 'standalone' || launchMode === 'fullscreen') return 'installed'; + if (canInstallPwa()) return 'prompt'; + if (!window.isSecureContext || !manifestOk || !swRegistered) return 'unavailable'; + return 'unknown'; } -function toneFor(value, type = 'binary') { - const v = String(value || '').toLowerCase(); - if (type === 'permission') { - if (v === 'granted') return 'ok'; - if (v === 'default') return 'warn'; - if (v === 'denied') return 'bad'; - return 'neutral'; - } - if (type === 'testPush') { - if (v === 'доставлен') return 'ok'; - if (v === 'отправлен') return 'warn'; - if (v === 'ошибка') return 'bad'; - return 'neutral'; - } - if (type === 'install') { - if (v === 'уже установлено' || v === 'доступна кнопка установки') return 'ok'; - if (v === 'браузер не сообщает' || v === 'недоступно') return 'warn'; - return 'neutral'; - } - if (type === 'launchMode') { - if (v === 'standalone' || v === 'fullscreen' || v === 'браузер') return 'ok'; - return 'neutral'; - } - if (v === 'да' || v === 'найден' || v === 'зарегистрирован' || v === 'поддерживается' || v === 'есть') return 'ok'; - if (v === 'не найден' || v === 'не зарегистрирован' || v === 'нет' || v === 'ошибка') return 'bad'; +function installStateText(code) { + const keys = { installed: 'text_023', prompt: 'text_024', unavailable: 'text_025', unknown: 'text_026' }; + return t(`screens.pwa_diagnostics_view.${keys[code] || 'text_026'}`); +} + +// Разрешения браузера и статусы диагностики — коды, а не переводимые подписи. +// Старые сохранённые значения push (русские слова) читаем ради совместимости. +function normalizeTestPushCode(value) { + const code = String(value || '').trim().toLowerCase(); + if (code === 'отправлен' || code === 'sent') return 'sent'; + if (code === 'доставлен' || code === 'delivered') return 'delivered'; + if (code === 'ошибка' || code === 'error') return 'error'; + return 'never'; +} + +function testPushText(code) { + const keys = { sent: 'test_push_sent', delivered: 'test_push_delivered', error: 'test_push_error' }; + return keys[code] ? t(`screens.pwa_diagnostics_view.${keys[code]}`) : t('screens.pwa_diagnostics_view.text_033'); +} + +function toneFor(code, type = 'binary') { + if (type === 'permission') return { granted: 'ok', default: 'warn', denied: 'bad' }[code] || 'neutral'; + if (type === 'testPush') return { delivered: 'ok', sent: 'warn', error: 'bad' }[code] || 'neutral'; + if (type === 'install') return { installed: 'ok', prompt: 'ok', unavailable: 'warn', unknown: 'warn' }[code] || 'neutral'; + if (type === 'launchMode') return ['standalone', 'fullscreen', 'browser'].includes(code) ? 'ok' : 'neutral'; + if (['yes', 'found', 'registered', 'supported', 'present'].includes(code)) return 'ok'; + if (['no', 'missing', 'not_registered', 'error', 'unavailable'].includes(code)) return 'bad'; return 'neutral'; } @@ -114,25 +117,34 @@ async function collectDiagnostics() { const result = { secureContext: window.isSecureContext === true, manifestStatus: t('screens.pwa_diagnostics_view.text_027'), + manifestCode: 'missing', manifestUrl: '', swStatus: t('screens.pwa_diagnostics_view.text_028'), + swCode: 'not_registered', swError: '', launchMode: detectLaunchMode(), installAvailability: t('screens.pwa_diagnostics_view.text_029'), + installCode: 'unknown', notificationsApi: t('screens.pwa_diagnostics_view.text_030'), + notificationsApiCode: 'no', pushApi: t('screens.pwa_diagnostics_view.text_031'), + pushApiCode: 'no', notificationPermission: 'default', pushSubscription: t('screens.pwa_diagnostics_view.text_032'), + subscriptionCode: 'no', subscriptionEndpoint: '', subscriptionUpdatedAtMs: 0, lastTestPush: t('screens.pwa_diagnostics_view.text_033'), + lastTestPushCode: 'never', lastTestPushAtMs: 0, lastPushPayload: null, iosSafariHint: false, tech: {}, }; + result.notificationsApiCode = 'Notification' in window ? 'supported' : 'no'; result.notificationsApi = 'Notification' in window ? t('screens.pwa_diagnostics_view.text_034') : t('screens.pwa_diagnostics_view.text_035'); + result.pushApiCode = 'PushManager' in window ? 'supported' : 'no'; result.pushApi = 'PushManager' in window ? t('screens.pwa_diagnostics_view.text_036') : t('screens.pwa_diagnostics_view.text_037'); if ('Notification' in window) { result.notificationPermission = String(Notification.permission || 'default'); @@ -144,6 +156,7 @@ async function collectDiagnostics() { if (href) { const url = new URL(href, window.location.href).toString(); const resp = await fetch(url, { cache: 'no-store' }); + result.manifestCode = resp.ok ? 'found' : 'missing'; result.manifestStatus = resp.ok ? t('screens.pwa_diagnostics_view.text_038') : t('screens.pwa_diagnostics_view.text_039'); result.manifestUrl = url; } else { @@ -157,8 +170,10 @@ async function collectDiagnostics() { if ('serviceWorker' in navigator) { try { registration = await navigator.serviceWorker.getRegistration(); + result.swCode = registration ? 'registered' : 'not_registered'; result.swStatus = registration ? t('screens.pwa_diagnostics_view.text_040') : t('screens.pwa_diagnostics_view.text_041'); } catch (error) { + result.swCode = 'error'; result.swStatus = t('screens.pwa_diagnostics_view.text_050'); result.swError = error?.message || 'unknown'; } @@ -166,23 +181,26 @@ async function collectDiagnostics() { result.swStatus = t('screens.pwa_diagnostics_view.text_051'); } - result.installAvailability = buildInstallState({ + result.installCode = buildInstallState({ launchMode: result.launchMode, - manifestOk: result.manifestStatus === 'найден', - swRegistered: result.swStatus === 'зарегистрирован', + manifestOk: result.manifestCode === 'found', + swRegistered: result.swCode === 'registered', }); + result.installAvailability = installStateText(result.installCode); if (registration && ('PushManager' in window)) { try { const subscription = await registration.pushManager.getSubscription(); if (subscription) { + result.subscriptionCode = 'present'; result.pushSubscription = t('screens.pwa_diagnostics_view.text_052'); result.subscriptionEndpoint = String(subscription.endpoint || ''); } else { result.pushSubscription = t('screens.pwa_diagnostics_view.text_053'); } } catch (error) { - result.pushSubscription = t('screens.pwa_diagnostics_view.text_054'); + result.subscriptionCode = 'error'; + result.pushSubscription = t('screens.pwa_diagnostics_view.text_054'); result.swError = result.swError || (error?.message || 'unknown'); } } @@ -197,7 +215,10 @@ async function collectDiagnostics() { try { const st = String(localStorage.getItem(LS_LAST_TEST_STATUS_KEY) || '').trim(); const at = Number(localStorage.getItem(LS_LAST_TEST_AT_KEY) || 0); - if (st) result.lastTestPush = st; + if (st) { + result.lastTestPushCode = normalizeTestPushCode(st); + result.lastTestPush = testPushText(result.lastTestPushCode); + } if (Number.isFinite(at) && at > 0) result.lastTestPushAtMs = at; } catch { // ignore @@ -221,13 +242,18 @@ async function collectDiagnostics() { launchMode: result.launchMode, canInstallPrompt: canInstallPwa(), swStatus: result.swStatus, + swCode: result.swCode, swError: result.swError, manifestStatus: result.manifestStatus, + manifestCode: result.manifestCode, manifestUrl: result.manifestUrl, pushSubscription: result.pushSubscription, + subscriptionCode: result.subscriptionCode, + installCode: result.installCode, subscriptionEndpoint: result.subscriptionEndpoint, subscriptionUpdatedAtMs: result.subscriptionUpdatedAtMs, lastTestPush: result.lastTestPush, + lastTestPushCode: result.lastTestPushCode, lastTestPushAtMs: result.lastTestPushAtMs, lastPushPayload: result.lastPushPayload, }; @@ -240,10 +266,10 @@ function buildRecommendations(diag) { if (!diag.secureContext) { rows.push(t('screens.pwa_diagnostics_view.text_068')); } - if (diag.manifestStatus !== 'найден') { + if (diag.manifestCode !== 'found') { rows.push(t('screens.pwa_diagnostics_view.text_069')); } - if (diag.swStatus !== 'зарегистрирован') { + if (diag.swCode !== 'registered') { rows.push(t('screens.pwa_diagnostics_view.text_070')); } if (diag.notificationPermission === 'default') { @@ -251,10 +277,10 @@ function buildRecommendations(diag) { } else if (diag.notificationPermission === 'denied') { rows.push(t('screens.pwa_diagnostics_view.text_072')); } - if (diag.pushSubscription !== 'есть') { + if (diag.subscriptionCode !== 'present') { rows.push(t('screens.pwa_diagnostics_view.text_073')); } - if (diag.installAvailability === 'доступна кнопка установки') { + if (diag.installCode === 'prompt') { rows.push(t('screens.pwa_diagnostics_view.text_074')); } if (diag.iosSafariHint) { @@ -329,16 +355,16 @@ export function render({navigate, chrome}) { statusList.innerHTML = ''; statusList.append( - rowEl('HTTPS', latestDiag.secureContext ? t('screens.pwa_diagnostics_view.text_042') : t('screens.pwa_diagnostics_view.text_043'), toneFor(latestDiag.secureContext ? t('screens.pwa_diagnostics_view.text_044') : t('screens.pwa_diagnostics_view.text_045'))), - rowEl('Manifest', latestDiag.manifestStatus, toneFor(latestDiag.manifestStatus)), - rowEl('Service Worker', latestDiag.swStatus, toneFor(latestDiag.swStatus)), - rowEl(t('screens.pwa_diagnostics_view.text_006'), latestDiag.launchMode, toneFor(latestDiag.launchMode, 'launchMode')), - rowEl(t('screens.pwa_diagnostics_view.text_007'), latestDiag.installAvailability, toneFor(latestDiag.installAvailability, 'install')), - rowEl('Notifications API', latestDiag.notificationsApi, toneFor(latestDiag.notificationsApi)), - rowEl('Push API', latestDiag.pushApi, toneFor(latestDiag.pushApi)), + rowEl('HTTPS', latestDiag.secureContext ? t('screens.pwa_diagnostics_view.text_042') : t('screens.pwa_diagnostics_view.text_043'), toneFor(latestDiag.secureContext ? 'yes' : 'no')), + rowEl('Manifest', latestDiag.manifestStatus, toneFor(latestDiag.manifestCode)), + rowEl('Service Worker', latestDiag.swStatus, toneFor(latestDiag.swCode)), + rowEl(t('screens.pwa_diagnostics_view.text_006'), latestDiag.launchMode === 'browser' ? t('screens.pwa_diagnostics_view.text_022') : latestDiag.launchMode, toneFor(latestDiag.launchMode, 'launchMode')), + rowEl(t('screens.pwa_diagnostics_view.text_007'), latestDiag.installAvailability, toneFor(latestDiag.installCode, 'install')), + rowEl('Notifications API', latestDiag.notificationsApi, toneFor(latestDiag.notificationsApiCode)), + rowEl('Push API', latestDiag.pushApi, toneFor(latestDiag.pushApiCode)), rowEl(t('screens.pwa_diagnostics_view.text_008'), latestDiag.notificationPermission, toneFor(latestDiag.notificationPermission, 'permission')), - rowEl('Push subscription', latestDiag.pushSubscription, toneFor(latestDiag.pushSubscription)), - rowEl(t('screens.pwa_diagnostics_view.text_009'), latestDiag.lastTestPush, toneFor(latestDiag.lastTestPush, 'testPush')), + rowEl('Push subscription', latestDiag.pushSubscription, toneFor(latestDiag.subscriptionCode)), + rowEl(t('screens.pwa_diagnostics_view.text_009'), latestDiag.lastTestPush, toneFor(latestDiag.lastTestPushCode, 'testPush')), ); if (latestDiag.subscriptionEndpoint) { @@ -375,7 +401,7 @@ export function render({navigate, chrome}) { if (latestDiag.swError) { setInfo(t('screens.pwa_diagnostics_view.text_055', { value1: latestDiag.swError })); } else { - setInfo(t('screens.pwa_diagnostics_view.text_056', { value1: new Date().toLocaleTimeString('ru-RU') })); + setInfo(t('screens.pwa_diagnostics_view.text_056', { value1: formatTime(new Date()) })); } }; @@ -487,7 +513,7 @@ export function render({navigate, chrome}) { actions.querySelector('#diag-testpush').addEventListener('click', async (event) => { await withButtonBusy(event.currentTarget, async () => { try { - localStorage.setItem(LS_LAST_TEST_STATUS_KEY, 'отправлен'); + localStorage.setItem(LS_LAST_TEST_STATUS_KEY, 'sent'); localStorage.setItem(LS_LAST_TEST_AT_KEY, String(Date.now())); } catch { // ignore @@ -502,7 +528,7 @@ export function render({navigate, chrome}) { await reloadStatuses(); }).catch(async (error) => { try { - localStorage.setItem(LS_LAST_TEST_STATUS_KEY, 'ошибка'); + localStorage.setItem(LS_LAST_TEST_STATUS_KEY, 'error'); localStorage.setItem(LS_LAST_TEST_AT_KEY, String(Date.now())); } catch { // ignore diff --git a/shine-UI/js/pages/remote-addblock-session-view.js b/shine-UI/js/pages/remote-addblock-session-view.js index 744cc8b1..d8aee2a3 100644 --- a/shine-UI/js/pages/remote-addblock-session-view.js +++ b/shine-UI/js/pages/remote-addblock-session-view.js @@ -1,3 +1,4 @@ +import { formatDateTime } from '../i18n/format.js'; import { t, th } from '../i18n/index.js'; import { createTopBar } from '../components/topbar.js'; import { toUserMessage } from '../services/ui-error-texts.js'; @@ -17,7 +18,7 @@ export const pageMeta = { id: 'remote-addblock-session-view', get title() { retu const SESSION_TYPE_HOMESERVER = 100; function formatSessionTime(ms) { - return new Date(ms).toLocaleString('ru-RU', { + return formatDateTime(new Date(ms), { day: '2-digit', month: '2-digit', year: 'numeric', diff --git a/shine-UI/js/pages/show-keys-view.js b/shine-UI/js/pages/show-keys-view.js index 025dc9c2..955f39b7 100644 --- a/shine-UI/js/pages/show-keys-view.js +++ b/shine-UI/js/pages/show-keys-view.js @@ -48,7 +48,7 @@ export function render({navigate, chrome}) { row.innerHTML = `
${label}${hint} - +
*****
`; diff --git a/shine-UI/js/pages/user-profile-view.js b/shine-UI/js/pages/user-profile-view.js index 6aa2da6f..8730cd7d 100644 --- a/shine-UI/js/pages/user-profile-view.js +++ b/shine-UI/js/pages/user-profile-view.js @@ -84,7 +84,7 @@ export function render({ navigate, route, chrome }) { const r = relation; const theyFriend = r.inFriend || r.inCloseFriend; let icon = 'user-plus'; - let label = 'Добавить связь'; + let label = t('remaining.profile.add_connection'); let hint = ''; if (r.outCloseFriend) { icon = 'check'; label = t('screens.user_profile_view.text_013'); } else if (r.outFriend) { icon = 'check'; label = t('screens.user_profile_view.text_014'); } diff --git a/shine-UI/js/pages/wallet-view.js b/shine-UI/js/pages/wallet-view.js index 34531587..8348c237 100644 --- a/shine-UI/js/pages/wallet-view.js +++ b/shine-UI/js/pages/wallet-view.js @@ -1,3 +1,4 @@ +import { formatDateTime, formatNumber } from '../i18n/format.js'; import { t, th } from '../i18n/index.js'; import { getSolanaCluster, confirmSolanaTransactionHttp } from '../services/solana-rpc-gateway.js'; import { createTopBar } from '../components/topbar.js'; @@ -41,7 +42,7 @@ import { export const pageMeta = { id: 'wallet-view', get title() { return t('screens.wallet_view.text_001'); } }; function nowRu() { - return new Date().toLocaleString('ru-RU'); + return formatDateTime(new Date()); } function formatKbFromBytes(rawBytes) { @@ -50,13 +51,13 @@ function formatKbFromBytes(rawBytes) { : Number(rawBytes || 0); if (!Number.isFinite(bytes) || bytes <= 0) return '0 KB'; const kb = bytes / 1024; - return `${kb.toLocaleString('ru-RU', { minimumFractionDigits: 2, maximumFractionDigits: 2 })} KB`; + return `${formatNumber(kb, { minimumFractionDigits: 2, maximumFractionDigits: 2 })} KB`; } function formatBytesRu(rawBytes) { const bytes = typeof rawBytes === 'bigint' ? Number(rawBytes) : Number(rawBytes || 0); if (!Number.isFinite(bytes) || bytes <= 0) return '0 B'; - return bytes.toLocaleString('ru-RU'); + return formatNumber(bytes); } function normalizeHex64(value) { @@ -66,7 +67,7 @@ function normalizeHex64(value) { function lamportsToSolText(lamportsBigInt) { const value = Number(lamportsBigInt || 0n) / 1_000_000_000; - return value.toLocaleString('ru-RU', { minimumFractionDigits: 0, maximumFractionDigits: 9 }); + return formatNumber(value, { minimumFractionDigits: 0, maximumFractionDigits: 9 }); } function formatLimitTopupError(error) { @@ -244,7 +245,7 @@ function trimZeros(value) { function formatUsdCentsText(cents) { const value = Number(cents || 0n) / 100; - return value.toLocaleString('ru-RU', { minimumFractionDigits: 0, maximumFractionDigits: 2 }); + return formatNumber(value, { minimumFractionDigits: 0, maximumFractionDigits: 2 }); } function formatPpmCoefText(coefPpm) { @@ -254,7 +255,7 @@ function formatPpmCoefText(coefPpm) { function formatLamportsSolText(lamports, digits = 9) { const value = Number(lamports || 0n) / Number(LAMPORTS_PER_SOL); - return value.toLocaleString('ru-RU', { minimumFractionDigits: 0, maximumFractionDigits: digits }); + return formatNumber(value, { minimumFractionDigits: 0, maximumFractionDigits: digits }); } function formatPythSolUsdText(pyth) { @@ -386,7 +387,7 @@ async function deriveSupportRandomWallet(extraText) { address: keypair.publicKey.toBase58(), privateKey32Base58: encodeBase58(seed), keypair, - generatedAt: new Date().toLocaleString('ru-RU'), + generatedAt: formatDateTime(new Date()), }; } @@ -881,7 +882,7 @@ export function render({navigate, chrome}) { const ticketInfo = await core.connection.getAccountInfo(ticketPda, 'confirmed'); if (!ticketInfo) { result.innerHTML = ` -

Билет ${formatSupportTicketLabel(parsed.queueId, parsed.index)} пока не создан.

+

${th('remaining.html_wallet_view.ticket')}${formatSupportTicketLabel(parsed.queueId, parsed.index)}${th('remaining.html_wallet_view.has_not_been_created_yet')}

`; return; } @@ -903,12 +904,12 @@ export function render({navigate, chrome}) {
${th('screens.wallet_view.text_213')} ${formatSupportTicketLabel(parsed.queueId, ticket.index)}
${th('screens.wallet_view.text_214')} ${ticket.isPaid ? t('screens.wallet_view.text_112') : t('screens.wallet_view.text_113')}
${th('screens.wallet_view.text_215')} ${ticket.recipientWallet}
-
${th('screens.wallet_view.text_216')} ${ticketsBefore.toString()} билетов
-
${th('screens.wallet_view.text_217')} ${paidBefore.toString()} билетов
-
${th('screens.wallet_view.text_218')} ${remainingBefore.toString()} билетов
+
${th('screens.wallet_view.text_216')} ${ticketsBefore.toString()}${th('remaining.html_wallet_view.tickets_div')} +
${th('screens.wallet_view.text_217')} ${paidBefore.toString()}${th('remaining.html_wallet_view.tickets_div')} +
${th('screens.wallet_view.text_218')} ${remainingBefore.toString()}${th('remaining.html_wallet_view.tickets_div')}
${th('screens.wallet_view.text_219')} ${formatUsdCentsText(queueState.sumPaidUsdCents)} USD
${th('screens.wallet_view.text_220')} ${formatUsdCentsText(ticket.payoutUsdCents)} USD
-
${th('screens.wallet_view.text_221')} ${formatUsdCentsText(ticket.debtBeforeUsdCents)} USD в очереди до него
+
${th('screens.wallet_view.text_221')} ${formatUsdCentsText(ticket.debtBeforeUsdCents)}${th('remaining.html_wallet_view.usd_ahead_of_it_in_the_queue_div')} `; } setStatus(t('screens.wallet_view.text_158', { value1: formatSupportTicketLabel(ticket.queueId, ticket.index), value2: endpoint })); @@ -1264,10 +1265,10 @@ export function render({navigate, chrome}) { if (modeToken !== activeModeToken) return; setStatus(t('screens.wallet_view.text_161', { value1: formatQueuePrefix(ticket.queueId), value2: ticket.index.toString() })); purchaseResultCard.innerHTML = ` -
${th('screens.wallet_view.text_260')} билет ${formatQueuePrefix(ticket.queueId)}-${ticket.index.toString()}
+
${th('screens.wallet_view.text_260')}${th('remaining.html_wallet_view.ticket_single')}${formatQueuePrefix(ticket.queueId)}-${ticket.index.toString()}
${th('screens.wallet_view.text_261')} ${ticket.recipientWallet}
${th('screens.wallet_view.text_262')} ${formatUsdCentsText(ticket.payoutUsdCents)} USD
-
${th('screens.wallet_view.text_263')} ${ticket.index > 0n ? (ticket.index - 1n).toString() : '0'} билетов
+
${th('screens.wallet_view.text_263')} ${ticket.index > 0n ? (ticket.index - 1n).toString() : '0'}${th('remaining.html_wallet_view.tickets_div')}
${th('screens.wallet_view.text_264')} ${signature}
`; await refreshCore(); @@ -1598,7 +1599,7 @@ export function render({navigate, chrome}) { publicationMainEl.textContent = t('screens.wallet_view.text_029'); } - let localStatusText = 'Локального слепка нет.'; + let localStatusText = t('remaining.wallet.no_local_snapshot'); const localMatchesServer = localSnapshot && String(localSnapshot.blockchainName || '') === String(usage.blockchainName || serverState.blockchainName || '') && Number(localSnapshot.lastBlockNumber) === Number(serverState.lastNumber) @@ -1645,9 +1646,9 @@ export function render({navigate, chrome}) { localHashEl.textContent = `Hash: ${localSnapshot.lastBlockHash || '–'}`; localSizeEl.textContent = t('screens.wallet_view.text_177', { value1: formatBytesRu(localSnapshot.usedBytes || 0) }); localArweaveEl.textContent = `Arweave tx: ${localSnapshot.txId}`; - localCreatedEl.textContent = t('screens.wallet_view.text_178', { value1: localSnapshot.uploadedAtMs ? new Date(localSnapshot.uploadedAtMs).toLocaleString('ru-RU') : '–' }); + localCreatedEl.textContent = t('screens.wallet_view.text_178', { value1: localSnapshot.uploadedAtMs ? formatDateTime(new Date(localSnapshot.uploadedAtMs)) : '–' }); localSolanaEl.textContent = localSnapshot.solanaUpdatedAtMs - ? t('screens.wallet_view.text_179', { value1: new Date(localSnapshot.solanaUpdatedAtMs).toLocaleString('ru-RU') }) + ? t('screens.wallet_view.text_179', { value1: formatDateTime(new Date(localSnapshot.solanaUpdatedAtMs)) }) : t('screens.wallet_view.text_128'); } else { localStateEl.textContent = t('screens.wallet_view.text_030'); diff --git a/shine-UI/js/services/arweave-avatar-cache-service.js b/shine-UI/js/services/arweave-avatar-cache-service.js index e58a8d6a..d1c59e9e 100644 --- a/shine-UI/js/services/arweave-avatar-cache-service.js +++ b/shine-UI/js/services/arweave-avatar-cache-service.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; import { buildArweaveDataUrl, sha256HexFromArrayBuffer, @@ -14,7 +15,7 @@ const MAX_BYTES = 50 * 1024 * 1024; function openDb() { return new Promise((resolve, reject) => { if (typeof indexedDB === 'undefined') { - reject(new Error('IndexedDB недоступен')); + reject(new Error(t('remaining.avatar_errors.indexeddb_is_unavailable'))); return; } const request = indexedDB.open(DB_NAME, DB_VERSION); @@ -25,7 +26,7 @@ function openDb() { } }; request.onsuccess = () => resolve(request.result); - request.onerror = () => reject(request.error || new Error('Ошибка открытия IndexedDB')); + request.onerror = () => reject(request.error || new Error(t('remaining.avatar_errors.could_not_open_indexeddb'))); }); } @@ -37,7 +38,7 @@ async function withStore(mode, runner) { const store = tx.objectStore(STORE); const result = runner(store, tx, resolve, reject); if (result !== undefined) resolve(result); - tx.onerror = () => reject(tx.error || new Error('Ошибка транзакции IndexedDB')); + tx.onerror = () => reject(tx.error || new Error(t('remaining.avatar_errors.indexeddb_transaction_failed'))); }); } finally { db.close(); @@ -48,7 +49,7 @@ async function getRecord(txId) { return withStore('readonly', (store, _tx, resolve, reject) => { const req = store.get(txId); req.onsuccess = () => resolve(req.result || null); - req.onerror = () => reject(req.error || new Error('Ошибка чтения кэша аватарки')); + req.onerror = () => reject(req.error || new Error(t('remaining.avatar_errors.could_not_read_avatar_cache'))); }); } @@ -56,7 +57,7 @@ async function putRecord(record) { return withStore('readwrite', (store, tx, resolve, reject) => { store.put(record); tx.oncomplete = () => resolve(true); - tx.onerror = () => reject(tx.error || new Error('Ошибка записи кэша аватарки')); + tx.onerror = () => reject(tx.error || new Error(t('remaining.avatar_errors.could_not_write_avatar_cache'))); }); } @@ -72,7 +73,7 @@ async function getAllRecords() { return withStore('readonly', (store, _tx, resolve, reject) => { const req = store.getAll(); req.onsuccess = () => resolve(Array.isArray(req.result) ? req.result : []); - req.onerror = () => reject(req.error || new Error('Ошибка чтения списка кэша аватарок')); + req.onerror = () => reject(req.error || new Error(t('remaining.avatar_errors.could_not_read_avatar_cache_entries'))); }); } @@ -81,7 +82,7 @@ async function deleteRecords(keys) { await withStore('readwrite', (store, tx, resolve, reject) => { keys.forEach((key) => store.delete(key)); tx.oncomplete = () => resolve(true); - tx.onerror = () => reject(tx.error || new Error('Ошибка очистки кэша аватарок')); + tx.onerror = () => reject(tx.error || new Error(t('remaining.avatar_errors.could_not_clear_avatar_cache'))); }); } @@ -208,7 +209,7 @@ async function getBlobFromCacheOrGateway({ gateway, txId, expectedSha256Hex = '' export async function getCachedAvatarObjectUrl({ gateway, txId, expectedSha256Hex = '' }) { const cleanTxId = String(txId || '').trim(); if (!validateArweaveTxId(cleanTxId)) { - throw new Error('Некорректный Transaction ID Arweave'); + throw new Error(t('remaining.avatar_errors.invalid_arweave_transaction_id')); } const blob = await getBlobFromCacheOrGateway({ gateway, @@ -222,6 +223,6 @@ export async function clearAvatarCache() { await withStore('readwrite', (store, tx, resolve, reject) => { store.clear(); tx.oncomplete = () => resolve(true); - tx.onerror = () => reject(tx.error || new Error('Ошибка очистки кэша аватарок')); + tx.onerror = () => reject(tx.error || new Error(t('remaining.avatar_errors.could_not_clear_avatar_cache'))); }); } diff --git a/shine-UI/js/services/arweave-file-service.js b/shine-UI/js/services/arweave-file-service.js index 188ef341..5e5f2d7d 100644 --- a/shine-UI/js/services/arweave-file-service.js +++ b/shine-UI/js/services/arweave-file-service.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; const DEFAULT_ARWEAVE_GATEWAY = 'https://arweave.net'; const WINSTON_PER_AR = 1_000_000_000_000n; const MAX_AVATAR_SOURCE_BYTES = 10 * 1024 * 1024; @@ -16,10 +17,10 @@ function normalizeGateway(rawGateway) { try { parsed = new URL(raw); } catch { - throw new Error('Некорректный Arweave gateway URL'); + throw new Error(t('remaining.arweave_file_errors.invalid_arweave_gateway_url')); } if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') { - throw new Error('Arweave gateway должен использовать http или https'); + throw new Error(t('remaining.arweave_file_errors.arweave_gateway_must_use_http_or_https')); } const normalized = `${parsed.protocol}//${parsed.host}${parsed.pathname}`.replace(/\/+$/g, ''); return normalized || DEFAULT_ARWEAVE_GATEWAY; @@ -30,11 +31,11 @@ function parseGatewayForArweaveInit(gateway) { try { parsed = new URL(gateway); } catch { - throw new Error('Некорректный Arweave gateway URL'); + throw new Error(t('remaining.arweave_file_errors.invalid_arweave_gateway_url')); } const protocol = parsed.protocol.replace(':', ''); if (protocol !== 'http' && protocol !== 'https') { - throw new Error('Arweave gateway должен использовать http или https'); + throw new Error(t('remaining.arweave_file_errors.arweave_gateway_must_use_http_or_https')); } const port = parsed.port ? Number(parsed.port) @@ -79,7 +80,7 @@ async function createBitmapWithFallback(file) { const image = await new Promise((resolve, reject) => { const img = new Image(); img.onload = () => resolve(img); - img.onerror = () => reject(new Error('Не удалось прочитать изображение')); + img.onerror = () => reject(new Error(t('remaining.arweave_files.could_not_read_image'))); img.src = url; }); return image; @@ -109,7 +110,7 @@ export function validateSha256Hex(sha256Hex) { } export async function sha256HexFromArrayBuffer(buffer) { - if (!(buffer instanceof ArrayBuffer)) throw new Error('Некорректные данные для SHA256'); + if (!(buffer instanceof ArrayBuffer)) throw new Error(t('remaining.arweave_file_errors.invalid_data_for_sha_256')); const digest = await crypto.subtle.digest('SHA-256', buffer); return bytesToHex(new Uint8Array(digest)); } @@ -117,12 +118,12 @@ export async function sha256HexFromArrayBuffer(buffer) { export function buildArweaveAvatarValue(txId, sha256Hex = '') { const cleanTxId = String(txId || '').trim(); if (!validateArweaveTxId(cleanTxId)) { - throw new Error('Некорректный Transaction ID Arweave'); + throw new Error(t('remaining.arweave_file_errors.invalid_arweave_transaction_id')); } const cleanSha = String(sha256Hex || '').trim().toLowerCase(); if (!cleanSha) return `AR:${cleanTxId}`; if (!validateSha256Hex(cleanSha)) { - throw new Error('Некорректный SHA256 хэш аватара'); + throw new Error(t('remaining.arweave_file_errors.invalid_avatar_sha_256_hash')); } return `SHA256:${cleanSha},AR:${cleanTxId}`; } @@ -158,7 +159,7 @@ export function buildArweaveDataUrl({ gateway, txId }) { const normalizedGateway = normalizeGateway(gateway); const cleanTxId = String(txId || '').trim(); if (!validateArweaveTxId(cleanTxId)) { - throw new Error('Некорректный Transaction ID Arweave'); + throw new Error(t('remaining.arweave_file_errors.invalid_arweave_transaction_id')); } return `${normalizedGateway}/${cleanTxId}`; } @@ -167,7 +168,7 @@ export async function getArweaveUploadPrice({ gateway, byteLength }) { const normalizedGateway = normalizeGateway(gateway); const bytes = Number(byteLength); if (!Number.isInteger(bytes) || bytes <= 0) { - throw new Error('Некорректный размер файла'); + throw new Error(t('remaining.arweave_file_errors.invalid_file_size')); } const response = await fetch(`${normalizedGateway}/price/${bytes}`, { method: 'GET' }); @@ -176,7 +177,7 @@ export async function getArweaveUploadPrice({ gateway, byteLength }) { throw new Error(`Не удалось получить цену загрузки (${response.status} ${response.statusText})`); } if (!/^\d+$/.test(raw)) { - throw new Error('Arweave gateway вернул некорректную цену'); + throw new Error(t('remaining.arweave_file_errors.arweave_gateway_returned_an_invalid_price')); } return { @@ -193,13 +194,13 @@ export function isSupportedAvatarImageType(type) { export function validateAvatarSourceFile(file) { if (!(file instanceof File)) { - throw new Error('Выберите файл изображения.'); + throw new Error(t('remaining.arweave_files.select_an_image_file')); } if (!isSupportedAvatarImageType(file.type)) { - throw new Error('Поддерживаются только JPEG, PNG или WebP.'); + throw new Error(t('remaining.arweave_files.only_jpeg_png_and_webp_files_are_supported')); } if (Number(file.size || 0) > MAX_AVATAR_SOURCE_BYTES) { - throw new Error('Файл слишком большой. Максимум 10 MB.'); + throw new Error(t('remaining.arweave_files.file_too_large_maximum_size_10_mb')); } } @@ -210,14 +211,14 @@ export async function prepareAvatarImageFile(file) { try { bitmap = await createBitmapWithFallback(file); } catch { - throw new Error('Не удалось подготовить изображение.'); + throw new Error(t('remaining.arweave_files.could_not_process_the_image')); } try { const originalWidth = Number(bitmap.width || 0); const originalHeight = Number(bitmap.height || 0); if (!originalWidth || !originalHeight) { - throw new Error('Не удалось подготовить изображение.'); + throw new Error(t('remaining.arweave_files.could_not_process_the_image')); } const scale = Math.min(1, MAX_AVATAR_SIDE_PX / Math.max(originalWidth, originalHeight)); @@ -229,7 +230,7 @@ export async function prepareAvatarImageFile(file) { canvas.height = height; const ctx = canvas.getContext('2d'); if (!ctx) { - throw new Error('Не удалось подготовить изображение.'); + throw new Error(t('remaining.arweave_files.could_not_process_the_image')); } ctx.drawImage(bitmap, 0, 0, width, height); @@ -242,7 +243,7 @@ export async function prepareAvatarImageFile(file) { blob = await canvasToBlob(canvas, contentType, AVATAR_QUALITY); } if (!blob) { - throw new Error('Не удалось подготовить изображение.'); + throw new Error(t('remaining.arweave_files.could_not_process_the_image')); } const optimizedFile = blobToFile(blob, fileName, contentType); @@ -261,7 +262,7 @@ export async function prepareAvatarImageFile(file) { }; } catch (error) { if (error instanceof Error) throw error; - throw new Error('Не удалось подготовить изображение.'); + throw new Error(t('remaining.arweave_files.could_not_process_the_image')); } finally { if (bitmap && typeof bitmap.close === 'function') { bitmap.close(); @@ -301,10 +302,10 @@ export async function loadArweaveFileMetadata({ gateway, txId, maxBytes = MAX_AR export async function uploadArweaveFile({ gateway, jwk, file, tags = [], shineType = 'avatar' }) { if (!jwk || typeof jwk !== 'object') { - throw new Error('Arweave-кошелёк не инициализирован.'); + throw new Error(t('remaining.arweave_files.arweave_wallet_is_not_initialized')); } if (!(file instanceof File)) { - throw new Error('Выберите файл.'); + throw new Error(t('remaining.arweave_files.select_a_file')); } const normalizedGateway = normalizeGateway(gateway); diff --git a/shine-UI/js/services/arweave-wallet-service.js b/shine-UI/js/services/arweave-wallet-service.js index 71ce5aa3..a4fde7b5 100644 --- a/shine-UI/js/services/arweave-wallet-service.js +++ b/shine-UI/js/services/arweave-wallet-service.js @@ -1,3 +1,5 @@ +import { t } from '../i18n/index.js'; +import { formatNumber } from '../i18n/format.js'; import { loadEncryptedUserSecrets, updateEncryptedUserSecrets } from './key-vault.js'; import { extractEd25519Seed32FromStoredValue } from './client-key-utils.js'; import { deriveArweaveWalletFromBlockchainKey32 } from './sawd-v1.js'; @@ -15,10 +17,10 @@ function normalizeGateway(rawGateway) { try { parsed = new URL(raw); } catch { - throw new Error('Некорректный Arweave gateway URL'); + throw new Error(t('remaining.arweave_wallet_errors.invalid_arweave_gateway_url')); } if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') { - throw new Error('Arweave gateway должен использовать http или https'); + throw new Error(t('remaining.arweave_wallet_errors.arweave_gateway_must_use_http_or_https')); } const normalized = `${parsed.protocol}//${parsed.host}${parsed.pathname}`.replace(/\/+$/g, ''); return normalized || DEFAULT_ARWEAVE_GATEWAY; @@ -29,11 +31,11 @@ function parseGatewayForArweaveInit(gateway) { try { parsed = new URL(gateway); } catch { - throw new Error('Некорректный Arweave gateway URL'); + throw new Error(t('remaining.arweave_wallet_errors.invalid_arweave_gateway_url')); } const protocol = parsed.protocol.replace(':', ''); if (protocol !== 'http' && protocol !== 'https') { - throw new Error('Arweave gateway должен использовать http или https'); + throw new Error(t('remaining.arweave_wallet_errors.arweave_gateway_must_use_http_or_https')); } const port = parsed.port ? Number(parsed.port) @@ -49,18 +51,18 @@ function parseArToWinston(amountAr) { const raw = String(amountAr ?? '').trim().replace(',', '.'); const match = raw.match(/^(\d+)(?:\.(\d+))?$/); if (!match) { - throw new Error('Сумма перевода должна быть числом'); + throw new Error(t('remaining.arweave_wallet.the_transfer_amount_must_be_a_number')); } const intPart = BigInt(match[1] || '0'); const frac = String(match[2] || ''); if (frac.length > 12) { - throw new Error('Слишком много знаков после запятой (максимум 12)'); + throw new Error(t('remaining.arweave_wallet.too_many_decimal_places_maximum_12')); } const fracPadded = `${frac}${'0'.repeat(12 - frac.length)}`; const winston = (intPart * WINSTON_PER_AR) + BigInt(fracPadded || '0'); if (winston <= 0n) { - throw new Error('Сумма перевода должна быть больше 0'); + throw new Error(t('remaining.arweave_wallet.the_transfer_amount_must_be_greater_than_zero')); } return winston.toString(); } @@ -112,12 +114,12 @@ function normalizeExtraWallets(secrets) { function parseJwkSecretString(secret) { const raw = String(secret || '').trim(); - if (!raw) throw new Error('Введите секрет Arweave-кошелька.'); + if (!raw) throw new Error(t('remaining.arweave_wallet.enter_your_arweave_wallet_secret')); const tryParse = (value) => { const parsed = JSON.parse(value); if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) { - throw new Error('Некорректный JWK Arweave.'); + throw new Error(t('remaining.arweave_wallet.invalid_arweave_jwk')); } return parsed; }; @@ -131,12 +133,12 @@ function parseJwkSecretString(secret) { try { return tryParse(atob(normalized)); } catch { - throw new Error('Секрет должен быть JSON JWK или base64url(JSON JWK).'); + throw new Error(t('remaining.arweave_wallet.the_secret_must_be_json_jwk_or_base64url_json_jwk')); } } function validateArweaveJwk(jwk) { - if (!jwk || typeof jwk !== 'object') throw new Error('Некорректный JWK Arweave.'); + if (!jwk || typeof jwk !== 'object') throw new Error(t('remaining.arweave_wallet.invalid_arweave_jwk')); ['kty', 'e', 'n', 'd', 'p', 'q', 'dp', 'dq', 'qi'].forEach((key) => { if (!String(jwk[key] || '').trim()) throw new Error(`В JWK Arweave нет поля ${key}.`); }); @@ -158,7 +160,7 @@ export async function getArweaveWalletChoices({ login, storagePwd, onStatus } = return [ { id: 'derived-blockchain-key', - label: 'Стандартный из ключа блокчейна', + label: t('remaining.arweave_wallet.derived_from_blockchain_key'), address: derived.address, owner: derived.owner, jwk: derived.jwk, @@ -175,7 +177,7 @@ export async function getArweaveWalletChoices({ login, storagePwd, onStatus } = export async function addArweaveWalletSecret({ login, storagePwd, secret, label = '' } = {}) { const cleanLogin = String(login || '').trim(); const cleanPwd = String(storagePwd || '').trim(); - if (!cleanLogin || !cleanPwd) throw new Error('Нет активной сессии.'); + if (!cleanLogin || !cleanPwd) throw new Error(t('remaining.arweave_wallet.no_active_session')); const jwk = parseJwkSecretString(secret); validateArweaveJwk(jwk); @@ -212,21 +214,21 @@ export async function getArweaveWalletFromStoredBlockchainKey({ login, storagePw const cleanLogin = String(login || '').trim(); const cleanPwd = String(storagePwd || '').trim(); if (!cleanLogin || !cleanPwd) { - throw new Error('Нет активной сессии для доступа к blockchain key'); + throw new Error(t('remaining.arweave_wallet_errors.no_active_session_to_access_blockchain_key')); } const secrets = await loadEncryptedUserSecrets(cleanLogin, cleanPwd); const cached = pickCachedWallet(secrets); if (cached) { - safeStatus(onStatus, 'Arweave-кошелёк загружен.'); + safeStatus(onStatus, t('remaining.arweave_wallet.arweave_wallet_loaded')); return cached; } - safeStatus(onStatus, 'Сейчас мы впервые получаем Arweave-кошелёк из вашего ключа блокчейна. Это может занять немного времени.'); + safeStatus(onStatus, t('remaining.arweave_wallet.your_arweave_wallet_is_being_derived_from_the_blockchain_k')); const storedBlockchainKey = String(secrets?.blockchainKey || '').trim(); if (!storedBlockchainKey) { - throw new Error('На устройстве не найден blockchain key'); + throw new Error(t('remaining.arweave_wallet_errors.blockchain_key_not_found_on_this_device')); } const blockchainKey32 = extractEd25519Seed32FromStoredValue(storedBlockchainKey); @@ -263,7 +265,7 @@ export async function getArweaveBalance({ gateway, address }) { const normalizedGateway = normalizeGateway(gateway); const cleanAddress = String(address || '').trim(); if (!cleanAddress) { - throw new Error('Не указан адрес Arweave'); + throw new Error(t('remaining.arweave_wallet.arweave_address_missing')); } const url = `${normalizedGateway}/wallet/${encodeURIComponent(cleanAddress)}/balance`; @@ -274,7 +276,7 @@ export async function getArweaveBalance({ gateway, address }) { throw new Error(`Не удалось получить баланс Arweave (${response.status} ${response.statusText})`); } if (!/^\d+$/.test(rawText)) { - throw new Error('Arweave gateway вернул некорректный баланс'); + throw new Error(t('remaining.arweave_wallet.arweave_gateway_returned_an_invalid_balance')); } const winstonBig = BigInt(rawText); @@ -289,7 +291,7 @@ export async function getArweaveBalance({ gateway, address }) { export function formatAr(value, digits = 6) { const n = Number(value); if (!Number.isFinite(n)) return '0'; - return n.toLocaleString('ru-RU', { + return formatNumber(n, { minimumFractionDigits: 0, maximumFractionDigits: digits, }); @@ -301,8 +303,8 @@ export function getArweaveTopupSiteUrl() { export async function transferAr({ gateway, jwk, toAddress, amountAr }) { const cleanTo = String(toAddress || '').trim(); - if (!cleanTo) throw new Error('Не указан адрес получателя Arweave'); - if (!jwk || typeof jwk !== 'object') throw new Error('Кошелёк Arweave не инициализирован'); + if (!cleanTo) throw new Error(t('remaining.arweave_wallet.arweave_recipient_address_missing')); + if (!jwk || typeof jwk !== 'object') throw new Error(t('remaining.arweave_wallet.arweave_wallet_is_not_initialized')); const normalizedGateway = normalizeGateway(gateway); const { host, port, protocol } = parseGatewayForArweaveInit(normalizedGateway); diff --git a/shine-UI/js/services/attachment-format.js b/shine-UI/js/services/attachment-format.js index 8f7ce273..e6c54974 100644 --- a/shine-UI/js/services/attachment-format.js +++ b/shine-UI/js/services/attachment-format.js @@ -1,3 +1,5 @@ +import { t, th } from '../i18n/index.js'; +import { formatNumber } from '../i18n/format.js'; import { openMediaViewer } from '../components/media-viewer.js'; import { buildArweaveDataUrl, sha256HexFromArrayBuffer, validateArweaveTxId, validateSha256Hex } from './arweave-file-service.js'; import { resolvePublicFileUrl } from './public-file-service.js'; @@ -20,13 +22,13 @@ export function escapeHtml(text) { // Размер файла по-русски: «83 Б», «93 КБ», «1,4 МБ»; после 10 – без дробной части. export function formatBytes(bytes) { const value = Number(bytes || 0); - if (!Number.isFinite(value) || value <= 0) return '0 Б'; - for (const [unit, size] of [['ГБ', 1024 ** 3], ['МБ', 1024 ** 2], ['КБ', 1024]]) { + if (!Number.isFinite(value) || value <= 0) return t('remaining.attachments.text_0_b'); + for (const [unit, size] of [[t('remaining.attachments.gb'), 1024 ** 3], [t('remaining.attachments.mb'), 1024 ** 2], [t('remaining.attachments.kb'), 1024]]) { if (value < size) continue; const amount = value / size; - return `${amount.toLocaleString('ru-RU', { maximumFractionDigits: amount >= 10 ? 0 : 1 })} ${unit}`; + return `${formatNumber(amount, { maximumFractionDigits: amount >= 10 ? 0 : 1 })} ${unit}`; } - return `${Math.round(value)} Б`; + return t('remaining.attachments.bytes', { count: Math.round(value) }); } function normalizeName(name) { @@ -42,9 +44,9 @@ export function normalizeAttachment(input = {}) { const sha256Hex = String(input.sha256 || input.sha256Hex || '').trim().toLowerCase(); const size = Number(input.sz || input.size || input.sizeBytes || 0); const name = normalizeName(input.nm || input.name || input.fileName || 'file'); - if (txId && !validateArweaveTxId(txId)) throw new Error('Некорректный Transaction ID Arweave.'); - if (!validateSha256Hex(sha256Hex)) throw new Error('Некорректный SHA-256 файла.'); - if (!Number.isInteger(size) || size <= 0) throw new Error('Некорректный размер файла.'); + if (txId && !validateArweaveTxId(txId)) throw new Error(t('remaining.attachment_errors.invalid_arweave_transaction_id')); + if (!validateSha256Hex(sha256Hex)) throw new Error(t('remaining.attachment_errors.invalid_file_sha_256')); + if (!Number.isInteger(size) || size <= 0) throw new Error(t('remaining.attachment_errors.invalid_file_size')); const out = { v: 1, name, @@ -149,11 +151,11 @@ function createUnavailableBlock(messageTimestampMs, storage = 'arweave', detail const block = document.createElement('div'); block.className = 'message-attachment-unavailable'; if (storage === 'server') { - block.textContent = 'Файл недоступен на сервере доступа автора.'; + block.textContent = t('remaining.attachments.the_file_is_unavailable_on_the_author_s_access_server'); } else { block.textContent = isRecentMessage(messageTimestampMs) - ? 'Скорее всего файл недоступен, потому что сообщение было создано недавно и файл ещё не распространился в Arweave. Попробуйте повторить через несколько минут.' - : 'Файл недоступен.'; + ? t('remaining.attachments.the_file_may_not_have_propagated_to_arweave_yet_please_try') + : t('remaining.attachments.file_unavailable'); } if (detail) { const debug = document.createElement('pre'); @@ -192,9 +194,9 @@ function createFileCard({ item, url, messageTimestampMs, slide }) { card.className = 'message-attachment-file-card'; card.role = 'button'; card.tabIndex = 0; - card.title = 'Скачать файл'; + card.title = t('remaining.attachments.download_file'); card.innerHTML = ` -
Файл
+
${th('remaining.html_attachment_format.file_div')}
${escapeHtml(item.name)}
${escapeHtml(formatBytes(item.size))}
@@ -234,7 +236,7 @@ function createMediaSlide({ item, url, kind, messageTimestampMs, slide, onOpen } frame.className = `message-attachment-media-frame message-attachment-media-frame--${kind}`; frame.role = 'button'; frame.tabIndex = 0; - frame.title = kind === 'video' ? 'Открыть видео' : 'Открыть изображение'; + frame.title = kind === 'video' ? t('remaining.attachments.open_video') : t('remaining.attachments.open_image'); frame.addEventListener('click', (event) => { event.stopPropagation(); onOpen?.(); @@ -377,7 +379,7 @@ async function resolveAttachmentDisplayUrl(item, options = {}) { if (!response.ok) throw new Error(`HTTP ${response.status} ${serverUrl}`); const buffer = await response.arrayBuffer(); const actualSha = await sha256HexFromArrayBuffer(buffer); - if (actualSha !== item.sha256) throw new Error(`SHA-256 скачанного файла не совпал с блокчейном: ${actualSha} != ${item.sha256} (${serverUrl})`); + if (actualSha !== item.sha256) throw new Error(t('remaining.attachment_error.hash_mismatch', { actual: actualSha, expected: item.sha256, url: serverUrl })); const blob = new Blob([buffer], { type: mimeTypeForAttachment(item, kind) }); return { url: URL.createObjectURL(blob), sourceUrl: serverUrl, objectUrl: true }; } @@ -423,12 +425,12 @@ export function createAttachmentCarouselElement(attachments = [], { prev.type = 'button'; prev.className = 'ui-button message-attachment-arrow message-attachment-arrow--prev'; prev.textContent = '‹'; - prev.setAttribute('aria-label', 'Предыдущее вложение'); + prev.setAttribute('aria-label', t('remaining.attachments.previous_attachment')); const next = document.createElement('button'); next.type = 'button'; next.className = 'ui-button message-attachment-arrow message-attachment-arrow--next'; next.textContent = '›'; - next.setAttribute('aria-label', 'Следующее вложение'); + next.setAttribute('aria-label', t('remaining.attachments.next_attachment')); const counter = document.createElement('div'); counter.className = 'message-attachment-counter'; wrap.classList.toggle('has-single-attachment', items.length <= 1); @@ -478,7 +480,7 @@ export function createAttachmentCarouselElement(attachments = [], { const loading = document.createElement('div'); loading.className = 'message-attachment-unavailable'; - loading.textContent = 'Загружаем файл…'; + loading.textContent = t('remaining.attachments.loading_file'); slide.append(loading); void getResolved(currentIndex) @@ -501,7 +503,7 @@ export function createAttachmentCarouselElement(attachments = [], { prev.hidden = items.length <= 1 || index <= 0; next.hidden = items.length <= 1 || index >= items.length - 1; counter.hidden = items.length <= 1; - counter.textContent = items.length > 1 ? `${index + 1} из ${items.length}` : ''; + counter.textContent = items.length > 1 ? t('remaining.attachments.counter', { current: index + 1, total: items.length }) : ''; }; const move = (delta) => { diff --git a/shine-UI/js/services/auth-required-modal.js b/shine-UI/js/services/auth-required-modal.js index 44f8ba35..8764f321 100644 --- a/shine-UI/js/services/auth-required-modal.js +++ b/shine-UI/js/services/auth-required-modal.js @@ -1,3 +1,4 @@ +import { t, th } from '../i18n/index.js'; import { navigate } from '../router.js'; function escapeHtml(text) { @@ -10,8 +11,8 @@ function escapeHtml(text) { } export function openAuthRequiredModal({ - title = 'Нужен вход', - text = 'Эта часть доступна после входа.', + title = t('remaining.auth_required.sign_in_required'), + text = t('remaining.auth_required.this_section_is_available_after_you_sign_in'), } = {}) { const root = document.getElementById('modal-root'); if (!(root instanceof HTMLElement)) { @@ -24,8 +25,8 @@ export function openAuthRequiredModal({

${escapeHtml(text)}

- - + +
diff --git a/shine-UI/js/services/call-service.js b/shine-UI/js/services/call-service.js index b7b77bbe..6172f76a 100644 --- a/shine-UI/js/services/call-service.js +++ b/shine-UI/js/services/call-service.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; import { addAppLogEntry, addSignedMessageToChat, authService, authorizeSession, state } from '../state.js'; import { buildDmCallTechBlock } from './dm-tech-blocks.js'; @@ -150,23 +151,23 @@ function parseInviteData(data = '') { function getCallTitleText(mode) { if (normalizeCallMode(mode) === CALL_MODE_INSTANT_VIDEO) { - return 'Видеозвонок'; + return t('remaining.call.video_call'); } if (normalizeCallMode(mode) === CALL_MODE_VIDEO) { - return 'Видеозвонок'; + return t('remaining.call.video_call'); } - return 'Звонок'; + return t('remaining.call.call'); } function getIncomingCallStatusText(peerLogin, mode) { const name = String(peerLogin || '').trim(); if (normalizeCallMode(mode) === CALL_MODE_INSTANT_VIDEO) { - return `Входящий видеозвонок от ${name}`; + return t('remaining.call.incoming_video', { name }); } if (isVideoCallMode(mode)) { - return `Входящий видеозвонок от ${name}`; + return t('remaining.call.incoming_video', { name }); } - return `Вам звонит ${name}`; + return t('remaining.call.incoming_voice', { name }); } function parseConnectStartWinnerSessionId(data = '') { @@ -331,9 +332,9 @@ function formatDuration(ms) { const totalMin = Math.floor(totalSec / 60); const min = totalMin % 60; const hours = Math.floor(totalMin / 60); - if (hours > 0) return `${hours}ч ${min}м ${sec}с`; - if (min > 0) return `${min}м ${sec}с`; - return `${sec}с`; + if (hours > 0) return `${hours}${t('remaining.call.unit_h')} ${min}${t('remaining.call.unit_m')} ${sec}${t('remaining.call.unit_s')}`; + if (min > 0) return `${min}${t('remaining.call.unit_m')} ${sec}${t('remaining.call.unit_s')}`; + return `${sec}${t('remaining.call.unit_s')}`; } function isInviteUndelivered(call) { @@ -775,7 +776,7 @@ function setStatus(call, statusText, phase = '') { function buildActiveStatusText(call) { const route = String(call?.connectionRouteLabel || '').trim(); const videoSlotMarker = call?.videoSlotReady ? ' +' : ''; - return route ? `Разговор идёт (${route}${videoSlotMarker})` : 'Разговор идёт'; + return route ? t('remaining.call.active_route', { route, videoSlotMarker }) : t('remaining.call.call_in_progress'); } function refreshVideoSlotReady(call) { @@ -1205,8 +1206,8 @@ async function detectConnectionRoute(call) { if (localType === 'relay' || remoteType === 'relay') { const label = turnCandidateAddress - ? `через TURN (${turnCandidateAddress})` - : (relayProto ? `через TURN (${relayProto})` : 'через TURN'); + ? t('remaining.call.route_turn_candidate', { address: turnCandidateAddress }) + : (relayProto ? t('remaining.call.via_turn_proto', { protocol: relayProto }) : t('remaining.call.via_turn')); return { label, details, localIp, remoteIp, turnCandidateAddress }; } if (localType || remoteType) { @@ -1216,7 +1217,7 @@ async function detectConnectionRoute(call) { || (localIp.startsWith('172.16.') && remoteIp.startsWith('172.16.')) ); return { - label: sameLan ? 'напрямую в локальной сети' : 'напрямую через интернет', + label: sameLan ? t('remaining.call.directly_on_local_network') : t('remaining.call.directly_over_the_internet'), details, localIp, remoteIp, @@ -1262,7 +1263,7 @@ function startReconnectFlow(call, reason = 'disconnected') { call.reconnectInProgress = true; call.reconnectAttempts = 0; recordCallTimeline(call, 'reconnect_start', `reason=${reason}`); - setStatus(call, 'Связь прервалась. Переподключаем…', 'reconnecting'); + setStatus(call, t('remaining.call.connection_lost_reconnecting'), 'reconnecting'); void emitDebug(call, 'warn', 'peer_connection_reconnect_start', `reason=${reason}`); const maxAttempts = 6; @@ -1397,9 +1398,9 @@ async function finalizeCall(call, { } call.phase = 'ended'; - call.statusText = 'Звонок завершён'; + call.statusText = t('remaining.call.call_ended'); if (String(localReasonCode || '') === 'busy') { - call.statusText = 'Пользователь занят'; + call.statusText = t('remaining.call.user_is_busy'); } recordCallTimeline(call, 'finalize_end', `reason=${localReasonCode || ''}; status=${call.statusText || ''}`); notifyCallState(); @@ -1770,7 +1771,7 @@ async function ensurePeerConnection(call) { ensureReservedVideoTransceiver(call); } } catch (e) { - setStatus(call, `Нет доступа к микрофону: ${e?.message || 'unknown'}`, 'failed'); + setStatus(call, t('remaining.call.microphone_error_full', { error: e?.message || 'unknown' }), 'failed'); recordCallTimeline(call, 'local_media_failed', toErrorText(e), 'warn'); await emitDebug(call, 'warn', 'microphone_access_failed', toErrorText(e)); throw e; @@ -1865,7 +1866,7 @@ async function onAccept(call) { recordCallTimeline(call, 'offer_start', `remoteSession=${call.remoteSessionId || ''}`); call.initialOfferInProgress = true; cleanupTimers(call); - setStatus(call, 'Соединяем…', 'connecting'); + setStatus(call, t('remaining.call.connecting'), 'connecting'); try { await notifyPeerSessionsAboutConnectStart(call); const pc = await ensurePeerConnection(call); @@ -1892,7 +1893,7 @@ function ensureIncomingNotification(peerLogin, mode = CALL_MODE_AUDIO) { const text = getIncomingCallStatusText(peerLogin, mode); try { if ('Notification' in window && Notification.permission === 'granted') { - new Notification('SHiNE: входящий звонок', { body: text }); + new Notification(t('remaining.call.shine_incoming_call'), { body: text }); } } catch {} try { @@ -2545,7 +2546,7 @@ export async function startOutgoingCall(peerLogin, options = {}) { const active = getActiveCall(); if (active) { - throw new Error(`Уже есть активный звонок с ${active.peerLogin || 'другим пользователем'}`); + throw new Error(t('remaining.call.active_call_already', { peer: active.peerLogin || t('remaining.call.another_user') })); } const callId = makeCallId(); @@ -2553,7 +2554,7 @@ export async function startOutgoingCall(peerLogin, options = {}) { const preflightTimeoutMs = resolveCallPreflightTimeoutMs(); const preflightOk = await ensureSessionForCall({ timeoutMs: preflightTimeoutMs, force: false }); if (!preflightOk) { - throw new Error('Сервер временно недоступен'); + throw new Error(t('remaining.call.server_temporarily_unavailable')); } const call = { @@ -2564,7 +2565,7 @@ export async function startOutgoingCall(peerLogin, options = {}) { autoEnableCameraOnConnect: isInstantVideoMode(callMode), direction: 'out', phase: 'searching', - statusText: 'Ищем пользователя…', + statusText: t('remaining.call.finding_user'), remoteSessionId: '', timers: {}, startedAtMs: nowMs(), @@ -2596,7 +2597,7 @@ export async function startOutgoingCall(peerLogin, options = {}) { calls.set(callId, call); activeCallId = callId; recordCallTimeline(call, 'outgoing_created', `peer=${cleanPeer}`); - setStatus(call, 'Ищем пользователя…', 'searching'); + setStatus(call, t('remaining.call.finding_user'), 'searching'); call.timers.total35s = setTimeout(() => { if (!calls.has(callId)) return; @@ -2614,7 +2615,7 @@ export async function startOutgoingCall(peerLogin, options = {}) { `ws=${Number(call.inviteDelivery?.deliveredWsSessions || 0)}; push=${Number(call.inviteDelivery?.deliveredWebPushSessions || call.inviteDelivery?.deliveredFcmSessions || 0)}`, ); if (getInviteDeliveredCount(call) > 0 && call.phase === 'searching') { - setStatus(call, 'Вызываем…', 'ringing'); + setStatus(call, t('remaining.call.calling'), 'ringing'); } scheduleOutgoingAckTimeout(call); } catch (error) { @@ -2627,14 +2628,14 @@ export async function startOutgoingCall(peerLogin, options = {}) { try { call.inviteDelivery = await broadcastSignal(call, TYPES.INVITE, buildInviteData({ mode: callMode })); if (getInviteDeliveredCount(call) > 0 && call.phase === 'searching') { - setStatus(call, 'Вызываем…', 'ringing'); + setStatus(call, t('remaining.call.calling'), 'ringing'); } scheduleOutgoingAckTimeout(call); return; } catch {} } await finalizeCall(call, { localReasonCode: 'error', debugReason: 'invite_failed:not_authenticated_after_retry' }); - throw new Error('Сервер временно недоступен'); + throw new Error(t('remaining.call.server_temporarily_unavailable')); } await finalizeCall(call, { localReasonCode: 'error', debugReason: `invite_failed:${toErrorText(error)}` }); throw error; @@ -2680,7 +2681,7 @@ export async function acceptIncomingCall() { call.cameraEnabled = true; } call.phase = 'connecting'; - setStatus(call, 'Соединяем…', 'connecting'); + setStatus(call, t('remaining.call.connecting'), 'connecting'); cleanupTimers(call); scheduleIncomingConnectTimeout(call); await sendSignal(call, TYPES.ACCEPT, 'accept'); @@ -2777,7 +2778,7 @@ export async function handleIncomingCallSignal(evt) { if (type === TYPES.RINGING) { if (call.direction === 'out' && call.phase === 'searching') { - setStatus(call, 'Вызываем…', 'ringing'); + setStatus(call, t('remaining.call.calling'), 'ringing'); } return; } @@ -2794,7 +2795,7 @@ export async function handleIncomingCallSignal(evt) { return; } call.phase = 'connecting'; - setStatus(call, 'Соединяем…', 'connecting'); + setStatus(call, t('remaining.call.connecting'), 'connecting'); await onAccept(call); return; } @@ -2860,7 +2861,7 @@ export async function handleIncomingCallSignal(evt) { await pc.setLocalDescription(answer); await sendSignal(call, TYPES.ANSWER, JSON.stringify(answer)); refreshVideoSlotReady(call); - setStatus(call, 'Соединяем…', 'connecting'); + setStatus(call, t('remaining.call.connecting'), 'connecting'); notifyCallState(); await emitDebug(call, 'info', 'offer_processed', 'answer sent'); } catch (error) { @@ -2901,7 +2902,7 @@ export async function handleIncomingCallSignal(evt) { await flushPendingIceCandidates(call); refreshVideoSlotReady(call); recordCallTimeline(call, 'answer_applied', `from=${fromSessionId || '-'}`); - setStatus(call, 'Соединяем…', 'connecting'); + setStatus(call, t('remaining.call.connecting'), 'connecting'); notifyCallState(); await emitDebug(call, 'info', 'answer_processed', 'remote description set'); } catch (error) { @@ -2994,7 +2995,7 @@ export async function handleCallPushAction(action, payload = {}) { const timeoutMs = resolveCallPreflightTimeoutMs(); const ok = await ensureSessionForCall({ timeoutMs, force: false }); if (!ok) { - throw new Error('Не удалось подключиться, вызов завершён'); + throw new Error(t('remaining.call.could_not_connect_call_ended')); } await handleIncomingCallPush(payload); if (normalized === 'accept') { diff --git a/shine-UI/js/services/call-ui-service.js b/shine-UI/js/services/call-ui-service.js index 69aa94ed..b70aabe7 100644 --- a/shine-UI/js/services/call-ui-service.js +++ b/shine-UI/js/services/call-ui-service.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; import { acceptIncomingCall, declineIncomingCall, @@ -82,10 +83,10 @@ function getSnapshotElapsedMs(snapshot) { } function buildBarText(snapshot) { - const peer = String(snapshot?.peerLogin || '').trim() || 'пользователь'; + const peer = String(snapshot?.peerLogin || '').trim() || t('remaining.call_ui.user'); const elapsed = formatElapsedMs(getSnapshotElapsedMs(snapshot)); - const kind = String(snapshot?.titleText || 'Звонок').trim() || 'Звонок'; - return `${kind} с ${peer} · ${elapsed}`; + const kind = String(snapshot?.titleText || t('remaining.call_ui.call')).trim() || t('remaining.call_ui.call'); + return t('remaining.call_ui.call_with', { kind, peer, elapsed }); } async function loadAvatarSnapshot(login) { @@ -116,7 +117,7 @@ function renderPeerAvatar(login, avatar = null) { avatar, size: 'xl', className: 'call-peer-avatar', - title: login ? `Профиль ${login}` : 'Профиль собеседника', + title: login ? t('remaining.call_ui.profile_of', { login }) : t('remaining.call_ui.other_user_s_profile'), }); if (!hasAvatar) { avatarEl.classList.add('call-peer-avatar--empty'); @@ -194,7 +195,7 @@ function setButtonIcon(button, iconName, label) { function updateMuteButtons(muted) { const iconName = muted ? 'mic-off' : 'mic-on'; - const label = muted ? 'Включить микрофон' : 'Выключить микрофон'; + const label = muted ? t('remaining.call_ui.unmute_microphone') : t('remaining.call_ui.mute_microphone'); setButtonIcon(muteBtn, iconName, label); setButtonIcon(barMuteBtn, iconName, label); if (muteBtn) muteBtn.dataset.muted = muted ? '1' : '0'; @@ -203,14 +204,14 @@ function updateMuteButtons(muted) { function updateSpeakerButtons(enabled) { const iconName = enabled ? 'speaker-on' : 'speaker-off'; - const label = enabled ? 'Выключить громкую связь' : 'Включить громкую связь'; + const label = enabled ? t('remaining.call_ui.turn_off_speaker') : t('remaining.call_ui.turn_on_speaker'); setButtonIcon(speakerBtn, iconName, label); setButtonIcon(barSpeakerBtn, iconName, label); } function updateCameraButtons(enabled) { const iconName = enabled ? 'camera-on' : 'camera-off'; - const label = enabled ? 'Выключить камеру' : 'Включить камеру'; + const label = enabled ? t('remaining.call_ui.turn_off_camera') : t('remaining.call_ui.turn_on_camera'); setButtonIcon(cameraBtn, iconName, label); setButtonIcon(barCameraBtn, iconName, label); if (cameraBtn) cameraBtn.dataset.enabled = enabled ? '1' : '0'; @@ -380,7 +381,7 @@ function ensureUi() { minimizeBtn = document.createElement('button'); minimizeBtn.type = 'button'; minimizeBtn.className = 'call-icon-btn call-icon-btn--secondary call-overlay-minimize-btn'; - setButtonIcon(minimizeBtn, 'minimize', 'Свернуть звонок'); + setButtonIcon(minimizeBtn, 'minimize', t('remaining.call_ui.minimize_call')); minimizeBtn.addEventListener('click', (event) => { stopEvent(event); if (!currentSnapshot) return; @@ -455,7 +456,7 @@ function ensureUi() { acceptBtn = document.createElement('button'); acceptBtn.type = 'button'; acceptBtn.className = 'call-accept-btn'; - acceptBtn.textContent = 'Ответить'; + acceptBtn.textContent = t('remaining.call_ui.answer'); acceptBtn.addEventListener('click', async () => { await acceptIncomingCall(); }); @@ -463,7 +464,7 @@ function ensureUi() { declineBtn = document.createElement('button'); declineBtn.type = 'button'; declineBtn.className = 'destructive-btn call-decline-btn'; - declineBtn.textContent = 'Отклонить'; + declineBtn.textContent = t('remaining.call_ui.decline'); declineBtn.addEventListener('click', async () => { await declineIncomingCall(); }); @@ -471,7 +472,7 @@ function ensureUi() { hangupBtn = document.createElement('button'); hangupBtn.type = 'button'; hangupBtn.className = 'call-icon-btn call-icon-btn--danger'; - setButtonIcon(hangupBtn, 'hangup', 'Положить трубку'); + setButtonIcon(hangupBtn, 'hangup', t('remaining.call_ui.hang_up')); hangupBtn.addEventListener('click', handleEndCallClick); incomingActionsEl.append(acceptBtn, declineBtn); @@ -489,8 +490,8 @@ function applyExpandedState(snapshot) { titleEl.textContent = ''; statusEl.textContent = ''; - peerLoginEl.textContent = snapshot.peerLogin || 'пользователь'; - kindEl.textContent = snapshot.titleText || 'Звонок'; + peerLoginEl.textContent = snapshot.peerLogin || t('remaining.call_ui.user'); + kindEl.textContent = snapshot.titleText || t('remaining.call_ui.call'); topStatusEl.textContent = snapshot.statusText || ''; updatePeerAvatar(snapshot.peerLogin || ''); @@ -554,7 +555,7 @@ function applyMinimizedState(snapshot) { const canEnd = !incomingStage && snapshot.canHangup; barHangupBtn.hidden = !canEnd; barHangupBtn.disabled = !canEnd; - setButtonIcon(barHangupBtn, 'hangup', 'Положить трубку'); + setButtonIcon(barHangupBtn, 'hangup', t('remaining.call_ui.hang_up')); barActionsEl.hidden = incomingStage || (!snapshot.canToggleSpeaker && !snapshot.canMute && !snapshot.canToggleCamera && !canEnd); } diff --git a/shine-UI/js/services/channel-name-rules.js b/shine-UI/js/services/channel-name-rules.js index 212bca6e..b728cb91 100644 --- a/shine-UI/js/services/channel-name-rules.js +++ b/shine-UI/js/services/channel-name-rules.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; const MIN_LEN = 4; const MAX_LEN = 32; const ALLOWED_CHARS_RE = /^[A-Za-z0-9_-]+$/; @@ -53,24 +54,24 @@ export function validateChannelDisplayName(value) { export function channelNameErrorText(code) { switch (String(code || '').trim()) { case 'blank': - return 'Введите название канала.'; + return t('remaining.channel_validation.enter_a_channel_name'); case 'too_short': - return 'Название слишком короткое: минимум 4 символа.'; + return t('remaining.channel_validation.channel_name_is_too_short_minimum_4_characters'); case 'too_long': - return 'Название слишком длинное: максимум 32 символа.'; + return t('remaining.channel_validation.channel_name_is_too_long_maximum_32_characters'); case 'bad_chars': - return 'Разрешены только латиница, цифры, _ и -.'; + return t('remaining.channel_validation.only_latin_letters_digits_and_are_allowed'); case 'digits_only': - return 'Название канала не должно состоять только из цифр.'; + return t('remaining.channel_validation.a_channel_name_cannot_consist_of_digits_only'); default: - return 'Некорректное название канала.'; + return t('remaining.channel_validation.invalid_channel_name'); } } export function channelDescriptionErrorText(value) { const normalized = normalizeChannelDescription(value); if (new TextEncoder().encode(normalized).length > 200) { - return 'Описание слишком длинное: максимум 200 байт UTF-8.'; + return t('remaining.channel_validation.description_is_too_long_maximum_200_utf_8_bytes'); } return ''; } diff --git a/shine-UI/js/services/channels-ux.js b/shine-UI/js/services/channels-ux.js index c218cffa..68106617 100644 --- a/shine-UI/js/services/channels-ux.js +++ b/shine-UI/js/services/channels-ux.js @@ -1,13 +1,8 @@ +import { t } from '../i18n/index.js'; +import { formatDate, formatTime, formatDateTime, formatRelative } from '../i18n/format.js'; import { iconHtml } from '../components/ui-icon.js'; const TOAST_HOST_ID = 'shine-toast-host'; -const rtf = (() => { - try { - return new Intl.RelativeTimeFormat('ru', { numeric: 'always' }); - } catch { - return null; - } -})(); function toNumber(value) { const n = Number(value); @@ -33,10 +28,10 @@ function pickUnit(seconds) { export function formatClockTime(timestampMs) { const ts = toNumber(timestampMs); if (!ts) return ''; - return new Intl.DateTimeFormat('ru-RU', { hour: '2-digit', minute: '2-digit' }).format(new Date(ts)); + return formatTime(new Date(ts)); } -const SHORT_MONTHS = ['янв', 'фев', 'мар', 'апр', 'мая', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек']; +const shortDay = (date) => formatDate(date, { day: 'numeric', month: 'short' }); // Дата записи в ряду действий: сегодня «10:24», раньше «25 сен, 10:24», в прошлом году «25 сен 2025». export function formatPostStamp(timestampMs) { @@ -46,7 +41,7 @@ export function formatPostStamp(timestampMs) { const now = new Date(); const clock = formatClockTime(ts); if (dt.toDateString() === now.toDateString()) return clock; - const day = `${dt.getDate()} ${SHORT_MONTHS[dt.getMonth()]}`; + const day = shortDay(dt); if (dt.getFullYear() !== now.getFullYear()) return `${day} ${dt.getFullYear()}`; return `${day}, ${clock}`; } @@ -59,10 +54,10 @@ export function formatDayLabel(timestampMs) { const today = new Date(); const startOf = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime(); const diffDays = Math.round((startOf(today) - startOf(dt)) / 86400000); - if (diffDays === 0) return 'Сегодня'; - if (diffDays === 1) return 'Вчера'; + if (diffDays === 0) return formatRelative(0, 'day'); + if (diffDays === 1) return formatRelative(-1, 'day'); const sameYear = dt.getFullYear() === today.getFullYear(); - return new Intl.DateTimeFormat('ru-RU', { day: 'numeric', month: 'long', ...(sameYear ? {} : { year: 'numeric' }) }).format(dt); + return formatDate(dt, { day: 'numeric', month: 'long', ...(sameYear ? {} : { year: 'numeric' }) }); } export function dayKey(timestampMs) { @@ -81,17 +76,17 @@ export function formatListTime(timestampMs) { const now = new Date(); const startOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate()).getTime(); if (ts >= startOfToday) { - return new Intl.DateTimeFormat('ru-RU', { hour: '2-digit', minute: '2-digit' }).format(dt); + return formatTime(dt); } const dayMs = 86400000; - if (ts >= startOfToday - dayMs) return 'вчера'; + if (ts >= startOfToday - dayMs) return formatRelative(-1, 'day'); if (ts >= startOfToday - 6 * dayMs) { - return new Intl.DateTimeFormat('ru-RU', { weekday: 'short' }).format(dt); + return formatDate(dt, { weekday: 'short' }); } if (dt.getFullYear() === now.getFullYear()) { - return new Intl.DateTimeFormat('ru-RU', { day: '2-digit', month: '2-digit' }).format(dt); + return formatDate(dt, { day: '2-digit', month: '2-digit' }); } - return new Intl.DateTimeFormat('ru-RU', { day: '2-digit', month: '2-digit', year: '2-digit' }).format(dt); + return formatDate(dt, { day: '2-digit', month: '2-digit', year: '2-digit' }); } // Возраст записи в шапке поста и ответа: «сейчас», «5 мин», «2 ч», «3 д», потом «12 окт», в прошлом году «12 окт 2025». @@ -99,14 +94,14 @@ export function formatShortAge(timestampMs) { const ts = toNumber(timestampMs); if (!ts) return ''; const ageMinutes = Math.max(0, Math.floor((Date.now() - ts) / 60000)); - if (ageMinutes < 1) return 'сейчас'; - if (ageMinutes < 60) return `${ageMinutes} мин`; + if (ageMinutes < 1) return formatRelative(0, 'second'); + if (ageMinutes < 60) return formatRelative(-ageMinutes, 'minute', { numeric: 'always', style: 'narrow' }); const ageHours = Math.floor(ageMinutes / 60); - if (ageHours < 24) return `${ageHours} ч`; + if (ageHours < 24) return formatRelative(-ageHours, 'hour', { numeric: 'always', style: 'narrow' }); const ageDays = Math.floor(ageHours / 24); - if (ageDays < 7) return `${ageDays} д`; + if (ageDays < 7) return formatRelative(-ageDays, 'day', { numeric: 'always', style: 'narrow' }); const dt = new Date(ts); - const day = `${dt.getDate()} ${SHORT_MONTHS[dt.getMonth()]}`; + const day = shortDay(dt); return dt.getFullYear() === new Date().getFullYear() ? day : `${day} ${dt.getFullYear()}`; } @@ -121,26 +116,22 @@ export function formatRelativeTime(timestampMs) { const ageSeconds = Math.max(0, (now - ts) / 1000); const ageDays = ageSeconds / 86400; - if (ageSeconds < 60) return 'только что'; + if (ageSeconds < 60) return formatRelative(0, 'second'); if (ageDays < 7) { const [unit, value] = pickUnit(diffSeconds); - if (rtf) return rtf.format(value, unit); - const absValue = Math.abs(value); - const suffix = value <= 0 ? 'назад' : 'через'; - const labels = { second: 'сек', minute: 'мин', hour: 'ч', day: 'д' }; - return `${absValue} ${labels[unit] || ''} ${suffix}`.trim(); + return formatRelative(value, unit, { numeric: 'always' }); } if (dt.getFullYear() === nowDt.getFullYear()) { - return new Intl.DateTimeFormat('ru-RU', { + return formatDateTime(dt, { day: '2-digit', month: '2-digit', hour: '2-digit', minute: '2-digit', - }).format(dt).replace(',', ','); + }); } - return new Intl.DateTimeFormat('ru-RU', { + return formatDate(dt, { day: '2-digit', month: '2-digit', year: 'numeric', - }).format(dt); + }); } function ensureToastHost() { @@ -277,7 +268,7 @@ export function writeChannelNotificationsState(nextState) { } export function makeAuthorLabel(login, localNumber) { - const cleanLogin = String(login || 'автор'); + const cleanLogin = String(login || t('remaining.channels.author')); const n = Number(localNumber); if (!Number.isFinite(n) || n < 1) return cleanLogin; return `${cleanLogin} · #${n}`; @@ -300,7 +291,7 @@ export function createSkeletonRows(kind = 'list', count = 4) { const wrap = document.createElement('div'); wrap.className = `skeleton-rows skeleton-rows--${kind}`; wrap.setAttribute('aria-busy', 'true'); - wrap.setAttribute('aria-label', 'Загрузка'); + wrap.setAttribute('aria-label', t('remaining.channels.loading')); for (let i = 0; i < count; i += 1) { const row = document.createElement('div'); row.className = 'skeleton-row'; @@ -379,7 +370,7 @@ export async function longPressFeel(el, delayMs = 130) { // Когда появится, здесь вызывать настоящий обработчик. export const REPOSTS_ENABLED = false; export function notifyRepostSoon() { - showToast('Репосты скоро появятся', { kind: 'info' }); + showToast(t('remaining.channels.reposts_are_coming_soon'), { kind: 'info' }); } // Общая карточка «не удалось загрузить»: короткий заголовок, причина в пару строк и крупная кнопка снизу. @@ -395,7 +386,7 @@ export function createLoadErrorCard({ title, message, onRetry, secondary = null const retry = document.createElement('button'); retry.type = 'button'; retry.className = 'primary-btn'; - retry.textContent = 'Повторить'; + retry.textContent = t('remaining.channels.retry'); retry.addEventListener('click', onRetry); card.append(heading, details, retry); if (secondary) { diff --git a/shine-UI/js/services/device-pairing-service.js b/shine-UI/js/services/device-pairing-service.js index 7051c7ff..d55b91bf 100644 --- a/shine-UI/js/services/device-pairing-service.js +++ b/shine-UI/js/services/device-pairing-service.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; import { base64ToBytes, bytesToBase64, @@ -42,11 +43,11 @@ function base64UrlToBytes(value) { function extractSeedFromPkcs8(pkcs8B64) { const raw = base64ToBytes(pkcs8B64); if (raw.length !== ED25519_PKCS8_PREFIX.length + 32) { - throw new Error('Некорректный приватный Ed25519 ключ'); + throw new Error(t('remaining.device_pairing.invalid_ed25519_private_key')); } for (let i = 0; i < ED25519_PKCS8_PREFIX.length; i += 1) { if (raw[i] !== ED25519_PKCS8_PREFIX[i]) { - throw new Error('Неподдерживаемый формат приватного Ed25519 ключа'); + throw new Error(t('remaining.device_pairing.unsupported_ed25519_private_key_format')); } } return raw.slice(ED25519_PKCS8_PREFIX.length); @@ -55,11 +56,11 @@ function extractSeedFromPkcs8(pkcs8B64) { function extractSessionPublicKeyB64(sessionKey) { const raw = String(sessionKey || '').trim(); if (!raw.startsWith('ed25519/')) { - throw new Error('Неподдерживаемый requesterSessionKey'); + throw new Error(t('remaining.device_pairing.unsupported_requester_session_key')); } const publicKeyB64 = raw.slice('ed25519/'.length).trim(); if (!publicKeyB64) { - throw new Error('Пустой requesterSessionKey'); + throw new Error(t('remaining.device_pairing.empty_requester_session_key')); } return publicKeyB64; } diff --git a/shine-UI/js/services/dm-chat-prefs.js b/shine-UI/js/services/dm-chat-prefs.js index 914f519d..0ed341aa 100644 --- a/shine-UI/js/services/dm-chat-prefs.js +++ b/shine-UI/js/services/dm-chat-prefs.js @@ -1,3 +1,4 @@ +import { formatDate, formatTime } from '../i18n/format.js'; // Настройки личных чатов на этом устройстве: «без звука» (навсегда или до срока) и «закреплён». // Сервер про них не знает: хранятся в localStorage отдельно для каждого аккаунта. // Список «без звука» дублируется в Cache Storage, чтобы его видел service worker: @@ -168,10 +169,10 @@ export function formatDmMuteUntil(until, now = new Date()) { const value = Number(until || 0); if (!value) return ''; const date = new Date(value); - const time = date.toLocaleTimeString('ru-RU', { hour: 'numeric', minute: '2-digit' }); + const time = formatTime(date, { hour: 'numeric', minute: '2-digit' }); const startOfDay = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime(); const days = Math.round((startOfDay(date) - startOfDay(now)) / 86400000); if (days <= 0) return `до ${time}`; if (days === 1) return `до завтра, ${time}`; - return `до ${date.toLocaleDateString('ru-RU', { day: 'numeric', month: 'long' })}, ${time}`; + return `до ${formatDate(date, { day: 'numeric', month: 'long' })}, ${time}`; } diff --git a/shine-UI/js/services/dm-tech-blocks.js b/shine-UI/js/services/dm-tech-blocks.js index a14c0cc9..fac1a0db 100644 --- a/shine-UI/js/services/dm-tech-blocks.js +++ b/shine-UI/js/services/dm-tech-blocks.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; function defaultParsed(rawText = '') { const text = String(rawText || ''); return { @@ -56,15 +57,15 @@ function formatCallDuration(totalSeconds) { function buildCallDisplayText(callSummary) { if (!callSummary) return ''; if (callSummary.status === 'completed') { - return `Звонок: ${formatCallDuration(callSummary.durationSec)}`; + return t('remaining.call_history.call_length', { duration: formatCallDuration(callSummary.durationSec) }); } const reason = String(callSummary.reason || '').trim().toLowerCase(); - if (reason === 'offline') return 'Абонент не в сети'; - if (reason === 'no_answer') return 'Нет ответа'; - if (reason === 'connect_failed') return 'Не удалось установить соединение'; - if (reason === 'busy') return 'Абонент занят'; - if (reason === 'declined') return 'Звонок отклонён'; - return 'Звонок не завершён'; + if (reason === 'offline') return t('remaining.call_history.user_is_offline'); + if (reason === 'no_answer') return t('remaining.call_history.no_answer'); + if (reason === 'connect_failed') return t('remaining.call_history.could_not_establish_a_connection'); + if (reason === 'busy') return t('remaining.call_history.user_is_busy'); + if (reason === 'declined') return t('remaining.call_history.call_declined'); + return t('remaining.call_history.call_was_not_completed'); } export function sanitizeUserDmTextForSend(rawText = '') { diff --git a/shine-UI/js/services/key-vault.js b/shine-UI/js/services/key-vault.js index f9a7f183..b48686d0 100644 --- a/shine-UI/js/services/key-vault.js +++ b/shine-UI/js/services/key-vault.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; import { decryptJsonWithStoragePwd, encryptJsonWithStoragePwd, @@ -34,7 +35,7 @@ function openDb() { } }; request.onsuccess = () => resolve(request.result); - request.onerror = () => reject(request.error || new Error('IndexedDB недоступен')); + request.onerror = () => reject(request.error || new Error(t('remaining.key_storage.indexeddb_is_unavailable'))); }); } @@ -44,7 +45,7 @@ async function put(storeName, value) { const tx = db.transaction(storeName, 'readwrite'); tx.objectStore(storeName).put(value); tx.oncomplete = () => resolve(); - tx.onerror = () => reject(tx.error || new Error('Ошибка записи в IndexedDB')); + tx.onerror = () => reject(tx.error || new Error(t('remaining.key_storage.could_not_write_to_indexeddb'))); }); db.close(); } @@ -55,7 +56,7 @@ async function get(storeName, key) { const tx = db.transaction(storeName, 'readonly'); const req = tx.objectStore(storeName).get(key); req.onsuccess = () => resolve(req.result || null); - req.onerror = () => reject(req.error || new Error('Ошибка чтения из IndexedDB')); + req.onerror = () => reject(req.error || new Error(t('remaining.key_storage.could_not_read_from_indexeddb'))); }); db.close(); return result; diff --git a/shine-UI/js/services/password-boundary-warning.js b/shine-UI/js/services/password-boundary-warning.js index 2a77e4a6..e15765d3 100644 --- a/shine-UI/js/services/password-boundary-warning.js +++ b/shine-UI/js/services/password-boundary-warning.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; import { confirmDialog } from '../components/confirm-dialog.js'; // Не обрезаем пароль: пробелы участвуют в формировании криптографических ключей. @@ -7,12 +8,12 @@ export function confirmPasswordBoundarySpaces(password) { const starts = /^\s/u.test(value); const ends = /\s$/u.test(value); if (!starts && !ends) return Promise.resolve(true); - const where = starts && ends ? 'начинается и заканчивается пробелом' - : starts ? 'начинается с пробела' : 'заканчивается пробелом'; + const where = starts && ends ? t('remaining.password.starts_and_ends_with_a_space') + : starts ? t('remaining.password.starts_with_a_space') : t('remaining.password.ends_with_a_space'); return confirmDialog({ - title: 'Пробел в пароле', - text: `Ваш пароль ${where}. Такой пробел трудно заметить при следующем входе, но он является частью пароля и влияет на ключи доступа. Вы уверены, что хотите оставить его?`, - confirmLabel: 'Да, оставить пароль', - cancelLabel: 'Вернуться к паролю', + title: t('remaining.password.space_in_password'), + text: t('remaining.password.warning', { where }), + confirmLabel: t('remaining.password.keep_password_as_entered'), + cancelLabel: t('remaining.password.edit_password'), }); } diff --git a/shine-UI/js/services/people-notes.js b/shine-UI/js/services/people-notes.js index a2118e18..e39957e1 100644 --- a/shine-UI/js/services/people-notes.js +++ b/shine-UI/js/services/people-notes.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; // Личные заметки о людях: текст и цветная метка, видны только владельцу аккаунта. // Пока хранятся на этом устройстве (localStorage, отдельно для каждого аккаунта) и на сервер // не уходят. Формат одной записи – { text, mark, updatedAt }: его же можно будет шифровать @@ -10,11 +11,11 @@ export const PEOPLE_NOTES_EVENT = 'shine-people-notes-updated'; // Цвет метки задаёт CSS (--note-mark-), здесь только порядок и подписи для экранного диктора. export const NOTE_MARKS = [ - { id: 'green', label: 'Зелёная метка' }, - { id: 'yellow', label: 'Жёлтая метка' }, - { id: 'red', label: 'Красная метка' }, - { id: 'blue', label: 'Синяя метка' }, - { id: 'violet', label: 'Фиолетовая метка' }, + { id: 'green', get label() { return t('remaining.note_markers.green_marker'); } }, + { id: 'yellow', get label() { return t('remaining.note_markers.yellow_marker'); } }, + { id: 'red', get label() { return t('remaining.note_markers.red_marker'); } }, + { id: 'blue', get label() { return t('remaining.note_markers.blue_marker'); } }, + { id: 'violet', get label() { return t('remaining.note_markers.purple_marker'); } }, ]; const MARK_IDS = new Set(NOTE_MARKS.map((mark) => mark.id)); diff --git a/shine-UI/js/services/public-channel-sidebar.js b/shine-UI/js/services/public-channel-sidebar.js index 22429c91..cbad638f 100644 --- a/shine-UI/js/services/public-channel-sidebar.js +++ b/shine-UI/js/services/public-channel-sidebar.js @@ -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'); diff --git a/shine-UI/js/services/public-file-service.js b/shine-UI/js/services/public-file-service.js index 28a81fda..ea084b4c 100644 --- a/shine-UI/js/services/public-file-service.js +++ b/shine-UI/js/services/public-file-service.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; import { importPkcs8Ed25519, signBase64 } from './crypto-utils.js'; import { sha256HexFromArrayBuffer, validateSha256Hex } from './arweave-file-service.js'; import { loadSessionMaterial } from './key-vault.js'; @@ -24,14 +25,14 @@ function wsUrlToHttpBase(wsUrl = '') { if (parsed.protocol === 'wss:') parsed.protocol = 'https:'; else if (parsed.protocol === 'ws:') parsed.protocol = 'http:'; if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') { - throw new Error('Не удалось определить HTTP-адрес сервера доступа.'); + throw new Error(t('remaining.file_errors.could_not_determine_the_access_server_http_address')); } return parsed.origin; } function publicFileUrl(serverBase, sha256) { const cleanSha = String(sha256 || '').trim().toLowerCase(); - if (!validateSha256Hex(cleanSha)) throw new Error('Некорректный SHA-256 файла.'); + if (!validateSha256Hex(cleanSha)) throw new Error(t('remaining.file_errors.invalid_file_sha_256')); return `${String(serverBase || '').replace(/\/$/, '')}/files/${cleanSha}`; } @@ -57,13 +58,13 @@ async function readErrorMessage(response) { async function createUploadContext({ login, sessionId, wsUrl }) { const cleanLogin = String(login || '').trim(); const cleanSessionId = String(sessionId || '').trim(); - if (!cleanLogin || !cleanSessionId) throw new Error('Нет активной пользовательской сессии.'); + if (!cleanLogin || !cleanSessionId) throw new Error(t('remaining.file_errors.no_active_user_session')); const sessionMaterial = await loadSessionMaterial(cleanLogin); if (!sessionMaterial?.sessionPrivPkcs8) { - throw new Error('На устройстве нет session key для загрузки файла.'); + throw new Error(t('remaining.file_errors.session_key_for_uploading_files_is_missing_on_this_dev')); } if (sessionMaterial.sessionId && String(sessionMaterial.sessionId) !== cleanSessionId) { - throw new Error('Сохранённый session key относится к другой сессии.'); + throw new Error(t('remaining.file_errors.saved_session_key_belongs_to_a_different_session')); } return { sessionId: cleanSessionId, @@ -73,16 +74,16 @@ async function createUploadContext({ login, sessionId, wsUrl }) { } export async function uploadPublicFile({ file, login, sessionId, wsUrl, onStatus = null } = {}) { - if (!(file instanceof File)) throw new Error('Файл не выбран.'); - if (Number(file.size || 0) <= 0) throw new Error('Нельзя загрузить пустой файл.'); + if (!(file instanceof File)) throw new Error(t('remaining.file_upload.no_file_selected')); + if (Number(file.size || 0) <= 0) throw new Error(t('remaining.file_upload.cannot_upload_an_empty_file')); - onStatus?.('Считаем SHA-256…'); + onStatus?.(t('remaining.file_upload.calculating_sha_256')); const bytes = await file.arrayBuffer(); const sha256 = await sha256HexFromArrayBuffer(bytes); const context = await createUploadContext({ login, sessionId, wsUrl }); const url = publicFileUrl(context.serverBase, sha256); - onStatus?.('Проверяем, есть ли файл на сервере…'); + onStatus?.(t('remaining.file_upload.checking_whether_the_file_is_on_the_server')); try { const existing = await fetch(url, { method: 'HEAD', cache: 'no-store' }); if (existing.ok) { @@ -111,7 +112,7 @@ export async function uploadPublicFile({ file, login, sessionId, wsUrl, onStatus timeMs, })); - onStatus?.('Загружаем на сервер доступа…'); + onStatus?.(t('remaining.file_upload.uploading_to_access_server')); let response; try { response = await fetch(url, { @@ -170,7 +171,7 @@ export async function resolvePublicFileUrl({ } const cleanLogin = String(authorLogin || '').trim().toLowerCase(); - if (!cleanLogin) throw new Error('Не указан автор server-вложения.'); + if (!cleanLogin) throw new Error(t('remaining.file_errors.server_attachment_author_is_missing')); const cacheKey = `${cleanLogin}|${String(solanaEndpoint || '').trim()}|${String(fallbackServerLogin || '').trim().toLowerCase()}`; const cached = accessServerCache.get(cacheKey); if (cached && Date.now() - cached.atMs < ACCESS_SERVER_CACHE_TTL_MS) { diff --git a/shine-UI/js/services/qr-key-transfer-service.js b/shine-UI/js/services/qr-key-transfer-service.js index aa11201f..0d7a049f 100644 --- a/shine-UI/js/services/qr-key-transfer-service.js +++ b/shine-UI/js/services/qr-key-transfer-service.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; import qrcode from '../vendor-qrcode-generator.js'; const TRANSFER_PREFIX = 'shine-key-transfer-v1:'; @@ -22,15 +23,15 @@ function base64UrlToBytes(value) { } export function keyLabel(id) { - if (id === 'blockchain') return 'ключ блокчейна'; - if (id === 'device' || id === 'client') return 'ключ доступа'; + if (id === 'blockchain') return t('remaining.qr_keys.blockchain_key'); + if (id === 'device' || id === 'client') return t('remaining.qr_keys.access_key'); return id; } export function describeTransferKeys(keys = {}) { const out = []; - if (keys.clientKey) out.push('ключ доступа'); - if (keys.blockchainKey) out.push('ключ блокчейна'); + if (keys.clientKey) out.push(t('remaining.qr_keys.access_key')); + if (keys.blockchainKey) out.push(t('remaining.qr_keys.blockchain_key')); return out; } @@ -38,7 +39,7 @@ export function makeKeyTransferText({ login, keys }) { const clientKey = String(keys?.clientKey || '').trim(); const blockchainKey = String(keys?.blockchainKey || '').trim(); if (!clientKey || !blockchainKey) { - throw new Error('Для подключения нужны ключ доступа и ключ блокчейна'); + throw new Error(t('remaining.qr_keys.both_an_access_key_and_blockchain_key_are_required_to_conn')); } const payload = { v: 1, @@ -54,20 +55,20 @@ export function makeKeyTransferText({ login, keys }) { export function parseKeyTransferText(text) { const raw = String(text || '').trim(); if (!raw.startsWith(TRANSFER_PREFIX)) { - throw new Error('Это не QR-код переноса ключей Сияния'); + throw new Error(t('remaining.qr_keys.this_is_not_a_shine_key_transfer_qr_code')); } const json = decoder.decode(base64UrlToBytes(raw.slice(TRANSFER_PREFIX.length))); const payload = JSON.parse(json); if (payload?.v !== 1 || payload?.type !== 'shine-key-transfer') { - throw new Error('Неподдерживаемый формат QR-кода'); + throw new Error(t('remaining.qr_keys.unsupported_qr_code_format')); } const login = String(payload.login || '').trim(); - if (!login) throw new Error('В QR-коде нет логина'); + if (!login) throw new Error(t('remaining.qr_keys.no_login_found_in_qr_code')); const keys = payload.keys && typeof payload.keys === 'object' ? payload.keys : {}; const clientKey = String(keys.clientKey || '').trim(); const blockchainKey = String(keys.blockchainKey || '').trim(); if (!clientKey || !blockchainKey) { - throw new Error('В QR-коде нет полного набора рабочих ключей'); + throw new Error(t('remaining.qr_keys.qr_code_does_not_contain_all_required_keys')); } return { login, diff --git a/shine-UI/js/services/registration-upgrade-helpers.js b/shine-UI/js/services/registration-upgrade-helpers.js index 12021aba..0e5a0aa7 100644 --- a/shine-UI/js/services/registration-upgrade-helpers.js +++ b/shine-UI/js/services/registration-upgrade-helpers.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; /** Единая стоимость регистрации: цена namespace уже включает депозит PDA. */ export const USER_PDA_SPACE = 768; // shine-solana/shine/programs/shine_users/src/settings.rs // Запас для предварительной проверки баланса; сеть списывает фактическую комиссию. @@ -8,9 +9,9 @@ export const LAMPORTS_PER_SOL = 1_000_000_000; export function calculateRegistrationFunding({ namespaceFeeLamports, rentLamports }) { const namespaceFee = BigInt(namespaceFeeLamports); const rent = BigInt(rentLamports); - if (namespaceFee < 0n || rent < 0n) throw new Error('Некорректная стоимость регистрации'); + if (namespaceFee < 0n || rent < 0n) throw new Error(t('remaining.registration_upgrade.invalid_registration_price')); if (namespaceFee < rent) { - throw new Error(`Цена namespace (${solFromLamports(namespaceFee)} SOL) меньше депозита PDA (${solFromLamports(rent)} SOL). Регистрация временно недоступна: обратитесь к администратору namespace.`); + throw new Error(t('remaining.registration_upgrade.price_below_rent', { price: solFromLamports(namespaceFee), rent: solFromLamports(rent) })); } const projectFee = namespaceFee - rent; const requiredLamports = namespaceFee + REGISTRATION_NETWORK_RESERVE_LAMPORTS; diff --git a/shine-UI/js/services/registration-v2-api.js b/shine-UI/js/services/registration-v2-api.js index 8e6f3316..23436541 100644 --- a/shine-UI/js/services/registration-v2-api.js +++ b/shine-UI/js/services/registration-v2-api.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; /** Разделённые шаги V2: независимая проверка логина, затем email. */ import { authService } from '../state.js'; import { normalizeFullLogin } from './shine-namespace-service.js'; @@ -5,7 +6,7 @@ import { normalizeFullLogin } from './shine-namespace-service.js'; async function call(op, payload = {}) { const response = await authService.ws.request(op, payload, op==='ConfirmFreeRegistration'?150000:18000); if (response.status !== 200 || response.ok === false) { - const error=new Error(response.message || response.error || `${op}: ошибка сервера`); + const error=new Error(response.message || response.error || t('remaining.registration_api.server_error', { op })); error.code=response.error || 'REGISTRATION_REQUEST_FAILED'; throw error; } diff --git a/shine-UI/js/services/shine-blockchain-snapshot-service.js b/shine-UI/js/services/shine-blockchain-snapshot-service.js index 10ffb471..87ed79c5 100644 --- a/shine-UI/js/services/shine-blockchain-snapshot-service.js +++ b/shine-UI/js/services/shine-blockchain-snapshot-service.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; const SNAPSHOT_STORAGE_KEY = 'shine-ui-blockchain-snapshot-v1'; function normalizeLogin(login) { @@ -69,11 +70,11 @@ export async function buildBlockchainSnapshotFile({ const cleanLogin = normalizeLogin(login); const cleanBlockchainName = String(blockchainName || '').trim(); const maxBlockNumber = Number(lastBlockNumber); - if (!authService?.ws?.request) throw new Error('Сервис сервера недоступен.'); - if (!cleanLogin) throw new Error('Не указан логин.'); - if (!cleanBlockchainName) throw new Error('Не указано имя блокчейна.'); + if (!authService?.ws?.request) throw new Error(t('remaining.blockchain_snapshot.server_service_unavailable')); + if (!cleanLogin) throw new Error(t('remaining.blockchain_snapshot.login_missing')); + if (!cleanBlockchainName) throw new Error(t('remaining.blockchain_snapshot.blockchain_name_missing')); if (!Number.isFinite(maxBlockNumber) || maxBlockNumber < 0) { - throw new Error('На сервере нет блоков для слепка.'); + throw new Error(t('remaining.blockchain_snapshot.no_blocks_available_on_the_server_for_a_snapshot')); } const parts = []; @@ -84,7 +85,7 @@ export async function buildBlockchainSnapshotFile({ blockNumber, }); if (response?.status !== 200) { - const message = String(response?.payload?.message || response?.message || 'Не удалось получить блок.'); + const message = String(response?.payload?.message || response?.message || t('remaining.blockchain_snapshot.could_not_retrieve_block')); throw new Error(`Не удалось скачать блок ${blockNumber}: ${message}`); } const blockBytes = decodeBase64ToBytes(response?.payload?.blockBytesB64 || ''); diff --git a/shine-UI/js/services/shine-server-resolver.js b/shine-UI/js/services/shine-server-resolver.js index 5dd200a6..a6019a8c 100644 --- a/shine-UI/js/services/shine-server-resolver.js +++ b/shine-UI/js/services/shine-server-resolver.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; import { readShineUserPda } from './shine-user-pda-service.js'; import { defaultServerAddress, @@ -63,7 +64,7 @@ export async function resolveShineServerByServerLogin({ serverLogin, solanaEndpo export async function resolveShineServerForUserLogin({ login, solanaEndpoint, fallbackServerLogin = '' }) { const cleanLogin = normalizeShineServerLogin(login); - if (!cleanLogin) throw new Error('Не указан логин пользователя для поиска сервера доступа.'); + if (!cleanLogin) throw new Error(t('remaining.server_resolver.user_login_is_required_to_find_an_access_server')); const parsedUser = await readShineUserPda({ login: cleanLogin, solanaEndpoint, diff --git a/shine-UI/js/services/solana-wallet-service.js b/shine-UI/js/services/solana-wallet-service.js index a37e317d..ac5413f3 100644 --- a/shine-UI/js/services/solana-wallet-service.js +++ b/shine-UI/js/services/solana-wallet-service.js @@ -1,3 +1,5 @@ +import { t } from '../i18n/index.js'; +import { formatNumber } from '../i18n/format.js'; import { confirmSolanaTransactionHttp, sendAndConfirmSolanaHttp } from './solana-rpc-gateway.js'; import { extractEd25519Seed32FromStoredValue } from './client-key-utils.js'; import { base64ToBytes } from './crypto-utils.js'; @@ -53,7 +55,7 @@ export function solanaAddressFromPublicKeyBase64(publicKeyB64) { if (!clean) return ''; const bytes = base64ToBytes(clean); if (bytes.length !== 32) { - throw new Error('Публичный ключ Solana должен содержать 32 байта'); + throw new Error(t('remaining.solana_wallet_errors.solana_public_key_must_contain_32_bytes')); } return encodeBase58(bytes); } @@ -80,7 +82,7 @@ function decodeBase58(input) { const ch = text[i]; const value = BASE58_MAP[ch]; if (value == null) { - throw new Error('Недопустимый символ Base58'); + throw new Error(t('remaining.solana_wallet_errors.invalid_base58_character')); } let carry = value; @@ -126,7 +128,7 @@ async function keypairFromStoredSecret(storedSecret) { export async function getSolanaWalletFromStoredSecret(storedSecret) { const clean = String(storedSecret || '').trim(); - if (!clean) throw new Error('Не передан приватный ключ'); + if (!clean) throw new Error(t('remaining.solana_wallet_errors.private_key_was_not_provided')); const keypair = await keypairFromStoredSecret(clean); return { address: keypair.publicKey.toBase58(), @@ -148,11 +150,11 @@ export async function createRandomSolanaWallet() { export async function createSolanaWalletFromPrivateBase58(privateKey32Base58) { const solana = await loadSolanaLib(); const clean = String(privateKey32Base58 || '').trim(); - if (!clean) throw new Error('Введите приватный ключ'); - if (!BASE58_RE.test(clean)) throw new Error('Разрешены только символы Base58'); + if (!clean) throw new Error(t('remaining.solana_wallet.enter_a_private_key')); + if (!BASE58_RE.test(clean)) throw new Error(t('remaining.solana_wallet.only_base58_characters_are_allowed')); const privateBytes = decodeBase58(clean); if (privateBytes.length !== 32) { - throw new Error('Приватный ключ должен быть ровно 32 байта в Base58'); + throw new Error(t('remaining.solana_wallet_errors.private_key_must_be_exactly_32_bytes_in_base58')); } const keypair = solana.Keypair.fromSeed(privateBytes); return { @@ -166,12 +168,12 @@ export async function getWalletFromStoredClientKey({ login, storagePwd }) { const cleanLogin = String(login || '').trim(); const cleanPwd = String(storagePwd || '').trim(); if (!cleanLogin || !cleanPwd) { - throw new Error('Нет активной сессии для доступа к client.key'); + throw new Error(t('remaining.solana_wallet.no_active_session_to_access_client_key')); } const secrets = await loadEncryptedUserSecrets(cleanLogin, cleanPwd); const clientPrivate = String(secrets?.clientKey || '').trim(); if (!clientPrivate) { - throw new Error('На устройстве не найден client.key'); + throw new Error(t('remaining.solana_wallet.client_key_not_found_on_this_device')); } const keypair = await keypairFromStoredSecret(clientPrivate); return { @@ -186,12 +188,12 @@ export async function getWalletFromStoredBlockchainKey({ login, storagePwd }) { const cleanLogin = String(login || '').trim(); const cleanPwd = String(storagePwd || '').trim(); if (!cleanLogin || !cleanPwd) { - throw new Error('Нет активной сессии для доступа к blockchain.key'); + throw new Error(t('remaining.solana_wallet.no_active_session_to_access_blockchain_key')); } const secrets = await loadEncryptedUserSecrets(cleanLogin, cleanPwd); const blockchainPrivate = String(secrets?.blockchainKey || '').trim(); if (!blockchainPrivate) { - throw new Error('На устройстве не найден blockchain.key'); + throw new Error(t('remaining.solana_wallet.blockchain_key_not_found_on_this_device')); } const keypair = await keypairFromStoredSecret(blockchainPrivate); return { @@ -205,12 +207,12 @@ export async function getWalletFromStoredRootKey({ login, storagePwd }) { const cleanLogin = String(login || '').trim(); const cleanPwd = String(storagePwd || '').trim(); if (!cleanLogin || !cleanPwd) { - throw new Error('Нет активной сессии для доступа к root key'); + throw new Error(t('remaining.solana_wallet.no_active_session_to_access_root_key')); } const secrets = await loadEncryptedUserSecrets(cleanLogin, cleanPwd); const rootPrivate = String(secrets?.rootKey || '').trim(); if (!rootPrivate) { - throw new Error('На устройстве не найден root key'); + throw new Error(t('remaining.solana_wallet.root_key_not_found_on_this_device')); } const keypair = await keypairFromStoredSecret(rootPrivate); return { @@ -223,12 +225,12 @@ export async function getWalletFromStoredRootKey({ login, storagePwd }) { export async function getStoredSolanaWalletChoices({ login, storagePwd } = {}) { const cleanLogin = String(login || '').trim(); const cleanPwd = String(storagePwd || '').trim(); - if (!cleanLogin || !cleanPwd) throw new Error('Нет активной сессии для доступа к ключам'); + if (!cleanLogin || !cleanPwd) throw new Error(t('remaining.solana_wallet_errors.no_active_session_to_access_keys')); const wallet = await getWalletFromStoredBlockchainKey({ login: cleanLogin, storagePwd: cleanPwd }); return [{ id: 'blockchain-key', keySource: 'blockchain', - label: 'Ключ блокчейна', + label: t('remaining.solana_wallet.blockchain_key'), address: wallet.address, keypair: wallet.keypair, }]; @@ -236,7 +238,7 @@ export async function getStoredSolanaWalletChoices({ login, storagePwd } = {}) { export async function encodeSolanaSecretKeyBase58(secretKey) { const bytes = secretKey instanceof Uint8Array ? secretKey : Uint8Array.from(secretKey || []); - if (!bytes.length) throw new Error('Пустой Solana secret key'); + if (!bytes.length) throw new Error(t('remaining.solana_wallet_errors.empty_solana_secret_key')); return encodeBase58(bytes); } @@ -269,12 +271,12 @@ export async function transferSol({ endpoint, fromKeypair, toAddress, amountSol const rpc = normalizeEndpoint(endpoint); const cleanTo = String(toAddress || '').trim(); const amount = Number(amountSol); - if (!cleanTo) throw new Error('Не указан адрес получателя'); - if (!Number.isFinite(amount) || amount <= 0) throw new Error('Сумма перевода должна быть больше 0'); + if (!cleanTo) throw new Error(t('remaining.solana_wallet.recipient_address_missing')); + if (!Number.isFinite(amount) || amount <= 0) throw new Error(t('remaining.solana_wallet.transfer_amount_must_be_greater_than_zero')); const conn = new solana.Connection(rpc, 'confirmed'); const lamports = Math.floor(amount * solana.LAMPORTS_PER_SOL); - if (lamports <= 0) throw new Error('Сумма слишком мала'); + if (lamports <= 0) throw new Error(t('remaining.solana_wallet.amount_is_too_small')); const tx = new solana.Transaction().add( solana.SystemProgram.transfer({ @@ -292,10 +294,10 @@ export async function transferAllSol({ endpoint, fromKeypair, toAddress }) { const solana = await loadSolanaLib(); const rpc = normalizeEndpoint(endpoint); const cleanTo = String(toAddress || '').trim(); - if (!fromKeypair?.publicKey) throw new Error('Не передан старый Solana-кошелёк'); - if (!cleanTo) throw new Error('Не указан новый адрес кошелька'); + if (!fromKeypair?.publicKey) throw new Error(t('remaining.solana_wallet.previous_solana_wallet_was_not_provided')); + if (!cleanTo) throw new Error(t('remaining.solana_wallet.new_wallet_address_missing')); if (fromKeypair.publicKey.toBase58() === cleanTo) { - throw new Error('Старый и новый кошельки совпадают'); + throw new Error(t('remaining.solana_wallet.old_and_new_wallet_addresses_are_the_same')); } const conn = new solana.Connection(rpc, 'confirmed'); @@ -351,7 +353,7 @@ export async function transferAllSol({ endpoint, fromKeypair, toAddress }) { export function formatSol(value, digits = 6) { const n = Number(value); if (!Number.isFinite(n)) return '0'; - return n.toLocaleString('ru-RU', { + return formatNumber(n, { minimumFractionDigits: 0, maximumFractionDigits: digits, }); diff --git a/shine-UI/js/services/speech-tools-service.js b/shine-UI/js/services/speech-tools-service.js index bde1ef62..8e8ed790 100644 --- a/shine-UI/js/services/speech-tools-service.js +++ b/shine-UI/js/services/speech-tools-service.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; const PIPER_LENGTH_SCALE_BY_QUALITY = { easy: '1.15', medium: '1.0', @@ -40,7 +41,7 @@ export async function speakTextBySettings(text, entrySettings) { if (provider === 'piper-http') { const baseUrl = String(cfg.piperBaseUrl || '').trim().replace(/\/+$/, ''); - if (!baseUrl) throw new Error('Не указан адрес Piper HTTP.'); + if (!baseUrl) throw new Error(t('remaining.speech.piper_http_url_is_not_set')); const quality = String(cfg.quality || 'medium').toLowerCase(); const voice = String(cfg.voice || '').trim(); const lengthScale = PIPER_LENGTH_SCALE_BY_QUALITY[quality] || PIPER_LENGTH_SCALE_BY_QUALITY.medium; @@ -65,7 +66,7 @@ export async function speakTextBySettings(text, entrySettings) { if (provider === 'openai') { const apiKey = String(cfg.apiKey || '').trim(); - if (!apiKey) throw new Error('Не заполнен API key для OpenAI TTS.'); + if (!apiKey) throw new Error(t('remaining.speech.openai_tts_api_key_is_missing')); const model = String(cfg.model || '').trim() || 'gpt-4o-mini-tts'; const baseUrl = normalizeOpenAiBaseUrl(cfg.externalBaseUrl || cfg.baseUrl || 'https://api.openai.com/v1'); const voice = String(cfg.voice || '').trim() || 'alloy'; @@ -91,5 +92,5 @@ export async function speakTextBySettings(text, entrySettings) { return; } - throw new Error('Неизвестный провайдер озвучки.'); + throw new Error(t('remaining.speech.unknown_text_to_speech_provider')); } diff --git a/shine-UI/js/services/theme-service.js b/shine-UI/js/services/theme-service.js index 64251680..2e279115 100644 --- a/shine-UI/js/services/theme-service.js +++ b/shine-UI/js/services/theme-service.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; const STORAGE_KEY = 'shine-ui-theme-mode-v1'; // Выбранная палитра и личные правки цветов (для дня и ночи отдельно). const PALETTE_KEY = 'shine-ui-palette-v1'; @@ -9,30 +10,30 @@ let sessionMode = null; // Роли цветов — тот же контракт, что в docs/UI-Design/DESIGN.md (раздел 4.1) и styles/main.css. export const PALETTE_ROLES = [ - { id: 'background', label: 'Фон' }, - { id: 'surface', label: 'Поверхности: поля, меню, карточки' }, - { id: 'surface-selected', label: 'Выбранное и лёгкое выделение' }, - { id: 'text-primary', label: 'Основной текст' }, - { id: 'text-secondary', label: 'Вторичный текст: время, подсказки' }, - { id: 'border-subtle', label: 'Разделители' }, - { id: 'border-control', label: 'Рамки полей и кнопок' }, - { id: 'surface-raised', label: 'Приподнятое: поля ввода, наведение' }, - { id: 'accent', label: 'Акцент: главные кнопки, ссылки' }, - { id: 'action', label: 'Вторичное действие: «Ответить», ссылки' }, - { id: 'bubble-out', label: 'Исходящее сообщение' }, - { id: 'on-accent', label: 'Текст на акцентной кнопке' }, - { id: 'reaction-active', label: 'Поставленный лайк' }, - { id: 'danger', label: 'Ошибки и удаление' }, - { id: 'success', label: 'Успех' }, - { id: 'warning', label: 'Предупреждение' }, - { id: 'info', label: 'Информация, подсказки о процессе' }, + { id: 'background', get label() { return t('remaining.theme.background'); } }, + { id: 'surface', get label() { return t('remaining.theme.surfaces_inputs_menus_cards'); } }, + { id: 'surface-selected', get label() { return t('remaining.theme.selection_and_subtle_highlighting'); } }, + { id: 'text-primary', get label() { return t('remaining.theme.primary_text'); } }, + { id: 'text-secondary', get label() { return t('remaining.theme.secondary_text_time_hints'); } }, + { id: 'border-subtle', get label() { return t('remaining.theme.dividers'); } }, + { id: 'border-control', get label() { return t('remaining.theme.input_and_button_borders'); } }, + { id: 'surface-raised', get label() { return t('remaining.theme.raised_surfaces_inputs_and_hover'); } }, + { id: 'accent', get label() { return t('remaining.theme.accent_primary_buttons_and_links'); } }, + { id: 'action', get label() { return t('remaining.theme.secondary_actions_reply_and_links'); } }, + { id: 'bubble-out', get label() { return t('remaining.theme.outgoing_message'); } }, + { id: 'on-accent', get label() { return t('remaining.theme.text_on_accent_buttons'); } }, + { id: 'reaction-active', get label() { return t('remaining.theme.liked_reaction'); } }, + { id: 'danger', get label() { return t('remaining.theme.errors_and_destructive_actions'); } }, + { id: 'success', get label() { return t('remaining.theme.success'); } }, + { id: 'warning', get label() { return t('remaining.theme.warning'); } }, + { id: 'info', get label() { return t('remaining.theme.information_and_progress_hints'); } }, ]; export const PALETTE_PRESETS = { // «Сияние» – цветовые роли макета V3/V4: тёмная тема из спецификации, // светлая подобрана отдельно, а не инверсией. aurora: { - label: 'Сияние', + get label() { return t('remaining.theme.shine'); }, dark: { background: '#121419', surface: '#1c1f27', 'surface-selected': '#302b43', 'surface-raised': '#272a34', 'text-primary': '#f1f1f5', 'text-secondary': '#a8abb8', @@ -69,7 +70,7 @@ export const PALETTE_PRESETS = { }, }, club: { - label: 'Индиго', + get label() { return t('remaining.theme.indigo'); }, dark: { background: '#12141f', surface: '#1c2031', 'surface-selected': '#272c45', 'text-primary': '#eceefa', 'text-secondary': '#a0a6c2', @@ -86,7 +87,7 @@ export const PALETTE_PRESETS = { }, }, shine: { - label: 'Бирюза', + get label() { return t('remaining.theme.turquoise'); }, dark: { background: '#101b20', surface: '#17272d', 'surface-selected': '#213b3a', 'text-primary': '#e8f2f1', 'text-secondary': '#98adaf', @@ -103,7 +104,7 @@ export const PALETTE_PRESETS = { }, }, mono: { - label: 'Монохром', + get label() { return t('remaining.theme.monochrome'); }, dark: { background: '#111212', surface: '#1c1d1d', 'surface-selected': '#2c2d2d', 'text-primary': '#f3f3f1', 'text-secondary': '#a3a3a0', @@ -128,28 +129,28 @@ function mixHex(first, second, amount) { } const EXTRA_PRESETS = [ - ['ocean', 'Океан', '#101c2b', '#182a3d', '#213c55', '#edf5ff', '#a6b9cf', '#75c8f0', '#102b40', '#f9fcff', '#e4f2fb', '#173247', '#536f83', '#087eae', '#ffffff'], - ['lavender', 'Лаванда', '#211b2b', '#30263d', '#473658', '#f5efff', '#bcb0cf', '#c5a0f5', '#f1ebf7', '#fffaff', '#e9def3', '#31283a', '#6d6076', '#7950a8', '#ffffff'], - ['graphite', 'Графит', '#17191c', '#222529', '#34383d', '#f2f4f5', '#adb4ba', '#c4cbd1', '#eef0f1', '#ffffff', '#e0e4e6', '#202427', '#5b646a', '#46535b', '#ffffff'], - ['sakura', 'Сакура', '#291b25', '#382430', '#503140', '#fff0f5', '#c9aab7', '#f39abb', '#fff0f4', '#fffafd', '#f7dce6', '#39232d', '#795967', '#b73565', '#ffffff'], - ['emerald', 'Изумруд', '#10231e', '#19332b', '#24483a', '#e8f8ef', '#a0c5ae', '#7fe0aa', '#eaf5ed', '#fbfffc', '#d8eddf', '#20372a', '#587363', '#187747', '#ffffff'], - ['sunrise', 'Рассвет', '#2b2017', '#3b2b1c', '#58402a', '#fff4df', '#d0b894', '#ffc36b', '#fff3df', '#fffaf0', '#f5e4c4', '#3a2b1b', '#78664c', '#a45c12', '#ffffff'], - ['cyberpunk', 'Киберпанк', '#171329', '#241b3b', '#382657', '#f5f0ff', '#b9a9d8', '#ff70dc', '#f6edfb', '#fffbff', '#eddcf5', '#30233b', '#705b7b', '#a12b91', '#ffffff'], - ['arctic', 'Арктика', '#14242a', '#1d333a', '#294750', '#edfaff', '#a7c4cc', '#82e2e5', '#e8f7f8', '#fbffff', '#d6eef0', '#20373a', '#587477', '#087f83', '#ffffff'], - ['coral', 'Коралл', '#2b1d1b', '#3a2925', '#563b34', '#fff1ec', '#d1b2a8', '#ff9d83', '#fff0e9', '#fffaf7', '#f9dfd4', '#3b2923', '#7b6258', '#bc4931', '#ffffff'], - ['grape', 'Виноград', '#211829', '#302238', '#493151', '#f8efff', '#c1a9cd', '#d39afa', '#f4eafa', '#fffaff', '#e9d8f2', '#35253d', '#725d7a', '#8145a9', '#ffffff'], - ['forest', 'Лес', '#19231b', '#263328', '#394b39', '#f0f7ed', '#b1c1a7', '#b0d17c', '#f0f4e8', '#fcfff7', '#e4ebd7', '#303828', '#69735d', '#52751f', '#ffffff'], - ['ruby', 'Рубин', '#28181e', '#382128', '#512e39', '#fff0f2', '#ceabb3', '#fa8095', '#fff0f1', '#fffafb', '#f4dce0', '#3c242b', '#795861', '#b52d4d', '#ffffff'], - ['lagoon', 'Лагуна', '#102323', '#193333', '#254949', '#e9f8f4', '#a1c4bc', '#67d8c2', '#e7f5ef', '#fbfffc', '#d3eee4', '#1e3932', '#56746b', '#087e70', '#ffffff'], - ['copper', 'Медь', '#281e19', '#392a22', '#533d30', '#fff2e8', '#ceb5a2', '#e9a879', '#f8eee5', '#fffaf5', '#eddfd1', '#392a21', '#786657', '#a65e2b', '#ffffff'], - ['neon', 'Неон', '#141f1b', '#1e3028', '#2b4939', '#edfff2', '#a6c6ae', '#a7f36b', '#eff7e9', '#fcfff8', '#dff0d0', '#253923', '#5b7352', '#4c861d', '#ffffff'], - ['paper', 'Бумага', '#20201e', '#2e2e2b', '#454540', '#f6f5ef', '#bcbcb2', '#d6c49b', '#f3f0e8', '#fffdf7', '#e8e2d3', '#302e28', '#716d61', '#76613b', '#ffffff'], - ['cosmos', 'Космос', '#171a30', '#222744', '#323b62', '#f0f2ff', '#aeb6d6', '#9eacff', '#edf0fc', '#fbfcff', '#dfe4fa', '#252b46', '#5c6687', '#4f61c5', '#ffffff'], - ['mint', 'Мята', '#14231f', '#1f332c', '#2e4940', '#ebfbf4', '#a9c6b9', '#8fe2c0', '#eaf5ee', '#fbfffc', '#d7eee1', '#21392f', '#597568', '#16805b', '#ffffff'], - ['sandstone', 'Песчаник', '#272019', '#382e23', '#514333', '#fff5e8', '#c9b69c', '#f0bd78', '#f6efe3', '#fffdf8', '#e9deca', '#3a3023', '#776b58', '#96601b', '#ffffff'], - ['dusk', 'Сумерки', '#211b2a', '#30263c', '#493658', '#f5efff', '#b8acc8', '#e0a6c8', '#f2edf4', '#fffaff', '#e8dfe9', '#352a39', '#706174', '#98577d', '#ffffff'], - ['lemon', 'Лимон', '#202216', '#30331e', '#454a2b', '#f8f9e9', '#bfc39c', '#e2e96d', '#f2f3e3', '#fdfff5', '#e6e9cc', '#353822', '#71755a', '#737c16', '#ffffff'], - ['obsidian', 'Обсидиан', '#151719', '#202326', '#30363b', '#f2f5f7', '#aab5bc', '#8db7c7', '#e9eef0', '#fbfeff', '#dce5e8', '#252c30', '#5c6a70', '#3b778c', '#ffffff'], + ['ocean', null, '#101c2b', '#182a3d', '#213c55', '#edf5ff', '#a6b9cf', '#75c8f0', '#102b40', '#f9fcff', '#e4f2fb', '#173247', '#536f83', '#087eae', '#ffffff'], + ['lavender', null, '#211b2b', '#30263d', '#473658', '#f5efff', '#bcb0cf', '#c5a0f5', '#f1ebf7', '#fffaff', '#e9def3', '#31283a', '#6d6076', '#7950a8', '#ffffff'], + ['graphite', null, '#17191c', '#222529', '#34383d', '#f2f4f5', '#adb4ba', '#c4cbd1', '#eef0f1', '#ffffff', '#e0e4e6', '#202427', '#5b646a', '#46535b', '#ffffff'], + ['sakura', null, '#291b25', '#382430', '#503140', '#fff0f5', '#c9aab7', '#f39abb', '#fff0f4', '#fffafd', '#f7dce6', '#39232d', '#795967', '#b73565', '#ffffff'], + ['emerald', null, '#10231e', '#19332b', '#24483a', '#e8f8ef', '#a0c5ae', '#7fe0aa', '#eaf5ed', '#fbfffc', '#d8eddf', '#20372a', '#587363', '#187747', '#ffffff'], + ['sunrise', null, '#2b2017', '#3b2b1c', '#58402a', '#fff4df', '#d0b894', '#ffc36b', '#fff3df', '#fffaf0', '#f5e4c4', '#3a2b1b', '#78664c', '#a45c12', '#ffffff'], + ['cyberpunk', null, '#171329', '#241b3b', '#382657', '#f5f0ff', '#b9a9d8', '#ff70dc', '#f6edfb', '#fffbff', '#eddcf5', '#30233b', '#705b7b', '#a12b91', '#ffffff'], + ['arctic', null, '#14242a', '#1d333a', '#294750', '#edfaff', '#a7c4cc', '#82e2e5', '#e8f7f8', '#fbffff', '#d6eef0', '#20373a', '#587477', '#087f83', '#ffffff'], + ['coral', null, '#2b1d1b', '#3a2925', '#563b34', '#fff1ec', '#d1b2a8', '#ff9d83', '#fff0e9', '#fffaf7', '#f9dfd4', '#3b2923', '#7b6258', '#bc4931', '#ffffff'], + ['grape', null, '#211829', '#302238', '#493151', '#f8efff', '#c1a9cd', '#d39afa', '#f4eafa', '#fffaff', '#e9d8f2', '#35253d', '#725d7a', '#8145a9', '#ffffff'], + ['forest', null, '#19231b', '#263328', '#394b39', '#f0f7ed', '#b1c1a7', '#b0d17c', '#f0f4e8', '#fcfff7', '#e4ebd7', '#303828', '#69735d', '#52751f', '#ffffff'], + ['ruby', null, '#28181e', '#382128', '#512e39', '#fff0f2', '#ceabb3', '#fa8095', '#fff0f1', '#fffafb', '#f4dce0', '#3c242b', '#795861', '#b52d4d', '#ffffff'], + ['lagoon', null, '#102323', '#193333', '#254949', '#e9f8f4', '#a1c4bc', '#67d8c2', '#e7f5ef', '#fbfffc', '#d3eee4', '#1e3932', '#56746b', '#087e70', '#ffffff'], + ['copper', null, '#281e19', '#392a22', '#533d30', '#fff2e8', '#ceb5a2', '#e9a879', '#f8eee5', '#fffaf5', '#eddfd1', '#392a21', '#786657', '#a65e2b', '#ffffff'], + ['neon', null, '#141f1b', '#1e3028', '#2b4939', '#edfff2', '#a6c6ae', '#a7f36b', '#eff7e9', '#fcfff8', '#dff0d0', '#253923', '#5b7352', '#4c861d', '#ffffff'], + ['paper', null, '#20201e', '#2e2e2b', '#454540', '#f6f5ef', '#bcbcb2', '#d6c49b', '#f3f0e8', '#fffdf7', '#e8e2d3', '#302e28', '#716d61', '#76613b', '#ffffff'], + ['cosmos', null, '#171a30', '#222744', '#323b62', '#f0f2ff', '#aeb6d6', '#9eacff', '#edf0fc', '#fbfcff', '#dfe4fa', '#252b46', '#5c6687', '#4f61c5', '#ffffff'], + ['mint', null, '#14231f', '#1f332c', '#2e4940', '#ebfbf4', '#a9c6b9', '#8fe2c0', '#eaf5ee', '#fbfffc', '#d7eee1', '#21392f', '#597568', '#16805b', '#ffffff'], + ['sandstone', null, '#272019', '#382e23', '#514333', '#fff5e8', '#c9b69c', '#f0bd78', '#f6efe3', '#fffdf8', '#e9deca', '#3a3023', '#776b58', '#96601b', '#ffffff'], + ['dusk', null, '#211b2a', '#30263c', '#493658', '#f5efff', '#b8acc8', '#e0a6c8', '#f2edf4', '#fffaff', '#e8dfe9', '#352a39', '#706174', '#98577d', '#ffffff'], + ['lemon', null, '#202216', '#30331e', '#454a2b', '#f8f9e9', '#bfc39c', '#e2e96d', '#f2f3e3', '#fdfff5', '#e6e9cc', '#353822', '#71755a', '#737c16', '#ffffff'], + ['obsidian', null, '#151719', '#202326', '#30363b', '#f2f5f7', '#aab5bc', '#8db7c7', '#e9eef0', '#fbfeff', '#dce5e8', '#252c30', '#5c6a70', '#3b778c', '#ffffff'], ]; function makePreset(label, dark, light) { @@ -177,8 +178,33 @@ function makePreset(label, dark, light) { return { label, dark: toColors(dark, 'dark'), light: toColors(light, 'light') }; } +const EXTRA_PRESET_LABEL_KEYS = { + 'ocean': 'remaining.theme.ocean', + 'lavender': 'remaining.theme.lavender', + 'graphite': 'remaining.theme.graphite', + 'sakura': 'remaining.theme.sakura', + 'emerald': 'remaining.theme.emerald', + 'sunrise': 'remaining.theme.sunrise', + 'cyberpunk': 'remaining.theme.cyberpunk', + 'arctic': 'remaining.theme.arctic', + 'coral': 'remaining.theme.coral', + 'grape': 'remaining.theme.grape', + 'forest': 'remaining.theme.forest', + 'ruby': 'remaining.theme.ruby', + 'lagoon': 'remaining.theme.lagoon', + 'copper': 'remaining.theme.copper', + 'neon': 'remaining.theme.neon', + 'paper': 'remaining.theme.paper', + 'cosmos': 'remaining.theme.cosmos', + 'mint': 'remaining.theme.mint', + 'sandstone': 'remaining.theme.sandstone', + 'dusk': 'remaining.theme.dusk', + 'lemon': 'remaining.theme.lemon', + 'obsidian': 'remaining.theme.obsidian', +}; for (const [id, label, ...colors] of EXTRA_PRESETS) { PALETTE_PRESETS[id] = makePreset(label, colors.slice(0, 7), colors.slice(7)); + Object.defineProperty(PALETTE_PRESETS[id], 'label', { enumerable: true, get: () => t(EXTRA_PRESET_LABEL_KEYS[id]) }); } const DEFAULT_PRESET = 'aurora'; diff --git a/shine-UI/js/services/turbo-upload-service.js b/shine-UI/js/services/turbo-upload-service.js index 2f17c396..22df82f4 100644 --- a/shine-UI/js/services/turbo-upload-service.js +++ b/shine-UI/js/services/turbo-upload-service.js @@ -1,3 +1,5 @@ +import { t } from '../i18n/index.js'; +import { formatNumber } from '../i18n/format.js'; import { getBalanceSol, getStoredSolanaWalletChoices, encodeSolanaSecretKeyBase58, formatSol } from './solana-wallet-service.js'; import { state } from '../state.js'; @@ -10,17 +12,17 @@ function parseSolToLamports(amountSol) { const raw = String(amountSol ?? '').trim().replace(',', '.'); const match = raw.match(/^(\d+)(?:\.(\d+))?$/); if (!match) { - throw new Error('Сумма пополнения должна быть числом'); + throw new Error(t('remaining.turbo.top_up_amount_must_be_a_number')); } const intPart = BigInt(match[1] || '0'); const frac = String(match[2] || ''); if (frac.length > 9) { - throw new Error('Слишком много знаков после запятой для SOL'); + throw new Error(t('remaining.turbo.too_many_decimal_places_for_sol')); } const fracPadded = `${frac}${'0'.repeat(9 - frac.length)}`; const lamports = (intPart * 1_000_000_000n) + BigInt(fracPadded || '0'); if (lamports <= 0n) { - throw new Error('Сумма пополнения должна быть больше 0'); + throw new Error(t('remaining.turbo.top_up_amount_must_be_greater_than_zero')); } return lamports.toString(); } @@ -41,7 +43,7 @@ async function getTurboWalletChoice({ login, storagePwd, keySource = 'blockchain const choices = await getStoredSolanaWalletChoices({ login, storagePwd }); const selected = choices.find((item) => item.keySource === normalizedKeySource) || choices[0] || null; if (!selected?.keypair) { - throw new Error('На устройстве не найден blockchain key для Turbo.'); + throw new Error(t('remaining.turbo.blockchain_key_for_turbo_not_found_on_this_device')); } return selected; } @@ -50,7 +52,7 @@ async function createTurboClientFromWalletChoice(choice) { const moduleRef = await loadTurboLib(); const TurboFactory = moduleRef?.TurboFactory; if (!TurboFactory?.authenticated) { - throw new Error('Turbo SDK не удалось инициализировать.'); + throw new Error(t('remaining.turbo.could_not_initialize_turbo_sdk')); } const privateKey = await encodeSolanaSecretKeyBase58(choice.keypair.secretKey); return TurboFactory.authenticated({ @@ -82,7 +84,7 @@ export function getFreeTurboUploadBytesLimit() { export function formatTurboCredits(value, digits = 6) { const n = Number(value); if (!Number.isFinite(n)) return '0'; - return n.toLocaleString('ru-RU', { + return formatNumber(n, { minimumFractionDigits: 0, maximumFractionDigits: digits, }); @@ -124,13 +126,13 @@ export async function getTurboBalanceForStoredSolanaKey({ login, storagePwd, key export async function estimateTurboUploadPrice({ login, storagePwd, keySource = 'blockchain', byteLength } = {}) { const bytes = Number(byteLength); if (!Number.isInteger(bytes) || bytes <= 0) { - throw new Error('Некорректный размер файла для Turbo.'); + throw new Error(t('remaining.turbo.invalid_file_size_for_turbo')); } const ctx = await getTurboContextForStoredSolanaKey({ login, storagePwd, keySource }); const rows = await ctx.turbo.getUploadCosts({ bytes: [bytes] }); const price = Array.isArray(rows) ? rows[0] : null; if (!price) { - throw new Error('Turbo не вернул цену загрузки.'); + throw new Error(t('remaining.turbo.turbo_did_not_return_an_upload_price')); } const winc = String(price.winc || '0'); return { @@ -152,7 +154,7 @@ export async function uploadFileWithTurbo({ onProgress, } = {}) { if (!(file instanceof File)) { - throw new Error('Выберите файл для загрузки через Turbo.'); + throw new Error(t('remaining.turbo.select_a_file_to_upload_through_turbo')); } const ctx = await getTurboContextForStoredSolanaKey({ login, storagePwd, keySource }); const result = await ctx.turbo.uploadFile({ diff --git a/shine-UI/js/services/ui-error-texts.js b/shine-UI/js/services/ui-error-texts.js index 00c0c5c1..b33f1aea 100644 --- a/shine-UI/js/services/ui-error-texts.js +++ b/shine-UI/js/services/ui-error-texts.js @@ -1,4 +1,4 @@ -import { t } from '../i18n/index.js'; +import { getLanguage, t } from '../i18n/index.js'; import { isDeveloperToolsEnabled } from './feature-settings.js'; // Сетевые ошибки браузера (fetch, загрузка файла) – одним понятным текстом. @@ -163,6 +163,11 @@ export function toUserMessage(error, fallback = t('errors.text_002')) { } if (!raw) return fallback; + // Internal exceptions may contain Russian text even when the UI is in English. + // Do not leak untranslated technical messages into the interface. + if (getLanguage() !== 'ru' && HAS_CYRILLIC_RE.test(raw)) { + return fallback || t('remaining.errors.generic'); + } return raw; } @@ -178,7 +183,7 @@ export function actionErrorText(action, error) { return /^(не удалось|ошибка|нельзя|сначала)/i.test(raw) ? raw : `${action}: ${raw}`; } if (raw && isDeveloperToolsEnabled()) return `${action}: ${raw}`; - return `${action}. Попробуйте ещё раз.`; + return t('remaining.errors.try_again', { action }); } // Микрофон и камера (getUserMedia): у этих ошибок смысл несёт имя, а не текст. Имена общие diff --git a/shine-UI/js/services/user-connections.js b/shine-UI/js/services/user-connections.js index 727ef202..6d45b4c2 100644 --- a/shine-UI/js/services/user-connections.js +++ b/shine-UI/js/services/user-connections.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; import { authService, state } from '../state.js'; import { loadProfileSnapshot } from './user-profile-params.js'; import { buildAvatarInitials as buildAvatarInitialsFromComponent } from '../components/avatar-image.js'; @@ -240,7 +241,7 @@ export async function loadUserProfileCard(login) { loadProfileSnapshot(cleanLogin), ]); - if (!user?.exists) throw new Error('Пользователь не найден'); + if (!user?.exists) throw new Error(t('remaining.connections.user_not_found')); const canonicalLogin = normalizeLogin(user.login || cleanLogin); const fields = toFieldMap(snapshot); diff --git a/shine-UI/js/services/user-profile-params.js b/shine-UI/js/services/user-profile-params.js index c90eb004..ba1c3752 100644 --- a/shine-UI/js/services/user-profile-params.js +++ b/shine-UI/js/services/user-profile-params.js @@ -1,18 +1,19 @@ +import { t } from '../i18n/index.js'; import { authService, state } from '../state.js'; import { validateArweaveTxId, validateSha256Hex } from './arweave-file-service.js'; import { buildAvatarReference, parseAvatarReference } from './avatar-reference.js'; import { CITY_MAX_LENGTH, CITY_PARAM, CITY_SUGGESTIONS } from './cities.js'; export const profileFieldDefs = [ - { key: 'first_name', readKeys: ['first_name'], label: 'Имя', placeholder: 'Введите имя' }, - { key: 'last_name', readKeys: ['last_name'], label: 'Фамилия', placeholder: 'Введите фамилию' }, + { key: 'first_name', readKeys: ['first_name'], get label() { return t('remaining.profile_fields.first_name'); }, get placeholder() { return t('remaining.profile_fields.enter_your_first_name'); } }, + { key: 'last_name', readKeys: ['last_name'], get label() { return t('remaining.profile_fields.last_name'); }, get placeholder() { return t('remaining.profile_fields.enter_your_last_name'); } }, // Город виден в профиле и собирает знакомых в раскладке «Города» на карте связей. - { key: CITY_PARAM, readKeys: [CITY_PARAM], label: 'Город', placeholder: 'Например, Казань', maxLength: CITY_MAX_LENGTH, suggestions: CITY_SUGGESTIONS }, - { key: 'address', readKeys: ['address'], label: 'Адрес', placeholder: 'Улица, дом' }, - { key: 'web', readKeys: ['web'], label: 'Ссылки', placeholder: 'Сайт, профиль или другая ссылка' }, - { key: 'phone', readKeys: ['phone'], label: 'Телефон', placeholder: '+7 ...' }, - { key: 'about', readKeys: ['about'], label: 'О себе', placeholder: 'Коротко расскажите о себе', maxLength: 160, multiline: true }, - { key: 'spiritual_path', readKeys: ['spiritual_path'], label: 'Духовный путь', placeholder: 'Расскажите о своём духовном пути, опыте, практиках и взглядах', maxLength: 5000, multiline: true }, + { key: CITY_PARAM, readKeys: [CITY_PARAM], get label() { return t('remaining.profile_fields.city'); }, get placeholder() { return t('remaining.profile_fields.for_example_london'); }, maxLength: CITY_MAX_LENGTH, suggestions: CITY_SUGGESTIONS }, + { key: 'address', readKeys: ['address'], get label() { return t('remaining.profile_fields.address'); }, get placeholder() { return t('remaining.profile_fields.street_and_house_number'); } }, + { key: 'web', readKeys: ['web'], get label() { return t('remaining.profile_fields.links'); }, get placeholder() { return t('remaining.profile_fields.website_profile_or_other_link'); } }, + { key: 'phone', readKeys: ['phone'], get label() { return t('remaining.profile_fields.phone'); }, placeholder: '+7 ...' }, + { key: 'about', readKeys: ['about'], get label() { return t('remaining.profile_fields.about_me'); }, get placeholder() { return t('remaining.profile_fields.tell_us_a_little_about_yourself'); }, maxLength: 160, multiline: true }, + { key: 'spiritual_path', readKeys: ['spiritual_path'], get label() { return t('remaining.profile_fields.spiritual_path'); }, get placeholder() { return t('remaining.profile_fields.share_your_spiritual_journey_experience_practices_and_view'); }, maxLength: 5000, multiline: true }, ]; export const profileToggleDefs = []; // legacy boolean toggles are no longer used by the new UI. @@ -60,7 +61,7 @@ function normalizeGenderValue(value) { async function getStoragePwd() { const storagePwd = state.session.storagePwdInMemory; if (!storagePwd) { - throw new Error('Нет storagePwd в памяти сессии. Выполните вход заново.'); + throw new Error(t('remaining.profile_errors.session_password_is_unavailable_sign_in_again')); } return storagePwd; } @@ -131,8 +132,8 @@ export async function loadProfileSnapshot(login) { // Legacy shine=no is intentionally ignored. Legacy official=yes/no is not read at all. const toggles = [ - { key: 'account_role', label: 'Роль аккаунта', enabled: accountRole === PROFILE_ACCOUNT_ROLE_PRIMARY, rawValue: accountRole, timeMs: latestAccountRole?.timeMs || 0 }, - { key: 'shine', label: 'Сияние', enabled: shineStatus === PROFILE_SHINE_SHINING, rawValue: shineStatus, timeMs: latestShine?.timeMs || 0 }, + { key: 'account_role', get label() { return t('remaining.profile_fields.account_role'); }, enabled: accountRole === PROFILE_ACCOUNT_ROLE_PRIMARY, rawValue: accountRole, timeMs: latestAccountRole?.timeMs || 0 }, + { key: 'shine', get label() { return t('remaining.profile_fields.shine'); }, enabled: shineStatus === PROFILE_SHINE_SHINING, rawValue: shineStatus, timeMs: latestShine?.timeMs || 0 }, ]; const latestGender = loadLatestByAliasesFromItems(items, ['gender']); @@ -186,10 +187,10 @@ export async function saveProfileStatus(login, key, value) { const cleanKey = String(key || '').trim(); const cleanValue = String(value || '').trim().toLowerCase(); if (cleanKey === 'account_role' && ![PROFILE_ACCOUNT_ROLE_PRIMARY, PROFILE_ACCOUNT_ROLE_NON_VOTING].includes(cleanValue)) { - throw new Error('Некорректное значение account_role'); + throw new Error(t('remaining.profile_errors.invalid_account_role_value')); } if (cleanKey === 'shine' && ![PROFILE_SHINE_SHINING, PROFILE_SHINE_UNKNOWN, PROFILE_SHINE_NOT_INTERESTED].includes(cleanValue)) { - throw new Error('Некорректное значение shine'); + throw new Error(t('remaining.profile_errors.invalid_shine_value')); } const storagePwd = await getStoragePwd(); await authService.addBlockUserParam({ login, param: cleanKey, value: cleanValue, storagePwd }); @@ -198,7 +199,7 @@ export async function saveProfileStatus(login, key, value) { // Kept only for old callers outside the current UI. New code must use saveProfileStatus(). export async function saveProfileToggle(login, key, enabled) { if (key === 'shine') return saveProfileStatus(login, 'shine', enabled ? PROFILE_SHINE_SHINING : PROFILE_SHINE_UNKNOWN); - if (key === 'official') throw new Error('Параметр official устарел. Используйте account_role.'); + if (key === 'official') throw new Error(t('remaining.profile_errors.the_official_parameter_is_deprecated_use_account_role')); throw new Error(`Неизвестный legacy toggle: ${key}`); } @@ -217,8 +218,8 @@ export async function saveProfileAvatar(login, avatar) { const cleanAr = String(avatar?.ar || '').trim(); const cleanSha = String(avatar?.sha256 || avatar?.sha256Hex || '').trim().toLowerCase(); const size = Number(avatar?.size || 0); - if (cleanAr && !validateArweaveTxId(cleanAr)) throw new Error('Некорректный Transaction ID Arweave'); - if (!validateSha256Hex(cleanSha)) throw new Error('Некорректный SHA256 хэш аватара'); + if (cleanAr && !validateArweaveTxId(cleanAr)) throw new Error(t('remaining.profile_errors.invalid_arweave_transaction_id')); + if (!validateSha256Hex(cleanSha)) throw new Error(t('remaining.profile_errors.invalid_avatar_sha_256_hash')); await saveProfileParamBlock(login, 'ava', buildAvatarReference({ ar: cleanAr, sha256: cleanSha, size })); } diff --git a/shine-UI/js/services/ws-client.js b/shine-UI/js/services/ws-client.js index 324cdf63..b0c4878c 100644 --- a/shine-UI/js/services/ws-client.js +++ b/shine-UI/js/services/ws-client.js @@ -1,3 +1,4 @@ +import { t } from '../i18n/index.js'; import { captureClientError } from './client-error-reporter.js'; import { defaultServerWs } from '../deploy-config.js'; @@ -69,7 +70,7 @@ export class WsJsonClient { if (this.ws && this.ws.readyState === WebSocket.OPEN) return; if (this.openPromise) return this.openPromise; if (isMixedContentWs(this.url)) { - const error = new Error('Страница открыта по HTTPS, а сервер указан как ws://. Используйте wss:// адрес для Shine сервера.'); + const error = new Error(t('remaining.websocket.this_page_uses_https_but_the_server_uses_ws_use_wss_for_th')); captureClientError({ kind: 'ws_mixed_content_blocked', message: error.message, @@ -96,7 +97,7 @@ export class WsJsonClient { }, { once: true }); ws.addEventListener('close', () => { - this.failPending('Соединение WebSocket закрыто'); + this.failPending(t('remaining.websocket.websocket_connection_closed')); }); ws.addEventListener('message', (event) => { diff --git a/shine-UI/tests/channel-name-address.test.mjs b/shine-UI/tests/channel-name-address.test.mjs index 690d228c..1139c889 100644 --- a/shine-UI/tests/channel-name-address.test.mjs +++ b/shine-UI/tests/channel-name-address.test.mjs @@ -16,7 +16,9 @@ test('новый канал: 1–3 символа запрещены, 4 и 32 р assert.equal(validateChannelDisplayName('x'.repeat(33)).code, 'too_long'); assert.equal(validateChannelDisplayName('1234').code, 'digits_only'); assert.equal(validateChannelDisplayName('a.bc').code, 'bad_chars'); - assert.equal(channelNameErrorText('too_short'), 'Название слишком короткое: минимум 4 символа.'); + const ru = JSON.parse(source('../js/i18n/locales/ru.json')); + assert.equal(ru.remaining.channel_validation.channel_name_is_too_short_minimum_4_characters, 'Название слишком короткое: минимум 4 символа.'); + assert.equal(channelNameErrorText('too_short'), 'remaining.channel_validation.channel_name_is_too_short_minimum_4_characters'); // no browser i18n bootstrap in this unit test }); test('адрес канала не получает лишнюю @, даже если логин начинается с @', () => { diff --git a/shine-UI/tests/locale-formatting.test.mjs b/shine-UI/tests/locale-formatting.test.mjs new file mode 100644 index 00000000..533c0c91 --- /dev/null +++ b/shine-UI/tests/locale-formatting.test.mjs @@ -0,0 +1,74 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { readFile } from 'node:fs/promises'; +import { fileURLToPath } from 'node:url'; + +const baseUrl = new URL('../js/i18n/', import.meta.url); +const i18n = await import('../js/i18n/index.js'); +const fmt = await import('../js/i18n/format.js'); + +function withMockBrowser(browserLanguages = ['ru-RU']) { + const originals = { + navigator: globalThis.navigator, + fetch: globalThis.fetch, + localStorage: globalThis.localStorage, + document: globalThis.document, + window: globalThis.window, + }; + Object.defineProperty(globalThis, 'navigator', { + configurable: true, + value: { languages: browserLanguages, language: browserLanguages[0] }, + }); + const saved = new Map(); + globalThis.document = { documentElement: { lang: '' } }; + globalThis.window = { __SHINE_BUILD_HASH__: 'test' }; + globalThis.localStorage = { getItem: (k) => saved.get(k) ?? null, setItem: (k,v) => saved.set(k,String(v)) }; + globalThis.fetch = async (url) => { + const u = new URL(url); + const text = await readFile(fileURLToPath(new URL(u.pathname, baseUrl)), 'utf8'); + return { ok: true, json: async () => JSON.parse(text) }; + }; + return { + saved, + setBrowserLanguages(list) { + Object.defineProperty(globalThis, 'navigator', { + configurable: true, + value: { languages: list, language: list[0] }, + }); + }, + restore() { + Object.defineProperty(globalThis, 'navigator', { configurable: true, value: originals.navigator }); + for (const key of ['fetch', 'localStorage', 'document', 'window']) { + if (originals[key] === undefined) delete globalThis[key]; + else globalThis[key] = originals[key]; + } + }, + }; +} + +test('даты/время/числа реагируют на единый язык, английский по умолчанию en-US', async () => { + const env = withMockBrowser(['ru-RU']); + try { + await i18n.initI18n(); + await i18n.setLanguage('ru'); + const date = new Date(2026, 10, 10, 14, 5); + assert.equal(fmt.getIntlLocale(), 'ru-RU'); + assert.match(fmt.formatDate(date), /^10 ноября 2026/u); + assert.equal(fmt.formatTime(date), '14:05'); + assert.equal(fmt.formatNumber(1234.5).replace(/\s/gu, ' '), '1 234,5'); + + await i18n.setLanguage('en'); + assert.equal(fmt.getIntlLocale(), 'en-US'); + assert.match(fmt.formatDate(date), /^10 November 2026$/u); + assert.equal(fmt.formatTime(date), '14:05'); + assert.match(fmt.formatDateTime(date), /^10\/11\/2026, 14:05$/u); + assert.equal(fmt.formatNumber(1234.5), '1,234.5'); + assert.equal(fmt.formatRelative(-1, 'day'), 'yesterday'); + assert.equal(fmt.formatRelative(0, 'second'), 'now'); + + env.setBrowserLanguages(['en-GB', 'en-US']); + assert.equal(fmt.getIntlLocale(), 'en-GB'); + env.setBrowserLanguages(['en']); + assert.equal(fmt.getIntlLocale(), 'en-US'); + } finally { env.restore(); } +}); diff --git a/shine-UI/tests/registration-upgrade-flow.test.mjs b/shine-UI/tests/registration-upgrade-flow.test.mjs index 8cb012b4..483a97c6 100644 --- a/shine-UI/tests/registration-upgrade-flow.test.mjs +++ b/shine-UI/tests/registration-upgrade-flow.test.mjs @@ -18,8 +18,8 @@ test('обе регистрации оплачивают цену namespace с assert.equal(result.networkReserve, 100_000n); assert.equal(result.requiredLamports, 20_100_000n); assert.equal(solFromLamports(result.requiredLamports), '0.020100'); - assert.throws(() => calculateUpgradeFunding({ namespaceFeeLamports: 5_000_000n, rentLamports: 6_000_000n }), /меньше депозита/); - assert.throws(() => calculateUpgradeFunding({ namespaceFeeLamports: -1, rentLamports: 0 }), /Некорректная/); + assert.throws(() => calculateUpgradeFunding({ namespaceFeeLamports: 5_000_000n, rentLamports: 6_000_000n }), /меньше депозита|remaining\.registration_upgrade\.price_below_rent/); + assert.throws(() => calculateUpgradeFunding({ namespaceFeeLamports: -1, rentLamports: 0 }), /Некорректная|remaining\.registration_upgrade\.invalid_registration_price/); }); test('после синхронизации Solana оба типа платных аккаунтов имеют статус PAID', () => { assert.equal(isUpgradeComplete('PAID'), true);