LucasWerkmeister created this task.
LucasWerkmeister added a project: Wikidata.
Restricted Application added a subscriber: Aklapper.

TASK DESCRIPTION
  **Problem:**
  
  - In the header of a Lexeme, when the Lemma is shown, it’s formatted using 
the Lemma’s MediaWiki language code as the HTML `lang` attribute, even when the 
language code isn’t actually valid for HTML (e.g. MediaWiki `mo` = BCP-47 
`ro-Cyrl-MD`).
  
  **List of steps to reproduce** (step by step, including full links if 
applicable):
  
  - follow this permanent link 
<https://www.wikidata.org/w/index.php?title=Lexeme:L8383&oldid=1448146499>
  - inspect the element of the “апэ” Lemma
  
  OR:
  
  - create a new Lexeme
  - add a Lemma to it using the language code `mo` (or another non-standard 
MediaWiki language code 
<https://gerrit.wikimedia.org/g/mediawiki/core/+/296165451aecd315b321de3f21a4a4a11f49ec42/includes/language/LanguageCode.php#78>,
 like `simple` or `nrm`)
  - inspect the element of that Lemma
  
  **What happens?**:
  
  - The HTML `lang` attribute of the Lemma element is set to the non-standard 
MediaWiki language code (`mo`, `simple`, `nrm`, etc.)
  
  **What should have happened instead?**:
  
  - It should be set to the corresponding standard HTML language code itself 
(`ro-Cyrl-MD`, `en-simple`, `nrf`, etc.)
  
  **Example:**
  
  - https://www.wikidata.org/w/index.php?title=Lexeme:L8383&oldid=1448146499
  
  **Behavior driven development (BDD) (optional):**
  
  - GIVEN a Lexeme with a Lemma in a non-standard MediaWiki language code
  - WHEN I look at the Lexeme page
  - THEN the Lemma is language-tagged using the corresponding standard HTML 
language code
  
  **Acceptance criteria (optional):**
  
  - ...
  
  **Notes:**
  
  - LexemeIdHtmlFormatter: convert lemma lang attribute to BCP 47 
<https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikibaseLexeme/+/641762> 
fixed the same issue for Lemmas formatted as part of Lexeme ID values in 
statements. (But see also T300261 <https://phabricator.wikimedia.org/T300261>.)
  - The //visible// language code of the Lemma, below the Lemma text, should 
probably still show the MediaWiki language code.

TASK DETAIL
  https://phabricator.wikimedia.org/T306293

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: LucasWerkmeister
Cc: Aklapper, LucasWerkmeister, Astuthiodit_1, karapayneWMDE, Invadibot, 
maantietaja, ItamarWMDE, Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, 
QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, 
Mbch331
_______________________________________________
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org

Reply via email to