Page MenuHomePhabricator

Incorrect plural expansion / closing for Gettext plurals
Closed, ResolvedPublicBUG REPORT

Description

Current status

Deployed. Waiting for export to QA.

Original report

During exports from Translatewiki.net, the following Gettext plural,

#: org/wikipediacleaner/gui/swing/bot/ListCWWorker.java:616
#, java-format
msgid "{0} page has been detected for algorithm {1}"
msgid_plural "{0} pages have been detected for algorithm {1}"
msgstr[0] "{0} page a été détectée pour l’algorithme {1}"
msgstr[1] "{0} pages ont été détectées pour l’algorithme {1}"

got exported as -

#: org/wikipediacleaner/gui/swing/bot/ListCWWorker.java:616
#, java-format
msgid "{0} page has been detected for algorithm {1}}"
msgid_plural "{0} pages have been detected for algorithm {1}"
msgstr[0] "{0} page a été détectée pour l’algorithme {1}}"
msgstr[1] "{0} pages ont été détectées pour l’algorithme {1}"

This is probably caused due to the variable {1} at the end of the plural.

See image created from PR -

PbTranslateWiki.png (318×1 px, 30 KB)

QA plan

Affected projects: translatewiki.net
Post-deployment: Test export of WPCleaner

Event Timeline

Change 607777 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] Armour {0} style variables in GettextPlural

https://gerrit.wikimedia.org/r/607777

Change 607777 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Armour {0} style variables in GettextPlural

https://gerrit.wikimedia.org/r/607777

Nikerabbit removed a project: Patch-For-Review.
Nikerabbit added a subscriber: Jpita.

@Jpita We'll be verifying this ourselves.

This has been deployed to translatewiki.net

Ran the exports today and did not notice this issue.

image.png (380×994 px, 183 KB)