Documents and notifications speak the language of the request, not of the document or the person receiving them #223
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Postulo/postulo#223
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Nothing in
src/ever switches translation to anything but the request's language:translation.overrideappears nowhere. As a result, the language a document declares, and the language a person chose, are ignored exactly where they matter most. Found in the 2026-09-15 code audit.1. CVs and letters print their fixed words in the interface language
documents/rendering.py:23-31,131: section headings come fromSECTION_LABELSviastr()in the active language.themes/base_cv.html:55,95-98andbase_portfolio.html:63-66: "present", month names (date:"M Y") andget_proficiency_displayall follow the interface.base_letter.html:27: the letter date is{% now "j F Y" %}.rendering.py:215: the{{ date }}placeholder usesstrftime("%B")in the C locale, so it is always English.2. Store copies are labelled with the owner's language
documents/stores.py:88sendslanguagefrom the profile, not from the document, so a French CV reaches Paperless labelled with the owner's interface language.3. The PDF title and file name carry the private variant name
base_cv.html:10,base_portfolio.html:19andbase_letter.html:10set<title>{{ cv.name }}</title>, which WeasyPrint writes into the PDF/Titlethat viewers and screen readers announce.rendering.py:287-290names the download "Backend, English — CV.pdf", and that name is what gets attached to portals and emails.documents/models.py:110).4. Scheduled and API notifications ignore the recipient's language
send_due_reminders.py:44andapplications/quiet.py:104-121callgettextin a management command where no language is active, so the text is alwaysLANGUAGE_CODE(en-gb).core/middleware.py:41-46appliesprofile.languageonly to a signed-in session. API token requests are not one, so "Captured: …" (api/api.py:291-311) follows whateverAccept-Languagethe extension sends.Proposal
translation.override(document_language(...)), falling back when no catalogue exists. Build{{ date }}withformats.date_formatinside it.stores.metadata_for: use the document's language for renders.notify()renders insidetranslation.override(owner.profile.language or site default). BuildNotificationfrom lazy strings, or have the service call a builder under the override.frCV rendered while the interface isen, and a reminder for a person whose language is not English.