Page MenuHomePhabricator

VisualEditor: The category tool should automatically strip the namespace "Category:" out of the cat name, if the editor types it in
Open, LowPublicFeature

Description

Intention:
Add a category to a page

Steps to Reproduce:

  1. Open the page in VisualEditor and choose the categories tool.
  2. Type the full name of the category, including the namespace: Category:Example

Actual Results:
VisualEditor adds a non-existent, malformed category named [[Category:Category:Example]].

Expected Results:
That VisualEditor would recognize that "Category:Example" already contained the namespace, and thus omit the duplication. Ideally, at non-English wikis, it would recognize and remove both the local name for the namespace and the English name, since both are typically valid (e.g., strip out both "Kategorie" and "Category" at the German Wikipedia).

Reproducible: Always


Version: unspecified
Severity: enhancement

Details

Reference
bz57786

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:33 AM
bzimport set Reference to bz57786.

[new feature or "nice-to-have" => severity=enhancement]

What to do when there's a category called "Category:Foo" and another called "Foo". Do we strip or not?

There is [[Category:Category theory]], it might be worth checking as a corner case.

Do any [[Category:Category:Foo]] pages exist? I haven't seen one.

(In reply to comment #4)

Do any [[Category:Category:Foo]] pages exist? I haven't seen one.

On all ten million MediaWiki wikis out there? Quite probably…

J.

Also there's the problem of either (a) only doing this hack for English, or (b) having to hold in VE a copy of all of the translations of Category:, and know which one to remove when (removing Catégorie: on French, but not on English, and so on).

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:13 AM
Aklapper removed a subscriber: rmoen.