Joe added a comment.

@mobrovac Please note that the term box is shown based on user preferences (languages spoken), the initially served DOM however needs to be the same for all users, so it can be cached. Also note that the language specific data that goes into the term box has to be loaded from the wikibase entity. So the only way to make it work as you suggested would be to always send all the terms in all languages, which, for some items, would be quite a bit of data.

Oh right, the languages. for caching we can vary the accept-language header, so that at least the most requested languages can be served from cache. But you are correct, shipping all the data may become unwieldy. I would still prefer the client making the extra request, though, since it still keeps the architecture saner and faster than doing it prematurely internally.

Varying the cache on accept-language is doable, but I don't think we do it right now and I don't think this applies though in this case:

  • if the user is logged in, their request is not cached, and we base the language shown on their preferences
  • if the user is not logged in and wants to choose a language for the interface different from the default, they have to add &uselang=... to their request, thus making it a different url to cache.

This is at least the behaviour I expect, and if that holds true we don't need to send data about all languages for every request either.


TASK DETAIL
https://phabricator.wikimedia.org/T212189

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Joe
Cc: daniel, mobrovac, Joe, Matthias_Geisler_WMDE, Jakob_WMDE, Pablo-WMDE, Aklapper, Lydia_Pintscher, Lea_WMDE, Addshore, WMDE-leszek, Legado_Shulgin, Nandana, thifranc, AndyTan, Davinaclare77, Qtn1293, Lahi, Gq86, GoranSMilovanovic, Th3d3v1ls, Hfbn0, QZanden, LawExplorer, Zppix, _jensen, D3r1ck01, SBisson, Wong128hk, Eevans, Hardikj, Wikidata-bugs, aude, faidon, Nikerabbit, Jdforrester-WMF, Mbch331, Jay8g, fgiunchedi
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to