Page MenuHomePhabricator

[Story] apply language fallback for labels and descriptions in current language in main part of header
Closed, ResolvedPublic

Description

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.

Event Timeline

Lydia_Pintscher raised the priority of this task from to Medium.
Lydia_Pintscher updated the task description. (Show Details)
Jonas renamed this task from apply language fallback for labels and descriptions in current language in main part of header to [Story] apply language fallback for labels and descriptions in current language in main part of header.Aug 14 2015, 8:50 AM
Jonas set Security to None.

I suppose it also shouldn't apply to the edit box below.

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

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

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:

  1. Fallback happens, you add terms in your UI language, you hit cancel. Instead of the fallback you see the missing term message
  2. 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.

Change 288024 merged by jenkins-bot:
Apply language fallback to terms in header

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

@Lydia_Pintscher Please test current master and decide whether that's good enough :)