Generated with the help of an LLM.
Problem/Motivation
On a non-English site, the review dates show up in English: "Nov 9, 2026" in badges, reasons, the node notice, the Review status page and the messages.
ReviewedDateManager::formatDate() formats the date with PHP's DateTimeImmutable::format('M j, Y'), so the month name never gets translated and the site's date formats are ignored. ReviewTableBuilder::timestamp() does use the date formatter, but with a hard-coded custom 'M j, Y' / 'M j, Y g:i A' format, so the order is still the US one.
A smaller thing: the digest heading ("Your content that needs review") is translated when the digest is queued, in the default language, not in the recipient's language like the rest of the mail.
Steps to reproduce
- Site in Dutch.
- Mark a node as reviewed. The message says "... is gemarkeerd als nagekeken op Nov 9, 2026."
Proposed resolution
- Use the
date.formatterservice with a site date format informatDate()andtimestamp().mediumwithout the time, or a format the module ships, maybe configurable. - Translate the digest heading in
hook_mail()with the message langcode, or store an untranslated key in the queue item.
Remaining tasks
- MR.
User interface changes
Dates follow the site's date format and language.
API changes
None.
Data model changes
Maybe a date format config entity, if the module ships one.
Issue fork content_reviewed_date-3636492
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3636492-localised-dates
changes, plain diff MR !4
Comments
Comment #5
ajetiv1fixed in baf5c4b and 613dd98; two editable date formats; MR !4's language parameter and localization test were merged.
Comment #6
ajetiv1fixed in baf5c4b and 613dd98; two editable date formats; MR !4's language parameter and localization test were merged.