Fix: localize reply/forward quote header incl. sender address#367
Merged
Conversation
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:").
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tsand the composer's inline fallback.Changes
lib/quote-header.tstakes an optionalQuoteHeaderLabelsset (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-levelquote_headermessage namespace viagetTranslations/useTranslations- the existing i18n pattern. Added the namespace to all 17 locales (placeholders{date}/{from}).From:line now shows the fullName <email>like other mail clients (the reply line keeps the bare name, which reads naturally in "On … wrote:").Type of Change
Checklist
npm run typecheck && npm run lintand there are no errorsnpm run build)locales/) if my changes affect user-facing text