When viewing an item in a language where no label and description exists I want to see the label and description of a fallback language if available. There needs to be an indicator showing the language (similar to how it is done for entity links in statements).
It should not be applied to aliases for now.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Apply language fallback to terms in header | mediawiki/extensions/Wikibase | master | +263 -108 |
Status | Subtype | Assigned | Task | |
---|---|---|---|---|
· · · | ||||
Open | None | T76216 [Epic] Language fallback | ||
Open | None | T54136 [Epic] Redesign Item UI for Wikidata repo | ||
Resolved | • adrianheine | T98014 [Story] apply language fallback for labels and descriptions in current language in main part of header | ||
Resolved | • adrianheine | T98041 [Task] Extract fallback hint rendering functionality | ||
Resolved | • adrianheine | T134743 [Task] Remove aliases empty text | ||
· · · |
Event Timeline
I'm starting to work on this. My understanding:
- Label and description will fall back separately according to standard fall back chains and each have a language hint
- Aliases will not fall back
- Aliases' empty message will specify in which language there are no aliases defined (»No aliases defined in Lakota«)
- <title> will get a label fall back without language hint
- Label, description and aliases won't be updated anymore while editing
- Label, description and aliases will be updated on save; this could happen by
- Retrieving HTML via API
- Retrieving terms using fall back for the current entity via API
- Completely doing the fall back in JS
@Lydia_Pintscher Is that acceptable to you?
"Aliases' empty message will specify in which language there are no aliases defined (»No aliases defined in Lakota«)" <- I think we should get rid of the no alias defined message in the top header. We don't show it in the term box either because we don't want to encourage people more than necessary to add aliases.
"<title> will get a label fall back without language hint" <- Might be too confusing but let's try it.
Rest sounds good to me :)
Change 288024 had a related patch set uploaded (by Adrian Heine):
Apply language fallback to terms in header
My first take at this does not take editing into account at all. It seems to me like this could be sufficient. There are only two cases I can think of that would lead to inconsistent behavior between what you see after leaving edit mode and after reloading the page:
- Fallback happens, you add terms in your UI language, you hit cancel. Instead of the fallback you see the missing term message
- Fallback happens, you add terms in a language that's not your UI language but comes in the fallback chain before the language in which displayed terms are. Instead of the better fallback terms you continue to see the worse fallback.
These two cases don't strike me as too relevant.