[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:

agray created this task.May 11 2016, 8:32 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 11 2016, 8:32 PM
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
agray updated the task description. (Show Details)May 11 2016, 11:12 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: Easy.
thiemowmde added a subscriber: thiemowmde.

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

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptSep 1 2016, 3:38 PM

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

thiemowmde moved this task from incoming to in current sprint on the Wikidata board.
thiemowmde moved this task from Proposed to Review on the Wikidata-Sprint-2016-11-08 board.

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

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

thiemowmde moved this task from Proposed to Review on the Wikidata-Sprint board.
thiemowmde updated the task description. (Show Details)Nov 21 2016, 9:26 AM
Jonas closed this task as Resolved.Nov 21 2016, 11:30 AM
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

matej_suchanek updated the task description. (Show Details)
Tobi_WMDE_SW moved this task from Review to Done on the Wikidata-Sprint board.Dec 16 2016, 3:16 PM