සැකිල්ල:YYYY elections in countryname category header
මෙම සැකිල්ල පිටු 2,300 පමණ භාවිතා වන නිසා සිදුකරන වෙනස් කිරීම් බොහෝ ස්ථානවලට බලපානු ඇත. ඔබ සිදුකිරීමට අදහස් කරන වෙනස්කම් මෙම සැකිල්ලට අදාළ /sandbox හෝ /testcases උපපිටුවල, හෝ ඔබගේ පරිශීලක උපපිටුවේ පළමුව සිදුකොට පරීක්ෂාකර බලන්න. එම වෙනස්කම් සිදුකිරීමට ප්රථම අදාළ සාකච්ඡා පිටුවේ ඒ පිළිබඳව සංවාදයක් ගොඩනැගීමට කාරුණික වන්න.
Transclusion count updated automatically (ප්රලේඛනය වෙතට යොමුවන්න). |
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. Remember that you can conduct experiments, and should test all improvements, in either the local /sandbox or your user space before changing anything here. |
Use this to create a category of the form "YYYY elections in CountryName", where "CountryName" is a valid name of a country and "YYYY" is a 4-digit year.
e.g.
- Category:1798 elections in the United States
- Category:1971 elections in Japan
- Category:2011 elections in Pakistan
- Category:2015 elections in Nigeria
Usage
[සංස්කරණය]Normal usage
[සංස්කරණය]{{YYYY elections in countryname category header}}
The normal usage requires no parameters, because the template looks up the other data.
e.g. on Category:1954 elections in the United States, 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
[සංස්කරණය]|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"|parentcountry=AnotherCountry
is available for use when a country is part of another country.
e.g. on Category:1998 elections in Hong Kong, use{{YYYY elections 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:
Use of the |nationality =
parameter is tracked in:
- Category:Template YYYY elections 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 31)