As an editor I want to easily understand what a constraint violation that involves a Lexeme or Form is saying in order to be able to fix the constraint violation.
Problem:
When a lexeme or form is mentioned in the violation message of a constraint report, the link text is only the entity ID, instead of the lemma(s) or representation(s).
Example:
https://www.wikidata.org/w/index.php?title=Lexeme:L123&oldid=704111533#P123
Screenshots:
BDD
GIVEN a statement has a constraint violation
AND the constraint violation explanation contains a reference to a Lexeme
THEN the link to that Lexeme should show the Lemma(s) as link text
GIVEN a statement has a constraint violation
AND the constraint violation explanation contains a reference to a Form
THEN the link to that Form should show the Representation(s) as link text
Acceptance criteria:
- The Lexeme ID is no longer shown but instead the Lemma(s)
- The Form ID is no longer shown but instead the Representation(s)
Technical notes:
WikibaseQualityConstraints initializes entity ID rendering like this:
$languageFallbackLabelDescriptionLookupFactory = $repo->getLanguageFallbackLabelDescriptionLookupFactory(); $labelDescriptionLookup = $languageFallbackLabelDescriptionLookupFactory->newLabelDescriptionLookup( $language ); $entityIdHtmlLinkFormatterFactory = $repo->getEntityIdHtmlLinkFormatterFactory(); $entityIdHtmlLinkFormatter = $entityIdHtmlLinkFormatterFactory->getEntityIdFormatter( $labelDescriptionLookup );
It looks like the EntityIdHtmlLinkFormatter doesn’t support entities without labels correctly…?