Lucas_Werkmeister_WMDE moved this task from Todo/Backlog to Doing on the Wikidata Dev Team (Sprint-∞) board. Lucas_Werkmeister_WMDE claimed this task. Lucas_Werkmeister_WMDE added a comment.
In T311626#8245641 <https://phabricator.wikimedia.org/T311626#8245641>, @Lucas_Werkmeister_WMDE wrote: > Did some more investigation at T262836#8245640 <https://phabricator.wikimedia.org/T262836#8245640>. Following on from the second part of that (ULS only sends language names for “supported” languages, not all known ones), I propose the following solution: - Server-side, we should send the following data: - language names for all known languages (`LanguageNameUtils::all` instead of `LanguageNameUtils::supported`)… - …unless the UniversalLanguageSelector extension is loaded, in which case we leave out all the supported languages (remove them from the array again), to avoid sending those twice - Client side (in `wikibase.getLanguageNameByCode()`), we should use the following sources for the language name, in this order: - the language names sent by the Wikibase server-side code above (new!) - `$.fn.uls.defaults.languages` (ULS language names) - `$.uls.data.languages` (ULS autonyms) - the language code This would be a new, generated JSON file in the ResourceLoader module. It’s a bit awkward to “punch out” the majority of the language names just because we happen to know that another extension will send them, but IMHO it’s worth the saved bandwidth. We should also make the client-side `WikibaseContentLanguages` service use `wikibase.getLanguageNameByCode()` instead of only using the ULS language names directly, which would resolve T262836 <https://phabricator.wikimedia.org/T262836> (benefiting the mobile termbox, and probably monolingual text languages too). Strictly speaking, that’s not part of this task (the classic termbox uses `wikibase.getLanguageNameByCode()` directly, so it wouldn’t be affected by `WikibaseContentLanguages` changes), but I expect it to be very little additional effort, so I think it would be a good idea to do it at the same time. TASK DETAIL https://phabricator.wikimedia.org/T311626 WORKBOARD https://phabricator.wikimedia.org/project/board/6017/ EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lucas_Werkmeister_WMDE Cc: Manuel, Lydia_Pintscher, Aklapper, Lucas_Werkmeister_WMDE, Astuthiodit_1, karapayneWMDE, Invadibot, maantietaja, ItamarWMDE, Akuckartz, darthmon_wmde, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
