Difference between revisions of "Template:Clubplayerscat/doc"
imported>Le Deluge (Initial documentation) |
imported>Le Deluge (update about country suggestion) |
||
| Line 2: | Line 2: | ||
:<code><nowiki>{{Clubplayerscat|Benin}}</nowiki></code> | :<code><nowiki>{{Clubplayerscat|Benin}}</nowiki></code> | ||
| − | It should be reasonably intelligent in working out which of the various parent categories it should be added to, and it tests to see if the club in the category name is the same spelling etc as the parent article. It will complain if you don't add the country parameter | + | It should be reasonably intelligent in working out which of the various parent categories it should be added to, and it tests to see if the club in the category name is the same spelling etc as the parent article, or a redirect. |
| + | |||
| + | It will complain if you don't add the country parameter, but as of July 2020 will suggest a country based on a primitive analysis of the last 700 characters of the corresponding club article. It's not foolproof but it works fairly well for clubs that don't already have a players category as they tend to have corresponding articles that are fairly simple in structure. On the other hand you should be more sceptical when "retrofitting" this template to existing players categories, it can get confused by eg clubs in Central Europe that have found themselves in multiple countries like Austria-Hungary, or "big club" articles with long lists of players and their countries. It works through country names in roughly alphabetical order, so be sceptical of suggestions of "Algeria" or "Belgium", whereas a suggestion of "Uganda" or "Zimbabwe" is probably good. | ||
The template was created in late February 2020 and so should be regarded as in beta for the near future - please ping [[User talk:Le Deluge|@Le Deluge]] if you find cases where it doesn't work. | The template was created in late February 2020 and so should be regarded as in beta for the near future - please ping [[User talk:Le Deluge|@Le Deluge]] if you find cases where it doesn't work. | ||
| − | At present it is only intended to work with (association) football players, but may be extended to cope with other sports in the future. | + | At present it is only intended to work with (association) football players, but may be extended to cope with other sports in the future, and with seasons/managers etc. |
Latest revision as of 14:21, 19 July 2020
This template is intended to provide an easy way to create categories of the form Category:(Football club) players such as Category:AS Police (Benin) players. You just need to transclude the template with a parameter to tell it which country the club is from, in this case :
{{Clubplayerscat|Benin}}
It should be reasonably intelligent in working out which of the various parent categories it should be added to, and it tests to see if the club in the category name is the same spelling etc as the parent article, or a redirect.
It will complain if you don't add the country parameter, but as of July 2020 will suggest a country based on a primitive analysis of the last 700 characters of the corresponding club article. It's not foolproof but it works fairly well for clubs that don't already have a players category as they tend to have corresponding articles that are fairly simple in structure. On the other hand you should be more sceptical when "retrofitting" this template to existing players categories, it can get confused by eg clubs in Central Europe that have found themselves in multiple countries like Austria-Hungary, or "big club" articles with long lists of players and their countries. It works through country names in roughly alphabetical order, so be sceptical of suggestions of "Algeria" or "Belgium", whereas a suggestion of "Uganda" or "Zimbabwe" is probably good.
The template was created in late February 2020 and so should be regarded as in beta for the near future - please ping @Le Deluge if you find cases where it doesn't work.
At present it is only intended to work with (association) football players, but may be extended to cope with other sports in the future, and with seasons/managers etc.