Page MenuHomePhabricator

PLURAL not supported in UploadWizard upload phase
Open, LowPublic


The message file-exists-duplicate, when used on the UploadWizard, is shown unparsed, like:

Questo file è un duplicato {{PLURAL:$1|del seguente|dei seguenti}} file:

The translation is correct:

Event Timeline

Yes, we usually file a separate report for each incorrectly used message. It's usually something silly like forgetting to load jqueryMsg,_grammar,_plural , although sometimes it's more complicated.

Yes, we usually file a separate report for each incorrectly used message.

I just said 'related'. I didn't imply anything else.

Same thing in English:

This file is a duplicate of the following {{PLURAL:$1|file|files}}:

This is odd, because deletion of did resolve the problem for that message. The only obvious difference I see is that that message only includes a link and the message in this phab only includes a template. See also T246879.

As I noted in the duplicate bug, in the console, the following warning is thrown, which might be relevant:

VM96:90 mediawiki.jqueryMsg: file-exists-duplicate: Cannot read property 'hasAlreadyBeenUsedAsAReplacement' of undefined
MarkTraceur added a subscriber: MarkTraceur.

Huh. So I'm slowly working my way backwards in time through the untriaged bugs, and this (being the third similar issue reported that I've seen so far) seems like it may just be a general bug across our upload error/warning handlers, or possibly in the message system. The code looks good on first glance, and I haven't found any big "DEPRECATION/BREAKING CHANGE" emails about jqueryMsg or mw.Message#parse yet, so I assume these things are still fine, and there's just a problem with the way we're using them in UploadWizard.

Anyway, I'm marking this as low for now and noting that T246879 seems pretty similar.

Also: I have tested on beta and in production with obviously-duplicate files, and have not been able to reproduce, so we may need additional details about future reports.

@MarkTraceur I can't reproduce it anymore either. @Krinkle and @Esanders have recently made a change to mediawiki.jqueryMsg.js, maybe one of those fixed it.

..or the parameters that were passed were bad and have been fixed, that would probably have the same result.

@MarkTraceur sorry, correction, the bug is still kinda present but not in the same form. When uploading a file for which one (1) duplicate file exists, the message that is shown is:

This file is a duplicate of the following files:
    File:A session with a psychotherapist (751707089).jpg

It uses plural despite there being only one file. The argument ($1) is actually always empty.