Module:Science redirect/conf
![]() | This module is rated as beta, and is ready for widespread use. It is still new and should be used with some caution to ensure the results are as expected. |
![]() | This Lua module is used on approximately 281,000 pages. To avoid major disruption and server load, any changes should be tested in the module's /sandbox or /testcases subpages, or in your own module sandbox. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
![]() | This module depends on the following other modules: |
This module is designed to serve as a back end for {{R from alternative scientific name}}
, {{R to scientific name}}
, {{R from scientific name}}
, {{R to monotypic taxon}}
and {{R from monotypic taxon}}
.
The template parameters and recognized categories are set in Module:Science redirect/conf.
Usage
{{#invoke:Science redirect|R|template name excluding 'R'}}
For example, for {{R to scientific name}}, you would use {{#invoke:Science redirect|R|to scientific name}}
to produce:
- To scientific name of an organism: This is a redirect from a vernacular ("common") name to the scientific name of an organism (or group of organisms).
Adding or modifying supported templates
The template parameters and recognized categories are set in Module:Science redirect/conf. Instructions on how to add data are in the comments of that file.
For debugging, add parameter |debug=true
, e.g. {{#invoke:Science redirect|R|to scientific name|debug=true}}
produces:
{{Redirect template
| name = To scientific name of an organism
| from = a vernacular ("common") name
| id = R_to_scientific_name
| printworthy = yes
| main category = Redirects to scientific names
| to = the scientific name of an organism (or group of organisms)
}}
Tracking categories
‹The template Category link is being considered for merging.› Science redirects ( 13 )
- ‹The template Category link is being considered for merging.› Category:Redirects from alternative scientific names ( 8,879 )
- ‹The template Category link is being considered for merging.› Category:Redirects to scientific names ( 19,874 )
- ‹The template Category link is being considered for merging.› Category:Redirects from scientific names ( 743 )
- ‹The template Category link is being considered for merging.› Category:Redirects to monotypic taxa ( 3,497 )
- ‹The template Category link is being considered for merging.› Category:Redirects from monotypic taxa ( 4,011 )
‹The template Category link is being considered for merging.› Virus redirects ( 5 )
- ‹The template Category link is being considered for merging.› Category:Redirects to scientific names of viruses ( 21 )
- ‹The template Category link is being considered for merging.› Category:Redirects from monotypic taxa of viruses ( 66 )
- ‹The template Category link is being considered for merging.› Category:Redirects from alternative scientific names of viruses ( 245 )
- ‹The template Category link is being considered for merging.› Category:Redirects to monotypic taxa of viruses ( 54 )
- ‹The template Category link is being considered for merging.› Category:Redirects from scientific names of viruses ( 103 )
‹The template Category link is being considered for merging.› Insect redirects ( 6 )
- ‹The template Category link is being considered for merging.› Category:Redirects to scientific names of insects ( 6,763 )
- ‹The template Category link is being considered for merging.› Category:Redirects from monotypic taxa of insects ( 602 )
- ‹The template Category link is being considered for merging.› Category:Redirects from alternative scientific names of insects ( 64,629 )
- ‹The template Category link is being considered for merging.› Category:Redirects to monotypic taxa of insects ( 3,366 )
- ‹The template Category link is being considered for merging.› Category:Redirects from scientific names of insects ( 1,867 )
‹The template Category link is being considered for merging.› Reptile redirects ( 5 )
- ‹The template Category link is being considered for merging.› Category:Redirects to scientific names of reptiles ( 3,561 )
- ‹The template Category link is being considered for merging.› Category:Redirects from monotypic taxa of reptiles ( 119 )
- ‹The template Category link is being considered for merging.› Category:Redirects from alternative scientific names of reptiles ( 3,055 )
- ‹The template Category link is being considered for merging.› Category:Redirects to monotypic taxa of reptiles ( 214 )
- ‹The template Category link is being considered for merging.› Category:Redirects from scientific names of reptiles ( 2,014 )
‹The template Category link is being considered for merging.› Amphibian redirects ( 5 )
- ‹The template Category link is being considered for merging.› Category:Redirects to scientific names of amphibians ( 843 )
- ‹The template Category link is being considered for merging.› Category:Redirects from monotypic taxa of amphibians ( 22 )
- ‹The template Category link is being considered for merging.› Category:Redirects from alternative scientific names of amphibians ( 676 )
- ‹The template Category link is being considered for merging.› Category:Redirects to monotypic taxa of amphibians ( 34 )
- ‹The template Category link is being considered for merging.› Category:Redirects from scientific names of amphibians ( 1,120 )
‹The template Category link is being considered for merging.› Arthropod redirects ( 8 )
- ‹The template Category link is being considered for merging.› Category:Redirects to scientific names of arthropods ( 107 )
- ‹The template Category link is being considered for merging.› Category:Redirects from monotypic taxa of arthropods ( 64 )
- ‹The template Category link is being considered for merging.› Category:Redirects from alternative scientific names of arthropods ( 166 )
- ‹The template Category link is being considered for merging.› Category:Redirects to monotypic taxa of arthropods ( 186 )
- ‹The template Category link is being considered for merging.› Category:Redirects from scientific names of arthropods ( 35 )
‹The template Category link is being considered for merging.› Mammal redirects ( 5 )
- ‹The template Category link is being considered for merging.› Category:Redirects to scientific names of mammals ( 614 )
- ‹The template Category link is being considered for merging.› Category:Redirects from monotypic taxa of mammals ( 109 )
- ‹The template Category link is being considered for merging.› Category:Redirects from alternative scientific names of mammals ( 327 )
- ‹The template Category link is being considered for merging.› Category:Redirects to monotypic taxa of mammals ( 81 )
- ‹The template Category link is being considered for merging.› Category:Redirects from scientific names of mammals ( 6,695 )
‹The template Category link is being considered for merging.› Plant redirects ( 6 )
- ‹The template Category link is being considered for merging.› Category:Redirects to scientific names of plants ( 56,494 )
- ‹The template Category link is being considered for merging.› Category:Redirects from monotypic taxa of plants ( 1,023 )
- ‹The template Category link is being considered for merging.› Category:Redirects from alternative scientific names of plants ( 43,453 )
- ‹The template Category link is being considered for merging.› Category:Redirects to monotypic taxa of plants ( 3,312 )
- ‹The template Category link is being considered for merging.› Category:Redirects from scientific names of plants ( 627 )
‹The template Category link is being considered for merging.› Spider redirects ( 5 )
- ‹The template Category link is being considered for merging.› Category:Redirects to scientific names of spiders ( 451 )
- ‹The template Category link is being considered for merging.› Category:Redirects from monotypic taxa of spiders ( 250 )
- ‹The template Category link is being considered for merging.› Category:Redirects from alternative scientific names of spiders ( 1,804 )
- ‹The template Category link is being considered for merging.› Category:Redirects to monotypic taxa of spiders ( 797 )
- ‹The template Category link is being considered for merging.› Category:Redirects from scientific names of spiders ( 149 )
‹The template Category link is being considered for merging.› Fish redirects ( 5 )
- ‹The template Category link is being considered for merging.› Category:Redirects to scientific names of fish ( 4,647 )
- ‹The template Category link is being considered for merging.› Category:Redirects from monotypic taxa of fish ( 569 )
- ‹The template Category link is being considered for merging.› Category:Redirects from alternative scientific names of fish ( 2,606 )
- ‹The template Category link is being considered for merging.› Category:Redirects to monotypic taxa of fish ( 383 )
- ‹The template Category link is being considered for merging.› Category:Redirects from scientific names of fish ( 6,183 )
‹The template Category link is being considered for merging.› Bird redirects ( 5 )
- ‹The template Category link is being considered for merging.› Category:Redirects to scientific names of birds ( 145 )
- ‹The template Category link is being considered for merging.› Category:Redirects from monotypic taxa of birds ( 149 )
- ‹The template Category link is being considered for merging.› Category:Redirects from alternative scientific names of birds ( 595 )
- ‹The template Category link is being considered for merging.› Category:Redirects to monotypic taxa of birds ( 21 )
- ‹The template Category link is being considered for merging.› Category:Redirects from scientific names of birds ( 12,078 )
‹The template Category link is being considered for merging.› Fungus redirects ( 5 )
- ‹The template Category link is being considered for merging.› Category:Redirects to scientific names of fungi ( 1,549 )
- ‹The template Category link is being considered for merging.› Category:Redirects from monotypic taxa of fungi ( 173 )
- ‹The template Category link is being considered for merging.› Category:Redirects from alternative scientific names of fungi ( 4,290 )
- ‹The template Category link is being considered for merging.› Category:Redirects to monotypic taxa of fungi ( 633 )
- ‹The template Category link is being considered for merging.› Category:Redirects from scientific names of fungi ( 63 )
‹The template Category link is being considered for merging.› Microorganism redirects ( 7 )
- ‹The template Category link is being considered for merging.› Category:Redirects to scientific names of microorganisms ( 37 )
- ‹The template Category link is being considered for merging.› Category:Redirects from monotypic taxa of microorganisms ( 90 )
- ‹The template Category link is being considered for merging.› Category:Redirects from alternative scientific names of microorganisms ( 91 )
- ‹The template Category link is being considered for merging.› Category:Redirects to monotypic taxa of microorganisms ( 41 )
- ‹The template Category link is being considered for merging.› Category:Redirects from scientific names of microorganisms ( 38 )
‹The template Category link is being considered for merging.› Animal redirects ( 11 )
- ‹The template Category link is being considered for merging.› Category:Redirects to scientific names of animals ( 301 )
- ‹The template Category link is being considered for merging.› Category:Redirects from monotypic taxa of animals ( 119 )
- ‹The template Category link is being considered for merging.› Category:Redirects from alternative scientific names of animals ( 833 )
- ‹The template Category link is being considered for merging.› Category:Redirects to monotypic taxa of animals ( 288 )
- ‹The template Category link is being considered for merging.› Category:Redirects from scientific names of animals ( 221 )
‹The template Category link is being considered for merging.› Mollusc redirects ( 5 )
- ‹The template Category link is being considered for merging.› Category:Redirects to scientific names of molluscs ( 925 )
- ‹The template Category link is being considered for merging.› Category:Redirects from monotypic taxa of molluscs ( 135 )
- ‹The template Category link is being considered for merging.› Category:Redirects from alternative scientific names of molluscs ( 1,129 )
- ‹The template Category link is being considered for merging.› Category:Redirects to monotypic taxa of molluscs ( 79 )
- ‹The template Category link is being considered for merging.› Category:Redirects from scientific names of molluscs ( 524 )
‹The template Category link is being considered for merging.› Alga redirects ( 5 )
- ‹The template Category link is being considered for merging.› Category:Redirects to scientific names of algae ( 92 )
- ‹The template Category link is being considered for merging.› Category:Redirects from monotypic taxa of algae ( 60 )
- ‹The template Category link is being considered for merging.› Category:Redirects from alternative scientific names of algae ( 86 )
- ‹The template Category link is being considered for merging.› Category:Redirects to monotypic taxa of algae ( 61 )
- ‹The template Category link is being considered for merging.› Category:Redirects from scientific names of algae ( 26 )
‹The template Category link is being considered for merging.› Crustacean redirects ( 5 )
- ‹The template Category link is being considered for merging.› Category:Redirects to scientific names of crustaceans ( 304 )
- ‹The template Category link is being considered for merging.› Category:Redirects from monotypic taxa of crustaceans ( 180 )
- ‹The template Category link is being considered for merging.› Category:Redirects from alternative scientific names of crustaceans ( 1,025 )
- ‹The template Category link is being considered for merging.› Category:Redirects to monotypic taxa of crustaceans ( 237 )
- ‹The template Category link is being considered for merging.› Category:Redirects from scientific names of crustaceans ( 146 )
Invalid parameters
- ‹The template Category link is being considered for merging.› Category:Redirects from alternative scientific names using unknown values for parameter 1 ( 20 )
- ‹The template Category link is being considered for merging.› Category:Redirects to scientific names using unknown values for parameter 1 ( 1 )
- ‹The template Category link is being considered for merging.› Category:Redirects from scientific names using unknown values for parameter 1 ( 0 )
- ‹The template Category link is being considered for merging.› Category:Redirects to monotypic taxa using unknown values for parameter 1 ( 10 )
- ‹The template Category link is being considered for merging.› Category:Redirects from monotypic taxa using unknown values for parameter 1 ( 1 )
local p = {}
p.templates = {
--name, from, to, category, and info are parameters of {{Redirect template}}
--category will have "Redirects " appended to the beginning and, if there is a subcategory specified, " of " and the subcategory name appended to the end
--$1 will be replaced with the singular form of the subcategory name, e.g. "a plant", "an insect", "a fish"; "an organism" will be used if no subcategory applies
--$2 will be replaced with the plural form of the subcategory name, e.g. "plants", "insects", "fish"; "organisms" will be used if no subcategory applies
--removeA should be set to true if the "a" or "an" should be removed from the singular form of the subcategory, e.g. "plant", "insect", "fish"; "an organism" will not be used if removeA = true
from_alternative_scientific_name = {
name = 'From alternative scientific name of $1',
from = 'an alternative scientific name of $1 (or group of $2)',
to = 'the accepted scientific name',
category = 'from alternative scientific names',
}, to_scientific_name = {
name = 'To scientific name of $1',
from = 'a [[Common name|vernacular ("common") name]]',
to = 'the [[biological nomenclature|scientific name]] of $1 (or group of $2)',
category = 'to scientific names',
}, from_scientific_name = {
name = 'From scientific name of $1',
from = 'a [[biological nomenclature|scientific name]] of $1 (or group of $2)',
to = 'a [[Common name|vernacular ("common") name]]',
category = 'from scientific names',
}, to_monotypic_taxon = {
name = 'To a monotypic taxon',
from = 'the only lower-ranking member of a monotypic $1 taxon',
to = 'its monotypic taxon',
category = 'to monotypic taxa',
info = "In a biology-related article, when for example a genus has only one species, the [[binomial name]] may be a redirect to the genus.\n** Use {{[[:Template:R from monotypic taxon|R from monotypic taxon]]}} instead when making a redirect ''from'' a monotypic taxon ''to'' its only member, for example, from a family name to its sole genus.",
removeA = true,
}, from_monotypic_taxon = {
name = 'From a monotypic taxon',
from = 'a monotypic $1 taxon',
to = 'its only lower-ranking member',
category = 'from monotypic taxa',
info = "In a biology-related article, when for example a family has only one genus, the family may be a redirect to the genus.\n** Use {{[[:Template:R to monotypic taxon|R to monotypic taxon]]}} when making a redirect ''to'' a monotypic taxon ''from'' its only member, for example, from a species to the genus of which it is the only member.",
removeA = true,
},
}
p.cats = {
-- List entries minus any trailing 's', e.g. "fungus" should be listed as "fungu"
-- The first parameter is the singular form of the subcategory name with its indefinite article, e.g. "a plant", "an insect", "a fish". See $1 above.
-- The second parameter, if it exists, is the plural form of the subcategory name, e.g. "plants", "insects", "fish". See $2 above.
-- If the second parameter is missing, the subcategory name will be used in the explanatory text but not in the categorization of the redirect.
whale = {'a mammal', 'mammals'},
wasp = {'an insect', 'insects'},
viruse = {'a virus', 'viruses'},
viru = {'a virus', 'viruses'},
turtle = {'a reptile', 'reptiles'},
squid = {'a mollusc', 'molluscs'},
spider = {'a spider', 'spiders'},
snake = {'a reptile', 'reptiles'},
snail = {'a mollusc', 'molluscs'},
slug = {'a mollusc', 'molluscs'},
shark = {'a fish', 'fish'},
rodent = {'a mammal', 'mammals'},
reptile = {'a reptile', 'reptiles'},
pterosaur = {'a reptile', 'reptiles'},
protist = {'a microorganism', 'microorganisms'},
primate = {'a mammal', 'mammals'},
plant = {'a plant', 'plants'},
octopuse = {'a mollusc', 'molluscs'},
octopu = {'a mollusc', 'molluscs'},
octopi = {'a mollusc', 'molluscs'},
moth = {'an insect', 'insects'},
mollusc = {'a mollusc', 'molluscs'},
mollusk = {'a mollusc', 'molluscs'},
microorganism = {'a microorganism', 'microorganisms'},
microbe = {'a microorganism', 'microorganisms'},
mammal = {'a mammal', 'mammals'},
lepidoptera= {'an insect', 'insects'},
insect = {'an insect', 'insects'},
horse = {'a mammal', 'mammals'},
gastropod = {'a mollusc', 'molluscs'},
fungu = {'a fungus', 'fungi'},
fungi = {'a fungus', 'fungi'},
frog = {'an amphibian', 'amphibians'},
fly = {'an insect', 'insects'},
flie = {'an insect', 'insects'},
fishe = {'a fish', 'fish'},
fish = {'a fish', 'fish'},
dolphin = {'a mammal', 'mammals'},
dog = {'a mammal', 'mammals'},
dinosaur = {'a reptile', 'reptiles'},
crustacean = {'a crustacean', 'crustaceans'},
cephalopod = {'a mollusc', 'molluscs'},
cat = {'a mammal', 'mammals'},
butterfly = {'an insect', 'insects'},
butterflie = {'an insect', 'insects'},
bivalve = {'a mollusc', 'molluscs'},
bird = {'a bird', 'birds'},
beetle = {'an insect', 'insects'},
bee = {'an insect', 'insects'},
bat = {'a mammal', 'mammals'},
bacteria = {'a microorganism', 'microorganisms'},
bacterium = {'a microorganism', 'microorganisms'},
arthropod = {'an arthropod', 'arthropods'},
arachnid = {'an arthropod', 'arthropods'},
archaea = {'a microorganism', 'microorganisms'},
ant = {'an insect', 'insects'},
animal = {'an animal', 'animals'},
amphibian = {'an amphibian', 'amphibians'},
algae = {'an alga', 'algae'},
alga = {'an alga', 'algae'},
none = {'an organism'},
}
return p