Page MenuHomePhabricator

Use BCP 47 conform language codes for the HTML attribute hreflang
Closed, ResolvedPublic

Description

The value of the HTML attribute hreflang must be a valid BCP 47 language tag.

The HTML validation fails because of invalid language codes: https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.wikidata.org%2Fw%2Findex.php%3Ftitle%3DQ5296%26diff%3D807351493%26oldid%3D272854

Event Timeline

Change 478693 had a related patch set uploaded (by Fomafix; owner: Fomafix):
[mediawiki/extensions/Wikibase@master] Apply LanguageCode::bcp47() to value of hreflang attribute

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

Change 478693 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Apply LanguageCode::bcp47() to value of hreflang attribute

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

Actual report from HTML Validator before deployment:

WARNING: The bdi element is not supported in all browsers. Please be sure to test, and consider using a polyfill.

From line 50, column 297; to line 50, column 301

atthiasb"><bdi>Matthi

WARNING: The bdi element is not supported in all browsers. Please be sure to test, and consider using a polyfill.

From line 51, column 297; to line 51, column 301

:Wonnral"><bdi>Wonnra

IMPORTANT: Element h4 not allowed as child of element span in this context. (Suppressing further errors from this subtree.)

From line 52, column 154738; to line 52, column 154793

date</a>: <h4 class="wb-details wb-time-details wb-time-rendered">28 Oct

Content model for element span:
    Phrasing content.
IMPORTANT: Element table not allowed as child of element span in this context. (Suppressing further errors from this subtree.)

From line 52, column 154814; to line 52, column 154855

2013</h4><table class="wb-details wb-time-details"><tr><t

Contexts in which element table may be used:
    Where flow content is expected.
Content model for element span:
    Phrasing content.
IMPORTANT: Bad value bat-smg for attribute hreflang on element a: Bad extlang subtag smg.

From line 52, column 188020; to line 52, column 188114

e-inline"><a dir="auto" href="https://bat-smg.wikipedia.org/wiki/P%C4%97rms_poslapis" hreflang="bat-smg">Pėrms

IMPORTANT: Bad value cbk-zam for attribute hreflang on element a: Bad extlang subtag zam.

From line 52, column 199845; to line 52, column 199937

e-inline"><a dir="auto" href="https://cbk-zam.wikipedia.org/wiki/El_Primero_Pagina" hreflang="cbk-zam">El Pri

IMPORTANT: Bad value eml for attribute hreflang on element a: The language subtag eml is not a valid ISO language part of a language tag.

From line 52, column 216582; to line 52, column 216651

e-inline"><a dir="auto" href="https://eml.wikipedia.org/wiki/PP" hreflang="eml">PP</a>

IMPORTANT: Bad value fiu-vro for attribute hreflang on element a: Bad extlang subtag vro.

From line 52, column 227683; to line 52, column 227775

e-inline"><a dir="auto" href="https://fiu-vro.wikipedia.org/wiki/P%C3%A4%C3%A4leht" hreflang="fiu-vro">Pääleh

IMPORTANT: Bad value map-bms for attribute hreflang on element a: Bad extlang subtag bms.

From line 52, column 276315; to line 52, column 276400

e-inline"><a dir="auto" href="https://map-bms.wikipedia.org/wiki/Kaca_Utama" hreflang="map-bms">Kaca U

IMPORTANT: Bad value roa-rup for attribute hreflang on element a: Bad extlang subtag rup.

From line 52, column 306910; to line 52, column 307008

e-inline"><a dir="auto" href="https://roa-rup.wikipedia.org/wiki/Prota_fr%C3%A3ndz%C3%A3" hreflang="roa-rup">Prota

IMPORTANT: Bad value roa-tara for attribute hreflang on element a: Bad script subtag.

From line 52, column 307328; to line 52, column 307427

e-inline"><a dir="auto" href="https://roa-tara.wikipedia.org/wiki/Pagene_Prengep%C3%A1le" hreflang="roa-tara">Pagene

