Page MenuHomePhabricator

Make File syntax processing match the specification and documentation
Open, Needs TriagePublic


Brief summary

File: syntax as described at mw:Help:Images is inconsistent and does not work as expected in all cases. Linter fails to identify all problem cases. The "parameters" (for lack of a better word) and options used in the File: syntax do not work in a predictable, consistent way, and their implementation is inconsistent with how template parameters work.

See for a full description and links to existing phabricator tasks

Skills required

Programming skills, strong analytical skills to compare the specification with functionality, technical writing of documentation (mentor can help with documentation).

Possible mentor(s)



(A couple of these have been worked on a little in the past few months, but the whole system still needs a full evaluation.)

T216566: Capitalized versions of valid File options are usually (but not always) ignored, but are (usually but not always) not flagged as Linter bogus file options.
T216003: Linter fails to detect multiple "upright" parameters as a Bogus file option (there are multiple variants within this bug report, including inconsistent handling of spaces before and after equals signs in File: parameters. Note also that if there is a space character between alt and the equals sign, the alt statement will be treated as a caption.)
T215999: Linter does not detect invalid "500px500px" as a bogus file option (also "600 px", "left150px", duplicated "300px")
T179605: LintError bogus-image-options triggers on "Thumbtime" (in general, case sensitivity works inconsistently in File: syntax)
T266406: Linter false positive: "Center/Left/Right" as caption for gallery image (no workaround is available)
T264464: Conflicting border/thumb/frame options are not detected as Linter errors (Until October 2020, mw:Help:Images said "If multiple of these options are present, only the first one will be used". That statement was incorrect, in that some options have priority over others regardless of position, leading to inconsistent results for editors and readers.)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptWed, Feb 10, 3:35 PM

@Jonesey95 Thank you so much for creating this task! I am one of the org admins for Wikimedia, and I have got a few questions for you:

  • Do you have a sense of how much time it would take an absolute beginner to complete this project?
  • Which programming skills would one require to work on this project?
  • Where would the code contributions ultimately land?
  • Are you going to be a technical or non-technical mentor on the project? Do you have a second mentor in mind with complementary skills?

I would then be able to share with you the next steps :)

Jonesey95 added a subscriber: Sbailey.EditedTue, Feb 16, 12:49 AM

I do not have good answers for any of these questions.

With respect to the amount of time this might take, I can only give you factors of ten. It will take well over 10 hours, and well under 1,000 hours. Probably somewhere in the 30 to 200 hour range is a good guess.

I don't know what programming skills would be needed, since I don't know anything about the code that runs Wikimedia sites.

The code contributions would ultimately be incorporated into the file handling branch of the Wikimedia code base, I think.

I am an end user of Wikipedia, so I can act as a QA person to identify bugs (as indicated in the many phab tasks that I have submitted). If there is a spec, I'll be happy to read it with someone to help them understand it. I can find and make test cases.

User @Sbailey (WMF) might be a person who could answer these questions more effectively. They have recently done some work on T215999.

@Jonesey95 Thank you for sharing your response! Scope-wise, this project looks good then. As you are coming with a non-technical background, we would need someone with technical skills willing to collaborate with you on this idea and mentor a candidate via GSoC. Have you talked with a potential technical mentor already, or would you need help in recruiting one?

I would need help recruiting a technical mentor. Thanks!

@Jonesey95 Okay! As a first step, I would encourage you to send an email to Wikitech-l sharing your idea and that you are looking for a mentor for the project.

No thanks. I must have misunderstood the call for submissions. I feel that I have described the work adequately.