Module:Countries/doc

From Multilingual Bookbinding Dictionary
< Module:Countries
Revision as of 16:47, 13 September 2020 by Adminsuzy (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is the documentation page for Module:Countries

This module implements templates that output a "Countries of" navigation box.

Module:Countries is the main module. Data for each supported region is defined in a submodule. It may also be used to create navigation box for other types of regions (not just lists of countries in a continent), this main module could be used as well to render a list of administrative or electoral subdivisions in any country or region, or for a list of teams in a sport competition, or for a list of named elements in a chemical classification).

Example of module for the list of countries of Africa

For example, Module:Countries/Africa specifies the all text displayed and the countries listed for Africa.

That module is then used to render the navigation box requested by template "countries of africa" was not recognized as a supported language code."countries of africa" was not recognized as a supported language code. "countries of africa" was not recognized as a supported language code., which displays its results with:

{{#invoke:Countries|main|Africa}}

The first unnamed parameter (Africa) identifies the submodule defining the countries in Africa. The parameter is case sensitive, it can be the full name of the data module, but if there's no colon indicated in this value, the full page name of the data module will be based on a common prefix prepended to this parameter.

Pages using the module with an invalid parameter are added to the tracking Category:Countries template with invalid parameters. The tracking category is also added if the list of countries selected by the user's language has a country code that is not defined in the infos table (or countries table, but not both). For testing, the parameter |nocat=yes can be used in the template to suppress the category.

Changes

Changes should be performed in the appropriate sandbox module and tested using the corresponding sandbox template. For example, a change to the text displayed or the countries listed for Africa would be made in Module:Countries/Africa/sandbox.


"countries of africa/sandbox" was not recognized as a supported language code."countries of africa/sandbox" was not recognized as a supported language code. "countries of africa/sandbox" was not recognized as a supported language code. displays its results with:

{{#invoke:Countries/sandbox|main|Africa}}

Use this sandbox template to test changes to the sandbox module for Africa.

Currently supported specializations for list of countries, territories or subdivisions of an area

The specific modules and their sandboxes defined for list of countries, territories or subdivisions of an area are implemented as the following subpages of the main module, and their associated templates (see Module:Convert/tester).

Modules in Commons

Templates in Commons using these modules

The sandbox versions of these templates should be different as they use the sandbox version of the modules.

Summary information about each item

See Module talk:Countries/show for a summary of all information about specific items in lists, including links to the item at Wikidata. If there appears to be an error in the name for a item, find the item in this list, then use the link to the item to check what changes may have occurred at Wikidata.

History

  • Report at phab:T171392 July 2017 (Lua out-of-memory problems resulting in "Error: 503, Service Unavailable").
  • Problem discussed at en:WP:VPT August 2017.
  • Module started September 2017 based on data and logic copied from Template:Countries of Europe to implement that template.
  • Use Module:Redirect to parse soft category redirects in their content. July 2020.