Page MenuHomePhabricator

Pass MW user language to Kartotherian from Kartographer
Closed, ResolvedPublic

Description

We should consider whether we want to implement a language picker, or whether user or content language makes more sense, but to start with we should have Kartographer pass the user language as the language code to Kartotherian once T187596: Kartotherian should accept (and propagate) a language parameter for tiles is done.

Event Timeline

Catrope triaged this task as Lowest priority.Feb 16 2018, 11:27 PM
Catrope created this task.
Legoktm removed a subscriber: Legoktm.Feb 16 2018, 11:38 PM
jmatazzoni raised the priority of this task from Lowest to High.Feb 26 2018, 11:56 PM

Change 419603 had a related patch set uploaded (by Mooeypoo; owner: Mooeypoo):
[mediawiki/extensions/Kartographer@master] Send user language to Kartotherian from Kartographer

https://gerrit.wikimedia.org/r/419603

Note: It's not possible to have user language in static maps (no user is available at parsing) so the code is using page language, and for consistency, the dynamic maps also use the same.

@Mooeypoo are you sure about that? I was under the impression that the parser has user (or at least site) language, which means it could generate a proper language-dependent url for the static image.

MaxSem added a subscriber: MaxSem.Mar 14 2018, 10:37 PM

Yes, it has. But you will also have to vary parser cache by it, at which point performance ppl will open a hunt for ya:)

@MaxSem I think static map should still be site-language based, which would prevent cache bloat, while still be useful to the readers (map in Japanese wiki will show in Japanese)

Yup, that's how it's going to be for now at least.

Mooeypoo added a comment.EditedMar 14 2018, 11:41 PM

We are delivering the site language (rather, the page language, in case of translations) in this commit -- just not the interface/user language. That part is not available during parsing.

TheDJ added a comment.EditedMar 15 2018, 9:59 AM

If a language picker is to be implemented, the only place where it should (by default) reside is probably on maps.wikimedia.org.

If a language picker is to be implemented, the only place where it should (by default) reside is probably on maps.wikimedia.org.

I don't think we're going for a language picker for the moment (though it might be a good idea for a maps.wikimedia.org feature for the future) -- right now, we're concentrating on making sure that maps that are in wikis are rendering tiles using the wiki language.

Change 419603 merged by jenkins-bot:
[mediawiki/extensions/Kartographer@master] Send page language to Kartotherian from Kartographer

https://gerrit.wikimedia.org/r/419603

Etonkovidova closed this task as Resolved.Mar 27 2018, 9:17 PM