Skip to content

Email for professionals and teams

Translate domain management

Hieu Nguyen (Jack)d554f84b376b
diff --git a/src/app/(admin)/domains/CloudflareReceivingConfig.tsx b/src/app/(admin)/domains/CloudflareReceivingConfig.tsx
index 4198bae..773e876 100644
--- a/src/app/(admin)/domains/CloudflareReceivingConfig.tsx
+++ b/src/app/(admin)/domains/CloudflareReceivingConfig.tsx
@@ -1,6 +1,7 @@
"use client";
import { useState } from "react";
+import { useLanguage } from "@/components/language-provider";
import { Button } from "@/components/ui/button";
import { runReceivingSetup } from "./api";
import { StatusRow } from "./status-row";
@@ -15,6 +16,7 @@ type Props = {
/** Email Routing status for the zone, with a setup that also deals with conflicting MX records. */
export default function CloudflareReceivingConfig({ domainId, routingOk, routingLabel, manual, onChanged }: Props) {
+ const { t } = useLanguage();
const [busy, setBusy] = useState(false);
const [error, setError] = useState("");
@@ -24,7 +26,7 @@ export default function CloudflareReceivingConfig({ domainId, routingOk, routing
try {
if (await runReceivingSetup(domainId, "cloudflare")) onChanged?.();
} catch (err) {
- setError(err instanceof Error ? err.message : "Setup failed");
+ setError(err instanceof Error ? err.message : t("domains.setupFailed"));
} finally { setBusy(false); }
}
@@ -33,11 +35,11 @@ export default function CloudflareReceivingConfig({ domainId, routingOk, routing
<ul className="space-y-2">
<StatusRow
ok={routingOk}
- title="Email Routing"
- hint="Routes incoming email to Mailflare"
+ title={t("domains.emailRouting")}
+ hint={t("domains.emailRoutingHint")}
action={!routingOk ? (
- <Button size="sm" variant="outline" className="bg-white" disabled={busy || manual} title={manual ? "DNS for this domain is managed manually" : undefined} onClick={() => void setup()}>
- {busy ? "Setting up…" : "Setup"}
+ <Button size="sm" variant="outline" className="bg-white" disabled={busy || manual} title={manual ? t("domains.manualDns") : undefined} onClick={() => void setup()}>
+ {busy ? t("domains.settingUp") : t("domains.setup")}
</Button>
) : undefined}
>
diff --git a/src/app/(admin)/domains/DomainDnsDetails.tsx b/src/app/(admin)/domains/DomainDnsDetails.tsx
index 743db79..c1ea05d 100644
--- a/src/app/(admin)/domains/DomainDnsDetails.tsx
+++ b/src/app/(admin)/domains/DomainDnsDetails.tsx
@@ -1,3 +1,4 @@
+import { useLanguage } from "@/components/language-provider";
import { Button } from "@/components/ui/button";
import { dnsAuthDescriptions, getDnsAuthItemClass } from "./utils";
import { ROW_GRID, StatusBadge, StatusRow } from "./status-row";
@@ -20,23 +21,24 @@ export default function DomainDnsDetails({
receivingProviderMessage,
onDnsChanged,
}: DomainDnsDetailsProps) {
+ const { t } = useLanguage();
const audit = dns.audit;
const manual = domain.zoneId === "manual";
const subdomain = dns.sendingSubdomain;
const sendingOk = subdomain ? dns.sendingEnabled : manual && domain.sendingEnabled;
const sendingLabel = subdomain
- ? `Sending for ${subdomain.name} is ${dns.sendingEnabled ? "enabled" : "disabled"}`
+ ? t("domains.sendingFor", { name: subdomain.name, state: dns.sendingEnabled ? t("domains.enabled") : t("domains.disabled") })
: manual
? domain.sendingEnabled
- ? "Email sending is configured"
- : "Email sending is not configured"
- : "Sending has not configured for this domain";
+ ? t("domains.sendingConfigured")
+ : t("domains.sendingNotConfigured")
+ : t("domains.sendingNotSet");
const routingOk = dns.routing.missing.length === 0 && (dns.routing.records.length > 0 || domain.routingEnabled);
const routingLabel = routingOk
- ? "Email routing is configured"
+ ? t("domains.routingConfigured")
: dns.routing.missing.length > 0
- ? `${dns.routing.missing.length} DNS record${dns.routing.missing.length === 1 ? "" : "s"} missing`
- : "No routing DNS records found";
+ ? t("domains.recordsMissing", { count: dns.routing.missing.length })
+ : t("domains.noRoutingRecords");
const auditRow = (record: DnsAuthRecord) => {
if (!audit) return null;
@@ -46,8 +48,8 @@ export default function DomainDnsDetails({
<li key={record} className={`${ROW_GRID} ${getDnsAuthItemClass(item.status)}`}>
<StatusBadge ok={ok} tone={item.status === "missing" ? "red" : "neutral"} />
<span className="min-w-0">
- <span className="block font-medium text-neutral-900">{item.label} record</span>
- <span className="block text-xs text-neutral-500">{dnsAuthDescriptions[record]}</span>
+ <span className="block font-medium text-neutral-900">{t("domains.recordLabel", { label: item.label })}</span>
+ <span className="block text-xs text-neutral-500">{t(dnsAuthDescriptions[record])}</span>
</span>
{ok ? (
<span className="min-w-0 break-all text-neutral-500">{item.found.length > 0 ? item.found.join(", ") : item.name}</span>
@@ -57,10 +59,10 @@ export default function DomainDnsDetails({
size="sm"
className="shrink-0 bg-white"
disabled={manual || setupRecord === record}
- title={manual ? "DNS for this domain is managed manually" : `Create the ${item.label} record`}
+ title={manual ? t("domains.manualDns") : t("domains.createRecord", { label: item.label })}
onClick={() => onSetup?.(record)}
>
- {setupRecord === record ? "Setting up..." : "Setup"}
+ {setupRecord === record ? t("domains.settingUp") : t("domains.setup")}
</Button>
)}
</li>
@@ -69,7 +71,7 @@ export default function DomainDnsDetails({
const cloudflareConfig = (
<ul className="space-y-2">
- <StatusRow ok={!!sendingOk} title="Email Sending" hint="Sends outgoing email from this domain">{sendingLabel}</StatusRow>
+ <StatusRow ok={!!sendingOk} title={t("domains.emailSending")} hint={t("domains.emailSendingHint")}>{sendingLabel}</StatusRow>
{auditRow("dkim")}
</ul>
);
@@ -82,17 +84,16 @@ export default function DomainDnsDetails({
<div className="px-4 pb-4 pt-4 sm:px-5 sm:pb-5">
{audit && (
<section>
- <h2 className="text-base font-semibold text-neutral-900">Domain setup</h2>
+ <h2 className="text-base font-semibold text-neutral-900">{t("domains.setupTitle")}</h2>
<p className="mt-0.5 text-sm text-neutral-500">
- Review the DNS authentication that keeps mail deliverable, whichever services send and receive it.
+ {t("domains.setupDescription")}
</p>
<ul className="mt-3 space-y-2">
{(["mx", "spf", "dmarc"] as DnsAuthRecord[]).map(auditRow)}
</ul>
{manual && (
<p className="text-xs text-neutral-500">
- DNS is managed manually for this domain, so records must be created
- where the domain&apos;s nameservers are hosted.
+ {t("domains.manualDnsNote")}
</p>
)}
{setupMessage && <p className="text-xs text-red-600">{setupMessage}</p>}
diff --git a/src/app/(admin)/domains/DomainItemCard.tsx b/src/app/(admin)/domains/DomainItemCard.tsx
index 8ccac2c..a3aa365 100644
--- a/src/app/(admin)/domains/DomainItemCard.tsx
+++ b/src/app/(admin)/domains/DomainItemCard.tsx
@@ -1,4 +1,5 @@
import { Fragment } from "react";
+import { useLanguage } from "@/components/language-provider";
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
import { Button } from "@/components/ui/button";
import { Badge } from "@/components/ui/badge";
@@ -43,6 +44,7 @@ export default function DomainItemCard({
setupRecord,
setupMessage,
}: DomainItemCardProps) {
+ const { t } = useLanguage();
const auth = dns?.auth;
return (
@@ -69,7 +71,7 @@ export default function DomainItemCard({
className="gap-1"
>
<StatusIcon ok={item.status === "active"} className="h-3 w-3" />
- {item.status}
+ {item.status === "active" ? t("dns.status.active") : item.status === "pending" ? t("dns.status.pending") : item.status}
</Badge>
{item.receivingProvider === "cloudflare" ? (
<Badge
@@ -77,25 +79,25 @@ export default function DomainItemCard({
className={cn("gap-1", !item.routingEnabled && "opacity-50")}
>
<StatusIcon ok={item.routingEnabled} className="h-3 w-3" />
- routing
+ {t("domains.badge.routing")}
</Badge>
) : item.receivingProvider === "none" ? (
<Badge variant="secondary" className="gap-1 opacity-50">
- sending only
+ {t("domains.badge.sendingOnly")}
</Badge>
) : (
<Badge variant="outline" className="gap-1">
- receiving via {item.receivingProvider === "ses" ? "Amazon SES" : "Resend"}
+ {t("domains.badge.receivingVia", { provider: item.receivingProvider === "ses" ? "Amazon SES" : "Resend" })}
</Badge>
)}
{item.sendingProvider === "resend" || item.sendingProvider === "ses" ? (
<Badge variant="outline" className="gap-1">
<StatusIcon ok className="h-3 w-3" />
- sending via {item.sendingProvider === "ses" ? "Amazon SES" : "Resend"}
+ {t("domains.badge.sendingVia", { provider: item.sendingProvider === "ses" ? "Amazon SES" : "Resend" })}
</Badge>
) : item.sendingProvider === "none" ? (
<Badge variant="secondary" className="gap-1 opacity-50">
- receiving only
+ {t("domains.badge.receivingOnly")}
</Badge>
) : (
<Badge
@@ -103,7 +105,7 @@ export default function DomainItemCard({
className={cn("gap-1", !item.sendingEnabled && "opacity-50")}
>
<StatusIcon ok={item.sendingEnabled} className="h-3 w-3" />
- sending
+ {t("domains.badge.sending")}
</Badge>
)}
</div>
@@ -115,7 +117,7 @@ export default function DomainItemCard({
{index > 0 && <span className="text-neutral-300">|</span>}
<span
className="flex items-center gap-1 text-neutral-500"
- title={`${record.toUpperCase()} · ${getDnsAuthStatusLabel(auth[record])}`}
+ title={`${record.toUpperCase()} · ${getDnsAuthStatusLabel(auth[record], t)}`}
>
<span className="uppercase">{record}</span>
<StatusIcon
@@ -132,11 +134,11 @@ export default function DomainItemCard({
>
{expanded ? (
<>
- Hide details <ChevronRight className="h-3 w-3" />
+ {t("domains.hideDetails")} <ChevronRight className="h-3 w-3" />
</>
) : (
<>
- Show details <ChevronDown className="h-3 w-3" />
+ {t("domains.showDetails")} <ChevronDown className="h-3 w-3" />
</>
)}
</button>
@@ -175,7 +177,7 @@ export default function DomainItemCard({
size="sm"
className="absolute right-4 top-4 h-8 w-8 p-0"
disabled={remove.isPending}
- aria-label={`Actions for ${item.hostname}`}
+ aria-label={t("domains.actionsFor", { host: item.hostname })}
>
<MoreVertical className="h-4 w-4" />
</Button>
@@ -191,16 +193,14 @@ export default function DomainItemCard({
onSelect={() => {
// Removing a domain deletes its mailboxes (and all their mail)
// and disables Email Routing on the zone, so require the hostname.
- const typed = window.prompt(
- `Remove ${item.hostname}? This permanently deletes every mailbox on this domain, including all their messages, and turns off Email Routing for the zone.\n\nType ${item.hostname} to confirm.`,
- );
+ const typed = window.prompt(t("domains.removeConfirm", { host: item.hostname }));
if (typed?.trim().toLowerCase() !== item.hostname.toLowerCase()) return;
remove.mutate(item.id);
}}
className="flex cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-red-600 outline-none hover:bg-red-50 focus:bg-red-50 data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
>
<Trash2 className="h-4 w-4" />
- Remove domain
+ {t("domains.removeDomain")}
</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu.Portal>
diff --git a/src/app/(admin)/domains/ProviderCard.tsx b/src/app/(admin)/domains/ProviderCard.tsx
index 1423aba..7735974 100644
--- a/src/app/(admin)/domains/ProviderCard.tsx
+++ b/src/app/(admin)/domains/ProviderCard.tsx
@@ -1,5 +1,6 @@
import type { ReactNode } from "react";
import { AlertTriangle, Check } from "lucide-react";
+import { useLanguage } from "@/components/language-provider";
import { Button } from "@/components/ui/button";
import { Switch } from "@/components/ui/switch";
@@ -19,12 +20,13 @@ type Props = {
/** One selectable provider: icon-left header with a switch, its config when on, a clean-up bar when off but configured. */
export default function ProviderCard({ title, description, ok, selected, disabled, onToggle, children, cleanup }: Props) {
+ const { t } = useLanguage();
return (
<li className="rounded-xl bg-neutral-50 px-4 py-3 text-sm">
<div className="flex items-center justify-between gap-3">
{ok !== null && (ok
- ? <span title="Set up" className="flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-green-600 text-white"><Check className="h-4 w-4" /></span>
- : <span title="Needs setup" className="flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-amber-100"><AlertTriangle className="h-4 w-4 text-amber-600" /></span>)}
+ ? <span title={t("domains.setUp")} className="flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-green-600 text-white"><Check className="h-4 w-4" /></span>
+ : <span title={t("domains.needsSetup")} className="flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-amber-100"><AlertTriangle className="h-4 w-4 text-amber-600" /></span>)}
<span className="min-w-0 flex-1">
<span className="block font-medium text-neutral-900">{title}</span>
<span className="block text-xs text-neutral-500">{description}</span>
@@ -34,9 +36,9 @@ export default function ProviderCard({ title, description, ok, selected, disable
{selected && children && <div className="mt-3 border-t border-neutral-200 pt-3">{children}</div>}
{!selected && cleanup?.present && (
<div className="mt-3 flex flex-wrap items-center justify-between gap-2 border-t border-neutral-200 pt-3 text-xs text-neutral-500">
- <span>{title} is still set up for this domain but not used.</span>
+ <span>{t("domains.stillSetUp", { title })}</span>
<Button size="sm" variant="outline" className="bg-white" disabled={cleanup.busy || cleanup.disabled} onClick={cleanup.onClick}>
- {cleanup.busy ? "Removing…" : "Clean up"}
+ {cleanup.busy ? t("domains.removing") : t("domains.cleanUp")}
</Button>
</div>
)}
diff --git a/src/app/(admin)/domains/ReceivingProviderConfig.tsx b/src/app/(admin)/domains/ReceivingProviderConfig.tsx
index 98d0ad3..3e2734a 100644
--- a/src/app/(admin)/domains/ReceivingProviderConfig.tsx
+++ b/src/app/(admin)/domains/ReceivingProviderConfig.tsx
@@ -1,6 +1,7 @@
"use client";
import { useCallback, useEffect, useState } from "react";
+import { useLanguage } from "@/components/language-provider";
import { Button } from "@/components/ui/button";
import type { ReceivingStep } from "@/lib/aws/ses-receiving-types";
import AwsCredentialsPanel from "./AwsCredentialsPanel";
@@ -22,12 +23,13 @@ type Props = {
};
const COPY = {
- resend: { setup: "Setup receiving", hint: "Enables receiving on the domain, points MX at Resend and registers the webhook." },
- ses: { setup: "Setup receiving", hint: "Creates the S3 bucket, SNS topic and receipt rule, then points MX at SES." },
+ resend: { hint: "domains.resendReceivingHint" },
+ ses: { hint: "domains.sesReceivingHint" },
} as const;
/** Checklist and setup button for receiving through Resend or Amazon SES. */
export default function ReceivingProviderConfig({ domainId, provider, onReady }: Props) {
+ const { t } = useLanguage();
const [credentials, setCredentials] = useState<boolean | null>(null);
const [view, setView] = useState<ViewResponse["view"]>(null);
const [loading, setLoading] = useState(true);
@@ -47,7 +49,7 @@ export default function ReceivingProviderConfig({ domainId, provider, onReady }:
setView(data.view ?? null);
setError(data.error ?? "");
})
- .catch((err) => { if (active) setError(err instanceof Error ? err.message : "Could not reach the provider"); })
+ .catch((err) => { if (active) setError(err instanceof Error ? err.message : t("domains.providerUnreachable")); })
.finally(() => { if (active) setLoading(false); });
return () => { active = false; };
}, [domainId, provider, reload]);
@@ -62,10 +64,10 @@ export default function ReceivingProviderConfig({ domainId, provider, onReady }:
setNotice("");
try {
const done = await runReceivingSetup(domainId, provider);
- if (done) setNotice("Setup finished. It can take a few minutes for DNS to propagate; use Check again to refresh.");
+ if (done) setNotice(t("domains.setupFinished"));
refresh();
} catch (err) {
- setError(err instanceof Error ? err.message : "Setup failed");
+ setError(err instanceof Error ? err.message : t("domains.setupFailed"));
} finally { setBusy(false); }
}
@@ -81,19 +83,19 @@ export default function ReceivingProviderConfig({ domainId, provider, onReady }:
)}
{credentials && (
<ul className="space-y-2">
- {loading && !view && <li className="list-none text-sm text-neutral-500">Checking…</li>}
+ {loading && !view && <li className="list-none text-sm text-neutral-500">{t("domains.checking")}</li>}
{view?.steps.filter((step) => provider !== "resend" || step.key !== "key").map((step) => (
- <StatusRow key={step.key} ok={step.ok} title={step.label} hint="">{step.detail ?? (step.ok ? "OK" : "Not set up")}</StatusRow>
+ <StatusRow key={step.key} ok={step.ok} title={step.label} hint="">{step.detail ?? (step.ok ? t("domains.ok") : t("domains.notSetUp"))}</StatusRow>
))}
</ul>
)}
- {credentials && view?.restrictedKey && <p className="text-xs text-neutral-500">This Resend key can only send mail, so Mailflare can&apos;t set up receiving. Use a full-access key, or enable receiving, add the MX record and create the <code>email.received</code> webhook in the Resend dashboard.</p>}
+ {credentials && view?.restrictedKey && <p className="text-xs text-neutral-500">{t("domains.restrictedKey", { webhook: "\u0001" }).split("\u0001").flatMap((part, index) => index === 0 ? [part] : [<code key={index}>email.received</code>, part])}</p>}
{credentials && !view?.restrictedKey && (
<div className="flex flex-wrap items-center justify-between gap-2">
- <p className="text-xs text-neutral-500">{COPY[provider].hint}</p>
+ <p className="text-xs text-neutral-500">{t(COPY[provider].hint)}</p>
<span className="flex gap-2">
- <Button size="sm" variant="outline" className="bg-white" disabled={busy || loading} onClick={refresh}>{loading ? "Checking…" : "Check again"}</Button>
- {needsSetup && <Button size="sm" disabled={busy || loading} onClick={() => void setup()}>{busy ? "Working…" : COPY[provider].setup}</Button>}
+ <Button size="sm" variant="outline" className="bg-white" disabled={busy || loading} onClick={refresh}>{loading ? t("domains.checking") : t("domains.checkAgain")}</Button>
+ {needsSetup && <Button size="sm" disabled={busy || loading} onClick={() => void setup()}>{busy ? t("domains.working") : t("domains.setupReceivingButton")}</Button>}
</span>
</div>
)}
diff --git a/src/app/(admin)/domains/ReceivingSetupSection.tsx b/src/app/(admin)/domains/ReceivingSetupSection.tsx
index e70f43e..fa067d9 100644
--- a/src/app/(admin)/domains/ReceivingSetupSection.tsx
+++ b/src/app/(admin)/domains/ReceivingSetupSection.tsx
@@ -1,6 +1,8 @@
"use client";
import { useEffect, useState, type ReactNode } from "react";
+import { useLanguage } from "@/components/language-provider";
+import type { TranslationKey } from "@/lib/i18n/types";
import { requestJson } from "./api";
import ProviderCard from "./ProviderCard";
import ReceivingProviderConfig from "./ReceivingProviderConfig";
@@ -9,10 +11,10 @@ import type { Domain, ReceivingProvider } from "./types";
type Option = Exclude<ReceivingProvider, "none">;
type Present = Record<Option, boolean | null>;
-const OPTIONS: { id: Option; title: string; description: string }[] = [
- { id: "cloudflare", title: "Cloudflare Email Routing", description: "Mail arrives through this domain's Cloudflare zone. The default." },
- { id: "resend", title: "Resend", description: "Resend receives mail and delivers it to Mailflare by webhook." },
- { id: "ses", title: "Amazon SES", description: "SES receives mail into S3 and notifies Mailflare." },
+const OPTIONS: { id: Option; titleKey: TranslationKey; descriptionKey: TranslationKey }[] = [
+ { id: "cloudflare", titleKey: "domains.opt.cfRouting", descriptionKey: "domains.opt.cfRoutingDesc" },
+ { id: "resend", titleKey: "domains.providerResend", descriptionKey: "domains.opt.resendReceiveDesc" },
+ { id: "ses", titleKey: "domains.providerSes", descriptionKey: "domains.opt.sesReceiveDesc" },
];
type Props = {
@@ -26,6 +28,7 @@ type Props = {
};
export default function ReceivingSetupSection({ domain, onChange, busy, message, cloudflareConfig, cloudflareOk }: Props) {
+ const { t } = useLanguage();
const [present, setPresent] = useState<Present>({ cloudflare: null, resend: null, ses: null });
const [ready, setReady] = useState<Record<"resend" | "ses", boolean | null>>({ resend: null, ses: null });
const [reload, setReload] = useState(0);
@@ -41,22 +44,22 @@ export default function ReceivingSetupSection({ domain, onChange, busy, message,
}, [domain.id, domain.receivingProvider, reload]);
async function cleanUp(option: Option, title: string) {
- if (!window.confirm(`Remove the ${title} receiving setup for ${domain.hostname}? This deletes its MX record and routing, so mail will not arrive through it.`)) return;
+ if (!window.confirm(t("domains.removeReceivingConfirm", { title, host: domain.hostname }))) return;
setRemoving(option);
setError("");
try {
await requestJson(`/api/domains/${domain.id}/receiving`, "DELETE", { target: option });
setReload((value) => value + 1);
} catch (err) {
- setError(err instanceof Error ? err.message : "Could not remove configuration");
+ setError(err instanceof Error ? err.message : t("domains.removeConfigFailed"));
} finally { setRemoving(null); }
}
return (
<section className="mt-6">
- <h2 className="text-base font-semibold text-neutral-900">Setup receiving email</h2>
+ <h2 className="text-base font-semibold text-neutral-900">{t("domains.setupReceiving")}</h2>
<p className="mt-0.5 text-sm text-neutral-500">
- Choose what receives mail for this domain. Only one service can own the MX record; setting up another asks before replacing it.
+ {t("domains.setupReceivingDescription")}
</p>
<ul className="mt-3 space-y-2">
{OPTIONS.map((option) => {
@@ -65,13 +68,13 @@ export default function ReceivingSetupSection({ domain, onChange, busy, message,
return (
<ProviderCard
key={option.id}
- title={option.title}
- description={option.description}
+ title={t(option.titleKey)}
+ description={t(option.descriptionKey)}
ok={ok}
selected={selected}
disabled={busy}
onToggle={(on) => onChange?.(on ? option.id : "none")}
- cleanup={{ present: !!present[option.id], busy: removing === option.id, disabled: removing !== null, onClick: () => void cleanUp(option.id, option.title) }}
+ cleanup={{ present: !!present[option.id], busy: removing === option.id, disabled: removing !== null, onClick: () => void cleanUp(option.id, t(option.titleKey)) }}
>
{option.id === "cloudflare"
? cloudflareConfig
@@ -80,7 +83,7 @@ export default function ReceivingSetupSection({ domain, onChange, busy, message,
);
})}
</ul>
- {domain.receivingProvider === "none" && <p className="mt-2 text-xs text-neutral-500">No receiving service selected: this domain only sends.</p>}
+ {domain.receivingProvider === "none" && <p className="mt-2 text-xs text-neutral-500">{t("domains.noReceiving")}</p>}
{message && <p className="mt-2 text-xs text-red-600">{message}</p>}
{error && <p role="alert" className="mt-2 text-xs text-red-600">{error}</p>}
</section>
diff --git a/src/app/(admin)/domains/SendingSetupSection.tsx b/src/app/(admin)/domains/SendingSetupSection.tsx
index 64ccf7b..402f53d 100644
--- a/src/app/(admin)/domains/SendingSetupSection.tsx
+++ b/src/app/(admin)/domains/SendingSetupSection.tsx
@@ -1,6 +1,8 @@
"use client";
import { useEffect, useState, type ReactNode } from "react";
+import { useLanguage } from "@/components/language-provider";
+import type { TranslationKey } from "@/lib/i18n/types";
import { requestJson } from "./api";
import ProviderCard from "./ProviderCard";
import ResendDomainSection from "./ResendDomainSection";
@@ -10,10 +12,10 @@ import type { Domain, SendingProvider } from "./types";
type Option = Exclude<SendingProvider, "none">;
type Present = Record<Option, boolean | null>;
-const OPTIONS: { id: Option; title: string; description: string }[] = [
- { id: "cloudflare", title: "Cloudflare Email", description: "Cloudflare Email Sending. Configured on this domain's zone." },
- { id: "resend", title: "Resend", description: "Send through your Resend account." },
- { id: "ses", title: "Amazon SES", description: "Send through your AWS account with SES." },
+const OPTIONS: { id: Option; titleKey: TranslationKey; descriptionKey: TranslationKey }[] = [
+ { id: "cloudflare", titleKey: "domains.opt.cfEmail", descriptionKey: "domains.opt.cfSendDesc" },
+ { id: "resend", titleKey: "domains.providerResend", descriptionKey: "domains.opt.resendSendDesc" },
+ { id: "ses", titleKey: "domains.providerSes", descriptionKey: "domains.opt.sesSendDesc" },
];
type Props = {
@@ -30,6 +32,7 @@ type Props = {
type PresenceResponse = Partial<Present> & { resendStatus?: string | null; sesVerified?: boolean | null };
export default function SendingSetupSection({ domain, onChange, busy, message, cloudflareConfig, cloudflareOk }: Props) {
+ const { t } = useLanguage();
const [present, setPresent] = useState<Present>({ cloudflare: null, resend: null, ses: null });
const [resendStatus, setResendStatus] = useState<string | null>(null);
const [sesStatus, setSesStatus] = useState<string | null>(null);
@@ -51,14 +54,14 @@ export default function SendingSetupSection({ domain, onChange, busy, message, c
}, [domain.id, domain.sendingProvider, reload]);
async function cleanUp(option: Option, title: string) {
- if (!window.confirm(`Remove the ${title} setup for ${domain.hostname}? This deletes its DNS records.`)) return;
+ if (!window.confirm(t("domains.removeSendingConfirm", { title, host: domain.hostname }))) return;
setRemoving(option);
setError("");
try {
await requestJson(`/api/domains/${domain.id}/sending`, "DELETE", { target: option });
setReload((value) => value + 1);
} catch (err) {
- setError(err instanceof Error ? err.message : "Could not remove configuration");
+ setError(err instanceof Error ? err.message : t("domains.removeConfigFailed"));
} finally { setRemoving(null); }
}
@@ -70,9 +73,9 @@ export default function SendingSetupSection({ domain, onChange, busy, message, c
return (
<section className="mt-6">
- <h2 className="text-base font-semibold text-neutral-900">Setup sending email</h2>
+ <h2 className="text-base font-semibold text-neutral-900">{t("domains.setupSending")}</h2>
<p className="mt-0.5 text-sm text-neutral-500">
- {domain.sendingProvider === "none" ? "This domain only receives mail. Turn on one option to send from it." : "Choose what sends outgoing mail from this domain. Receiving is not affected."}
+ {domain.sendingProvider === "none" ? t("domains.sendingNone") : t("domains.sendingChoose")}
</p>
<ul className="mt-3 space-y-2">
{OPTIONS.map((option) => {
@@ -80,13 +83,13 @@ export default function SendingSetupSection({ domain, onChange, busy, message, c
return (
<ProviderCard
key={option.id}
- title={option.title}
- description={option.description}
+ title={t(option.titleKey)}
+ description={t(option.descriptionKey)}
ok={selected || present[option.id] ? okFor(option.id) : null}
selected={selected}
disabled={busy}
onToggle={(on) => onChange?.(on ? option.id : "none")}
- cleanup={{ present: !!present[option.id], busy: removing === option.id, disabled: removing !== null, onClick: () => void cleanUp(option.id, option.title) }}
+ cleanup={{ present: !!present[option.id], busy: removing === option.id, disabled: removing !== null, onClick: () => void cleanUp(option.id, t(option.titleKey)) }}
>
{option.id === "cloudflare" ? cloudflareConfig
: option.id === "resend" ? <ResendDomainSection domainId={domain.id} onStatus={setResendStatus} />
diff --git a/src/app/(admin)/domains/api.ts b/src/app/(admin)/domains/api.ts
index 6e8305c..422a8c7 100644
--- a/src/app/(admin)/domains/api.ts
+++ b/src/app/(admin)/domains/api.ts
@@ -1,3 +1,4 @@
+import { defaultTranslator } from "@/lib/i18n/utils";
import { authFetch } from "@/lib/auth/client";
export async function requestJson<T>(url: string, method: string, body?: unknown): Promise<T> {
@@ -8,7 +9,7 @@ export async function requestJson<T>(url: string, method: string, body?: unknown
cache: "no-store",
});
const data = (await response.json()) as T & { error?: string };
- if (!response.ok) throw new Error(data.error ?? "Request failed");
+ if (!response.ok) throw new Error(data.error ?? defaultTranslator("domains.requestFailed"));
return data;
}
@@ -42,6 +43,6 @@ export async function runReceivingSetup(domainId: string, provider: "cloudflare"
if (!confirmMxReplacement(response, data)) return false;
({ response, data } = await call(true));
}
- if (!response.ok) throw new Error(data.error ?? "Setup failed");
+ if (!response.ok) throw new Error(data.error ?? defaultTranslator("domains.setupFailed"));
return true;
}
diff --git a/src/app/(admin)/domains/page.tsx b/src/app/(admin)/domains/page.tsx
index 92ebff5..5c87ebe 100644
--- a/src/app/(admin)/domains/page.tsx
+++ b/src/app/(admin)/domains/page.tsx
@@ -3,6 +3,7 @@
import { mobilePrimaryActionClass } from "@/components/page-header-utils";
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { useRef, useState } from "react";
+import { useLanguage } from "@/components/language-provider";
import { Button } from "@/components/ui/button";
import {
Dialog,
@@ -24,6 +25,7 @@ import { checkDomain } from "./utils";
import { confirmMxReplacement } from "./api";
export default function DomainsPage() {
+ const { t } = useLanguage();
const qc = useQueryClient();
const [hostname, setHostname] = useState("");
// Self-hosted installs without Cloudflare credentials manage DNS by hand.
@@ -64,12 +66,12 @@ export default function DomainsPage() {
if (checkedDomain?.hostname !== normalized) {
const result = await checkDomain(normalized);
if (!result.ok || !result.domain) {
- throw new Error(result.error ?? "Domain check failed");
+ throw new Error(result.error ?? t("onboarding.domainCheckFailed"));
}
checkedDomain = result.domain;
setDomainCheck(result.domain);
}
- if (!checkedDomain) throw new Error("Domain check failed");
+ if (!checkedDomain) throw new Error(t("onboarding.domainCheckFailed"));
const res = await authFetch("/api/domains", {
method: "POST",
@@ -82,7 +84,7 @@ export default function DomainsPage() {
}),
});
const json = (await res.json()) as { error?: string };
- if (!res.ok) throw new Error(json.error ?? "Failed");
+ if (!res.ok) throw new Error(json.error ?? t("mailboxes.failed"));
return json;
},
onSuccess: () => {
@@ -99,7 +101,7 @@ export default function DomainsPage() {
const remove = useMutation({
mutationFn: async (id: string) => {
const res = await authFetch(`/api/domains/${id}`, { method: "DELETE" });
- if (!res.ok) throw new Error("Failed to remove");
+ if (!res.ok) throw new Error(t("domains.removeFailed"));
},
onSuccess: () => qc.invalidateQueries({ queryKey: ["domains"] }),
});
@@ -112,7 +114,7 @@ export default function DomainsPage() {
error?: string;
};
if (!res.ok || !json.domain || !json.dns) {
- throw new Error(json.error ?? "Failed to load DNS");
+ throw new Error(json.error ?? t("domains.dnsLoadFailed"));
}
const loadedView = { domain: json.domain, dns: json.dns };
setDnsViews((current) => ({ ...current, [id]: loadedView }));
@@ -143,7 +145,7 @@ export default function DomainsPage() {
await loadDns(id);
} catch (error) {
if (expandedIdRef.current === id) {
- setDnsError(error instanceof Error ? error.message : "Failed to load DNS");
+ setDnsError(error instanceof Error ? error.message : t("domains.dnsLoadFailed"));
}
} finally {
if (expandedIdRef.current === id) setDnsLoading(false);
@@ -170,12 +172,12 @@ export default function DomainsPage() {
let { res, json } = await put(false);
// Cloudflare sending refuses while another service's MX records exist.
if (confirmMxReplacement(res, json)) ({ res, json } = await put(true));
- if (!res.ok) throw new Error(json.error ?? "Failed to change sending provider");
+ if (!res.ok) throw new Error(json.error ?? t("domains.sendingChangeFailed"));
if (json.warning) setSendingMessage(json.warning);
await loadDns(id);
qc.invalidateQueries({ queryKey: ["domains"] });
} catch (error) {
- setSendingMessage(error instanceof Error ? error.message : "Failed to change sending provider");
+ setSendingMessage(error instanceof Error ? error.message : t("domains.sendingChangeFailed"));
} finally {
setSendingBusy(false);
}
@@ -196,11 +198,11 @@ export default function DomainsPage() {
body: JSON.stringify({ provider }),
});
const json = (await res.json()) as { error?: string };
- if (!res.ok) throw new Error(json.error ?? "Failed to change receiving provider");
+ if (!res.ok) throw new Error(json.error ?? t("domains.receivingChangeFailed"));
await loadDns(id);
qc.invalidateQueries({ queryKey: ["domains"] });
} catch (error) {
- setReceivingMessage(error instanceof Error ? error.message : "Failed to change receiving provider");
+ setReceivingMessage(error instanceof Error ? error.message : t("domains.receivingChangeFailed"));
} finally {
setReceivingBusy(false);
}
@@ -238,7 +240,7 @@ export default function DomainsPage() {
};
let { res, json } = await post(false);
if (confirmMxReplacement(res, json)) ({ res, json } = await post(true));
- if (!res.ok) throw new Error(json.error ?? "Failed to set up DNS record");
+ if (!res.ok) throw new Error(json.error ?? t("domains.dnsSetupFailed"));
if (json.domain && json.dns) {
const updatedView = { domain: json.domain, dns: json.dns };
setDnsViews((current) => ({
@@ -248,7 +250,7 @@ export default function DomainsPage() {
} else await loadDns(dnsView.domain.id);
qc.invalidateQueries({ queryKey: ["domains"] });
} catch (error) {
- setSetupMessage(error instanceof Error ? error.message : "Failed to set up DNS record");
+ setSetupMessage(error instanceof Error ? error.message : t("domains.dnsSetupFailed"));
} finally {
setSetupRecord(null);
}
@@ -264,7 +266,7 @@ export default function DomainsPage() {
setDomainChecking(false);
if (!result.ok || !result.domain) {
setDomainCheck(null);
- setDomainCheckError(result.error ?? "Domain check failed");
+ setDomainCheckError(result.error ?? t("onboarding.domainCheckFailed"));
return;
}
@@ -275,31 +277,30 @@ export default function DomainsPage() {
<div className="space-y-6">
<div className="flex items-center justify-between gap-4">
<div>
- <h1 className="text-2xl md:text-3xl font-medium">Domains</h1>
+ <h1 className="text-2xl md:text-3xl font-medium">{t("domains.title")}</h1>
<p className="mt-1 text-sm text-neutral-500">
{managesDns
- ? "Domains must be on your Cloudflare account, which manages their DNS. Choose per domain whether Cloudflare, Resend or Amazon SES receives and sends its mail."
- : "Add the domains this server receives mail for. Open DNS on a domain to see the MX, SPF and DMARC records to create."}
+ ? t("domains.descriptionManaged")
+ : t("domains.descriptionManual")}
</p>
</div>
<Dialog open={createOpen} onOpenChange={setCreateOpen}>
<DialogTrigger asChild>
<Button className={mobilePrimaryActionClass}>
<Plus className="h-4 w-4" />
- New domain
+ {t("domains.new")}
</Button>
</DialogTrigger>
<DialogContent>
<DialogHeader>
- <DialogTitle>Add domain</DialogTitle>
+ <DialogTitle>{t("domains.addTitle")}</DialogTitle>
<DialogDescription>
- Connect a Cloudflare zone, then choose which service receives
- its mail and whether Mailflare should provision Email Sending.
+ {t("domains.addDescription")}
</DialogDescription>
</DialogHeader>
<div className="space-y-4">
<div className="space-y-2">
- <Label htmlFor="hostname">Hostname</Label>
+ <Label htmlFor="hostname">{t("domains.hostname")}</Label>
<Input
id="hostname"
value={hostname}
@@ -315,13 +316,13 @@ export default function DomainsPage() {
</div>
<div className="flex items-center justify-between gap-4 rounded-xl bg-neutral-50 px-4 py-3">
<div>
- <Label htmlFor="receiving-provider">Receive mail with</Label>
+ <Label htmlFor="receiving-provider">{t("domains.receiveWith")}</Label>
<p className="mt-1 text-xs leading-5 text-neutral-500">
{receivingProvider === "cloudflare"
- ? "Cloudflare Email Routing is enabled on the zone."
+ ? t("domains.receiveHintCloudflare")
: receivingProvider === "none"
- ? "The domain only sends. Add a receiving service later."
- : "Add your credentials and set it up from the domain page after adding."}
+ ? t("domains.receiveHintNone")
+ : t("domains.providerHintLater")}
</p>
</div>
<select
@@ -330,23 +331,23 @@ export default function DomainsPage() {
onChange={(e) => setReceivingProvider(e.target.value as ReceivingProvider)}
className="h-9 shrink-0 rounded-md border border-neutral-200 bg-white px-3 text-sm"
>
- <option value="cloudflare">Cloudflare Email Routing</option>
+ <option value="cloudflare">{t("domains.cloudflareRouting")}</option>
<option value="resend">Resend</option>
<option value="ses">Amazon SES</option>
- <option value="none">Not selected</option>
+ <option value="none">{t("domains.notSelected")}</option>
</select>
</div>
<div className="flex items-center justify-between gap-4 rounded-xl bg-neutral-50 px-4 py-3">
<div>
- <Label htmlFor="sending-provider">Send mail with</Label>
+ <Label htmlFor="sending-provider">{t("domains.sendWith")}</Label>
<p className="mt-1 text-xs leading-5 text-neutral-500">
{domainChecking
- ? "Checking Cloudflare access..."
+ ? t("setup.checkingCloudflare")
: sendingProvider === "cloudflare"
- ? "Cloudflare Email Sending is enabled on the zone."
+ ? t("domains.sendHintCloudflare")
: sendingProvider === "none"
- ? "Receive-only mode. Add a sending service later."
- : "Add your credentials and set it up from the domain page after adding."}
+ ? t("domains.sendHintNone")
+ : t("domains.providerHintLater")}
</p>
</div>
{domainChecking && <LoaderCircle className="h-4 w-4 shrink-0 animate-spin text-neutral-500" />}
@@ -356,16 +357,16 @@ export default function DomainsPage() {
onChange={(e) => setSendingProvider(e.target.value as SendingProvider)}
className="h-9 shrink-0 rounded-md border border-neutral-200 bg-white px-3 text-sm"
>
- <option value="cloudflare">Cloudflare Email Sending</option>
+ <option value="cloudflare">{t("domains.cloudflareSending")}</option>
<option value="resend">Resend</option>
<option value="ses">Amazon SES</option>
- <option value="none">Not selected</option>
+ <option value="none">{t("domains.notSelected")}</option>
</select>
</div>
{domainCheck && (
<div className="flex items-center gap-3 rounded-xl bg-green-50 px-4 py-3 text-sm text-green-700">
<CheckCircle2 className="h-4 w-4" />
- Domain found in Cloudflare as {domainCheck.zone.name}
+ {t("setup.domainFound", { zone: domainCheck.zone.name })}
</div>
)}
{domainCheckError && (
@@ -378,16 +379,14 @@ export default function DomainsPage() {
<p>{(create.error as Error).message}</p>
<div className="space-y-2">
<p className="font-medium">
- Check that your Cloudflare API token has these permissions:
+ {t("domains.tokenPermissions")}
</p>
<ul className="list-disc space-y-1 pl-5">
<li>
- All accounts — DNS Settings:Edit, Email Routing
- Addresses:Edit; Email Sending:Edit for outbound mail
+ {t("domains.tokenAccounts")}
</li>
<li>
- All zones — DNS Settings:Edit, Email Routing Rules:Edit,
- Zone Settings:Edit, DNS:Edit
+ {t("domains.tokenZones")}
</li>
</ul>
</div>
@@ -397,7 +396,7 @@ export default function DomainsPage() {
onClick={() => create.mutate()}
disabled={!hostname || domainChecking || create.isPending}
>
- {create.isPending ? "Adding..." : "Add domain"}
+ {create.isPending ? t("onboarding.adding") : t("domains.addTitle")}
</Button>
</div>
</DialogContent>
@@ -412,7 +411,7 @@ export default function DomainsPage() {
)}
{!isLoading && (data?.domains ?? []).length === 0 && (
<p className="rounded-2xl bg-white px-5 py-4 text-sm text-neutral-500">
- No domains yet
+ {t("domains.none")}
</p>
)}
<List>
diff --git a/src/app/(admin)/domains/utils.ts b/src/app/(admin)/domains/utils.ts
index 9510e0c..ffd01f5 100644
--- a/src/app/(admin)/domains/utils.ts
+++ b/src/app/(admin)/domains/utils.ts
@@ -1,23 +1,25 @@
+import type { TranslationKey } from "@/lib/i18n/types";
+import { defaultTranslator, type Translator } from "@/lib/i18n/utils";
import { authFetch } from "@/lib/auth/client";
import type { DnsAuthRecord, DnsAuthStatus, DomainPreflightResponse } from "./types";
export const dnsAuthRecords: DnsAuthRecord[] = ["mx", "spf", "dkim", "dmarc"];
-export const dnsAuthDescriptions: Record<DnsAuthRecord, string> = {
- mx: "Routes incoming email to Mailflare",
- spf: "Authorizes Mailflare to send email",
- dkim: "Signs outgoing email for deliverability",
- dmarc: "Helps prevent email spoofing",
-};
+export const dnsAuthDescriptions = {
+ mx: "dns.mx",
+ spf: "dns.spf",
+ dkim: "dns.dkim",
+ dmarc: "dns.dmarc",
+} satisfies Record<DnsAuthRecord, TranslationKey>;
-export function getDnsAuthStatusLabel(status: DnsAuthStatus): string {
+export function getDnsAuthStatusLabel(status: DnsAuthStatus, t: Translator = defaultTranslator): string {
switch (status) {
case "ok":
- return "found";
+ return t("dns.found");
case "missing":
- return "missing";
+ return t("dns.missing");
default:
- return "not verified";
+ return t("dns.notVerified");
}
}
diff --git a/src/lib/i18n/en.json b/src/lib/i18n/en.json
index a603dda..5f4c2a5 100644
--- a/src/lib/i18n/en.json
+++ b/src/lib/i18n/en.json
@@ -1055,5 +1055,110 @@
"mailbox.deleteFailed": "Failed to delete mailbox",
"mailbox.deleteConfirm": "Delete {address}? This removes its email routing rule and cannot be undone.",
"mailbox.deleting": "Deleting...",
- "mailbox.delete": "Delete mailbox"
+ "mailbox.delete": "Delete mailbox",
+ "domains.removeFailed": "Failed to remove",
+ "domains.dnsLoadFailed": "Failed to load DNS",
+ "domains.sendingChangeFailed": "Failed to change sending provider",
+ "domains.receivingChangeFailed": "Failed to change receiving provider",
+ "domains.dnsSetupFailed": "Failed to set up DNS record",
+ "domains.title": "Domains",
+ "domains.descriptionManaged": "Domains must be on your Cloudflare account, which manages their DNS. Choose per domain whether Cloudflare, Resend or Amazon SES receives and sends its mail.",
+ "domains.descriptionManual": "Add the domains this server receives mail for. Open DNS on a domain to see the MX, SPF and DMARC records to create.",
+ "domains.new": "New domain",
+ "domains.addTitle": "Add domain",
+ "domains.addDescription": "Connect a Cloudflare zone, then choose which service receives its mail and whether Mailflare should provision Email Sending.",
+ "domains.hostname": "Hostname",
+ "domains.receiveWith": "Receive mail with",
+ "domains.receiveHintCloudflare": "Cloudflare Email Routing is enabled on the zone.",
+ "domains.receiveHintNone": "The domain only sends. Add a receiving service later.",
+ "domains.providerHintLater": "Add your credentials and set it up from the domain page after adding.",
+ "domains.cloudflareRouting": "Cloudflare Email Routing",
+ "domains.cloudflareSending": "Cloudflare Email Sending",
+ "domains.notSelected": "Not selected",
+ "domains.sendWith": "Send mail with",
+ "domains.sendHintCloudflare": "Cloudflare Email Sending is enabled on the zone.",
+ "domains.sendHintNone": "Receive-only mode. Add a sending service later.",
+ "domains.tokenPermissions": "Check that your Cloudflare API token has these permissions:",
+ "domains.tokenAccounts": "All accounts — DNS Settings:Edit, Email Routing Addresses:Edit; Email Sending:Edit for outbound mail",
+ "domains.tokenZones": "All zones — DNS Settings:Edit, Email Routing Rules:Edit, Zone Settings:Edit, DNS:Edit",
+ "domains.none": "No domains yet",
+ "dns.status.active": "active",
+ "dns.status.pending": "pending",
+ "domains.badge.routing": "routing",
+ "domains.badge.sendingOnly": "sending only",
+ "domains.badge.receivingVia": "receiving via {provider}",
+ "domains.badge.sendingVia": "sending via {provider}",
+ "domains.badge.receivingOnly": "receiving only",
+ "domains.badge.sending": "sending",
+ "domains.providerSes": "Amazon SES",
+ "domains.providerResend": "Resend",
+ "dns.found": "found",
+ "dns.missing": "missing",
+ "dns.notVerified": "not verified",
+ "dns.mx": "Routes incoming email to Mailflare",
+ "dns.spf": "Authorizes Mailflare to send email",
+ "dns.dkim": "Signs outgoing email for deliverability",
+ "dns.dmarc": "Helps prevent email spoofing",
+ "domains.hideDetails": "Hide details",
+ "domains.showDetails": "Show details",
+ "domains.actionsFor": "Actions for {host}",
+ "domains.removeConfirm": "Remove {host}? This permanently deletes every mailbox on this domain, including all their messages, and turns off Email Routing for the zone.\n\nType {host} to confirm.",
+ "domains.removeDomain": "Remove domain",
+ "domains.sendingFor": "Sending for {name} is {state}",
+ "domains.enabled": "enabled",
+ "domains.disabled": "disabled",
+ "domains.sendingConfigured": "Email sending is configured",
+ "domains.sendingNotConfigured": "Email sending is not configured",
+ "domains.sendingNotSet": "Sending has not configured for this domain",
+ "domains.routingConfigured": "Email routing is configured",
+ "domains.recordsMissing.one": "{count} DNS record missing",
+ "domains.recordsMissing.other": "{count} DNS records missing",
+ "domains.noRoutingRecords": "No routing DNS records found",
+ "domains.recordLabel": "{label} record",
+ "domains.manualDns": "DNS for this domain is managed manually",
+ "domains.createRecord": "Create the {label} record",
+ "domains.settingUp": "Setting up...",
+ "domains.setup": "Setup",
+ "domains.emailSending": "Email Sending",
+ "domains.emailSendingHint": "Sends outgoing email from this domain",
+ "domains.setupTitle": "Domain setup",
+ "domains.setupDescription": "Review the DNS authentication that keeps mail deliverable, whichever services send and receive it.",
+ "domains.manualDnsNote": "DNS is managed manually for this domain, so records must be created where the domain's nameservers are hosted.",
+ "domains.setUp": "Set up",
+ "domains.needsSetup": "Needs setup",
+ "domains.stillSetUp": "{title} is still set up for this domain but not used.",
+ "domains.removing": "Removing…",
+ "domains.cleanUp": "Clean up",
+ "domains.setupFailed": "Setup failed",
+ "domains.emailRouting": "Email Routing",
+ "domains.emailRoutingHint": "Routes incoming email to Mailflare",
+ "domains.requestFailed": "Request failed",
+ "domains.opt.cfRouting": "Cloudflare Email Routing",
+ "domains.opt.cfRoutingDesc": "Mail arrives through this domain's Cloudflare zone. The default.",
+ "domains.opt.resendReceiveDesc": "Resend receives mail and delivers it to Mailflare by webhook.",
+ "domains.opt.sesReceiveDesc": "SES receives mail into S3 and notifies Mailflare.",
+ "domains.opt.cfEmail": "Cloudflare Email",
+ "domains.opt.cfSendDesc": "Cloudflare Email Sending. Configured on this domain's zone.",
+ "domains.opt.resendSendDesc": "Send through your Resend account.",
+ "domains.opt.sesSendDesc": "Send through your AWS account with SES.",
+ "domains.removeReceivingConfirm": "Remove the {title} receiving setup for {host}? This deletes its MX record and routing, so mail will not arrive through it.",
+ "domains.removeSendingConfirm": "Remove the {title} setup for {host}? This deletes its DNS records.",
+ "domains.removeConfigFailed": "Could not remove configuration",
+ "domains.setupReceiving": "Setup receiving email",
+ "domains.setupReceivingDescription": "Choose what receives mail for this domain. Only one service can own the MX record; setting up another asks before replacing it.",
+ "domains.noReceiving": "No receiving service selected: this domain only sends.",
+ "domains.setupSending": "Setup sending email",
+ "domains.sendingNone": "This domain only receives mail. Turn on one option to send from it.",
+ "domains.sendingChoose": "Choose what sends outgoing mail from this domain. Receiving is not affected.",
+ "domains.setupReceivingButton": "Setup receiving",
+ "domains.resendReceivingHint": "Enables receiving on the domain, points MX at Resend and registers the webhook.",
+ "domains.sesReceivingHint": "Creates the S3 bucket, SNS topic and receipt rule, then points MX at SES.",
+ "domains.providerUnreachable": "Could not reach the provider",
+ "domains.setupFinished": "Setup finished. It can take a few minutes for DNS to propagate; use Check again to refresh.",
+ "domains.checking": "Checking…",
+ "domains.ok": "OK",
+ "domains.notSetUp": "Not set up",
+ "domains.restrictedKey": "This Resend key can only send mail, so Mailflare can't set up receiving. Use a full-access key, or enable receiving, add the MX record and create the {webhook} webhook in the Resend dashboard.",
+ "domains.checkAgain": "Check again",
+ "domains.working": "Working…"
}
diff --git a/src/lib/i18n/pt-BR.json b/src/lib/i18n/pt-BR.json
index 19d0416..673cb65 100644
--- a/src/lib/i18n/pt-BR.json
+++ b/src/lib/i18n/pt-BR.json
@@ -1055,5 +1055,110 @@
"mailbox.deleteFailed": "Falha ao excluir a caixa de correio",
"mailbox.deleteConfirm": "Excluir {address}? Isto remove sua regra de roteamento de e-mail e não pode ser desfeito.",
"mailbox.deleting": "Excluindo...",
- "mailbox.delete": "Excluir caixa de correio"
+ "mailbox.delete": "Excluir caixa de correio",
+ "domains.removeFailed": "Falha ao remover",
+ "domains.dnsLoadFailed": "Falha ao carregar o DNS",
+ "domains.sendingChangeFailed": "Falha ao alterar o provedor de envio",
+ "domains.receivingChangeFailed": "Falha ao alterar o provedor de recebimento",
+ "domains.dnsSetupFailed": "Falha ao configurar o registro DNS",
+ "domains.title": "Domínios",
+ "domains.descriptionManaged": "Os domínios devem estar na sua conta Cloudflare, que gerencia o DNS. Escolha, por domínio, se a Cloudflare, o Resend ou o Amazon SES recebe e envia seus e-mails.",
+ "domains.descriptionManual": "Adicione os domínios para os quais este servidor recebe e-mails. Abra o DNS de um domínio para ver os registros MX, SPF e DMARC a criar.",
+ "domains.new": "Novo domínio",
+ "domains.addTitle": "Adicionar domínio",
+ "domains.addDescription": "Conecte uma zona da Cloudflare e escolha qual serviço recebe seus e-mails e se o Mailflare deve provisionar o Email Sending.",
+ "domains.hostname": "Nome do host",
+ "domains.receiveWith": "Receber e-mails com",
+ "domains.receiveHintCloudflare": "O Cloudflare Email Routing está ativado na zona.",
+ "domains.receiveHintNone": "O domínio apenas envia. Adicione um serviço de recebimento depois.",
+ "domains.providerHintLater": "Adicione suas credenciais e configure na página do domínio depois de adicioná-lo.",
+ "domains.cloudflareRouting": "Cloudflare Email Routing",
+ "domains.cloudflareSending": "Cloudflare Email Sending",
+ "domains.notSelected": "Não selecionado",
+ "domains.sendWith": "Enviar e-mails com",
+ "domains.sendHintCloudflare": "O Cloudflare Email Sending está ativado na zona.",
+ "domains.sendHintNone": "Modo somente recebimento. Adicione um serviço de envio depois.",
+ "domains.tokenPermissions": "Verifique se o seu token de API da Cloudflare tem estas permissões:",
+ "domains.tokenAccounts": "Todas as contas — DNS Settings:Edit, Email Routing Addresses:Edit; Email Sending:Edit para e-mails enviados",
+ "domains.tokenZones": "Todas as zonas — DNS Settings:Edit, Email Routing Rules:Edit, Zone Settings:Edit, DNS:Edit",
+ "domains.none": "Nenhum domínio ainda",
+ "dns.status.active": "ativo",
+ "dns.status.pending": "pendente",
+ "domains.badge.routing": "roteamento",
+ "domains.badge.sendingOnly": "somente envio",
+ "domains.badge.receivingVia": "recebendo via {provider}",
+ "domains.badge.sendingVia": "enviando via {provider}",
+ "domains.badge.receivingOnly": "somente recebimento",
+ "domains.badge.sending": "envio",
+ "domains.providerSes": "Amazon SES",
+ "domains.providerResend": "Resend",
+ "dns.found": "encontrado",
+ "dns.missing": "ausente",
+ "dns.notVerified": "não verificado",
+ "dns.mx": "Encaminha os e-mails recebidos ao Mailflare",
+ "dns.spf": "Autoriza o Mailflare a enviar e-mails",
+ "dns.dkim": "Assina os e-mails enviados para melhorar a entregabilidade",
+ "dns.dmarc": "Ajuda a evitar a falsificação de e-mails",
+ "domains.hideDetails": "Ocultar detalhes",
+ "domains.showDetails": "Mostrar detalhes",
+ "domains.actionsFor": "Ações para {host}",
+ "domains.removeConfirm": "Remover {host}? Isto exclui permanentemente todas as caixas de correio deste domínio, incluindo todas as mensagens, e desativa o Email Routing da zona.\n\nDigite {host} para confirmar.",
+ "domains.removeDomain": "Remover domínio",
+ "domains.sendingFor": "O envio para {name} está {state}",
+ "domains.enabled": "ativado",
+ "domains.disabled": "desativado",
+ "domains.sendingConfigured": "O envio de e-mails está configurado",
+ "domains.sendingNotConfigured": "O envio de e-mails não está configurado",
+ "domains.sendingNotSet": "O envio não foi configurado para este domínio",
+ "domains.routingConfigured": "O roteamento de e-mails está configurado",
+ "domains.recordsMissing.one": "{count} registro DNS ausente",
+ "domains.recordsMissing.other": "{count} registros DNS ausentes",
+ "domains.noRoutingRecords": "Nenhum registro DNS de roteamento encontrado",
+ "domains.recordLabel": "Registro {label}",
+ "domains.manualDns": "O DNS deste domínio é gerenciado manualmente",
+ "domains.createRecord": "Criar o registro {label}",
+ "domains.settingUp": "Configurando...",
+ "domains.setup": "Configurar",
+ "domains.emailSending": "Email Sending",
+ "domains.emailSendingHint": "Envia e-mails a partir deste domínio",
+ "domains.setupTitle": "Configuração do domínio",
+ "domains.setupDescription": "Revise a autenticação de DNS que mantém os e-mails entregáveis, independentemente dos serviços que os enviam e recebem.",
+ "domains.manualDnsNote": "O DNS é gerenciado manualmente para este domínio, então os registros devem ser criados onde os servidores de nomes do domínio estão hospedados.",
+ "domains.setUp": "Configurado",
+ "domains.needsSetup": "Precisa de configuração",
+ "domains.stillSetUp": "{title} ainda está configurado para este domínio, mas não é usado.",
+ "domains.removing": "Removendo…",
+ "domains.cleanUp": "Limpar",
+ "domains.setupFailed": "Falha na configuração",
+ "domains.emailRouting": "Email Routing",
+ "domains.emailRoutingHint": "Encaminha os e-mails recebidos ao Mailflare",
+ "domains.requestFailed": "Falha na requisição",
+ "domains.opt.cfRouting": "Cloudflare Email Routing",
+ "domains.opt.cfRoutingDesc": "Os e-mails chegam pela zona da Cloudflare deste domínio. O padrão.",
+ "domains.opt.resendReceiveDesc": "O Resend recebe os e-mails e os entrega ao Mailflare por webhook.",
+ "domains.opt.sesReceiveDesc": "O SES recebe os e-mails no S3 e notifica o Mailflare.",
+ "domains.opt.cfEmail": "Cloudflare Email",
+ "domains.opt.cfSendDesc": "Cloudflare Email Sending. Configurado na zona deste domínio.",
+ "domains.opt.resendSendDesc": "Envie pela sua conta do Resend.",
+ "domains.opt.sesSendDesc": "Envie pela sua conta da AWS com o SES.",
+ "domains.removeReceivingConfirm": "Remover a configuração de recebimento de {title} para {host}? Isto exclui seu registro MX e roteamento, então os e-mails não chegarão por ele.",
+ "domains.removeSendingConfirm": "Remover a configuração de {title} para {host}? Isto exclui seus registros DNS.",
+ "domains.removeConfigFailed": "Não foi possível remover a configuração",
+ "domains.setupReceiving": "Configurar o recebimento de e-mails",
+ "domains.setupReceivingDescription": "Escolha o que recebe os e-mails deste domínio. Apenas um serviço pode ter o registro MX; configurar outro pergunta antes de substituí-lo.",
+ "domains.noReceiving": "Nenhum serviço de recebimento selecionado: este domínio apenas envia.",
+ "domains.setupSending": "Configurar o envio de e-mails",
+ "domains.sendingNone": "Este domínio apenas recebe e-mails. Ative uma opção para enviar a partir dele.",
+ "domains.sendingChoose": "Escolha o que envia os e-mails deste domínio. O recebimento não é afetado.",
+ "domains.setupReceivingButton": "Configurar recebimento",
+ "domains.resendReceivingHint": "Ativa o recebimento no domínio, aponta o MX para o Resend e registra o webhook.",
+ "domains.sesReceivingHint": "Cria o bucket S3, o tópico SNS e a regra de recebimento e depois aponta o MX para o SES.",
+ "domains.providerUnreachable": "Não foi possível acessar o provedor",
+ "domains.setupFinished": "Configuração concluída. A propagação do DNS pode levar alguns minutos; use Verificar novamente para atualizar.",
+ "domains.checking": "Verificando…",
+ "domains.ok": "OK",
+ "domains.notSetUp": "Não configurado",
+ "domains.restrictedKey": "Esta chave do Resend só pode enviar e-mails, então o Mailflare não consegue configurar o recebimento. Use uma chave de acesso total ou ative o recebimento, adicione o registro MX e crie o webhook {webhook} no painel do Resend.",
+ "domains.checkAgain": "Verificar novamente",
+ "domains.working": "Trabalhando…"
}