User:Adamw/Delete: Category alias proposal

This page describes some potential technical implementations for category aliasing.

Background
The Wikimedia Deutschland Technical Wishes team is currently looking at various solutions to the problem of generic masculine categories in biographical articles. This is both ungrammatical and reduces the visibility of women.

We're hoping to introduce a technical mechanism which will allow a category to be applied to an article and will appear at the bottom of that article, while aliasing to another category. A made-up English example would be, a biographical article categorized as "Firewoman" might alias to "Firefighter". The article would show "Firewoman" in its list of categories, but you could find the article by visiting the "Firefighter" category.

Hard redirect categories
There are theoretically two ways to redirect a category, but only one is correct. If the category page source begins with the " " directive, then anyone visiting the category will be redirected to the target page instead, but it's still possible to assign the category to an article. This is broken and shouldn't be used. A bot will rewrite any hard redirected categories as a templated soft redirect, using the "Category redirect" template, for example with this edit. The soft redirect is meant for common misspellings, and another bot will recategorize any articles to move from the redirected category to the target category.

I'm proposing that we take advantage of the brokenness of hard-redirected categories, to give these pages a new behavior. If an article is categorized with the "Firewoman" example from above, and the "Firewoman" category page contained the source " ", then the article will display the "Firewoman" category, but will show up on the Firefighter category page. I'd suggest that the article also show up on the "Firewoman" category page since this will be an expected behavior, but this is tricky because the redirect also means that it will take an extra step to reach the Firewoman category page.

A similar idea for category redirects has been around since at least 2009, when a similar feature was temporarily deployed. The implementation was incomplete and quickly reverted, but onwiki discussion about some of the shortcomings makes the challenges seem reasonable.

Alias keyword
Rather than change the behavior of " ", we might introduce a new directive such as " " instead. Although this is nice because it gives us additional freedom to add constraints (e.g. can only alias to another category page) and behaviors, it means a wikitext syntax change, which could confuse parsers, etc.

Non-page representations
It might be possible to implement category aliases in some other way which doesn't involve the creation of a category page for the alias, but these seem to create a lot of technical debt, since we'll have to modify the many places where MediaWiki code interacts with categories, e.g. making the aliases available in search and autocomplete features.