diff --git a/components/email/email-viewer.tsx b/components/email/email-viewer.tsx index dd3c11c6..7f089689 100644 --- a/components/email/email-viewer.tsx +++ b/components/email/email-viewer.tsx @@ -4116,7 +4116,21 @@ export function EmailViewer({
{/* Authentication Results */} - {email.authenticationResults && ( + {email.authenticationResults && (() => { + const translateAuthResult = (result?: string) => { + const r = (result || '').toLowerCase(); + switch (r) { + case 'pass': return t('authentication.result.pass'); + case 'fail': return t('authentication.result.fail'); + case 'softfail': return t('authentication.result.softfail'); + case 'neutral': return t('authentication.result.neutral'); + case 'permerror': return t('authentication.result.permerror'); + case 'temperror': return t('authentication.result.temperror'); + case 'none': return t('authentication.result.none'); + default: return result || ''; + } + }; + return (
{/* SPF Check */} {email.authenticationResults.spf && ( @@ -4137,10 +4151,10 @@ export function EmailViewer({
SPF - +
-
- {email.authenticationResults.spf.result} +
+ {translateAuthResult(email.authenticationResults.spf.result)}
@@ -4171,10 +4185,10 @@ export function EmailViewer({
DKIM - +
-
- {email.authenticationResults.dkim.result} +
+ {translateAuthResult(email.authenticationResults.dkim.result)}
@@ -4205,16 +4219,16 @@ export function EmailViewer({
DMARC - +
-
- {email.authenticationResults.dmarc.result} +
+ {translateAuthResult(email.authenticationResults.dmarc.result)}
{email.authenticationResults.dmarc.policy && (
- Policy: {email.authenticationResults.dmarc.policy} + {t('authentication.policy')}: {email.authenticationResults.dmarc.policy}
)}
@@ -4258,7 +4272,8 @@ export function EmailViewer({
)} - )} + ); + })()} {/* AI Analysis (X-Spam-LLM) - Full width card */} {email.spamLLM && ( diff --git a/locales/en/common.json b/locales/en/common.json index 91b0326c..1251e3d6 100644 --- a/locales/en/common.json +++ b/locales/en/common.json @@ -306,7 +306,20 @@ "fail": "DMARC Fail", "none": "No DMARC" }, - "spam_score": "Spam Score" + "spam_score": "Spam Score", + "tooltip_spf": "Sender Policy Framework: Verifies that the sending server is authorized to send email on behalf of the domain", + "tooltip_dkim": "DomainKeys Identified Mail: Confirms the email was not altered in transit using a cryptographic signature", + "tooltip_dmarc": "Domain-based Message Authentication, Reporting & Conformance: Ensures SPF and DKIM align with the sender's domain and sets a policy for failures", + "policy": "Policy", + "result": { + "pass": "Pass", + "fail": "Fail", + "softfail": "Soft fail", + "neutral": "Neutral", + "permerror": "Permanent error", + "temperror": "Temporary error", + "none": "None" + } }, "headers": { "routing": "Routing",