Template:YYY0s in nationality sport category header/doc
![]() | This is a documentation subpage for Template:YYY0s in nationality sport category header. It may contain usage information, categories and other content that is not part of the original template page. |
![]() | 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 "YYY0s in nationality sport(s)", where "nationality" is a valid nationality and "YYY0s" is a 4-digit decade.
e.g.
Sport vs Sports
[edit]The template detects whether the category page uses the word "sport" (British English usage) or "sports" (American English usage). It follows that usage for all parent categories.
Usage
[edit]Normal usage
[edit]{{YYY0s in nationality sport category header}}
The normal usage requires no parameters, because the template looks up the other data.
e.g. on Category:1950s in Polish sport, no parameters are needed
The other needed data is:
- the adjectival form of the country in which the country is located. This is looked up by Template:GetAdjectiveFromCountryName
- 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
[edit]|nationality=Fooish
bypasses the lookup of the nationality, and uses "Fooish"|continent1=Atlantis
bypasses the lookup of the continent, and uses "Atlantis"|continent2=Lemuria
bypasses the lookup of the continent, and adds a second continent: "Lemuria"|parentnationality=AnotherCountry
is available for use when a country is part of another country.
e.g. on Category:2010s in Hong Kong sport, use{{YYY0s in nationality sport category header|parentnationality=Chinese}}
|diagnose=yes
turns on diagnostics, which may help if the template doesn't work as expected
Country name
[edit]By default, this template finds the country name by using Template:GetCountryNameFromAdjective. In some edge it may not return a country name.
That may be due to this category being misnamed, or it may be due to an omission in the lookup table used by Template:GetCountryNameFromAdjective. (Some former countries may have been omitted. Also, when country has been renamed, the lookup uses only the current country name).
If a country name is not found then the template creates no output other than an error message. If you are satisfied that the category is correctly named, use the |country=
parameter to specify the country name:
- e.g.
{{YYY0s in nationality sport category header|European|country=South Ruritania}}
Tracking
[edit]Use of the |parentnationality=
parameter is tracked in:
Categories where country lookup fails are tracked in a category shared with many other templates:
- Category:Errors reported by other category header templates (population 3)
See also
[edit]- Template:YYYY in continent sport category header
- Template:YYY0s in continent sport category header
- Template:YYYY in nationality sport category header
- Template:YYY0s in nationality sport category header
- Template:YYYY in nationality women's sport category header
- Template:YYY0s in nationality women's sport category header
- Template:YYYY in continent women's sport category header
- Template:YYY0s in continent women's sport category header
- Template:YYYY in men's sport category header