IMPORTANT: Bad value simple for attribute hreflang on element a: The language subtag simple is not a valid IANA language part of a language tag.

From line 52, column 316810; to line 52, column 316892

e-inline"><a dir="auto" href="https://simple.wikipedia.org/wiki/Main_Page" hreflang="simple">Main P

IMPORTANT: Bad value simple for attribute hreflang on element a: The language subtag simple is not a valid IANA language part of a language tag.

From line 52, column 317214; to line 52, column 317296

e-inline"><a dir="auto" href="https://simple.wikiquote.org/wiki/Main_Page" hreflang="simple">Main P

IMPORTANT: Bad value zh-classical for attribute hreflang on element a: Subtags must not exceed 8 characters in length.

From line 52, column 354382; to line 52, column 354522

e-inline"><a dir="auto" href="https://zh-classical.wikipedia.org/wiki/%E7%B6%AD%E5%9F%BA%E5%A4%A7%E5%85%B8:%E5%8D%B7%E9%A6%96" hreflang="zh-classical">維基大典:卷

WARNING: Potentially bad value zh-min-nan for attribute hreflang on element a: The grandfathered language tag zh-min-nan is deprecated. Use nan instead.

From line 52, column 354850; to line 52, column 354950

e-inline"><a dir="auto" href="https://zh-min-nan.wikiquote.org/wiki/Th%C3%A2u-ia%CC%8Dh" hreflang="zh-min-nan">Thâu-i

WARNING: Potentially bad value zh-min-nan for attribute hreflang on element a: The grandfathered language tag zh-min-nan is deprecated. Use nan instead.

From line 52, column 355282; to line 52, column 355383

e-inline"><a dir="auto" href="https://zh-min-nan.wikisource.org/wiki/Th%C3%A2u-ia%CC%8Dh" hreflang="zh-min-nan">Thâu-i

IMPORTANT: Bad value simple for attribute hreflang on element a: The language subtag simple is not a valid IANA language part of a language tag.

From line 52, column 399444; to line 52, column 399526

e-inline"><a dir="auto" href="https://simple.wikibooks.org/wiki/Main_Page" hreflang="simple">Main P

WARNING: Potentially bad value zh-min-nan for attribute hreflang on element a: The grandfathered language tag zh-min-nan is deprecated. Use nan instead.

From line 52, column 400685; to line 52, column 400785

e-inline"><a dir="auto" href="https://zh-min-nan.wikipedia.org/wiki/Th%C3%A2u-ia%CC%8Dh" hreflang="zh-min-nan">Thâu-i

WARNING: Potentially bad value zh-min-nan for attribute hreflang on element a: The grandfathered language tag zh-min-nan is deprecated. Use nan instead.

From line 52, column 436700; to line 52, column 436801

e-inline"><a dir="auto" href="https://zh-min-nan.wiktionary.org/wiki/Th%C3%A2u-ia%CC%8Dh" hreflang="zh-min-nan">Thâu-i

IMPORTANT: Bad value roa-rup for attribute hreflang on element a: Bad extlang subtag rup.

From line 52, column 448623; to line 52, column 448722

e-inline"><a dir="auto" href="https://roa-rup.wiktionary.org/wiki/Prota_fr%C3%A3ndz%C3%A3" hreflang="roa-rup">Prota

WARNING: Potentially bad value zh-yue for attribute hreflang on element a: The language tag zh-yue is deprecated. Use yue instead.

From line 52, column 481810; to line 52, column 481901

e-inline"><a dir="auto" href="https://zh-yue.wikipedia.org/wiki/%E9%A0%AD%E7%89%88" hreflang="zh-yue">頭版</a>

IMPORTANT: Bad value simple for attribute hreflang on element a: The language subtag simple is not a valid IANA language part of a language tag.

From line 52, column 496653; to line 52, column 496747

e-inline"><a dir="auto" href="https://simple.wiktionary.org/wiki/Wiktionary:Main_Page" hreflang="simple">Wiktio