Problem:
When displaying an Item or Property page, the page heading usually applies language fallback to the label and description. The problem is that doing anything with the termbox which causes the heading to update causes the language fallback to no longer be applied
Examples:
e.g.
- On https://test.wikidata.org/wiki/Q38378?uselang=de-ch de-ch falls back to de for the label and en for the description
- On https://test.wikidata.org/wiki/Q38379?uselang=de-ch de-ch falls back to en for the label and de for the description
Steps to reproduce:
Case A
- Make any change in the termbox and save it.
- After saving the heading is refreshed and no longer applies language fallback
Case B
- Make any change to the language current set as the interface language and then cancel editing.
- The heading updates when making the changes, the changes are reverted after cancelling, but language fallback is no longer applied
Notes:
- This is a side-effect of T98014. PHP does language fallback in the header section, but JS does not. So, if you edit the terms of an entity which doesn't have terms in the UI language, after leaving edit mode the header section might look different than it does after a reload.
- This will get more visible after releasing language code mul (T285156).
- See also T356201: MUL - Language fallback not applied to placeholders after editing terms
Acceptance criteria:
The page title is always up-to date with the rest of the Item:
- The language fallback of the page title is respected in both cases A and B (this can be the usual live update while typing, but it does not have to, one update when the edit is actually published is also fine).
- The language fallback is respected in the <title> for both cases A and B (please make sure that we make only one update -- when the edit is actually published).
Original:
This is a side-effect of T98014. PHP does language fallback in the header section, but JS does not. So, if you edit the terms of an entity which doesn't have terms in the UI language, after leaving edit mode the header section might look different than it does after a reload.
SP - 5-8