Wikivoyage:VCard/Replacing existing Marker and Listing modules and templates

Index > Dokumentation > Lua- und Scribunto-Module > VCard > Replacing existing Marker and Listing modules and templates

This article gives additional information for Wikivoyage branches which already use Marker and Listing modules and templates. This information was obtained from the experiences got from setting up these modules in Spanish and Japanese Wikivoyage branches.

Within the last seven years we made a big effort on German Wikivoyage to improve marker and map functionality. This made sense because of new features like Kartographer maps, Lua scripting and Wikidata access. On the other hand it is necessary to bring new services to the readers, in particular for readers with smartphones. And there are several Wikivoyage language branches which can benefit from data stored at Wikidata.

To to this we started from scratch. This means we have a completely new code base with about 10,000 lines, but we tried to assure a high extend of backward compatibility.

Internationalization is prepared.

Tracking categories Bearbeiten

It seems useful to create and permanently check the following two tracking categories to detect script errors at an early stage.

  • Use the Pages with script errors category (es: Páginas con errores de secuencia de comandos (script), ja: スクリプトエラーがあるページ). This is an in-build Mediawiki tracking category. It seems useful to correct all script errors before implementing the new vCard package.
  • Create the Different module version in Wikidata category. This is used to keep the software up to date. The categories are created by the Failsafe module which is called by the Module version template. This template should be added to the documentation page of all modules. So, at first both module and template should be installed and adapted.

LinkPhone and Exchange rate modules Bearbeiten

Maybe “LinkPhone” and “Exchange rate” modules exist in the Wikivoyage branch where the new vCard package will be installed. These (old) modules have to be renamed or deleted.

  • LinkPhone module is an enhanced module as it was used in the English Wikivoyage. As I know, this module is only used in Listing module or Listing template. You should rename the old module and adapt the module or template. After the complete installation of the vCard package you can delete the old module because it is no longer used.
  • This local Module:Exchange rate module is an enhanced module of the English Wikivoyage Exchangerate. If the name “Exchange rate” is used instead of the original name so it has to be renamed beforehand, and the dependent templates have to be adapted. Maybe the old module is not used any longer after the installation of the vCard package.
Important hint: both exchange-rate databases at Wikimedia Commons (ECB euro foreign exchange reference rates.tab and Xe.com exchange rates.tab) are no longer supported. User Giftpflanze stopped the service after a severe attack to her at the German Wikipedia. This module has to be replaced in future if a new service would be established.

In both case please check if {{#invoke}} statements are used which can be found with insource:/.../ search statements at which ... is a regular expression.

Type, group, and map-type Bearbeiten

We deprecated generalized types like do, go, see etc. because they are senseless for a transfer to Wikidata. For accommodations, we use for instance hotel, hostel, campsite instead of sleep. See also the list of types. All types belong to a group like go, do, see etc. But we are planning to make subdivisions like for do: culture, recreation, sports and fitness and so on. We have new groups like populated (instead of city), view, and area.

Maintenance: options.noTypeMsgs in Module:Marker utilities/i18n

Do, see, ... templates Bearbeiten

Usually only vCard/listing template is needed.

Maybe the support of older templates is needed for backward compatibility. For instance for do template:

<includeonly><templatestyles src="VCard/styles.css" />{{#invoke: vCard | vCard | type = do }}</includeonly><noinclude>{{Documentation}}</noinclude>

The type parameter defines the default type if a type is missing.


Style sheets Bearbeiten

Vorlage:VCard/styles.css

JavaScript tools Bearbeiten

Maintenance: parameters and values checks Bearbeiten