Jump to content

Module:Science redirect/conf

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ahecht (talk | contribs) at 22:35, 4 June 2017 (add aliases, add commented out commonly used alternatives). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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 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]]}} 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 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.
	plant      = {'a plant', 'plants'},
	fish       = {'a fish', 'fish'},
	fishe      = {'a fish', 'fish'},
	fungu      = {'a fungus', 'fungi'},
	fungi      = {'a fungus', 'fungi'},
	spider     = {'a spider', 'spiders'},
	crustacean = {'a crustacean', 'crustaceans'},
	reptile    = {'a reptile', 'reptiles'},
	dinosaur   = {'a reptile', 'reptiles'},
	insect     = {'an insect', 'insects'},
	moth       = {'an insect', 'insects'},
	butterfly  = {'an insect', 'insects'},
	beetle     = {'an insect', 'insects'},
	fly        = {'an insect', 'insects'},
	--mammal       = {'a mammal', 'mammals'},
	--rodent       = {'a mammal', 'mammals'},
	--amphibian    = {'an amphibian', 'amphibians'},
	--gastropod    = {'a gastropod', 'gastropods'},
	none       = {'an organism'},
}

return p