Page MenuHomePhabricator

Language fallbacks for referenced Senses in statements
Closed, ResolvedPublic

Description

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

Problem:
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.

BDD
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

Details

Related Gerrit Patches:
mediawiki/extensions/WikibaseLexeme : masterSenseIdTextFormatter fallback to SenseId
mediawiki/extensions/WikibaseLexeme : masterAdd language fallback to SenseIdHtmlFormatter

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.

Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptAug 14 2018, 3:41 PM
Ladsgroup removed Ladsgroup as the assignee of this task.Aug 15 2018, 9:17 PM
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)

Addshore moved this task from To Do to Doing on the Wikidata-Senses-Iteration3 board.
Restricted Application added a project: User-Addshore. · View Herald TranscriptAug 20 2018, 12:24 PM

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

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

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..

Addshore moved this task from Back Burner 🏛️ to Active 🚁 on the User-Addshore board.

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:

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

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

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

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

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

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

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