• Home
  • Random
  • Recent changes
  • Special pages
  • Settings
  • About MOASSpedia
  • Disclaimers
MOASSpedia
  • 216.73.216.49
  • Talk
  • Watchlist
  • Contributions
  • Log in

Template:YYYY crimes in countryname category header

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here
Template documentation[view] [edit] [history] [purge]
This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages.
You can conduct experiments, and should test all major changes, in either this template's sandbox, the general template sandbox, or your user space before changing anything here.

Use this to create a category of the form "YYYY crimes in CountryName", where "CountryName" is a valid name of a country and "YYYY" is a 4-digit year.

e.g.

  • Category:1860 crimes in the United States
  • Category:1932 crimes in Japan
  • Category:2011 crimes in Pakistan
  • Category:2015 crimes in Nigeria

Contents

  • 1 Usage
    • 1.1 Normal usage
    • 1.2 Optional parameters
  • 2 Tracking
  • 3 See also

Usage

Normal usage

{{YYYY crimes in countryname category header}}

The normal usage requires no parameters, because the template looks up the other data.

e.g. on Category:1954 crimes in the United States, no parameters are needed

The other needed data is:

  1. the adjectival form of the country in which the country is located. This is looked up by Template:GetAdjectiveFromCountryName
  2. the continent(s) in which the country is located. This is looked up by Template:Country2continent

If either of those lookups fails, then an error is reported unless the required data is supplied by an optional parameter.

That may be due to this category being misnamed, or it may be due to an omission in the lookup table used by Template:GetAdjectiveFromCountryName or Template:Country2continent. (Some former countries may have been omitted. Also, when country has been renamed, the lookup uses only the current country name).

If a lookup fails, then the template creates no output other than an error message. If you are satisfied that the category is correctly named, use the one of the optional parameters below.

Optional parameters

  • |nationality=Fooish bypasses the lookup of the nationality, and uses "Fooish"
  • |continent1=Atlantis bypasses the lookup of the continent, and uses "Atlantis".
  • |continent2=Lemuris bypasses the lookup of the continent, and adds a second continent: "Lemuria"
  • |parentcountry=AnotherCountry is available for use when a country is part of another country.
    e.g. on Category:2003 crimes in Hong Kong, use {{YYYY crimes in countryname category header|parentcountry=China}}
  • |diagnose=yes turns on diagnostics, which may help if the template doesn't work as expected

Tracking

Use of the |parentcountry= parameter is tracked in:

  • Category:Template YYYY crimes in countryname category header with parentcountry (population 0)

Use of the |nationality = parameter is tracked in:

  • Category:Template YYYY crimes in countryname category header with nationality parameter (population 0)

Categories where country lookup fails are tracked in a category shared with many other templates:

  • Category:Errors reported by other category header templates (population 0)

See also

  • Template:YYYY crimes in continent category header
  • Template:YYY0s crimes in continent category header
  • Template:YYYY crimes in countryname category header
  • Template:YYY0s crimes in countryname category header
The above documentation is transcluded from Template:YYYY crimes in countryname category header/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://moasspedia.org/w/index.php?title=Template:YYYY_crimes_in_countryname_category_header&oldid=39735"
Categories:
  • Templates using CatAutoTOC
  • Intricate templates
  • Crime chronology category header templates
Last edited on 30 September 2020, at 13:00

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 30 September 2020, at 13:00.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop