الگو:سرساز رده جرایم دهه در کشور/توضیحات
این زیرصفحهٔ مستندات الگو:سرساز رده جرایم دهه در کشور است. این شامل اطلاعات استفاده، الگوها، پیوندهای بین زبانی و سایر اطلاعات است که در اصل الگو صفحه قرار نمیگیرد. |
این الگو از ویژگی و دستورهای پیچیده استفاده میکند.
توصیه میشود پیش از ویرایش الگو با دستورهای الگو و توابع تجزیهکننده آشنا شوید. اگر ویرایشتان باعث بروز مشکلات غیرمنتظره شد، خواهشمند است آن را بهسرعت برگردانید، زیرا ممکن است این الگو در شمار زیادی صفحه ظاهر شود. بهیاد داشته باشید که شما میتوانید آزمایش انجام دهید، اما باید همهٔ بهسازیها را پیش از آنکه در اینجا اعمال کنید، در صفحهٔ تمرین عمومی الگو یا فضای کاربریتان بیازمایید. |
Use this to create a category of the form "YYY0s crimes in CountryName", where "CountryName" is a valid name of a country and "YYY0s" is a 4-digit decade.
e.g.
- Category:1860s crimes in the United States
- Category:1980s crimes in India
- Category:2010s crimes in Norway
Usage
[ویرایش]Normal usage
[ویرایش]{{YYY0s crimes in countryname category header}}
The normal usage requires no parameters, because the template looks up the other data.
e.g. on Category:1950s crimes 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 الگو:کشور به قاره
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 الگو:کشور به قاره. (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"|continent=Zog
is needed for a country which is located in two continents.
e.g. on Category:1990s crimes in Russia, use{{YYY0s crimes in countryname category header|continent1=Europe|continent2=Asia}}
|parentcountry=AnotherCountry
is available for use when a country is part of another country.
e.g. on Category:2000s crimes in Hong Kong, use{{YYY0s 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:
Use of the |nationality =
parameter is tracked in:
- Category:Template YYY0s crimes in countryname category header with nationality parameter (population ۰)
Categories where country lookup fails are tracked in a category shared with many other templates:
- (population ۰)
See also
[ویرایش]- الگو:YYYY crimes in continent category header
- الگو:YYY0s crimes in continent category header
- الگو:سرساز رده جرایم سال در کشور
- Template:YYY0s crimes in countryname category header