- Issue created by @niklan
- Merge request !13170Pass unprocessed strings into PluralTranslatableMarkup → (Open) created by niklan
The StatusReportPage
render element passes TranslatableMarkup
instances as arguments to PluralTranslatableMarkup
for text strings, which leads to two issues:
Assume we have this example:
$text = t('Checked', [], ['context' => 'Examined']);
$text_plural = t('Checked', [], ['context' => 'Examined']);
echo new PluralTranslatableMarkup(5, $text, $text_plural);
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.
Pass unprocessed raw text values (without prior processing by TranslatableMarkup
) to the PluralTranslatableMarkup
.
Active
11.0 🔥
system.module