Page MenuHomePhabricator

<maplink>/<mapframe>: Allow Unicode letters for group and show parameters
Closed, ResolvedPublic

Description

<maplink> and <mapframe> tags can use group and show parameters in the Wikivoyage mode. group specifies a name for a pushpin-marker layer, and show names the groups to show.

In Kartographer Tag\Taghandler.php, function parseGroups(), group and show names are restricted to ASCII characters and numbers with a regular expression like $this->getText( 'group', null, '/^[a-zA-Z0-9]+$/' ).

I ask to allow all Unicode characters for i18n purposes because these group names are shown in the layer control of the map. It will be useful for non-Latin wikis but also for a lot of Latin wikis like German because of special characters like umlauts and several diacritics.

The map elements are added with 'ext.kartographer.box', addGeoJSONLayer( groupName, geoJson, [options] ) JavaScript function. This function accepts Unicode characters for groupName, too.

Event Timeline

Mholloway edited projects, added Maps (Kartographer); removed Maps.
MSantos lowered the priority of this task from Medium to Low.Sep 25 2018, 3:11 PM
MSantos moved this task from Unsorted to Wikivoyage on the Maps (Kartographer) board.

Change 734744 had a related patch set uploaded (by TheDJ; author: TheDJ):

[mediawiki/extensions/Kartographer@master] Allow unicode characters in Kartographer group names

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

Change 734744 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Allow unicode characters in Kartographer group names

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

TheDJ claimed this task.