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 -

QA plan

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

Event Timeline

abi_ created this task.Jun 24 2020, 10:37 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 24 2020, 10:37 AM
NicoV added a subscriber: NicoV.Jun 24 2020, 10:41 AM
abi_ added a comment.Jun 25 2020, 7:06 AM

During imports,

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.

abi_ closed this task as Resolved.Jul 2 2020, 8:52 PM