Topic on Talk:Map improvements 2018

Maps usage on Commons

12
Mike Peel (talkcontribs)

Hi. Just a quick note to mention that the amount of maps being shown on Commons (as opposed to being linked to) is increasing at the moment as I roll out commons:Template:Wikidata Infobox, for example see: https://commons.wikimedia.org/wiki/Category:Five_hundred_meter_Aperture_Spherical_Telescope I'm hoping that doesn't cause any performance issues. It might be an interesting test case for multilingual maps (do they auto-change based on the language setting on commons?), and if by any chance you fancy working on improving the integration with Wikidata then that would be appreciated (at the moment we're using a lua/templateparser hack, and it is lacking features like auto-determining the zoom level to use)!

JMatazzoni (WMF) (talkcontribs)

Hi @Mike Peel. I'm glad you asked about using mapframe in templates. I think this will be a really powerful use case for internationalized map. The answer to your question is that the maps will display in the content language of whatever wiki they are on. (Or they will attempt to, subject to availability of multilingual name data in OpenStreetMap for the language and location.)

You ask about the 'language setting on commons"; that would be the interface language preference, I assume. Since maps are content, they conform to the wiki's content setting, not the interface language preference. I hope that answers your question.

Mike Peel (talkcontribs)

Thanks! By the "language setting on commons", I meant the language selector that's at the top of the page (here also), to the left of the username. If you change that on Commons, then the infobox changes to show info in the chosen language - will the map do that as well?

JMatazzoni (WMF) (talkcontribs)

> If you change that on Commons, then the infobox changes to show info in the chosen language

Ahhh. I didn't know about that Commons-specific feature. I think the answer is that the map won't change on Commons in this way. Although the language selector changes the display in the way you have pointed out, the underlying content language of Commons remains English, and I'm told the map will respect that. (Also, I seem to have misunderstood the purpose of your infobox: I thought it was being stored on commons for use on articles (about telescopes) on different wikis. But I see now that this info box is meant to live on Commons.)

Mike Peel (talkcontribs)

OK. Out of curiosity, what would happen if we fed the lang parameter with the reader's language choice? That's possible with Lua. It might confuse the system/caching though?

Yes, the infobox is commons-specific, it's there to provide basic background info on all topics in all languages. It exclusively uses info from Wikidata. It would work easily enough on other wikis if anyone wants to do that, though.

Roan Kattouw (WMF) (talkcontribs)

I suspect there would be caching issues with that, but if you're interested you could try it out on testwiki and see what happens (or test it on Commons once internationalized maps have been rolled out there).

Abbe98 (talkcontribs)

On the client side caching shouldn't be an issue, because of the different query parameter values. Query parameters can even be used perfectly fine for cache busting...

On the backend I assume Cassandra cached tiles are separated as different Kartotherian sources, Vanish does caching based on the entire URL just as web browsers.

Roan Kattouw (WMF) (talkcontribs)

Yes, all those things will be fine. The caching issues I'm worried about are in MediaWiki's parser cache. That might not respond well to a mapframe tag with a dynamic lang attribute, and might try to reuse cached HTML that was generated for a different language.

Mike Peel (talkcontribs)

I hadn't spotted that the multi-language support had been switched on until now ... I've added language-switching into the sandbox, which is currently demo'd at https://commons.wikimedia.org/wiki/Category:Lovell_Telescope (try switching to Russian!).

I can roll that out to the main version - as long as it won't break Commons?

Mooeypoo (talkcontribs)

@Mike Peel ooh, this is cool, and it works with ULS switching (as well as ?uselang=xx parameter) as well. Super cool!

So, we actively chose against making map language follow user (interface) language, for various technical and product reasons, but -- and @JMatazzoni (WMF) and @Roan Kattouw (WMF) can correct me if I'm forgetting something -- that is more relevant for language-specific wikis. It might actually not be as relevant set of issues for a multilingual wiki like Commons.

I think that if that usage stays on Commons only, it should be safe. Just to verify (I remember talking through some of the technical limitations with the parser) @Roan Kattouw (WMF) am I missing something? The fact that switching interface language seems to display the map with the interface language seems to suggest that technical limitation is not as limiting on Commons.

Roan Kattouw (WMF) (talkcontribs)

@Mike Peel that should be fine. The infobox already localizes itself to the user language, so whatever parser cache problems that causes are already there and won't be made worse by this.

Mike Peel (talkcontribs)

OK, thanks for the reassurances, it's now live on around 600,000 commons categories!

Reply to "Maps usage on Commons"