[3.0] Writes each digest in the language of the member receiving it - #9613
Open
albertlast wants to merge 1 commit into
Open
[3.0] Writes each digest in the language of the member receiving it#9613albertlast wants to merge 1 commit into
albertlast wants to merge 1 commit into
Conversation
The strings for every language a subscriber reads are collected into $langtxt, keyed by language, and then every email was built from $langtxt[$lang] - $lang being whatever the foreach that filled $langtxt left behind. Every member got the same language, whichever one happened to be last, and the 'lang' the query recorded for each member was never read. The sign-off did not even do that: it called getTxt() with no language at all, so it was always in the forum's default language while the rest of the mail was in another. There is already a localized copy of it in $langtxt['bye'], which nothing used. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
albertlast
force-pushed
the
3.0/digest-member-language
branch
from
September 3, 2026 23:03
3820a04 to
ff19903
Compare
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.
Description
SendDigestscollects the strings for every language its subscribers read into$langtxt, keyed by language, and then builds every email from$langtxt[$lang]—$langbeing whatever theforeach ($langs as $lang)that filled$langtxthappened to leave behind. Every member gets the same language, whichever one sorted last, and the'lang'the opening query records for each member is never read at all.The sign-off did not even do that. It called
Lang::getTxt('regards_team', …)with no language argument, so it was always in the forum's default language while the rest of the mail was in another. There is already a correctly localized copy of it in$langtxt[…]['bye'], which nothing used.Verified on the Docker stack with a marked second language pack: with UserA on
tr_TRand UserB onen_US, both digests came out identical before, and afterwards each member's mail — subject, intro, section headings, lines and sign-off — is in their own language.Note that this is only visible once #9612 lands.
Lang::load()currently ignores the language it is asked for, soLang::getTxt(…, lang: …)returns the forum default whatever it is passed, and the two changes were verified together.Not covered by a test.
SendDigests::execute()opens with a query and needs a database throughout, so it is out of scope for the unit suite.Issues References (Fixes|Related|Closes)
🤖 Generated with Claude Code