Add Domains to Administration

A role that can read domains now finds a Domains section beside Accounts:
list and search with each domain's account count and whether its DNS, DKIM
and certificate are managed automatically; add a domain; edit its
description, other names, catch-all address and plus addressing; copy its
DNS records one at a time or as a zone file; see its DKIM keys and their
stage; and remove it once no accounts use it.

The records come from the zone file Stalwart computes per domain. A long
DKIM record, which the BIND serialiser splits into quoted chunks, is joined
back into the single value a DNS provider's form wants.

Removing a domain takes its DKIM keys first, in the same request, because the
server will not remove a domain its keys still name. Removal is not offered
while accounts use the domain, or when the role cannot remove the keys.

The Administration nav is now built from the sections the role can read, and
the menu appears when there is at least one. The mock gains domains, DKIM
keys and zone files.

61 new strings, translated in all nine catalogues; strings falling back to
English stay at 16.
This commit is contained in:
2026-09-13 15:39:16 -07:00
parent d279fe8f90
commit 1dafb4bc79
23 changed files with 1783 additions and 30 deletions
+64
View File
@@ -43,6 +43,63 @@ import type { Catalog } from "@/lib/i18n";
*/
export const catalog: Catalog = {
strings: {
// ── Administration: domains ────────────────────────────────────
"Domains": "Домени",
"By hand": "Вручну",
"Signing": "Підписує",
"Published, not signing yet": "Опубліковано, ще не підписує",
"Retiring": "Виводиться з роботи",
"Retired": "Виведено з роботи",
"This domain no longer exists. Someone may have removed it.": "Цього домену більше немає. Можливо, його хтось видалив.",
"That doesn't look like a domain name, such as example.com.": "Це не схоже на ім'я домену на кшталт example.com.",
"Added {name}. Its DNS records are ready to copy.": "Домен {name} додано. Його DNS-записи готові до копіювання.",
"Saved {name}": "Домен {name} збережено",
"Add domain": "Додати домен",
"Added {date}": "Додано {date}",
"This domain is disabled on the server.": "Цей домен вимкнено на сервері.",
"Your role lets you view domains but not change them.": "Ваша роль дозволяє переглядати домени, але не змінювати їх.",
"New domains sign their mail with DKIM keys the server creates and rotates. Its DNS records appear here once it's added.": "Нові домени підписують пошту ключами DKIM, які сервер створює й змінює сам. DNS-записи з'являться тут після додавання домену.",
"Other names": "Інші імена",
"Delivery": "Доставлення",
"Catch-all address": "Адреса для всієї пошти",
"Mail to an address nobody has on this domain is delivered here. Leave it empty to refuse that mail.": "Сюди доставляються листи на адреси цього домену, яких ні в кого немає. Залиште порожнім, щоб відхиляти такі листи.",
"Plus addressing": "Адреси з «+»",
"Set by a custom rule on the server.": "Задано власним правилом на сервері.",
"Mail to name+anything@ is delivered to name@.": "Листи на ім'я+будь-що@ доставляються на ім'я@.",
"DNS records": "DNS-записи",
"Published automatically through {provider}.": "Публікуються автоматично через {provider}.",
"Published automatically by the server.": "Публікуються сервером автоматично.",
"Add these where this domain's DNS is hosted. Mail isn't delivered or trusted until they're in place.": "Додайте їх там, де розміщено DNS цього домену. Поки їх немає, пошта не доставляється й не вважається надійною.",
"Copy {type} record for {name}": "Скопіювати запис {type} для {name}",
"Copy value": "Скопіювати значення",
"Copied the zone file": "Файл зони скопійовано",
"Copy all as a zone file": "Скопіювати все як файл зони",
"The server returned no records for this domain.": "Сервер не повернув записів для цього домену.",
"DKIM keys": "Ключі DKIM",
"The server creates and rotates these keys itself.": "Сервер створює й змінює ці ключі сам.",
"These keys are managed by hand on the server.": "Цими ключами керують на сервері вручну.",
"No DKIM keys, so mail from this domain isn't signed and is more likely to be marked as spam.": "Ключів DKIM немає, тому пошта з цього домену не підписується й частіше потрапляє до спаму.",
"Managed by the server": "Керується сервером",
"Certificate": "Сертифікат",
"Another name for this domain": "Інше ім'я для цього домену",
"Mail to the same address at any of these names reaches the same account. Changes apply when you save.": "Листи на ту саму адресу під будь-яким із цих імен потрапляють до того самого облікового запису. Зміни наберуть чинності після збереження.",
"Its DKIM keys have to be removed first, and your role can't remove them.": "Спершу треба видалити його ключі DKIM, а ваша роль цього не дозволяє.",
"The server stops accepting mail for this domain.": "Сервер перестане приймати пошту для цього домену.",
"Remove domain…": "Видалити домен…",
"Remove {name}?": "Видалити {name}?",
"Removed {name}": "Домен {name} видалено",
"The server kept the domain: it is still used by {things}.": "Сервер зберіг домен: його ще використовують {things}.",
"Remove domain": "Видалити домен",
"The server stops accepting mail for this domain. This can't be undone.": "Сервер перестане приймати пошту для цього домену. Скасувати це неможливо.",
"Where your addresses live, and the DNS records that let mail arrive and be trusted.": "Де розміщено ваші адреси та DNS-записи, завдяки яким пошта доходить і викликає довіру.",
"Search domains": "Пошук доменів",
"No domains match": "Немає відповідних доменів",
"No domains yet": "Доменів ще немає",
"DKIM": "DKIM",
"Tenant": "Орендар",
"Disabled": "Вимкнено",
"also {names}": "також {names}",
"The server did not say whether the domain was created.": "Сервер не повідомив, чи створено домен.",
// ── Administration: accounts ───────────────────────────────────
"Change your own password in {settings}.": "Власний пароль можна змінити в розділі {settings}.",
"Administration": "Адміністрування",
@@ -1413,6 +1470,13 @@ export const catalog: Catalog = {
"no address": "немає адреси",
},
plurals: {
// ── Administration: domains ────────────────────────────────────
"{n} accounts use this domain. Move or delete them first.": { one: "Цей домен використовує {n} обліковий запис. Спершу перенесіть або видаліть його.", few: "Цей домен використовують {n} облікові записи. Спершу перенесіть або видаліть їх.", many: "Цей домен використовують {n} облікових записів. Спершу перенесіть або видаліть їх.", other: "Цей домен використовують {n} облікового запису. Спершу перенесіть або видаліть їх." },
"The server stops accepting mail for this domain, and its {n} DKIM keys are deleted. This can't be undone.": { one: "Сервер перестане приймати пошту для цього домену, і його {n} ключ DKIM буде видалено. Скасувати це неможливо.", few: "Сервер перестане приймати пошту для цього домену, і його {n} ключі DKIM буде видалено. Скасувати це неможливо.", many: "Сервер перестане приймати пошту для цього домену, і його {n} ключів DKIM буде видалено. Скасувати це неможливо.", other: "Сервер перестане приймати пошту для цього домену, і його {n} ключа DKIM буде видалено. Скасувати це неможливо." },
"{n} domains": { one: "{n} домен", few: "{n} домени", many: "{n} доменів", other: "{n} домену" },
"{n} mailing lists": { one: "{n} список розсилки", few: "{n} списки розсилки", many: "{n} списків розсилки", other: "{n} списку розсилки" },
"{n} DKIM keys": { one: "{n} ключ DKIM", few: "{n} ключі DKIM", many: "{n} ключів DKIM", other: "{n} ключа DKIM" },
"{n} other items": { one: "{n} інший об'єкт", few: "{n} інші об'єкти", many: "{n} інших об'єктів", other: "{n} іншого об'єкта" },
// ── Administration ────────────────────────────────────────────────
"{n} accounts": { one: "{n} обліковий запис", few: "{n} облікові записи", many: "{n} облікових записів", other: "{n} облікового запису" },
// ── Third pass ─────────────────────────────────────────────────────