Thoughts from discussion between Leszek and Lea 2019-06-03
Option 1: "We removed a funcationality and are consistent"
This means: Never show any language anywhere that is not currently WD conform
Option 2: "We show historic revisions with all languages that were part of that revision at the time, although the language might not officially be supported anymore"
This means: Filter out all non-WD conform languages from ULS
--> No WD non-conform language ever shown in user preferred langauges
--> All languages possibly visible in "all entered languages" for historic revisions (as long as implicit assumption, that disallowed languages don't carry fingerprints in most current revision stands)
------------------
**Motivation**
There are cases where the user prefered languages given to Wikidata by the ULS extension are not compatible with the list of accepted languages of Wikidata. We don't want this to break our interface.
**Current thoughts**
Story 1:
Filter out all languages we do not know from ULS
**Previous thoughts**
- Maybe show all languages in read mode, if they have content already, and use the language code instead of the language name (because we don't have that info anymore)
- For editing, never show any fingerprint of languages not accepted by Wikidata.
**Notes**
- Languages from ULS not known by wikibase will never have any data
- Historic data issues should be resolved
- Would we need to change Wikibase::GetUserLanguages ?
**Edge case**
Toki pona is preferred language by someone --> wouldn't it have content? No, because this only affects historic revisions, and they are all non-editable. But this would still make people not be able to see the Toki Pona statements.
-------------------
**Motivation**
Termbox is showing languages considered "preferred by the user" (T213720) in the "more languages" sections.
These languages are [[ https://gerrit.wikimedia.org/g/mediawiki/extensions/Wikibase/+/03315597479b383d72d07e1addd453b33c39a172/repo/resources/wikibase.getUserLanguages.js#12 | sourced from ]] their babel box (`config.get( 'wbUserSpecifiedLanguages' )`) //or// ULS (`uls.getFrequentLanguageList()`) - the latter being influenced by e.g. the country you are surfing the web from, user agent languages, languages previously used on mediawiki projects. They can, apparently, contain language codes that //do// exist but are not considered to be full fledged MediaWikiContentLanguages (wb terminology) but [[ https://github.com/wikimedia/jquery.uls/blame/master/src/jquery.uls.data.js#L1051 | delegate ]] to another language code instead. However, it is not possible to add anything to these languages or save them on the wiki, since the language is not an official project language, and the display is broken. Currently, the desktop termbox fails when saving.
{T222790} has been raised to clarify if an upstream change to the ULS data source is feasible.
**Example for bug appearing (in new termbox layout)**
{F28336153}
**Example for languages with which this happened**
The language code for which this happened was **fil**, resulting in a weird looking and behaving first line of the in more languages section. Note the red text for missing label and description is shifted to the left because the language is totally missing.
{F28469501}
**Acceptance Criteria**
[] In termbox v2 the application doesn't blow up through `wb.getUserLanguages()` containing delegating languages codes like `fil`.