Page MenuHomePhabricator

Correctly set lang HTML attribute for each article placeholder string
Open, Needs TriagePublic

Description

https://cy.wikipedia.org/wiki/Arbennig:Am_y_Pwnc/Q1441 has a label and description in English, but they're both marked as being in Welsh (cy), either implicitly or explicitly:

<h1 id="firstHeading" class="firstHeading" lang="cy">Wanfried agreement</h1>

Every label and description (also for properties and statements thereof) should come with its lang attribute, when we fallback to a language different from the content language.


URL: https://www.w3.org/International/questions/qa-lang-why.en

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

LanguageFallbackChain::extractPreferredValue() returns a language value which should be what we need, if it's passed on in the next steps; TermIndexEntry provides a getLanguage() function.

https://www.mediawiki.org/wiki/Extension:Wikibase_Client/Lua mentions mw.wikibase.entity:getLabelWithLang and mw.wikibase.entity:getDescriptionWithLang

Change 358998 had a related patch set uploaded (by Nemo bis; owner: Federico Leva):
[mediawiki/extensions/ArticlePlaceholder@master] [WIP] Identify some places where the lang attribute would be needed

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

Change 358998 abandoned by Addshore:
[mediawiki/extensions/ArticlePlaceholder@master] [WIP] Identify some places where the lang attribute would be needed

Reason:

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

  NODES
INTERN 1
Note 1
Project 5