style(web): apply bun fmt formatting
This commit is contained in:
parent
d3a6dd316b
commit
769e25a705
3 changed files with 77 additions and 41 deletions
|
|
@ -10,10 +10,12 @@ export const en = {
|
|||
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.",
|
||||
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.",
|
||||
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.",
|
||||
|
|
@ -41,25 +43,35 @@ export const en = {
|
|||
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.",
|
||||
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.",
|
||||
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.",
|
||||
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.",
|
||||
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.",
|
||||
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.",
|
||||
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.",
|
||||
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.",
|
||||
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",
|
||||
|
|
@ -70,14 +82,18 @@ export const en = {
|
|||
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.",
|
||||
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).",
|
||||
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.",
|
||||
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.",
|
||||
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",
|
||||
|
|
@ -85,15 +101,18 @@ export const en = {
|
|||
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.",
|
||||
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.",
|
||||
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.",
|
||||
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.",
|
||||
|
|
|
|||
|
|
@ -12,10 +12,12 @@ export const ru: Catalog = {
|
|||
source: "Исходный код",
|
||||
title: "VNOX: голосовой и текстовый чат на своём сервере",
|
||||
accountTitle: "Аккаунт | VNOX Central",
|
||||
description: "Голосовой и текстовый чат, который вы запускаете сами. Клиент на Rust, каналы, личные сообщения, друзья, роли и шифрованный голос по UDP. Открытый код, GPLv3.",
|
||||
description:
|
||||
"Голосовой и текстовый чат, который вы запускаете сами. Клиент на Rust, каналы, личные сообщения, друзья, роли и шифрованный голос по UDP. Открытый код, GPLv3.",
|
||||
development: "Ранняя версия, код открыт",
|
||||
heroTitle: "Голос и чат\nна вашем сервере.",
|
||||
heroText: "Десктопный клиент на Rust и сервер, который вы запускаете сами. Каналы, личные сообщения, друзья, роли и голос.",
|
||||
heroText:
|
||||
"Десктопный клиент на Rust и сервер, который вы запускаете сами. Каналы, личные сообщения, друзья, роли и голос.",
|
||||
openCentral: "Открыть Vnox Central",
|
||||
explore: "О проекте",
|
||||
earlyNote: "Не готово для продакшена. Что уже работает, написано ниже.",
|
||||
|
|
@ -43,25 +45,34 @@ export const ru: Catalog = {
|
|||
preview: "Предпросмотр",
|
||||
previewTheme: "Тема иллюстрации",
|
||||
projectTitle: "Один клиент,\nваш сервер.",
|
||||
projectText: "VNOX это чат с текстом и голосом. Сервер вы запускаете на своём железе, а данные и пользователи остаются у вас.",
|
||||
projectText:
|
||||
"VNOX это чат с текстом и голосом. Сервер вы запускаете на своём железе, а данные и пользователи остаются у вас.",
|
||||
projectNative: "Нативный клиент",
|
||||
projectNativeText: "Написан на Rust и Slint, без Electron и веб-вида. Вход по ключу Ed25519, без паролей на сервере.",
|
||||
projectNativeText:
|
||||
"Написан на Rust и Slint, без Electron и веб-вида. Вход по ключу Ed25519, без паролей на сервере.",
|
||||
projectServer: "Сервер сообщества",
|
||||
projectServerText: "Шлюз (TCP) отвечает за чат, гильдии и роли, голосовой узел (UDP) пересылает звук. Есть и общий демон для обоих.",
|
||||
projectServerText:
|
||||
"Шлюз (TCP) отвечает за чат, гильдии и роли, голосовой узел (UDP) пересылает звук. Есть и общий демон для обоих.",
|
||||
projectCentral: "Vnox Central",
|
||||
projectCentralText: "Веб-аккаунт с входом через GitHub. С ключом настольного клиента он пока не связан.",
|
||||
projectCentralText:
|
||||
"Веб-аккаунт с входом через GitHub. С ключом настольного клиента он пока не связан.",
|
||||
clientCode: "Код клиента",
|
||||
serverCode: "Код сервера",
|
||||
clientTitle: "Настройки внешнего вида",
|
||||
clientText: "Четыре темы (светлая, тёмная, мега-тёмная и своя), размер текста, звук и профиль.",
|
||||
clientScreenshot: "Настройки внешнего вида в клиенте VNOX: четыре темы и размер текста.",
|
||||
clientText:
|
||||
"Четыре темы (светлая, тёмная, мега-тёмная и своя), размер текста, звук и профиль.",
|
||||
clientScreenshot:
|
||||
"Настройки внешнего вида в клиенте VNOX: четыре темы и размер текста.",
|
||||
screenshotCaption: "Настоящий снимок клиента. Интерфейс ещё меняется.",
|
||||
appearanceTitle: "Своя тема",
|
||||
appearanceText: "Палитру можно задать через CSS-переменные. Внешние ресурсы не загружаются.",
|
||||
appearanceText:
|
||||
"Палитру можно задать через CSS-переменные. Внешние ресурсы не загружаются.",
|
||||
identityTitle: "Аватар",
|
||||
identityText: "Выберите фото и подберите масштаб и положение в круглой рамке.",
|
||||
identityText:
|
||||
"Выберите фото и подберите масштаб и положение в круглой рамке.",
|
||||
roadmapTitle: "Что есть, а что будет",
|
||||
roadmapText: "Проект в разработке. Слева то, что уже есть в коде, справа то, что ещё делаем.",
|
||||
roadmapText:
|
||||
"Проект в разработке. Слева то, что уже есть в коде, справа то, что ещё делаем.",
|
||||
available: "Уже в коде",
|
||||
next: "В работе и планах",
|
||||
availableOne: "Клиент, текстовые каналы и голос",
|
||||
|
|
@ -72,14 +83,18 @@ export const ru: Catalog = {
|
|||
nextOne: "Управление вебхуками в клиенте",
|
||||
nextTwo: "Трансляция экрана с отдельным звуком",
|
||||
nextThree: "Поиск серверов и привязка Central к ключу клиента",
|
||||
downloadNote: "Готовых сборок пока нет. Клиент и сервер можно собрать из исходников.",
|
||||
downloadNote:
|
||||
"Готовых сборок пока нет. Клиент и сервер можно собрать из исходников.",
|
||||
faqTitle: "Частые вопросы",
|
||||
faqServer: "Нужен ли отдельный голосовой сервер?",
|
||||
faqServerAnswer: "Нет. Шлюз и голосовой узел можно запустить одним демоном (serverd).",
|
||||
faqServerAnswer:
|
||||
"Нет. Шлюз и голосовой узел можно запустить одним демоном (serverd).",
|
||||
faqCentral: "Зачем нужен Vnox Central?",
|
||||
faqCentralAnswer: "Это веб-аккаунт с входом через GitHub. Сервер сообщества работает отдельно и от Central не зависит.",
|
||||
faqCentralAnswer:
|
||||
"Это веб-аккаунт с входом через GitHub. Сервер сообщества работает отдельно и от Central не зависит.",
|
||||
faqRelease: "Где скачать клиент?",
|
||||
faqReleaseAnswer: "Пока нигде. Исходники клиента и сервера открыты, инструкции по сборке лежат в их репозиториях.",
|
||||
faqReleaseAnswer:
|
||||
"Пока нигде. Исходники клиента и сервера открыты, инструкции по сборке лежат в их репозиториях.",
|
||||
statusLoading: "Проверяем Vnox Central…",
|
||||
statusReady: "Vnox Central отвечает",
|
||||
statusUnavailable: "Не удалось связаться с Vnox Central",
|
||||
|
|
@ -87,16 +102,19 @@ export const ru: Catalog = {
|
|||
retry: "Повторить",
|
||||
back: "На главную",
|
||||
accountHeading: "Аккаунт Vnox Central",
|
||||
accountIntro: "Пока можно войти через GitHub. Больше с аккаунтом ничего не сделать.",
|
||||
accountIntro:
|
||||
"Пока можно войти через GitHub. Больше с аккаунтом ничего не сделать.",
|
||||
loginTitle: "Продолжить с GitHub",
|
||||
loginText: "VNOX получает ваш публичный профиль GitHub. Доступ к репозиториям не запрашивается.",
|
||||
loginText:
|
||||
"VNOX получает ваш публичный профиль GitHub. Доступ к репозиториям не запрашивается.",
|
||||
loginButton: "Войти через GitHub",
|
||||
loginLoading: "Проверяем возможность входа…",
|
||||
loginDisabled: "Вход через GitHub на сервере пока выключен.",
|
||||
loginUnavailable:
|
||||
"Не удалось проверить доступность входа. Повторите попытку.",
|
||||
privacy: "Вход проходит на github.com. Пароль от GitHub остаётся у GitHub.",
|
||||
accountStage: "Аккаунт пока не связан с ключами настольного клиента. Друзья, серверы и сообщения в нём появятся позже.",
|
||||
accountStage:
|
||||
"Аккаунт пока не связан с ключами настольного клиента. Друзья, серверы и сообщения в нём появятся позже.",
|
||||
sessionLoading: "Загружаем аккаунт…",
|
||||
profileTitle: "Вы вошли",
|
||||
profileIntro: "Вход через GitHub выполнен. Это ваш аккаунт VNOX Central.",
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@ test("every translation key used in code exists and every key is used", async ()
|
|||
used.add(`faq${part}`);
|
||||
used.add(`faq${part}Answer`);
|
||||
}
|
||||
for (const m of code.matchAll(/\b(?:tr|t)\(\s*"([A-Za-z]+)"/g)) used.add(m[1]!);
|
||||
for (const m of code.matchAll(/\b(?:tr|t)\(\s*"([A-Za-z]+)"/g))
|
||||
used.add(m[1]!);
|
||||
for (const m of code.matchAll(/\(\[((?:"[a-z]+",?\s*)+)\] as const\)/g))
|
||||
for (const k of m[1]!.matchAll(/"([a-z]+)"/g)) used.add(k[1]!);
|
||||
for (const key of Object.keys(en)) {
|
||||
|
|
@ -64,9 +65,7 @@ test("every translation key used in code exists and every key is used", async ()
|
|||
test("static HTML fallback text matches the Russian dictionary", async () => {
|
||||
const html = await text("public/index.html");
|
||||
const flat = (value: string) => value.replace(/\s+/g, " ").trim();
|
||||
for (const m of html.matchAll(
|
||||
/data-i18n="([A-Za-z]+)"[^>]*>([^<]*)</g,
|
||||
)) {
|
||||
for (const m of html.matchAll(/data-i18n="([A-Za-z]+)"[^>]*>([^<]*)</g)) {
|
||||
const key = m[1] as keyof typeof ru;
|
||||
assert.ok(key in ru, key);
|
||||
assert.equal(flat(m[2]!), flat(ru[key]), `fallback for ${key}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue