Page MenuHomePhabricator

Autogenerate reference names
Closed, ResolvedPublic

Description

A reference name could be autogenerated when a user wants to cite a reference without a name. Potentially, this would allow to hide all UI elements dealing with reference names. Reference names are one of the most confusing aspects of references on Wikipedia and removing those elements could avoid a lot of confusion. VisualEditor already does this, for similar reasons.

The current solution is a field for the reference name, and if a user wants to cite a reference without a name, s/he will be prompted to enter one.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 14 2016, 6:03 PM
Sophivorus triaged this task as Low priority.Oct 14 2016, 6:03 PM

Maybe the reference name can be autogenerated by normalizing the "main value" of the template (see getMainValue method). So if the title of the book is "On the Origin of Species", the reference name would be "on-the-origin-of-species".

The problem I see with this strategy is what to do with references without template. The reference name would be too long. Maybe it can be capped at 20 chars or something.

Or maybe we should use random strings as autogenerated reference names.

Mattflaschen-Personal added a comment.EditedFeb 5 2017, 9:51 PM

For consideration, VisualEditor uses special numeric ones for this purpose (e.g. <ref name=":0">).

However, I think using meaningful strings like "on-the-origin-of-species" (even if not perfect ones; there could be a length cap) is better. ProveIt is a source-editing tool and a meaningful string looks better in wikitext than :0.

Sophivorus closed this task as Resolved.Sep 19 2019, 10:47 PM
Sophivorus claimed this task.