wikimedia-gadgets / afc-helper

A tool for reviewing Articles for Creation submissions on the English Wikipedia
https://en.wikipedia.org/wiki/Wikipedia:AFCH
GNU General Public License v3.0
36 stars 80 forks source link

Don't add colons to wikilinks that contain the word "draft" #257

Open NovemLinguae opened 1 year ago

NovemLinguae commented 1 year ago

Requested by InfiniteNexus at https://en.wikipedia.org/wiki/Wikipedia_talk:WikiProject_Articles_for_creation#Category_links

AFCH automatically adds colons to [[Category:abc]] type wikilinks so that drafts stay out of categories. So the above is converted to [[:Category:abc]]

This ticket is to code an exception for categories whose name contains the word "draft". According to InfiniteNexus, these are usually false positives.

Diff of incorrect AFCH behavior: https://en.wikipedia.org/w/index.php?diff=1137264750&diffmode=source

image

siddharthvp commented 1 year ago

Such adhoc exceptions can have false positives and aren't maintainable. The supported way to categorise drafts is via templates, so they don't get coloned, eg. via {{AfC topic}}, {{Draft article|subject=}}, etc.

enterprisey commented 1 year ago

That makes sense, but I think checking for Category:Draft articles subcategories would cover everything. And in fact PR #154 addresses precisely this (which leads us to #131, which this might be a dupe of, really) - we worked on it a bit ages ago and I'm sure the idea could be adapted into merge-ability.