Page MenuHomePhabricator

[Bug] Correct language fallback rendering on Special:ListProperties
Closed, ResolvedPublic

Description

When viewing Special:ListProperties, all properties shown are rendered in the same way and labelled as the user's language, regardless of whether they're actually in that language or not. For example, with the language set to Gaelic (gd) -

<li><a title="Property:P27" href="/wiki/Property:P27"><span class="wb-itemlink"><span class="wb-itemlink-label" lang="gd">country of citizenship</span> <span class="wb-itemlink-id">(P27)</span></span></a></li>

<li><a title="Property:P30" href="/wiki/Property:P30"><span class="wb-itemlink"><span class="wb-itemlink-label" lang="gd">mòr-roinn</span> <span class="wb-itemlink-id">(P30)</span></span></a></li>

Note that both use lang="gd", although P27 is using the English (en) label, and P30 is using the correct Gaelic (gd) label.

When seen elsewhere, eg on an item, fallback labels are correctly shown as lang="en":

<div class="wikibase-statementgroupview-property-label" dir="auto"><a title="Property:P27" href="/wiki/Property:P27" lang="en">country of citizenship</a><sup class="wb-language-fallback-indicator">Beurla</sup></div>

Patches for review:

Event Timeline

agray renamed this task from Correct language fallback rendering on Special:Allpages to Correct language fallback rendering on Special:ListProperties.May 11 2016, 8:36 PM
thiemowmde renamed this task from Correct language fallback rendering on Special:ListProperties to [Bug] Correct language fallback rendering on Special:ListProperties.Sep 1 2016, 3:37 PM
thiemowmde triaged this task as Low priority.
thiemowmde added a project: good first task.
thiemowmde subscribed.

Confirmed. SpecialListProperties needs to check if it gets a TermFallback, and should use getActualLanguageCode then.

Change 320643 had a related patch set (by Matěj Suchánek) published:
Use actualLanguageCode on ListProperties

https://gerrit.wikimedia.org/r/320643

Change 320796 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
More specific return type in LanguageFallbackLabelDescriptionLookup

https://gerrit.wikimedia.org/r/320796

Change 320796 merged by jenkins-bot:
More specific return type in LanguageFallbackLabelDescriptionLookup

https://gerrit.wikimedia.org/r/320796

Jonas moved this task from Review to Done on the Wikidata-Sprint-2016-11-08 board.

Change 320643 merged by jenkins-bot:
Use actualLanguageCode on ListProperties

https://gerrit.wikimedia.org/r/320643