StatusReportPage passes TranslatableMarkup to PluralTranslatableMarkup causing translation issues

Created on 5 September 2025, about 19 hours ago

Problem/Motivation

The StatusReportPage render element passes TranslatableMarkup instances as arguments to PluralTranslatableMarkup for text strings, which leads to two issues:

  1. It prevents proper translation of plural forms
  2. It treats translated strings as English words

Steps to reproduce

Assume we have this example:

$text = t('Checked', [], ['context' => 'Examined']);
$text_plural = t('Checked', [], ['context' => 'Examined']);
echo new PluralTranslatableMarkup(5, $text, $text_plural);
  • On English the output is «Checked»
  • On Russian the output is: «Проверки»

First, the word «Проверки» in this case should be «Проверок», as it is the third plural form in Russian. The translation for «Checked» should be:

msgctxt "Examined"
msgid "Checked"
msgid_plural "Checked"
msgstr[0] "Проверка"
msgstr[1] "Проверки"
msgstr[2] "Проверок"

but in fact the current approach forces to use a single translation for all forms:

msgctxt "Examined"
msgid "Checked"
msgstr "Проверки"

Secondly, when Russian words are actually passed as arguments to PluralTranslatableMarkup, it creates a new problem: these strings, which are essentially translations, become source strings on their own and are treated as English words.

Proposed resolution

Pass unprocessed raw text values (without prior processing by TranslatableMarkup) to the PluralTranslatableMarkup.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

system.module

Created by

🇷🇺Russia niklan Russia, Perm

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024