As a Wikidata editor, I don’t want to see language fallback indicators if the fallback is just within language variants, e. g. from British or Canadian English (en-gb, en-ca) to “English” (en).
While this generally works (implemented in T174318: Don’t display language fallback indicators for variant fallbacks), language fallback indicators are still sometimes shown. This happens whenever an item is rendered with its label but the main Wikibase stylesheets aren’t loaded (since the hiding of the indicators is implemented in those stylesheets), such as on diff pages (in diff-only mode, i. e. not showing the page below the diff) and on undo pages.
Note that in the diff case, the presence of item links in the edit summaries seems to be sufficient to “summon” the relevant CSS, so that the indicators are hidden in https://www.wikidata.org/w/index.php?diff=1207519515&uselang=en-gb&diffonly=0.
GIVEN a diff between two edits
WHEN viewing the diff
AND using a UI language variant for which there is no label
AND the label exists for the fallback language of that variant
THEN the language indicator is not shown
- do not show language indicator on diff pages when we are just falling back from a language variant to its main language