Version: unspecified
Severity: enhancement
Whiteboard: storypoints: 1
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=37312
Description
Details
- Reference
- bz37634
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | None | T39634 Display the label of an item in the Recent Changes | |||
Resolved | None | T39312 Display labels in special pages |
Event Timeline
Recent changes displays the Title of the page, which, in case of an item, is a numeric identifier. The recent changes has to include additionally the label of the item for the selected language in order to be minimally useful.
I think you guys will want a fairly general 'get human-readable title' method on Title; this could look up usage of DISPLAYTITLE and other similar things in general, and could hook into your label lookups here.
I don't (In reply to comment #2)
I think you guys will want a fairly general 'get human-readable title' method
on Title; this could look up usage of DISPLAYTITLE and other similar things in
general, and could hook into your label lookups here.
Would be nice, but I don't see a way to guarantee that this can always be done without loading the actual content. That would be expensive, and thus not a good thing to do in potentially long listings like RecentChanges. Also, in that case, it would make more sense to put the method into WikiPage, not Title.
Hm, maybe the human readable title could be stored in pageprops... dies DISPLAYTITLE already go there?
(In reply to comment #2)
Oh, I forget: for Wikidata, the human readable title depends on the user language. Could still be done with pageprops, but has the potential of swamping that table.
Seems like there are different places to hook in for different types of special pages.
'OldChangesListRecentChangesLine' works for RecentChanges, but needs a heavy lookup. It is already other heavy actions there. Not sure if a little more really makes any big difference. Because several accesses this page at the same time I would propose to simply use the memcached for caching the title-language-label-lookup.
'LogLine' works for several logging pages. It also have a load issue, but is used much more seldom than the recent changes. Not sure if there is anything to gain on caching values..
'ShowSearchHitTitle' should be used too.
'Special::NewPagesFilter' seems to be odd, not sure if this is covered by any of the other hooks.
(In reply to comment #6)
Seems like there are different places to hook in for different types of special
pages.
I still think we should just use LinkStart to hook into the Linker. We may need a global state switch of some sort to disable this when parsing wikitext...