Wikivoyage:VCard/Installation
This page should give support to implement vCard and Marker modules in other Wikivoyage branches.
Importing modules
BearbeitenPlease import all of the following modules to the wiki. Please note: Do not change the module names. You can name the calling templates as you like.
The modules should be running already after the import.
Modules needed
BearbeitenCoordinates (Doku), Coordinates/i18n (Doku), CountryData (Doku), CountryData/Currencies (Doku), CountryData/Geography (Doku), Exchange rate (Doku), Hours (Doku), Hours/i18n (Doku), Languages (Doku), Link utilities (Doku), Link utilities/i18n (Doku), LinkMail (Doku), LinkPhone (Doku), LinkSkype (Doku), Marker utilities (Doku), Marker utilities/Groups (Doku), Marker utilities/i18n (Doku, es), Marker utilities/Maki icons (Doku), Marker utilities/Types (Doku), PageData (Doku), UrlCheck (Doku), UrlCheck/i18n (Doku, en, es), VCard (Doku), VCard/Cards (Doku), VCard/i18n (Doku), VCard/Params (Doku), VCard/Qualifiers (Doku, es), VCard/Subtypes (Doku), Wikidata utilities (Doku), Yesno (Doku)
Furthermore, if you want to install the Marker module you additionally need the following modules:
Marker (Doku), Marker/Params (Doku)
Localization
BearbeitenLocalization gives the opportunity to adapt both modules to the need of the local wikis. That’s why code and localization modules are separated.
For translation and adaption, it seems useful to start with the translation of VCard/i18n, Marker/Params, and Marker utilities/i18n.
Some modules contain the label translations of Wikidata entities. This is necessary because of the expensive computing time of the retrieval of additional Wikidata entities and the limitation to maximally 400 entity calls. With these tables, normally only one entity call per template call is necessary. Considering the maximum computing time of ten seconds per page, it is possible to call 150 to 200 {{vCard}} templates per page.
- High priority
- Adaption
- VCard/Params – Add local parameter names if existent. Not much to do, but in the list
p=
you can do changes, if you want tu use local parameter names instead of English ones. - Marker utilities/i18n – Setting display and maintenance options.
- VCard/Params – Add local parameter names if existent. Not much to do, but in the list
- Translation
- Marker utilities/i18n – There is a section with heaps of maintenance categories.
- Hours/i18n – Time and date labels as well as some maintaining categories.
- VCard/Qualifiers – Qualifiers for contacts and prices.
- Adaption
- Medium priority
- Translations
- Coordinates/i18n – Error messages and category names for coordinates. Adapt direction letters.
- CountryData/Geography – Every entry needs the name of the country in Wiki language
(country=xxx)
. Minor adaptions. - Link utilities/i18n – Mostly maintenance and error category names.
- VCard/Subtypes – Classification and facilities for hotels, restaurants etc. (from three stars via pools in hotels to the cuisine in restaurants ).
- Marker utilities/Groups — The type labels are only used by the listing editor. Adding aliases if necessary.
- MediaWiki:Gadget-ListingEditor.js – Translations and additions until the line “Stop translation here”.
- Translations
- Low priority
- Adaption
- VCard/i18n – Only if necessary.
- Translations
- Marker utilities/Types — The group labels are used by both the vCard/listing module and the listing editor. The
map
parameter is used by the map layer tool whereas the strings can contain only the characters A-Z, a-z and 0-9. Translation of the labels in Wiki language, adding aliases. - UrlCheck/i18n — Error messages for handling URLs. These strings are for maintenance and not (yet) used by the vCard/listing module.
- VCard/Cards – Small amount of strings to translate.
- Marker utilities/Types — The group labels are used by both the vCard/listing module and the listing editor. The
- Adaption
Registration at Wikidata
BearbeitenPlease register all modules at Wikidata. This will help to inform administrators in case of code changes.
Naming of templates
BearbeitenThe modules are only called by templates. The names of the templates can be freely chosen.
Styles needed
BearbeitenTemplate calls
BearbeitenYou can write the template script like the following ones. The second call is used for templates which do not use the type
parameter by default, for instance for see
, do
or similar templates.
<templatestyles src="VCard/styles.css" />{{#invoke: vCard | vCard }}
or
<templatestyles src="VCard/styles.css" />{{#invoke: vCard | vCard | type = see }}
Additional tools
BearbeitenFor the implementation of additional tools, please refer to Marker Package where these tools including their style sheets are listed.
Maintenance
Bearbeiten{{Marker}} and {{vCard}} templates use a lot of maintenance categories. These should be combined in suitable higher-level administration categories.
- {{Modulversion}} – Template to compare the module version stored in the module with that noted in Wikidata. Modules with a version which differ from the Wikidata value are recorded in Different module version in Wikidata category.
- Listing maintenance – Maintenance category for categories used by {{Marker}} and {{vCard}} templates.
- Pages using Wikidata properties – Maintenance category for categories of Wikidata properties used.
Notes
Bearbeiten- The templates have maximum Wikidata support. This made it difficult to implement it because of the huge computing time for the retrieval of Wikidata data. I found ways to call only one Q dataset per template in most cases (not ten to thirty). So it takes about the same time as before. We tested it with Vienna and Halle (Saale). In the article of Vienna 268 Listing and 55 Marker templates are used. 216 of them get data from Wikidata. But the main cause for the computing time is the
<maplink>
call which takes about 40 %. - The
wikipedia
template parameter is no longer used. Please remove it or substitute it bywikidata
. But there is some support for backward compatibility. - The
type
template parameter differs from the original one. The former ones likesee
,do
, etc. are no real types. They summarize institutions of the same article section but they cannot distinguish between different types within a section. We deprecated them because they are senseless for an automatized transfer to Wikidata. The new vCard/listing uses now two terms:type
is now a more specified type like restaurant, cafe, church, dam, etc. but it can have values likesee
,do
, etc. for convenience reasons, too. All types belong to agroup
which have the meaning of the old types likesee
,do
, etc. You can use thegroup
parameter to override the group affiliation which is automatically estimated. The seldomly usedgroup
parameter of the old listing templates has to be renamed tomap-group
. - You need some time to translate the strings for internationalization. Maybe it takes about one week.
- You will be surprised how many errors were made in the past. From our experience, about ten percent of all articles are erroneous. Most errors occur with names, urls, phone numbers, email addresses or wrongly written parameter names. The correction have to be mainly done manually and will take maybe several weeks.
- Parameter names, types, groups, and subtypes can have aliases.
Features
Bearbeiten- Formal parameter check,
- data retrieval from Wikidata,
- analysis of categories of Wikidata properties and marker types used.