Skip to content

Fix: localize reply/forward quote header incl. sender address#367

Merged
rathlinus merged 1 commit into
bulwarkmail:mainfrom
dealerweb:pr/quote-header-i18n
May 30, 2026
Merged

Fix: localize reply/forward quote header incl. sender address#367
rathlinus merged 1 commit into
bulwarkmail:mainfrom
dealerweb:pr/quote-header-i18n

Conversation

@dealerweb
Copy link
Copy Markdown
Contributor

Summary

The reply/forward quote header was always English regardless of UI language ("On {date}, {from} wrote:", "---------- Forwarded message ----------", the From/Date/Subject labels), in both lib/quote-header.ts and the composer's inline fallback.

Changes

  • lib/quote-header.ts takes an optional QuoteHeaderLabels set (English defaults preserved for back-compat), so the pure lib stays free of the request/i18n context.
  • page.tsx (server) and the composer (client) build those labels from a new top-level quote_header message namespace via getTranslations/useTranslations - the existing i18n pattern. Added the namespace to all 17 locales (placeholders {date} / {from}).
  • Also: the forward From: line now shows the full Name <email> like other mail clients (the reply line keeps the bare name, which reads naturally in "On … wrote:").

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Checklist

  • I have read the Contributing Guide
  • My code follows the project's code style and conventions
  • I have run npm run typecheck && npm run lint and there are no errors
  • The build passes (npm run build)
  • I have tested my changes locally
  • I have updated translations (locales/) if my changes affect user-facing text

The reply/forward quote header was always emitted in English ("On {date},
{from} wrote:", "---------- Forwarded message ----------", From/Date/Subject)
regardless of UI language, in both the main path (lib/quote-header.ts) and the
composer's inline fallback. quote-header.ts now takes an optional localized
QuoteHeaderLabels set (English defaults preserved for back-compat); page.tsx
builds it from a new quote_header message namespace, and the composer fallback
uses the same keys. Added the quote_header namespace to all 17 locales.

Also folds in the forward-sender-address fix: the forward "From:" line now
shows the full "Name <email>" like every mail client (the reply line keeps the
bare name, which reads naturally in "On … wrote:").
@rathlinus rathlinus merged commit 8d79145 into bulwarkmail:main May 30, 2026
@dealerweb dealerweb deleted the pr/quote-header-i18n branch May 31, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants