feat(web): rewrite site copy in plain language and split i18n dictionaries
Move RU/EN strings to src/i18n/{ru,en}.ts, add og/meta tags that follow the
selected language, remove the long dash from all text, add copy guidelines and
tests for key parity, HTML fallback text and dash-free sources and bundle.
This commit is contained in:
parent
0d80ca9433
commit
d3a6dd316b
11 changed files with 397 additions and 295 deletions
114
src/i18n/en.ts
Normal file
114
src/i18n/en.ts
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
export const en = {
|
||||
skip: "Skip to content",
|
||||
nav: "Main navigation",
|
||||
navProject: "Project",
|
||||
navClient: "Client",
|
||||
navRoadmap: "What’s next",
|
||||
language: "Language",
|
||||
account: "Account",
|
||||
footer: "Client and server are written in Rust.",
|
||||
source: "Source code",
|
||||
title: "VNOX: voice and text chat on your own server",
|
||||
accountTitle: "Account | VNOX Central",
|
||||
description: "Voice and text chat you run yourself. Rust desktop client, channels, direct messages, friends, roles and encrypted UDP voice. Open source, GPLv3.",
|
||||
development: "Early version, code is open",
|
||||
heroTitle: "Voice and text chat\non your own server.",
|
||||
heroText: "A desktop client written in Rust and a server you run yourself. Channels, direct messages, friends, roles and voice.",
|
||||
openCentral: "Open Vnox Central",
|
||||
explore: "Explore the project",
|
||||
earlyNote: "Not production ready. What already works is listed below.",
|
||||
diagramLabel: "What the client looks like",
|
||||
diagramNote: "A schematic illustration, not a screenshot",
|
||||
textTab: "Text",
|
||||
voiceTab: "Voice",
|
||||
themeTab: "Appearance",
|
||||
community: "Your community",
|
||||
general: "general",
|
||||
ideas: "ideas",
|
||||
voiceRoom: "Evening voice",
|
||||
voiceConnected: "You are in a voice channel",
|
||||
voiceExplain: "You can browse text channels without leaving voice.",
|
||||
you: "You",
|
||||
friend: "Friend",
|
||||
messageSample: "A shared channel for ideas, links and plans.",
|
||||
messageNote: "Text and voice in one window.",
|
||||
voiceCaption: "Microphone modes: push to talk, voice activity or always on.",
|
||||
themeCaption: "Light, dark, mega dark and your own.",
|
||||
light: "Light",
|
||||
dark: "Dark",
|
||||
black: "Mega dark",
|
||||
custom: "Custom",
|
||||
preview: "Preview",
|
||||
previewTheme: "Illustration theme",
|
||||
projectTitle: "One client,\nyour own server.",
|
||||
projectText: "VNOX is a chat with text and voice. You run the server on your own hardware, so the data and the users stay with you.",
|
||||
projectNative: "Native client",
|
||||
projectNativeText: "Written in Rust and Slint, no Electron or web view. Sign-in uses an Ed25519 key, so the server stores no passwords.",
|
||||
projectServer: "Community server",
|
||||
projectServerText: "The gateway (TCP) handles chat, guilds and roles, and the voice node (UDP) relays audio. There is also a combined daemon that runs both.",
|
||||
projectCentral: "Vnox Central",
|
||||
projectCentralText: "A web account with GitHub sign-in. It is not linked to the desktop client key yet.",
|
||||
clientCode: "Client source",
|
||||
serverCode: "Server source",
|
||||
clientTitle: "Appearance settings",
|
||||
clientText: "Four themes (light, dark, mega dark and custom), text size, audio and profile.",
|
||||
clientScreenshot: "Appearance settings in the VNOX client: four themes and a text size slider.",
|
||||
screenshotCaption: "A real screenshot of the client. The interface is still changing.",
|
||||
appearanceTitle: "Your own theme",
|
||||
appearanceText: "Set your own palette with CSS variables. No external resources are loaded.",
|
||||
identityTitle: "Avatar",
|
||||
identityText: "Pick a photo, then set its zoom and position in a round preview.",
|
||||
roadmapTitle: "What exists and what is next",
|
||||
roadmapText: "The project is in development. On the left is what is already in the code, on the right what we are still building.",
|
||||
available: "Already in the code",
|
||||
next: "In progress and planned",
|
||||
availableOne: "Client, text channels and voice",
|
||||
availableTwo: "Direct messages, friends, guilds and roles",
|
||||
availableThree: "Voice encryption (ChaCha20-Poly1305) and key-based sign-in",
|
||||
availableFour: "Web account through GitHub, site in Russian and English",
|
||||
availableFive: "Incoming and signed outgoing webhooks on the server",
|
||||
nextOne: "Webhook management in the client",
|
||||
nextTwo: "Screen sharing with separate audio",
|
||||
nextThree: "Server discovery and linking Central to the client key",
|
||||
downloadNote: "There are no prebuilt downloads yet. You can build the client and server from source.",
|
||||
faqTitle: "FAQ",
|
||||
faqServer: "Do I need a separate voice server?",
|
||||
faqServerAnswer: "No. The gateway and the voice node can run as one daemon (serverd).",
|
||||
faqCentral: "What is Vnox Central for?",
|
||||
faqCentralAnswer: "It is a web account with GitHub sign-in. A community server runs on its own and does not depend on Central.",
|
||||
faqRelease: "Where can I download the client?",
|
||||
faqReleaseAnswer: "Nowhere yet. The client and server sources are open, and build instructions are in their repositories.",
|
||||
statusLoading: "Checking Vnox Central…",
|
||||
statusReady: "Vnox Central is up",
|
||||
statusUnavailable: "Could not reach Vnox Central",
|
||||
statusNote: "Central service status",
|
||||
retry: "Try again",
|
||||
back: "Back to home",
|
||||
accountHeading: "Your Vnox Central account",
|
||||
accountIntro: "For now you can sign in with GitHub. There is nothing else to do with the account yet.",
|
||||
loginTitle: "Continue with GitHub",
|
||||
loginText: "VNOX gets your public GitHub profile. It does not ask for access to your repositories.",
|
||||
loginButton: "Sign in with GitHub",
|
||||
loginLoading: "Checking sign-in availability…",
|
||||
loginDisabled: "GitHub sign-in is turned off on the server.",
|
||||
loginUnavailable: "Could not check sign-in availability. Try again.",
|
||||
privacy: "You sign in on github.com. Your GitHub password stays with GitHub.",
|
||||
accountStage: "The account is not linked to the desktop client keys yet. Friends, servers and messages will be added later.",
|
||||
sessionLoading: "Loading your account…",
|
||||
profileTitle: "You are signed in",
|
||||
profileIntro: "Signed in with GitHub. This is your VNOX Central account.",
|
||||
handle: "Account handle",
|
||||
userId: "Account ID",
|
||||
provider: "Signed in with",
|
||||
logout: "Sign out",
|
||||
loggingOut: "Signing out…",
|
||||
logoutError: "Could not sign out. Try again.",
|
||||
profileFallback: "VNOX user",
|
||||
accountError: "Your account is currently unavailable",
|
||||
accountErrorText:
|
||||
"Could not load your session. Check your connection and try again.",
|
||||
copy: "Copy account ID",
|
||||
copied: "Account ID copied",
|
||||
copyError: "Could not copy the ID. Select it manually.",
|
||||
} as const;
|
||||
export type Catalog = Record<keyof typeof en, string>;
|
||||
19
src/i18n/index.ts
Normal file
19
src/i18n/index.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { en } from "./en";
|
||||
import { ru } from "./ru";
|
||||
|
||||
export const messages = { ru, en } as const;
|
||||
export type Language = keyof typeof messages;
|
||||
export type MessageKey = keyof typeof en;
|
||||
export const languages = Object.keys(messages) as Language[];
|
||||
|
||||
/** Saved choice wins; otherwise Russian for ru locales, English for the rest. */
|
||||
export function detectLanguage(
|
||||
saved: unknown,
|
||||
languages: readonly string[] = [],
|
||||
): Language {
|
||||
if (saved === "ru" || saved === "en") return saved;
|
||||
return languages.some((value) => /^ru(?:-|$)/i.test(value)) ? "ru" : "en";
|
||||
}
|
||||
export function translate(language: Language, key: MessageKey): string {
|
||||
return messages[language]?.[key] ?? messages.en[key] ?? key;
|
||||
}
|
||||
116
src/i18n/ru.ts
Normal file
116
src/i18n/ru.ts
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
import type { Catalog } from "./en";
|
||||
|
||||
export const ru: Catalog = {
|
||||
skip: "Перейти к содержимому",
|
||||
nav: "Основная навигация",
|
||||
navProject: "Проект",
|
||||
navClient: "Клиент",
|
||||
navRoadmap: "Дальше",
|
||||
language: "Язык",
|
||||
account: "Аккаунт",
|
||||
footer: "Клиент и сервер написаны на Rust.",
|
||||
source: "Исходный код",
|
||||
title: "VNOX: голосовой и текстовый чат на своём сервере",
|
||||
accountTitle: "Аккаунт | VNOX Central",
|
||||
description: "Голосовой и текстовый чат, который вы запускаете сами. Клиент на Rust, каналы, личные сообщения, друзья, роли и шифрованный голос по UDP. Открытый код, GPLv3.",
|
||||
development: "Ранняя версия, код открыт",
|
||||
heroTitle: "Голос и чат\nна вашем сервере.",
|
||||
heroText: "Десктопный клиент на Rust и сервер, который вы запускаете сами. Каналы, личные сообщения, друзья, роли и голос.",
|
||||
openCentral: "Открыть Vnox Central",
|
||||
explore: "О проекте",
|
||||
earlyNote: "Не готово для продакшена. Что уже работает, написано ниже.",
|
||||
diagramLabel: "Как выглядит клиент",
|
||||
diagramNote: "Схематичная иллюстрация, не снимок экрана",
|
||||
textTab: "Текст",
|
||||
voiceTab: "Голос",
|
||||
themeTab: "Внешний вид",
|
||||
community: "Ваше сообщество",
|
||||
general: "общий",
|
||||
ideas: "идеи",
|
||||
voiceRoom: "Вечерний войс",
|
||||
voiceConnected: "Вы в голосовом канале",
|
||||
voiceExplain: "Текстовые каналы можно листать, не выходя из голосового.",
|
||||
you: "Вы",
|
||||
friend: "Друг",
|
||||
messageSample: "Общий канал для идей, ссылок и планов.",
|
||||
messageNote: "Текст и голос в одном окне.",
|
||||
voiceCaption: "Режимы микрофона: PTT, VAD или всегда включён.",
|
||||
themeCaption: "Светлая, тёмная, мега-тёмная и своя.",
|
||||
light: "Светлая",
|
||||
dark: "Тёмная",
|
||||
black: "Мега-тёмная",
|
||||
custom: "Своя",
|
||||
preview: "Предпросмотр",
|
||||
previewTheme: "Тема иллюстрации",
|
||||
projectTitle: "Один клиент,\nваш сервер.",
|
||||
projectText: "VNOX это чат с текстом и голосом. Сервер вы запускаете на своём железе, а данные и пользователи остаются у вас.",
|
||||
projectNative: "Нативный клиент",
|
||||
projectNativeText: "Написан на Rust и Slint, без Electron и веб-вида. Вход по ключу Ed25519, без паролей на сервере.",
|
||||
projectServer: "Сервер сообщества",
|
||||
projectServerText: "Шлюз (TCP) отвечает за чат, гильдии и роли, голосовой узел (UDP) пересылает звук. Есть и общий демон для обоих.",
|
||||
projectCentral: "Vnox Central",
|
||||
projectCentralText: "Веб-аккаунт с входом через GitHub. С ключом настольного клиента он пока не связан.",
|
||||
clientCode: "Код клиента",
|
||||
serverCode: "Код сервера",
|
||||
clientTitle: "Настройки внешнего вида",
|
||||
clientText: "Четыре темы (светлая, тёмная, мега-тёмная и своя), размер текста, звук и профиль.",
|
||||
clientScreenshot: "Настройки внешнего вида в клиенте VNOX: четыре темы и размер текста.",
|
||||
screenshotCaption: "Настоящий снимок клиента. Интерфейс ещё меняется.",
|
||||
appearanceTitle: "Своя тема",
|
||||
appearanceText: "Палитру можно задать через CSS-переменные. Внешние ресурсы не загружаются.",
|
||||
identityTitle: "Аватар",
|
||||
identityText: "Выберите фото и подберите масштаб и положение в круглой рамке.",
|
||||
roadmapTitle: "Что есть, а что будет",
|
||||
roadmapText: "Проект в разработке. Слева то, что уже есть в коде, справа то, что ещё делаем.",
|
||||
available: "Уже в коде",
|
||||
next: "В работе и планах",
|
||||
availableOne: "Клиент, текстовые каналы и голос",
|
||||
availableTwo: "Личные сообщения, друзья, гильдии и роли",
|
||||
availableThree: "Шифрование голоса (ChaCha20-Poly1305) и вход по ключу",
|
||||
availableFour: "Веб-аккаунт через GitHub, сайт на русском и английском",
|
||||
availableFive: "Входящие и подписанные исходящие вебхуки на сервере",
|
||||
nextOne: "Управление вебхуками в клиенте",
|
||||
nextTwo: "Трансляция экрана с отдельным звуком",
|
||||
nextThree: "Поиск серверов и привязка Central к ключу клиента",
|
||||
downloadNote: "Готовых сборок пока нет. Клиент и сервер можно собрать из исходников.",
|
||||
faqTitle: "Частые вопросы",
|
||||
faqServer: "Нужен ли отдельный голосовой сервер?",
|
||||
faqServerAnswer: "Нет. Шлюз и голосовой узел можно запустить одним демоном (serverd).",
|
||||
faqCentral: "Зачем нужен Vnox Central?",
|
||||
faqCentralAnswer: "Это веб-аккаунт с входом через GitHub. Сервер сообщества работает отдельно и от Central не зависит.",
|
||||
faqRelease: "Где скачать клиент?",
|
||||
faqReleaseAnswer: "Пока нигде. Исходники клиента и сервера открыты, инструкции по сборке лежат в их репозиториях.",
|
||||
statusLoading: "Проверяем Vnox Central…",
|
||||
statusReady: "Vnox Central отвечает",
|
||||
statusUnavailable: "Не удалось связаться с Vnox Central",
|
||||
statusNote: "Состояние центрального сервиса",
|
||||
retry: "Повторить",
|
||||
back: "На главную",
|
||||
accountHeading: "Аккаунт Vnox Central",
|
||||
accountIntro: "Пока можно войти через GitHub. Больше с аккаунтом ничего не сделать.",
|
||||
loginTitle: "Продолжить с GitHub",
|
||||
loginText: "VNOX получает ваш публичный профиль GitHub. Доступ к репозиториям не запрашивается.",
|
||||
loginButton: "Войти через GitHub",
|
||||
loginLoading: "Проверяем возможность входа…",
|
||||
loginDisabled: "Вход через GitHub на сервере пока выключен.",
|
||||
loginUnavailable:
|
||||
"Не удалось проверить доступность входа. Повторите попытку.",
|
||||
privacy: "Вход проходит на github.com. Пароль от GitHub остаётся у GitHub.",
|
||||
accountStage: "Аккаунт пока не связан с ключами настольного клиента. Друзья, серверы и сообщения в нём появятся позже.",
|
||||
sessionLoading: "Загружаем аккаунт…",
|
||||
profileTitle: "Вы вошли",
|
||||
profileIntro: "Вход через GitHub выполнен. Это ваш аккаунт VNOX Central.",
|
||||
handle: "Имя аккаунта",
|
||||
userId: "ID аккаунта",
|
||||
provider: "Способ входа",
|
||||
logout: "Выйти из аккаунта",
|
||||
loggingOut: "Выходим…",
|
||||
logoutError: "Не удалось выйти. Повторите попытку.",
|
||||
profileFallback: "Пользователь VNOX",
|
||||
accountError: "Аккаунт сейчас недоступен",
|
||||
accountErrorText:
|
||||
"Не удалось загрузить сессию. Проверьте соединение и повторите попытку.",
|
||||
copy: "Скопировать ID",
|
||||
copied: "ID скопирован",
|
||||
copyError: "Не удалось скопировать ID. Выделите его вручную.",
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue