Hi all,
Wikidata is planned as a multilingual resource, and we are using ULS for switching languages. ULS is pretty cool, if you have not tried it out yet, you definitively should. ULS works great if you are a logged in user. ULS on Wikidata does not work so well right now if you are not logged in. Due to caching issues, the system sometimes switches your language randomly.
There is a bug with quite some discussion going on: https://bugzilla.wikimedia.org/show_bug.cgi?id=41451
There is a changeset to ULS providing one solution: https://gerrit.wikimedia.org/r/#/c/32030/
There seems to be an agreement that the solution could fix the issue for now with Wikidata, but it is unclear if this will scale to the Wikipedias. This is a call for some input and attention to anyone who can help resolve the issue.
So far huge thanks to Daniel K., Mark, Niklas, Katie, Siebrand, Faidon for pushing for solutions.
Cheers, Denny
This ULS? https://www.mediawiki.org/wiki/Universal_Language_Selector
----- Yury Katkov, WikiVote
On Tue, Nov 6, 2012 at 11:46 PM, Denny Vrandečić < denny.vrandecic@wikimedia.de> wrote:
Hi all,
Wikidata is planned as a multilingual resource, and we are using ULS for switching languages. ULS is pretty cool, if you have not tried it out yet, you definitively should. ULS works great if you are a logged in user. ULS on Wikidata does not work so well right now if you are not logged in. Due to caching issues, the system sometimes switches your language randomly.
There is a bug with quite some discussion going on: https://bugzilla.wikimedia.org/show_bug.cgi?id=41451
There is a changeset to ULS providing one solution: https://gerrit.wikimedia.org/r/#/c/32030/
There seems to be an agreement that the solution could fix the issue for now with Wikidata, but it is unclear if this will scale to the Wikipedias. This is a call for some input and attention to anyone who can help resolve the issue.
So far huge thanks to Daniel K., Mark, Niklas, Katie, Siebrand, Faidon for pushing for solutions.
Cheers, Denny
-- Project director Wikidata Wikimedia Deutschland e.V. | Obentrautstr. 72 | 10963 Berlin Tel. +49-30-219 158 26-0 | http://wikimedia.de
Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e.V. Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin, Steuernummer 27/681/51985.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On 07/11/12 07:46, Denny Vrandečić wrote:
There is a changeset to ULS providing one solution: https://gerrit.wikimedia.org/r/#/c/32030/
As I said on the changeset, adding Vary: Cookie doesn't actually do anything, but if you did make it do something, the result would be essentially no caching, since there is client-side code deployed which sets random cookies for all anonymous users.
The variant feature has much the same problem, and they solved it by putting the language code in the URL, and then purging all possible language URLs when a page is changed. Then only the language-independent URLs need to send Vary: Accept-Language. I think that is the best solution here, also.
Maybe it would be possible to vary on the value of the ULS language cookie, but it would require patches to Squid and Varnish. Maybe you could get away with just patching every client-side extension to use local storage instead of cookies, but the result would be pretty fragile since apparently, all our frontend developers love $.cookie and use it by reflex.
-- Tim Starling
On Tuesday, November 6, 2012 at 4:22 PM, Tim Starling wrote:
Maybe it would be possible to vary on the value of the ULS language cookie, but it would require patches to Squid and Varnish.
I don't know about Squid, but there are all manner of ways you could attack this problem with Varnish. Overriding vcl_hash lets you customize how a cache key is constructed from a request. It's usually just hostname + URL, but you can add any string to the hash:
sub vcl_hash { if (req.http.Cookie ~ "language") { hash_data(regsub(req.http.Cookie, "^.*(language=[^;]+).*$", "\1")); } }
-- Ori Livneh ori@wikimedia.org
wikitech-l@lists.wikimedia.org