Page MenuHomePhabricator

Language fallbacks for referenced Senses in statements
Closed, ResolvedPublic


As a reader I want to see the best Gloss available for a Sense in order to understand what a Sense means.

We don't have Glosses for a Sense in all the languages but we still want to show something better than the ID if possible.

GIVEN a statement that has a Sense as value
AND the Sense does not have a Gloss in the current interface language
THEN the Gloss for the next language in the Wikimedia language fallback chain is shown
AND the language is shown in superscript (except for language variants, see T174318: Don’t display language fallback indicators for variant fallbacks)
AND if none can be found the ID of the Sense is shown

Acceptance criteria:

  • fallback is indicated to the user in the same way as fallback for labels (superscript of the language name)
  • fallback is in place if the Sense does not have a Gloss in the current interface language

Event Timeline

Before T89213: Allow fallback to any language is fixed it may be common to see only Qid as many senses may not have English translation.

Ladsgroup moved this task from Doing to To Do on the Wikidata-Senses-Iteration3 board.
Ladsgroup added a subscriber: Ladsgroup.

I tried but couldn't finish it, someone else can pick this up. (Unlicking the cookie)

Change 454036 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/WikibaseLexeme@master] Add language fallback to SenseIdHtmlFormatter

The patch only alters the HTML output which as far as I can tell meets the acceptance criteria of this ticket.
If we also want to change the text formatting of the sense value then either we need to spec what that should look like in this ticket or open another ticket.
I'm not actually sure where the text formatter is used..

I think the text formatter is used when you start editing the value, for example, to populate the input.

Currently the formatter formats the values with fallback as the following:

image.png (106×224 px, 3 KB)

If I just shove the current version of the fallback indicator in the brackets we end up with something like this:

image.png (160×236 px, 4 KB)

Thoughts by @Lydia_Pintscher & WMDE-Design ?

Change 454244 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/WikibaseLexeme@master] SenseIdTextFormatter fallback to SenseId

Decision: for now, with the former.

Decision 2: when there is no gloss in fallback languages, display the sense ID.

Change 454036 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Add language fallback to SenseIdHtmlFormatter

Change 454244 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] SenseIdTextFormatter fallback to SenseId