Email for professionals and teams
Translate provider setup panels
Hieu Nguyen (Jack)f5c3aeabc563
diff --git a/src/app/(admin)/domains/AwsCredentialsPanel.tsx b/src/app/(admin)/domains/AwsCredentialsPanel.tsxindex 98dc32d..6f6dd50 100644--- a/src/app/(admin)/domains/AwsCredentialsPanel.tsx+++ b/src/app/(admin)/domains/AwsCredentialsPanel.tsx@@ -1,6 +1,7 @@"use client";import { useEffect, useState } from "react";+import { useLanguage } from "@/components/language-provider";import { Button } from "@/components/ui/button";import { Input } from "@/components/ui/input";import type { AwsCapabilityReport, AwsConfigStatus } from "@/lib/aws/aws-types";@@ -23,6 +24,7 @@ const REGION_HINTS = ["us-east-1", "us-east-2", "us-west-2", "eu-west-1", "eu-we* the key lacks, along with the IAM policy that grants everything.*/export default function AwsCredentialsPanel({ need, onChanged }: Props) {+ const { t } = useLanguage();const [status, setStatus] = useState<AwsConfigStatus | null>(null);const [policy, setPolicy] = useState<unknown>(null);const [report, setReport] = useState<AwsCapabilityReport | null>(null);@@ -45,7 +47,7 @@ export default function AwsCredentialsPanel({ need, onChanged }: Props) {const checked = await requestJson<{ report: AwsCapabilityReport }>("/api/admin/aws", "POST", {});if (active) { setReport(checked.report); onChanged?.(true, checked.report); }})- .catch((err) => { if (active) { setError(err instanceof Error ? err.message : "Could not load AWS settings"); setStatus((current) => current ?? { configured: false, source: null, region: null, accessKeyHint: null, accountId: null }); } });+ .catch((err) => { if (active) { setError(err instanceof Error ? err.message : t("aws.loadFailed")); setStatus((current) => current ?? { configured: false, source: null, region: null, accessKeyHint: null, accountId: null }); } });return () => { active = false; };// eslint-disable-next-line react-hooks/exhaustive-deps}, []);@@ -53,7 +55,7 @@ export default function AwsCredentialsPanel({ need, onChanged }: Props) {async function run(kind: "save" | "check" | "remove", action: () => Promise<void>) {setBusy(kind);setError("");- try { await action(); } catch (err) { setError(err instanceof Error ? err.message : "Request failed"); } finally { setBusy(null); }+ try { await action(); } catch (err) { setError(err instanceof Error ? err.message : t("domains.requestFailed")); } finally { setBusy(null); }}const save = () => run("save", async () => {@@ -71,7 +73,7 @@ export default function AwsCredentialsPanel({ need, onChanged }: Props) {onChanged?.(true, data.report);});const remove = () => run("remove", async () => {- if (!window.confirm("Remove the AWS credentials? Domains using Amazon SES will stop sending and receiving. Resources already created in AWS are left in place.")) return;+ if (!window.confirm(t("aws.removeConfirm"))) return;const data = await requestJson<{ status: AwsConfigStatus }>("/api/admin/aws", "DELETE", {});setStatus(data.status);setReport(null);@@ -87,60 +89,60 @@ export default function AwsCredentialsPanel({ need, onChanged }: Props) {<ul className="space-y-2"><StatusRowok={configured && !editing}- title="AWS credentials"- hint="Shared by every domain using Amazon SES"+ title={t("aws.credentials")}+ hint={t("aws.credentialsHint")}action={configured && !editing ? (<>- <Button size="sm" variant="outline" className="bg-white" disabled={busy !== null} onClick={() => void check()}>{busy === "check" ? "Checking…" : "Re-check"}</Button>- {!fromEnvironment && <Button size="sm" variant="outline" className="bg-white" disabled={busy !== null} onClick={() => setEditing(true)}>Replace</Button>}- {!fromEnvironment && <Button size="sm" variant="outline" className="bg-white" disabled={busy !== null} onClick={() => void remove()}>Remove</Button>}+ <Button size="sm" variant="outline" className="bg-white" disabled={busy !== null} onClick={() => void check()}>{busy === "check" ? t("domains.checking") : t("aws.recheck")}</Button>+ {!fromEnvironment && <Button size="sm" variant="outline" className="bg-white" disabled={busy !== null} onClick={() => setEditing(true)}>{t("resend.replace")}</Button>}+ {!fromEnvironment && <Button size="sm" variant="outline" className="bg-white" disabled={busy !== null} onClick={() => void remove()}>{t("resend.remove")}</Button>}</>) : undefined}>{showForm ? (<form className="grid gap-2" onSubmit={(event) => { event.preventDefault(); void save(); }}>- <Input autoComplete="off" placeholder="Access key ID (AKIA…)" value={accessKeyId} onChange={(event) => setAccessKeyId(event.target.value)} className="max-w-sm bg-white" />- <Input type="password" autoComplete="off" placeholder="Secret access key" value={secretAccessKey} onChange={(event) => setSecretAccessKey(event.target.value)} className="max-w-sm bg-white" />- <Input list="aws-regions" placeholder="Region (us-east-1)" value={region} onChange={(event) => setRegion(event.target.value)} className="max-w-[12rem] bg-white" />+ <Input autoComplete="off" placeholder={t("aws.accessKeyId")} value={accessKeyId} onChange={(event) => setAccessKeyId(event.target.value)} className="max-w-sm bg-white" />+ <Input type="password" autoComplete="off" placeholder={t("aws.secretKey")} value={secretAccessKey} onChange={(event) => setSecretAccessKey(event.target.value)} className="max-w-sm bg-white" />+ <Input list="aws-regions" placeholder={t("aws.region")} value={region} onChange={(event) => setRegion(event.target.value)} className="max-w-[12rem] bg-white" /><datalist id="aws-regions">{REGION_HINTS.map((hint) => <option key={hint} value={hint} />)}</datalist><span className="flex gap-2">- <Button type="submit" size="sm" disabled={!accessKeyId.trim() || !secretAccessKey.trim() || !region.trim() || busy !== null}>{busy === "save" ? "Validating…" : "Validate and save"}</Button>- {editing && <Button type="button" size="sm" variant="outline" className="bg-white" onClick={() => { setEditing(false); setError(""); }}>Cancel</Button>}+ <Button type="submit" size="sm" disabled={!accessKeyId.trim() || !secretAccessKey.trim() || !region.trim() || busy !== null}>{busy === "save" ? t("aws.validating") : t("aws.validateSave")}</Button>+ {editing && <Button type="button" size="sm" variant="outline" className="bg-white" onClick={() => { setEditing(false); setError(""); }}>{t("common.cancel")}</Button>}</span></form>- ) : configured ? `Access key …${status?.accessKeyHint} · ${status?.region}${status?.accountId ? ` · account ${status.accountId}` : ""}${fromEnvironment ? " · from environment" : ""}` : "Checking…"}+ ) : configured ? `${t("aws.keySummary", { hint: status?.accessKeyHint, region: status?.region })}${status?.accountId ? t("aws.accountSuffix", { id: status.accountId }) : ""}${fromEnvironment ? t("aws.envSuffix") : ""}` : t("domains.checking")}</StatusRow>{configured && !editing && report && need === "sending" && (- <StatusRow ok={report.sending} title="SES sending" hint="Send mail and manage sender identities">- {report.sending ? `Allowed in ${report.region}` : "Missing SES permissions"}+ <StatusRow ok={report.sending} title={t("aws.sesSending")} hint={t("aws.sesSendingHint")}>+ {report.sending ? t("aws.allowedIn", { region: report.region }) : t("aws.missingSes")}</StatusRow>)}{configured && !editing && report?.sending && report.productionAccess === false && need === "sending" && (- <StatusRow ok={false} title="SES sandbox" hint="New AWS accounts start restricted">- Only verified recipients can receive mail until you request production access in the SES console.+ <StatusRow ok={false} title={t("aws.sandbox")} hint={t("aws.sandboxHint")}>+ {t("aws.sandboxDetail")}</StatusRow>)}{configured && !editing && report && need === "receiving" && (<>- <StatusRow ok={report.receivingRegion && report.receiving} title="SES receiving" hint="Receipt rules for inbound mail">- {!report.receivingRegion ? `${report.region} cannot receive mail. Use us-east-1, us-west-2 or eu-west-1.` : report.receiving ? `Allowed in ${report.region}` : "Missing SES receipt-rule permissions"}+ <StatusRow ok={report.receivingRegion && report.receiving} title={t("aws.sesReceiving")} hint={t("aws.sesReceivingHint")}>+ {!report.receivingRegion ? t("aws.regionCannotReceive", { region: report.region }) : report.receiving ? t("aws.allowedIn", { region: report.region }) : t("aws.missingReceipt")}</StatusRow>- <StatusRow ok={report.s3} title="S3" hint="Bucket where SES stores raw messages">{report.s3 ? "Allowed" : "Missing S3 permissions"}</StatusRow>- <StatusRow ok={report.sns} title="SNS" hint="Notifies Mailflare of each message">{report.sns ? "Allowed" : "Missing SNS permissions"}</StatusRow>+ <StatusRow ok={report.s3} title="S3" hint={t("aws.s3Hint")}>{report.s3 ? t("aws.allowed") : t("aws.missingS3")}</StatusRow>+ <StatusRow ok={report.sns} title="SNS" hint={t("aws.snsHint")}>{report.sns ? t("aws.allowed") : t("aws.missingSns")}</StatusRow></>)}</ul>{configured && !editing && report && report.missing.length > 0 && (<details className="rounded-lg bg-white px-3 py-2 text-xs text-neutral-600">- <summary className="cursor-pointer font-medium text-neutral-800">Missing permissions and the IAM policy that grants them</summary>- <p className="mt-2">Missing: {report.missing.join(", ")}</p>+ <summary className="cursor-pointer font-medium text-neutral-800">{t("aws.missingSummary")}</summary>+ <p className="mt-2">{t("aws.missingList", { list: report.missing.join(", ") })}</p><pre className="mt-2 max-h-64 overflow-auto rounded bg-neutral-50 p-2">{JSON.stringify(policy, null, 2)}</pre></details>)}{showForm && (<p className="text-xs text-neutral-500">- Create an IAM user with programmatic access in the AWS console and attach a policy with the permissions Mailflare needs (shown after you save, if any are missing). Credentials are checked with AWS before they are stored.+ {t("aws.createUserHint")}</p>)}{error && <p role="alert" className="text-xs text-red-600">{error}</p>}diff --git a/src/app/(admin)/domains/ResendDomainSection.tsx b/src/app/(admin)/domains/ResendDomainSection.tsxindex cc23e3e..4b8cae3 100644--- a/src/app/(admin)/domains/ResendDomainSection.tsx+++ b/src/app/(admin)/domains/ResendDomainSection.tsx@@ -2,6 +2,7 @@import { useEffect, useState } from "react";import { Button } from "@/components/ui/button";+import { useLanguage } from "@/components/language-provider";import { authFetch } from "@/lib/auth/client";import type { ResendDomainView } from "@/lib/domains/resend-domain-types";import ResendKeyRow from "./ResendKeyRow";@@ -17,6 +18,7 @@ async function postJson<T>(url: string, method: string, body: unknown): Promise<}export default function ResendDomainSection({ domainId, onStatus }: { domainId: string; onStatus?: (status: string | null) => void }) {+ const { t } = useLanguage();const [keyConfigured, setKeyConfigured] = useState<boolean | null>(null);const [view, setView] = useState<ResendDomainView | null>(null);const [canManage, setCanManage] = useState(true);@@ -32,16 +34,16 @@ export default function ResendDomainSection({ domainId, onStatus }: { domainId:.then(async (response) => ({ response, data: (await response.json()) as ResendResponse })).then(({ response, data }) => {if (!active) return;- if (!response.ok && data.keyConfigured === undefined) throw new Error(data.error ?? "Could not reach Resend");+ if (!response.ok && data.keyConfigured === undefined) throw new Error(data.error ?? t("resend.unreachable"));setKeyConfigured(data.keyConfigured ?? true);setCanManage(data.canManageDomains ?? true);setView(data.resend ?? null);setError(response.ok ? "" : data.error ?? "");})- .catch((err) => { if (active) { setKeyConfigured(true); setError(err instanceof Error ? err.message : "Could not reach Resend"); } })+ .catch((err) => { if (active) { setKeyConfigured(true); setError(err instanceof Error ? err.message : t("resend.unreachable")); } }).finally(() => { if (active) setLoading(false); });return () => { active = false; };- }, [domainId, reload]);+ }, [domainId, reload, t]);useEffect(() => {if (loading) return;@@ -53,7 +55,7 @@ export default function ResendDomainSection({ domainId, onStatus }: { domainId:setError("");setNotice("");try { await action(); }- catch (err) { setError(err instanceof Error ? err.message : "Request failed"); }+ catch (err) { setError(err instanceof Error ? err.message : t("domains.requestFailed")); }finally { setBusy(null); }}@@ -63,37 +65,37 @@ export default function ResendDomainSection({ domainId, onStatus }: { domainId:});const sendTest = () => run("test", async () => {const data = await postJson<{ to: string }>(`/api/domains/${domainId}/resend`, "POST", { action: "test" });- setNotice(`Test email sent to ${data.to}`);+ setNotice(t("resend.testSent", { to: data.to }));});const verified = view?.status === "verified";- const needsFullKey = "Needs a full-access Resend API key";+ const needsFullKey = t("resend.needsFullKey");const domainLabel = loading- ? "Checking Resend…"+ ? t("resend.checking"): !canManage- ? "Cannot check: this key can only send mail"+ ? t("resend.cannotCheck"): !view- ? "Could not read the domain from Resend"+ ? t("resend.cannotRead"): verified- ? "Domain verified in Resend"+ ? t("resend.verified"): view.registered? view.missingDns === 0- ? `DNS records added, waiting for Resend to verify (${view.status.replace(/_/g, " ")})`+ ? t("resend.waiting", { status: view.status.replace(/_/g, " ") }): view.missingDns- ? `${view.missingDns} DNS record${view.missingDns === 1 ? "" : "s"} missing in Cloudflare`- : `DNS check: ${view.status.replace(/_/g, " ")}`- : "Domain is not added to Resend yet";+ ? t("resend.missingDns", { count: view.missingDns })+ : t("resend.dnsCheck", { status: view.status.replace(/_/g, " ") })+ : t("resend.notAdded");const domainButton = !canManage- ? "Setup domain"+ ? t("resend.btn.setupDomain"): !view? null: view.registered && !view.dnsManaged- ? "Verify"+ ? t("resend.btn.verify"): !view.registered- ? view.dnsManaged ? "Setup domain and DNS" : "Setup domain"+ ? view.dnsManaged ? t("resend.btn.setupDomainDns") : t("resend.btn.setupDomain"): view.dnsManaged && view.missingDns !== 0- ? "Create missing DNS and verify"- : "Check status";+ ? t("resend.btn.createMissing")+ : t("resend.btn.checkStatus");return (<div className="space-y-2">@@ -107,10 +109,10 @@ export default function ResendDomainSection({ domainId, onStatus }: { domainId:{keyConfigured && (<StatusRowok={verified}- title="Domain"- hint="Verified sender domain in Resend"+ title={t("resend.domain")}+ hint={t("resend.domainHint")}action={verified ? (- <Button size="sm" variant="outline" className="bg-white" disabled={busy !== null} onClick={() => void sendTest()}>{busy === "test" ? "Sending…" : "Send test email"}</Button>+ <Button size="sm" variant="outline" className="bg-white" disabled={busy !== null} onClick={() => void sendTest()}>{busy === "test" ? t("resend.sending") : t("resend.sendTest")}</Button>) : domainButton && !loading ? (<Buttonsize="sm"@@ -120,7 +122,7 @@ export default function ResendDomainSection({ domainId, onStatus }: { domainId:title={canManage ? undefined : needsFullKey}onClick={() => void domainAction(view?.registered && (!view.dnsManaged || view.missingDns === 0) ? "verify" : "setup")}>- {busy === "verify" ? "Checking…" : busy === "setup" ? "Working…" : domainButton}+ {busy === "verify" ? t("domains.checking") : busy === "setup" ? t("domains.working") : domainButton}</Button>) : undefined}>@@ -129,9 +131,9 @@ export default function ResendDomainSection({ domainId, onStatus }: { domainId:)}</ul>- {!loading && !canManage && keyConfigured && <p className="text-xs text-neutral-500">Add this domain at resend.com/domains and create the DNS records it shows, then send a test email. Or replace the key with a full-access one so Mailflare can set it up.</p>}- {view && view.registered && !verified && !view.dnsManaged && <p className="text-xs text-neutral-500">Add these records where this domain's DNS is hosted, then verify.</p>}- {view && view.registered && !verified && view.dnsManaged && view.missingDns === 0 && <p className="text-xs text-neutral-500">DNS changes can take a few minutes to propagate. Check again shortly.</p>}+ {!loading && !canManage && keyConfigured && <p className="text-xs text-neutral-500">{t("resend.manualHint")}</p>}+ {view && view.registered && !verified && !view.dnsManaged && <p className="text-xs text-neutral-500">{t("resend.addRecords")}</p>}+ {view && view.registered && !verified && view.dnsManaged && view.missingDns === 0 && <p className="text-xs text-neutral-500">{t("resend.propagate")}</p>}{view && view.records.length > 0 && !verified && (<ul className="space-y-1 text-xs text-neutral-600">diff --git a/src/app/(admin)/domains/ResendKeyRow.tsx b/src/app/(admin)/domains/ResendKeyRow.tsxindex b119131..d9e3d39 100644--- a/src/app/(admin)/domains/ResendKeyRow.tsx+++ b/src/app/(admin)/domains/ResendKeyRow.tsx@@ -1,6 +1,7 @@"use client";import { useState } from "react";+import { useLanguage } from "@/components/language-provider";import { Button } from "@/components/ui/button";import { Input } from "@/components/ui/input";import { postJson } from "./api";@@ -15,6 +16,7 @@ type Props = {/** The shared Resend API key, used by both the sending and receiving setup. */export default function ResendKeyRow({ configured, onChanged, onError }: Props) {+ const { t } = useLanguage();const [apiKey, setApiKey] = useState("");const [editing, setEditing] = useState(false);const [busy, setBusy] = useState(false);@@ -23,7 +25,7 @@ export default function ResendKeyRow({ configured, onChanged, onError }: Props)async function run(action: () => Promise<void>) {setBusy(true);onError("");- try { await action(); } catch (error) { onError(error instanceof Error ? error.message : "Request failed"); } finally { setBusy(false); }+ try { await action(); } catch (error) { onError(error instanceof Error ? error.message : t("domains.requestFailed")); } finally { setBusy(false); }}const save = () => run(async () => {@@ -33,7 +35,7 @@ export default function ResendKeyRow({ configured, onChanged, onError }: Props)onChanged(true);});const remove = () => run(async () => {- if (!window.confirm("Remove the Resend API key? Every domain using Resend will stop sending and receiving.")) return;+ if (!window.confirm(t("resend.removeConfirm"))) return;await postJson("/api/admin/resend-key", "DELETE", {});onChanged(false);});@@ -42,24 +44,24 @@ export default function ResendKeyRow({ configured, onChanged, onError }: Props)<><StatusRowok={!!configured && !editing}- title="API key"- hint="Shared by every domain using Resend"+ title={t("resend.key")}+ hint={t("resend.keyHint")}action={configured && !editing ? (<>- <Button size="sm" variant="outline" className="bg-white" disabled={busy} onClick={() => setEditing(true)}>Replace</Button>- <Button size="sm" variant="outline" className="bg-white" disabled={busy} onClick={() => void remove()}>Remove</Button>+ <Button size="sm" variant="outline" className="bg-white" disabled={busy} onClick={() => setEditing(true)}>{t("resend.replace")}</Button>+ <Button size="sm" variant="outline" className="bg-white" disabled={busy} onClick={() => void remove()}>{t("resend.remove")}</Button></>) : undefined}>{showForm ? (<form className="flex flex-wrap gap-2" onSubmit={(event) => { event.preventDefault(); void save(); }}><Input type="password" autoComplete="off" placeholder="re_..." value={apiKey} onChange={(event) => setApiKey(event.target.value)} className="max-w-xs bg-white" />- <Button type="submit" size="sm" disabled={!apiKey.trim() || busy}>{busy ? "Checking…" : "Save key"}</Button>- {editing && <Button type="button" size="sm" variant="outline" className="bg-white" onClick={() => { setEditing(false); setApiKey(""); }}>Cancel</Button>}+ <Button type="submit" size="sm" disabled={!apiKey.trim() || busy}>{busy ? t("domains.checking") : t("resend.saveKey")}</Button>+ {editing && <Button type="button" size="sm" variant="outline" className="bg-white" onClick={() => { setEditing(false); setApiKey(""); }}>{t("common.cancel")}</Button>}</form>- ) : configured ? "API key saved" : "Checking…"}+ ) : configured ? t("resend.keySaved") : t("domains.checking")}</StatusRow>- {showForm && <li className="list-none px-1 text-xs text-neutral-500">Create a key at resend.com/api-keys. A full-access key lets Mailflare add the domain, its DNS and the receiving webhook for you; a sending-only key works for sending, but you add the domain in Resend yourself.</li>}+ {showForm && <li className="list-none px-1 text-xs text-neutral-500">{t("resend.keyInstructions")}</li>}</>);}diff --git a/src/app/(admin)/domains/SesSendingConfig.tsx b/src/app/(admin)/domains/SesSendingConfig.tsxindex b78595f..cba2898 100644--- a/src/app/(admin)/domains/SesSendingConfig.tsx+++ b/src/app/(admin)/domains/SesSendingConfig.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 { SesSendingView } from "@/lib/aws/ses-sending-types";import AwsCredentialsPanel from "./AwsCredentialsPanel";@@ -10,6 +11,7 @@ import { StatusRow } from "./status-row";type SesResponse = { credentials?: boolean; ses?: SesSendingView | null; error?: string };export default function SesSendingConfig({ domainId, onStatus }: { domainId: string; onStatus?: (status: string | null) => void }) {+ const { t } = useLanguage();const [credentials, setCredentials] = useState<boolean | null>(null);const [view, setView] = useState<SesSendingView | null>(null);const [loading, setLoading] = useState(true);@@ -22,10 +24,10 @@ export default function SesSendingConfig({ domainId, onStatus }: { domainId: strlet active = true;requestJson<SesResponse>(`/api/domains/${domainId}/ses`, "GET").then((data) => { if (active) { setCredentials(data.credentials ?? true); setView(data.ses ?? null); setError(data.error ?? ""); } })- .catch((err) => { if (active) setError(err instanceof Error ? err.message : "Could not reach AWS"); })+ .catch((err) => { if (active) setError(err instanceof Error ? err.message : t("ses.unreachable")); }).finally(() => { if (active) setLoading(false); });return () => { active = false; };- }, [domainId, reload]);+ }, [domainId, reload, t]);useEffect(() => {if (loading) return;@@ -36,7 +38,7 @@ export default function SesSendingConfig({ domainId, onStatus }: { domainId: strsetBusy(kind);setError("");setNotice("");- try { await action(); } catch (err) { setError(err instanceof Error ? err.message : "Request failed"); } finally { setBusy(null); }+ try { await action(); } catch (err) { setError(err instanceof Error ? err.message : t("domains.requestFailed")); } finally { setBusy(null); }}, []);const domainAction = (action: "setup" | "verify") => run(action, async () => {@@ -45,7 +47,7 @@ export default function SesSendingConfig({ domainId, onStatus }: { domainId: str});const sendTest = () => run("test", async () => {const data = await requestJson<{ to: string }>(`/api/domains/${domainId}/ses`, "POST", { action: "test" });- setNotice(`Test email sent to ${data.to}`);+ setNotice(t("resend.testSent", { to: data.to }));});const onCredentials = useCallback((configured: boolean) => {@@ -54,17 +56,17 @@ export default function SesSendingConfig({ domainId, onStatus }: { domainId: strsetReload((value) => value + 1);}, []);- const label = loading ? "Checking Amazon SES…"- : !view ? "Could not read the domain from SES"- : view.verified ? "Domain verified in SES"- : !view.registered ? "Domain is not added to SES yet"- : view.missingDns === 0 ? `DNS records added, waiting for SES to verify (DKIM ${view.dkimStatus.toLowerCase()})`- : view.missingDns ? `${view.missingDns} DKIM record${view.missingDns === 1 ? "" : "s"} missing in Cloudflare`- : `DKIM ${view.dkimStatus.toLowerCase()}`;+ const label = loading ? t("ses.checking")+ : !view ? t("ses.cannotRead")+ : view.verified ? t("ses.verified")+ : !view.registered ? t("ses.notAdded")+ : view.missingDns === 0 ? t("ses.waiting", { status: view.dkimStatus.toLowerCase() })+ : view.missingDns ? t("ses.missingDkim", { count: view.missingDns })+ : t("ses.dkim", { status: view.dkimStatus.toLowerCase() });const buttonLabel = !view ? null- : !view.registered ? (view.dnsManaged ? "Setup domain and DNS" : "Setup domain")- : view.dnsManaged && view.missingDns !== 0 ? "Create missing DNS and verify"- : "Check status";+ : !view.registered ? (view.dnsManaged ? t("resend.btn.setupDomainDns") : t("resend.btn.setupDomain"))+ : view.dnsManaged && view.missingDns !== 0 ? t("resend.btn.createMissing")+ : t("resend.btn.checkStatus");return (<div className="space-y-2">@@ -73,27 +75,27 @@ export default function SesSendingConfig({ domainId, onStatus }: { domainId: str<ul className="space-y-2"><StatusRowok={!!view?.verified}- title="Domain"- hint="Verified sender identity in SES"+ title={t("resend.domain")}+ hint={t("ses.domainHint")}action={view?.verified ? (- <Button size="sm" variant="outline" className="bg-white" disabled={busy !== null} onClick={() => void sendTest()}>{busy === "test" ? "Sending…" : "Send test email"}</Button>+ <Button size="sm" variant="outline" className="bg-white" disabled={busy !== null} onClick={() => void sendTest()}>{busy === "test" ? t("resend.sending") : t("resend.sendTest")}</Button>) : buttonLabel && !loading ? (<Button size="sm" variant="outline" className="bg-white" disabled={busy !== null} onClick={() => void domainAction(view?.registered && (!view.dnsManaged || view.missingDns === 0) ? "verify" : "setup")}>- {busy === "verify" ? "Checking…" : busy === "setup" ? "Working…" : buttonLabel}+ {busy === "verify" ? t("domains.checking") : busy === "setup" ? t("domains.working") : buttonLabel}</Button>) : undefined}>{label}</StatusRow>{view?.productionAccess === false && (- <StatusRow ok={false} title="SES sandbox" hint="Account-wide restriction">- In the sandbox SES delivers only to verified addresses. Request production access in the SES console before sending to anyone else.+ <StatusRow ok={false} title={t("aws.sandbox")} hint={t("ses.sandboxHint")}>+ {t("ses.sandboxDetail")}</StatusRow>)}</ul>)}- {view && view.registered && !view.verified && !view.dnsManaged && <p className="text-xs text-neutral-500">Add these CNAME records where this domain's DNS is hosted, then check status.</p>}- {view && view.registered && !view.verified && view.dnsManaged && view.missingDns === 0 && <p className="text-xs text-neutral-500">DNS changes can take a few minutes to propagate. Check again shortly.</p>}+ {view && view.registered && !view.verified && !view.dnsManaged && <p className="text-xs text-neutral-500">{t("ses.addCnames")}</p>}+ {view && view.registered && !view.verified && view.dnsManaged && view.missingDns === 0 && <p className="text-xs text-neutral-500">{t("resend.propagate")}</p>}{view && view.registered && !view.verified && view.records.length > 0 && (<ul className="space-y-1 text-xs text-neutral-600">{view.records.map((record) => (diff --git a/src/lib/i18n/en.json b/src/lib/i18n/en.jsonindex 5f4c2a5..5fc5310 100644--- a/src/lib/i18n/en.json+++ b/src/lib/i18n/en.json@@ -1160,5 +1160,82 @@"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…"+ "domains.working": "Working…",+ "resend.unreachable": "Could not reach Resend",+ "resend.testSent": "Test email sent to {to}",+ "resend.needsFullKey": "Needs a full-access Resend API key",+ "resend.checking": "Checking Resend…",+ "resend.cannotCheck": "Cannot check: this key can only send mail",+ "resend.cannotRead": "Could not read the domain from Resend",+ "resend.verified": "Domain verified in Resend",+ "resend.waiting": "DNS records added, waiting for Resend to verify ({status})",+ "resend.missingDns.one": "{count} DNS record missing in Cloudflare",+ "resend.missingDns.other": "{count} DNS records missing in Cloudflare",+ "resend.dnsCheck": "DNS check: {status}",+ "resend.notAdded": "Domain is not added to Resend yet",+ "resend.btn.setupDomain": "Setup domain",+ "resend.btn.verify": "Verify",+ "resend.btn.setupDomainDns": "Setup domain and DNS",+ "resend.btn.createMissing": "Create missing DNS and verify",+ "resend.btn.checkStatus": "Check status",+ "resend.domain": "Domain",+ "resend.domainHint": "Verified sender domain in Resend",+ "resend.sending": "Sending…",+ "resend.sendTest": "Send test email",+ "resend.manualHint": "Add this domain at resend.com/domains and create the DNS records it shows, then send a test email. Or replace the key with a full-access one so Mailflare can set it up.",+ "resend.addRecords": "Add these records where this domain's DNS is hosted, then verify.",+ "resend.propagate": "DNS changes can take a few minutes to propagate. Check again shortly.",+ "resend.key": "API key",+ "resend.keyHint": "Shared by every domain using Resend",+ "resend.replace": "Replace",+ "resend.remove": "Remove",+ "resend.saveKey": "Save key",+ "resend.keySaved": "API key saved",+ "resend.removeConfirm": "Remove the Resend API key? Every domain using Resend will stop sending and receiving.",+ "resend.keyInstructions": "Create a key at resend.com/api-keys. A full-access key lets Mailflare add the domain, its DNS and the receiving webhook for you; a sending-only key works for sending, but you add the domain in Resend yourself.",+ "aws.loadFailed": "Could not load AWS settings",+ "aws.removeConfirm": "Remove the AWS credentials? Domains using Amazon SES will stop sending and receiving. Resources already created in AWS are left in place.",+ "aws.credentials": "AWS credentials",+ "aws.credentialsHint": "Shared by every domain using Amazon SES",+ "aws.recheck": "Re-check",+ "aws.accessKeyId": "Access key ID (AKIA…)",+ "aws.secretKey": "Secret access key",+ "aws.region": "Region (us-east-1)",+ "aws.validating": "Validating…",+ "aws.validateSave": "Validate and save",+ "aws.keySummary": "Access key …{hint} · {region}",+ "aws.accountSuffix": " · account {id}",+ "aws.envSuffix": " · from environment",+ "aws.sesSending": "SES sending",+ "aws.sesSendingHint": "Send mail and manage sender identities",+ "aws.allowedIn": "Allowed in {region}",+ "aws.missingSes": "Missing SES permissions",+ "aws.sandbox": "SES sandbox",+ "aws.sandboxHint": "New AWS accounts start restricted",+ "aws.sandboxDetail": "Only verified recipients can receive mail until you request production access in the SES console.",+ "aws.sesReceiving": "SES receiving",+ "aws.sesReceivingHint": "Receipt rules for inbound mail",+ "aws.regionCannotReceive": "{region} cannot receive mail. Use us-east-1, us-west-2 or eu-west-1.",+ "aws.missingReceipt": "Missing SES receipt-rule permissions",+ "aws.s3Hint": "Bucket where SES stores raw messages",+ "aws.allowed": "Allowed",+ "aws.missingS3": "Missing S3 permissions",+ "aws.snsHint": "Notifies Mailflare of each message",+ "aws.missingSns": "Missing SNS permissions",+ "aws.missingSummary": "Missing permissions and the IAM policy that grants them",+ "aws.missingList": "Missing: {list}",+ "aws.createUserHint": "Create an IAM user with programmatic access in the AWS console and attach a policy with the permissions Mailflare needs (shown after you save, if any are missing). Credentials are checked with AWS before they are stored.",+ "ses.unreachable": "Could not reach AWS",+ "ses.checking": "Checking Amazon SES…",+ "ses.cannotRead": "Could not read the domain from SES",+ "ses.verified": "Domain verified in SES",+ "ses.notAdded": "Domain is not added to SES yet",+ "ses.waiting": "DNS records added, waiting for SES to verify (DKIM {status})",+ "ses.missingDkim.one": "{count} DKIM record missing in Cloudflare",+ "ses.missingDkim.other": "{count} DKIM records missing in Cloudflare",+ "ses.dkim": "DKIM {status}",+ "ses.domainHint": "Verified sender identity in SES",+ "ses.sandboxHint": "Account-wide restriction",+ "ses.sandboxDetail": "In the sandbox SES delivers only to verified addresses. Request production access in the SES console before sending to anyone else.",+ "ses.addCnames": "Add these CNAME records where this domain's DNS is hosted, then check status."}diff --git a/src/lib/i18n/pt-BR.json b/src/lib/i18n/pt-BR.jsonindex 673cb65..9bd1720 100644--- a/src/lib/i18n/pt-BR.json+++ b/src/lib/i18n/pt-BR.json@@ -1160,5 +1160,82 @@"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…"+ "domains.working": "Trabalhando…",+ "resend.unreachable": "Não foi possível acessar o Resend",+ "resend.testSent": "E-mail de teste enviado para {to}",+ "resend.needsFullKey": "Requer uma chave de API do Resend com acesso total",+ "resend.checking": "Verificando o Resend…",+ "resend.cannotCheck": "Não é possível verificar: esta chave só pode enviar e-mails",+ "resend.cannotRead": "Não foi possível ler o domínio no Resend",+ "resend.verified": "Domínio verificado no Resend",+ "resend.waiting": "Registros DNS adicionados, aguardando a verificação do Resend ({status})",+ "resend.missingDns.one": "{count} registro DNS ausente na Cloudflare",+ "resend.missingDns.other": "{count} registros DNS ausentes na Cloudflare",+ "resend.dnsCheck": "Verificação de DNS: {status}",+ "resend.notAdded": "O domínio ainda não foi adicionado ao Resend",+ "resend.btn.setupDomain": "Configurar domínio",+ "resend.btn.verify": "Verificar",+ "resend.btn.setupDomainDns": "Configurar domínio e DNS",+ "resend.btn.createMissing": "Criar DNS ausente e verificar",+ "resend.btn.checkStatus": "Verificar status",+ "resend.domain": "Domínio",+ "resend.domainHint": "Domínio remetente verificado no Resend",+ "resend.sending": "Enviando…",+ "resend.sendTest": "Enviar e-mail de teste",+ "resend.manualHint": "Adicione este domínio em resend.com/domains e crie os registros DNS exibidos; depois envie um e-mail de teste. Ou substitua a chave por uma de acesso total para que o Mailflare faça a configuração.",+ "resend.addRecords": "Adicione estes registros onde o DNS deste domínio está hospedado e depois verifique.",+ "resend.propagate": "As alterações de DNS podem levar alguns minutos para se propagar. Verifique novamente em breve.",+ "resend.key": "Chave de API",+ "resend.keyHint": "Compartilhada por todos os domínios que usam o Resend",+ "resend.replace": "Substituir",+ "resend.remove": "Remover",+ "resend.saveKey": "Salvar chave",+ "resend.keySaved": "Chave de API salva",+ "resend.removeConfirm": "Remover a chave de API do Resend? Todos os domínios que usam o Resend deixarão de enviar e receber.",+ "resend.keyInstructions": "Crie uma chave em resend.com/api-keys. Uma chave de acesso total permite que o Mailflare adicione o domínio, seu DNS e o webhook de recebimento; uma chave somente de envio funciona para enviar, mas você adiciona o domínio no Resend por conta própria.",+ "aws.loadFailed": "Não foi possível carregar as configurações da AWS",+ "aws.removeConfirm": "Remover as credenciais da AWS? Os domínios que usam o Amazon SES deixarão de enviar e receber. Os recursos já criados na AWS são mantidos.",+ "aws.credentials": "Credenciais da AWS",+ "aws.credentialsHint": "Compartilhadas por todos os domínios que usam o Amazon SES",+ "aws.recheck": "Verificar de novo",+ "aws.accessKeyId": "ID da chave de acesso (AKIA…)",+ "aws.secretKey": "Chave de acesso secreta",+ "aws.region": "Região (us-east-1)",+ "aws.validating": "Validando…",+ "aws.validateSave": "Validar e salvar",+ "aws.keySummary": "Chave de acesso …{hint} · {region}",+ "aws.accountSuffix": " · conta {id}",+ "aws.envSuffix": " · do ambiente",+ "aws.sesSending": "Envio do SES",+ "aws.sesSendingHint": "Enviar e-mails e gerenciar identidades de remetente",+ "aws.allowedIn": "Permitido em {region}",+ "aws.missingSes": "Permissões do SES ausentes",+ "aws.sandbox": "Sandbox do SES",+ "aws.sandboxHint": "Contas novas da AWS começam restritas",+ "aws.sandboxDetail": "Somente destinatários verificados podem receber e-mails até que você solicite acesso de produção no console do SES.",+ "aws.sesReceiving": "Recebimento do SES",+ "aws.sesReceivingHint": "Regras de recebimento para e-mails de entrada",+ "aws.regionCannotReceive": "{region} não pode receber e-mails. Use us-east-1, us-west-2 ou eu-west-1.",+ "aws.missingReceipt": "Permissões de regras de recebimento do SES ausentes",+ "aws.s3Hint": "Bucket onde o SES armazena as mensagens brutas",+ "aws.allowed": "Permitido",+ "aws.missingS3": "Permissões do S3 ausentes",+ "aws.snsHint": "Notifica o Mailflare sobre cada mensagem",+ "aws.missingSns": "Permissões do SNS ausentes",+ "aws.missingSummary": "Permissões ausentes e a política IAM que as concede",+ "aws.missingList": "Ausentes: {list}",+ "aws.createUserHint": "Crie um usuário IAM com acesso programático no console da AWS e anexe uma política com as permissões de que o Mailflare precisa (exibidas após salvar, se alguma estiver ausente). As credenciais são verificadas com a AWS antes de serem armazenadas.",+ "ses.unreachable": "Não foi possível acessar a AWS",+ "ses.checking": "Verificando o Amazon SES…",+ "ses.cannotRead": "Não foi possível ler o domínio no SES",+ "ses.verified": "Domínio verificado no SES",+ "ses.notAdded": "O domínio ainda não foi adicionado ao SES",+ "ses.waiting": "Registros DNS adicionados, aguardando a verificação do SES (DKIM {status})",+ "ses.missingDkim.one": "{count} registro DKIM ausente na Cloudflare",+ "ses.missingDkim.other": "{count} registros DKIM ausentes na Cloudflare",+ "ses.dkim": "DKIM {status}",+ "ses.domainHint": "Identidade de remetente verificada no SES",+ "ses.sandboxHint": "Restrição em toda a conta",+ "ses.sandboxDetail": "No sandbox, o SES entrega apenas a endereços verificados. Solicite acesso de produção no console do SES antes de enviar a outras pessoas.",+ "ses.addCnames": "Adicione estes registros CNAME onde o DNS deste domínio está hospedado e depois verifique o status."}