Module:ComicsInfobox/Race

local valid = { ["Abaddonusian"] = "Abaddonusians", ["Acheronian"] = "Acheronians", ["Aegenan"] = "Aegenans", ["Aellan"] = "Aellans", ["Aelphian"] = "Aelphians", ["Aerosian"] = "Aerosians", ["Aesir"] = "Aesirs", ["Alephian"] = "Alephians", ["Alligator"] = "Alligators", ["Almeracian"] = "Almeracians", ["Alstairian"] = "Alstairians", ["Altrosian"] = "Altrosians", ["Amadusian"] = "Amadusians", ["Amazon"] = "Amazons", ["Android"] = "Androids", ["Angel"] = "Angels", ["Angorian"] = "Angorians", ["Angtuan"] = "Angtuans", ["Animal"] = "Animals", ["Annunake"] = "Annunake", ["Antarean"] = "Antareans", ["Apiatonian"] = "Apiatonians", ["Apokoliptian"] = "Apokoliptians", ["Archai"] = "The Archai", ["Argoan"] = "Argoans", ["Arguvian"] = "Arguvians", ["Asgardian"] = "Asgardians", ["Atlantean"] = "Atlanteans", ["Avian"] = "Avians", ["Avalonian"] = "Avalonians", ["Azarathian"] = "Azarathians", ["Baaldurian"] = "Baaldurians", ["Baaltarian"] = "Baaltarians", ["Bear"] = "Bears", ["Bellatrixian"] = "Bellatrixians", ["Betrassian"] = "Betrassians", ["Bgztlian"] = "Bgztlians", ["Binderaanian"] = "Binderaanians", ["Bird"] = "Birds", ["Bismollian"] = "Bismollians", ["Bizarro"] = "Bizarros", ["Blue"] = "Blues", ["Bolovaxian"] = "Bolovaxians", ["Borgonian"] = "Borgonians", ["Borialosaurus"] = "Borialosauruses", ["Braalian"] = "Braalians", ["Branx"] = "Branx", ["Bug of New Genesis"] = "Bugs of New Genesis", ["Bummb'l"] = "Bummb'ls", ["Byrnian"] = "Byrnians", ["Cairnian"] = "Cairnians", ["Calatonian"] = "Calatonians", ["Canopean"] = "Canopeans", ["Carggite"] = "Carggites", ["Cat"] = "Cats", ["Celtic God"] = "Celtic Gods", ["Centaur"] = "Centaurs", ["Changralynian"] = "Changralynians", ["Chimpanzee"] = "Chimpanzees", ["Chthostosian"] = "Chthostosians", ["Cintosian"] = "Cintosians", ["Circadian"] = "Circadians", ["Cironielian"] = "Cironielians", ["Citadelian"] = "Citadelians", ["Coluan"] = "Coluans", ["Coludroid"] = "Coludroids", ["Competalian"] = "Competalians", ["Cow"] = "Cows", ["Curatti"] = "Curatti", ["Cyborg"] = "Cyborgs", ["Cyclops"] = "Cyclopes", ["Cygnian"] = "Cygnians", ["Czarnian"] = "Czarnians", ["Daemonite"] = "Daemonites", ["Dalwythian"] = "Dalwythans", ["Daxamite"] = "Daxamites", ["Deer"] = "Deer", ["Demons"] = "Demons", ["Demigod"] = "Demigods", ["Dheronian"] = "Dheronians", ["Dhorian"] = "Dhorians", ["Diib"] = "Diibs", ["Diasporan"] = "Diasporans", ["Dog"] = "Dogs", ["Dokris"] = "Dokris", ["Dolphin"] = "Dolphins", ["Dominator"] = "Dominators", ["Doopa"] = "Doopas", ["Draaga"] = "Draagas", ["Dragon"] = "Dragons", ["Dryad"] = "Dryads", ["Duck"] = "Ducks", ["Durlan"] = "Durlans", ["Dwarf"] = "Dwarves", ["Egregore"] = "Egregores", ["Eigessan"] = "Eigessans", ["Elephant"] = "Elephants", ["Enelsian"] = "Enelsians", ["Erinyes"] = "Erinyes", ["Euphorian"] = "Euphorians", ["Exxorian"] = "Exxorians", ["Fable"] = "Fables", ["Fairy"] = "Fairies", ["Fire Troll"] = "Fire Trolls", ["Fish"] = "Fishes", ["Fluviaat"] = "Fluviaats", ["Forerunner"] = "Forerunners", ["Fp'yian"] = "Fp'yians", ["Fresishian"] = "Fresishians", ["Frog"] = "Frogs", ["Fwangian"] = "Fwangians", ["G'Newtian"] = "G'Newtians", ["Gargarean"] = "Gargareans", ["Gargoyle"] = "Gargoyles", ["Geequoan"] = "Geequoans", ["Gil'Dishpan"] = "Gil'Dishpan", ["Glazzonion"] = "Glazzonions", ["Goat"] = "Goats", ["Gobdorian"] = "Gobdorians", ["God"] = "Gods", ["God of Africa"] = "Gods of Africa", ["God of Egypt"] = "Gods of Egypt", ["God of Mexico"] = "Gods of Mexico", ["Gordanian"] = "Gordanians", ["Gorgon"] = "Gorgons", ["Gorilla"] = "Gorillas", ["Graxosian"] = "Graxosians", ["Grendan"] = "Grendans", ["Groundhog"] = "Groundhogs", ["Grxyorian"] = "Grxyorians", ["Gryxian"] = "Gryxians", ["H'lvenite"] = "H'lvenites", ["Hajorian"] = "Hajorians", ["Hatorian"] = "Hatorians", ["Havanian"] = "Havanians", ["Hawkmen"] = "Hawkmen", ["Hecatonchire"] = "Hecatonchires", ["Hepvestusan"] = "Hepvestusans", ["Hindu God"] = "Hindu Gods", ["Hippopotamus"] = "Hippopotamuses", ["Homo Magi"] = "Homo Magi", ["Horse"] = "Horses", ["Human"] = "Humans", ["Human/Alien Hybrid"] = "Human/Alien Hybrids", ["Human/Demon Hybrid"] = "Human/Demon Hybrids", ["Hyena"] = "Hyenas", ["Hykraian"] = "Hykraians", ["Imp"] = "Imps", ["Imskian"] = "Imskians", ["I'noxian"] = "I'noxians", ["Janusian"] = "Janusians", ["Jaquaan"] = "Jaquaans", ["Jaydian"] = "Jaydians", ["Kaffarian"] = "Kaffarians", ["Kahloan"] = "Kahloans", ["Kalanorian"] = "Kalanorians", ["Kamburu"] = "Kamburus", ["Kangaroo"] = "Kangaroos", ["Karnan"] = "Karnans", ["Karrakanian"] = "Karrakanians", ["Katarthan"] = "Katarthans", ["Kathoonian"] = "Kathoonians", ["Kherubim"] = "Kherubim", ["Khund"] = "Khunds", ["Klarmarian"] = "Klarmarians", ["Korugaran"] = "Korugarans", ["Kranaltinian"] = "Kranaltinians", ["Krolotean"] = "Kroloteans", ["Kryptonian"] = "Kryptonians", ["Kryptonian Canine"] = "Kryptonian Canines", ["Kryptonian God"] = "Kryptonian Gods", ["Kwai"] = "Kwai", ["LaBurbian"] = "LaBurbians", ["Lallorian"] = "Lallorians", ["Lanothian"] = "Lanothians", ["Lemur"] = "Lemurs", ["Lexorian"] = "Lexorians", ["Liger"] = "Ligers", ["Lilliputian"] = "Lilliputians", ["Lion"] = "Lions", ["Lisnarian"] = "Lisnarians", ["Living Star"] = "Living Stars", ["Lizarkon"] = "Lizarkons", ["Llaran"] = "Llarans", ["Loranean"] = "Loraneans", ["Lurker"] = "Lurkers", ["Makkoran"] = "Makkorans", ["Maltusian"] = "Maltusians", ["Manatee"] = "Manatees", ["Manhawk"] = "Manhawks", ["Manhunter"] = "Manhunters", ["Markian"] = "Markians", ["Martian"] = "Martians", ["Megan"] = "Megans", ["Mercurian"] = "Mercurians", ["Merpeople"] = "Merpeople", ["Metahuman"] = "Metahumans", ["Metan"] = "Metans", ["Minotaur"] = "Minotaurs", ["Mongoose"] = "Mongooses", ["Monitor"] = "Monitors", ["Monkey"] = "Monkeys", ["Moose"] = "Moose", ["Mosteelian"] = "Mosteelians", ["Motusian"] = "Motusians", ["Mouse"] = "Mice", ["Muldroogan"] = "Muldroogans", ["Mummy"] = "Mummies", ["Murrian"] = "Murrians", ["Muscarian"] = "Muscarians", ["Mutant"] = "Mutants", ["Myrg"] = "Myrgs", ["N'cronian"] = "N'cronians", ["Naktosian"] = "Naktosians", ["Naltorian"] = "Naltorians", ["Neanderthal"] = "Neanderthals", ["Nekromnian"] = "Nekromnians", ["Neonian"] = "Neonians", ["Neptunian"] = "Neptunians", ["New Asgardian"] = "New Asgardians", ["New God"] = "New Gods", ["Ngoan"] = "Ngoans", ["Noc'sagian"] = "Noc'sagians", ["Norman"] = "Norman", ["Numericonian"] = "Numericonians", ["Oan"] = "Oans", ["Obsidian-Folk"] = "Obsidian-Folk", ["Octopus"] = "Octopuses", ["Ogre"] = "Ogres", ["Okaaran"] = "Okaarans", ["Old God"] = "Old Gods", ["Olympian"] = "Olympians", ["Orandan"] = "Orandans", ["Oranxian"] = "Oranxians", ["Orazan"] = "Orazans", ["Ovacronian"] = "Ovacronians", ["Owl"] = "Owls", ["Ozimanian"] = "Ozimanians", ["Ozyronian"] = "Ozyronians", ["Parademon"] = "Parademons", ["Pegacorn"] = "Pegacorns", ["Pegasus"] = "Pegasi", ["Pharman"] = "Pharmans", ["Phlonian"] = "Phlonians", ["Phytarian"] = "Phytarians", ["Pig"] = "Pigs", ["Plutonian"] = "Plutonians", ["Preztorian"] = "Preztorians", ["Protean"] = "Proteans", ["Psion"] = "Psions", ["Pumice Person"] = "Pumice People", ["Punkusian"] = "Punkusians", ["Qwardian"] = "Qwardians", ["Rabbit"] = "Rabbits", ["Rannian"] = "Rannians", ["Rat"] = "Rats", ["Reach"] = "The Reach", ["Red Saturnian"] = "Red Saturnians", ["White Saturnian"] = "White Saturnians", ["Saturnian"] = "Saturnians", ["Reptile"] = "Reptiles", ["Rhoonian"] = "Rhoonians", ["Rhormorid"] = "Rhormorids", ["Rimborian"] = "Rimborians", ["Robot"] = "Robots", ["Roguian"] = "Roguians", ["Rojiran"] = "Rojirans", ["Satyr"] = "Satyrs", ["Savothian"] = "Savothians", ["Selachian"] = "Selachians", ["Simballian"] = "Simballians", ["Shark"] = "Sharks", ["Shayol"] = "Shayol", ["Sheeda"] = "Sheeda", ["Sher'Hedeen"] = "Sher'Hedeens", ["Shwarian"] = "Shwarians", ["Siamgemian"] = "Siamgemians", ["Sirkian"] = "Sirkians", ["Sklarian"] = "Sklarians", ["Skor"] = "Skors", ["Skrull"] = "Skrulls", ["Sky Kanga"] = "Sky Kangas", ["Slyggian"] = "Slyggians", ["Solarian"] = "Solarians", ["Somahturan"] = "Somahturans", ["Spitroid"] = "Spitroids", ["Squirrel"] = "Squirrels", ["Starhavenite"] = "Starhavenites", ["Stratan"] = "Stratans", ["Suirpalamanian"] = "Suirpalamanians", ["Sun-Eater"] = "Sun-Eaters", ["Synriannaquian"] = "Synriannaquians", ["Talokite"] = "Talokites", ["Talynian"] = "Talynians", ["Tamaranean"] = "Tamaraneans", ["Tamojoranian"] = "Tamojoranians", ["Tanjentan"] = "Tanjentans", ["Tartarian"] = "Tartarians", ["Tchk-Tchk"] = "Tchk-Tchks", ["Teallian"] = "Teallians", ["Terminan"] = "Terminans", ["Terran"] = "Terrans", ["Thanagarian"] = "Thanagarians", ["Tharrian"] = "Tharrians", ["Tiger"] = "Tigers", ["Titan of Myth"] = "Titans of Myth", ["Titanian"] = "Titanians", ["Toomeyan"] = "Toomeyans", ["Tormock"] = "Tormocks", ["Tortugan"] = "Tortugans", ["Tree"] = "Trees", ["Trewskian"] = "Trewskians", ["Tritonian"] = "Tritonians", ["Trogkian Mammoth"] = "Trogkian Mammoths", ["Trommite"] = "Trommites", ["Trontian"] = "Trontians", ["Tsauronian"] = "Tsauronians", ["Turtle"] = "Turtles", ["Tyrrazian"] = "Tyrrazians", ["Ungaran"] = "Ungarans", ["Unicorn"] = "Unicorns", ["Un-Man"] = "Un-Men", ["Uxorian"] = "Uxorians", ["Valeronian"] = "Valeronians", ["Valkyrie"] = "Valkyries", ["Vampire"] = "Vampires", ["Van'nian"] = "Van'nians", ["Varidian"] = "Varidians", ["Varvan"] = "Varvans", ["Venegarian"] = "Venegarians", ["Venturan"] = "Venturans", ["Venusian"] = "Venusians", ["Volkregian"] = "Volkregians", ["Voranian"] = "Voranians", ["Vornian"] = "Vornians", ["Vulcan"] = "Vulcans", ["Vuldarian"] = "Vuldarians", ["Vyrgan"] = "Vyrgans", ["Weasel"] = "Weasels", ["Werewolf"] = "Werewolves", ["Whale"] = "Whales", ["White Martian"] = "White Martians", ["Winathian"] = "Winathians", ["Wolf"] = "Wolves", ["Xanshian"] = "Xanshians", ["Xanthuan"] = "Xanthuans", ["Xarapion"] = "Xarapions", ["Xardan"] = "Xardans", ["Xenusian"] = "Xenusians", ["Xibalban"] = "Xibalbans", ["Xudarian"] = "Xudarians", ["Yodix"] = "The Yodix", ["Youngenian"] = "Youngenians", ["Zadronian"] = "Zadronians", ["Zamaron"] = "Zamarons", ["Zambaii"] = "Zambaii", ["Zarolatt"] = "Zarolatts", ["Zaronian"] = "Zaronians", ["Zaroxian"] = "Zaroxians", ["Zeroxian"] = "Zeroxians", ["Zezzite"] = "Zezzites", ["Zoan"] = "Zoans", ["Zombie"] = "Zombies", ["Zsiglonian"] = "Zsiglonians", ["Zuunian"] = "Zuunians", ["Zwenian"] = "Zwenians", ["Zymian"] = "Zymians", }

local substitutes = { ["abaddonusians"] = "Abaddonusian", ["acheronians"] = "Acheronian", ["aegenans"] = "Aegenan", ["aellan"] = "Aellan", ["aerosians"] = "Aerosian", ["aisir"] = "Aesir", ["alephians"] = "Alephian", ["aelphians"] = "Alephian", ["alligators"] = "Alligator", ["almeracians"] = "Almeracian", ["alstairians"] = "Alstairian", ["altrosians"] = "Altrosian", ["asir"] = "Aesir", ["amadusians"] = "Amadusian", ["amazons"] = "Amazon", ["androids"] = "Android", ["animal"] = "Animal", ["angels"] = "Angel", ["angorians"] = "Angorian", ["angor"] = "Angorian", ["angtuans"] = "Angtuan", ["annunake"] = "Annunake", ["antareans"] = "Antarean", ["apiatonians"] = "Apiatonian", ["apokalptian"] = "Apokoliptian", ["apocalyptian"] = "Apokoliptian", ["the archai"] = "Archai", ["argoans"] = "Argoan", ["arguvians"] = "Arguvian", ["asgardan"] = "Asgardian", ["azgardian"] = "Asgardian", ["atlanteans"] = "Atlantean", ["atlantians"] = "Atlantean", ["atlantian"] = "Atlantean", ["avians"] = "Avian", ["avalonians"] = "Avalonian", ["azarathians"] = "Azarathian", ["baaldurians"] = "Baaldurian", ["baalterian"] = "Baaltarian", ["baltarian"] = "Baaltarian", ["bears"] = "Bear", ["belatrixan"] = "Bellatrixian", ["belatrixian"] = "Bellatrixian", ["betrassians"] = "Betrassian", ["bgtzlian"] = "Bgztlian", ["bgztlan"] = "Bgztlian", ["binderaanians"] = "Binderaanian", ["birds"] = "Bird", ["bismollians"] = "Bismollian", ["bizzaro"] = "Bizarro", ["bizzarro"] = "Bizarro", ["bizaro"] = "Bizarro", ["blues"] = "Blue", ["bolovaxians"] = "Bolovaxian", ["borgonians"] = "Borgonian", ["borialosauruses"] = "Borialosaurus", ["braalians"] = "Braalian", ["branx"] = "Branx", ["bug"] = "Bug of New Genesis", ["bugs of new genesis"] = "Bug of New Genesis", ["bummb'ls"] = "Bummb'l", ["byrnians"] = "Byrnian", ["cairnians"] = "Cairnian", ["calatonians"] = "Calatonian", ["canopeans"] = "Canopean", ["carggites"] = "Carggite", ["cats"] = "Cat", ["celtic gods"] = "Celtic God", ["centaurs"] = "Centaur", ["changralynians"] = "Changralynian", ["chimpanzees"] = "Chimpanzee", ["chimp"] = "Chimpanzee", ["chimps"] = "Chimpanzee", ["chthostosians"] = "Chthostosian", ["cintosians"] = "Cintosian", ["circadians"] = "Circadian", ["cironielians"] = "Cironielian", ["citadelians"] = "Citadelian", ["coluans"] = "Coluan", ["coludroids"] = "Coludroid", ["competalians"] = "Competalian", ["cows"] = "Cow", ["curatti"] = "Curatti", ["cyborg"] = "Cyborg", ["cyborgs"] = "Cyborg", ["cyclopes"] = "Cyclops", ["cygnians"] = "Cygnian", ["cazarnan"] = "Czarnian", ["czarnians"] = "Czarnian", ["daemonites"] = "Daemonite", ["dalwythians"] = "Dalwythian", ["daxam"] = "Daxamite", ["daxamites"] = "Daxamite", ["deer"] = "Deer", ["demon"] = "Demons", ["demons"] = "Demons", ["demigod"] = "Demigods", ["dheronians"] = "Dheronian", ["dhoran"] = "Dhorian", ["diibs"] = "Diib", ["diasporans"] = "Diasporan", ["dogs"] = "Dog", ["dokris"] = "Dokris", ["dolphins"] = "Dolphin", ["dominators"] = "Dominator", ["doopas"] = "Doopa", ["dragaas"] = "Draaga", ["dragons"] = "Dragon", ["dryads"] = "Dryad", ["ducks"] = "Duck", ["durlian"] = "Durlan", ["dwarves"] = "Dwarf", ["dwarfs"] = "Dwarf", ["egregores"] = "Egregore", ["eigessans"] = "Eigessan", ["elephants"] = "Elephant", ["enelsians"] = "Enelsian", ["erinyes"] = "Erinyes", ["euphorians"] = "Euphorian", ["exorian"] = "Exxorian", ["exxorrian"] = "Exxorian", ["exoran"] = "Exxorian", ["exxoran"] = "Exxorian", ["fables"] = "Fable", ["fable"] = "Fable", ["fairies"] = "Fairy", ["fire trolls"] = "Fire Troll", ["fish"] = "Fish", ["fishes"] = "Fish", ["fluviaats"] = "Fluviaat", ["forerunners"] = "Forerunner", ["fp'yians"] = "Fp'yian", ["frogs"] = "Frog", ["fresishians"] = "Fresishian", ["fwangians"] = "Fwangian", ["g'newt"] = "G'Newtian", ["g'newtians"] = "G'Newtian", ["gargareans"] = "Gargarean", ["gargoyles"] = "Gargoyle", ["geequoans"] = "Geequoan", ["gil'dishpan"] = "Gil'Dishpan", ["glazzonians"] = "Glazzonion", ["glazzonions"] = "Glazzonion", ["goats"] = "Goat", ["gobdorians"] = "Gobdorian", ["gods"] = "God", ["gods of africa"] = "God of Africa", ["african gods"] = "God of Africa", ["gods of egypt"] = "God of Egypt", ["egyptian gods"] = "God of Egypt", ["gods of mexico"] = "Gods of Mexico", ["mexican gods"] = "Gods of Mexico", ["gordanians"] = "Gordanian", ["gorgons"] = "Gorgon", ["gorillas"] = "Gorilla", ["graxosians"] = "Graxosian", ["grendans"] = "Grendan", ["groundhogs"] = "Groundhog", ["grxyorians"] = "Grxyorian", ["gryxians"] = "Gryxian", ["h'lven"] = "H'lvenite", ["h'lvenites"] = "H'lvenite", ["hajorians"] = "Hajorian", ["hatorians"] = "Hatorian", ["havanians"] = "Havanian", ["havania"] = "Havanian", ["hawkmen"] = "Hawkmen", ["hecatonchires"] = "Hecatonchire", ["hepvestusans"] = "Hepvestusan", ["hindu gods"] = "Hindu God", ["hippopotamuses"] = "Hippopotamus", ["homomagi"] = "Homo Magi", ["homomagian"] = "Homo Magi", ["homo magian"] = "Homo Magi", ["horses"] = "Horse", ["human being"] = "Human", ["human beings"] = "Human", ["humans"] = "Human", ["human"] = "Human", ["human/alien hybrid"] = "Human/Alien Hybrids", ["human/alien hybrids"] = "Human/Alien Hybrids", ["human/demon hybrid"] = "Human/Demon Hybrids", ["human/demon hybrids"] = "Human/Demon Hybrids", ["hyenas"] = "Hyena", ["hykraians"] = "Hykraian", ["imps"] = "Imp", ["imskians"] = "Imskian", ["i'noxians"] = "I'noxian", ["jaden"] = "Jaydian", ["jadian"] = "Jaydian", ["janusians"] = "Janusian", ["jaquaans"] = "Jaquaan", ["jayden"] = "Jaydian", ["jaydan"] = "Jaydian", ["kaffarians"] = "Kaffarian", ["kahloans"] = "Kahloan", ["kalanoran"] = "Kalanorian", ["kamburus"] = "Kamburu", ["kangaroos"] = "Kangaroo", ["karnans"] = "Karnan", ["karrakanians"] = "Karrakanian", ["katarthans"] = "Katarthan", ["kathoonians"] = "Kathoonian", ["kherubim"] = "Kherubim", ["khundia"] = "Khund", ["khunds"] = "Khund", ["klarmarians"] = "Klarmarian", ["korgu"] = "Korugaran", ["korugar"] = "Korugaran", ["korugarian"] = "Korugaran", ["kranaltinians"] = "Kranaltinian", ["kroloteans"] = "Krolotean", ["kriptonan"] = "Kryptonian", ["kriptonian"] = "Kryptonian", ["kryptonan"] = "Kryptonian", ["kryptonian"] = "Kryptonian", ["kryptonian canine"] = "Kryptonian Canines", ["kryptonian god"] = "Kryptonian Gods", ["kwai"] = "Kwai", ["laburbians"] = "LaBurbian", ["lallorians"] = "Lallorian", ["lanothians"] = "Lanothian", ["lemurs"] = "Lemur", ["lexoran"] = "Lexorian", ["lexorian"] = "Lexorian", ["ligers"] = "Liger", ["lilliputians"] = "Lilliputian", ["lions"] = "Lion", ["lisnarians"] = "Lisnarians", ["living stars"] = "Living Star", ["lizarkons"] = "Lizarkon", ["llarans"] = "Llaran", ["loraneans"] = "Loranean", ["lurkers"] = "Lurker", ["makkorans"] = "Makkoran", ["maltusians"] = "Maltusian", ["maltus"] = "Maltusian", ["manatees"] = "Manatee", ["manhawks"] = "Manhawk", ["manhunter"] = "Manhunter", ["man hunter"] = "Manhunter", ["man hunters"] = "Manhunter", ["man-hunter "] = "Manhunter", ["man-hunters"] = "Manhunter", ["markians"] = "Markian", ["marsian"] = "Martian", ["marshan "] = "Martian", ["marsian "] = "Martian", ["martians"] = "Martian", ["meganian"] = "Megan", ["mercurians"] = "Mercurian", ["mermaid"] = "Merpeople", ["merman"] = "Merpeople", ["merpeople"] = "Merpeople", ["metahuman"] = "Metahuman", ["metans"] = "Metan", ["mice"] = "Mouse", ["minotaurs"] = "Minotaur", ["mongooses"] = "Mongoose", ["monitors"] = "Monitor", ["monkeys"] = "Monkey", ["moose"] = "Moose", ["mosteelians"] = "Mosteelian", ["motusians"] = "Motusian", ["muldroogans"] = "Muldroogan", ["mummies"] = "Mummy", ["murrians"] = "Murrian", ["muscaran"] = "Muscarian", ["mutants"] = "Mutant", ["mutant"] = "Mutant", ["myrgs"] = "Myrg", ["n'cronians"] = "N'cronian", ["new asgardians"] = "New Asgardian", ["new genesis bug"] = "Bug of New Genesis", ["new genesis bugs"] = "Bug of New Genesis", ["nacktosian"] = "Naktosian", ["naktosan"] = "Naktosian", ["naltoran"] = "Naltorian", ["neanderthals"] = "Neanderthal", ["nekromnians"] = "Nekromnian", ["neonians"] = "Neonian", ["neptunians"] = "Neptunian", ["new genesis"] = "New Gods", ["new gods"] = "New God", ["new-god"] = "New God", ["new-gods"] = "New God", ["ngoans"] = "Ngoan", ["noc'sagians"] = "Noc'sagian", ["norman"] = "Norman", ["numericonians"] = "Numericonian", ["oanian"] = "Oan", ["oans"] = "Oan", ["obsidian-folk"] = "Obsidian-Folk", ["octopuses"] = "Octopus", ["ogres"] = "Ogre", ["okaran"] = "Okaaran", ["okarian"] = "Okaaran", ["okaarian"] = "Okaaran", ["old gods"] = "Old God", ["olympians"] = "Olympian", ["olympian gods"] = "Olympian", ["gods of olympus"] = "Olympian", ["orandans"] = "Oradan", ["oranxians"] = "Oranxian", ["orazans"] = "Orazan", ["ovacronians"] = "Ovacronian", ["owls"] = "Owl", ["ozimanians"] = "Ozimanian", ["ozyronians"] = "Ozyronian", ["parademons"] = "Parademon", ["pegacorns"] = "Pegacorn", ["pegasi"] = "Pegasus", ["pharmans"] = "Pharman", ["phlonians"] = "Phlonian", ["phytarians"] = "Phytarian", ["pigs"] = "Pig", ["plutonians"] = "Plutonian", ["preztorians"] = "Preztorian", ["proteans"] = "Protean", ["psions"] = "Psion", ["pumician"] = "Pumice Person", ["pumice"] = "Pumice Person", ["pumice people"] = "Pumice Person", ["pumican"] = "Pumice Person", ["punkusians"] = "Punkusian", ["qwardians"] = "Qwardian", ["rabbits"] = "Rabbit", ["ranian"] = "Rannian", ["raanian"] = "Rannian", ["rannan"] = "Rannian", ["rann"] = "Rannian", ["rats"] = "Rat", ["the reach"] = "Reach", ["red saturnians"] = "Red Saturnian", ["white saturnians"] = "White Saturnian", ["saturnians"] = "Saturnian", ["reptiles"] = "Reptile", ["rhoonians"] = "Rhoonian", ["rhormorids"] = "Rhormorid", ["rimboran"] = "Rimborian", ["rimborians"] = "Rimborian", ["robots"] = "Robot", ["roguians"] = "Roguian", ["rojirans"] = "Rojiran", ["satyrs"] = "Satyr", ["slavothian"] = "Savothian", ["slavothan "] = "Savothian", ["savothan"] = "Savothian", ["selachians"] = "Selachian", ["sharks"] = "Shark", ["shayol"] = "Shayol", ["sheeda"] = "Sheeda", ["sher'hedeens"] = "Sher'Hedeen", ["shwarians"] = "Shwarian", ["siamgemians"] = "Siamgemian", ["simballians"] = "Simballian", ["sirkians"] = "Sirkian", ["sklarians"] = "Sklarian", ["skors"] = "Skor", ["skrulls"] = "Skrull", ["sky kangas"] = "Sky Kanga", ["slyggians"] = "Slyggian", ["solarians"] = "Solarian", ["somahturans"] = "Somahturan", ["spitroid"] = "Spitroid", ["spitroid"] = "Spitroid", ["squirrels"] = "Squirrel", ["starhavenite"] = "Starhavenites", ["stratans"] = "Stratan", ["suirpalamanians"] = "Suirpalamanian", ["sun-eaters"] = "Sun-Eater", ["synriannaquians"] = "Synriannaquian", ["talokites"] = "Talokite", ["talokians"] = "Talokite", ["talynians"] = "Talynian", ["tamareneans"] = "Tamaranean", ["tamaraneans"] = "Tamaranean", ["tamojoranians"] = "Tamojoranian", ["tanjentans"] = "Tanjentan", ["tartarians"] = "Tartarian", ["tchk-tchks"] = "Tchk-Tchk", ["teallians"] = "Teallian", ["terminans"] = "Terminan", ["terrans"] = "Terran", ["thanagar"] = "Thanagarian", ["thanagarians"] = "Thanagarian", ["tharrians"] = "Tharrian", ["tharr"] = "Tharrian", ["tigers"] = "Tiger", ["tigres"] = "Tiger", ["tigre"] = "Tiger", ["titan of myth"] = "Titans of Myth", ["titans of myth"] = "Titans of Myth", ["titan"] = "Titanian", ["titanan"] = "Titanian", ["toomeyans"] = "Toomeyan", ["tormocks"] = "Tormock", ["tortugans"] = "Tortugan", ["trees"] = "Tree", ["trewskians"] = "Trewskian", ["tritonians"] = "Tritonian", ["trogkian mammoths"] = "Trogkian Mammoth", ["trommites"] = "Trommite", ["tront"] = "Trontian", ["trontians"] = "Trontian", ["tsauronians"] = "Tsauronian", ["turtles"] = "Turtle", ["tyrrazians"] = "Tyrrazian", ["ungara"] = "Ungaran", ["unicorns"] = "Unicorn", ["unmen"] = "Un-Man", ["unman"] = "Un-Man", ["un men"] = "Un-Man", ["un man"] = "Un-Man", ["un-man"] = "Un-Man", ["un-manian"] = "Un-Man", ["uxorians"] = "Uxorian", ["uxor"] = "Uxorian", ["valeronians"] = "Valeronian", ["valkyries"] = "Valkyrie", ["vampire"] = "Vampire", ["vampires"] = "Vampire", ["van'nians"] = "Van'nian", ["varidians"] = "Varidian", ["varvan"] = "Varvans", ["venegarians"] = "Venegarian", ["venturans"] = "Venturan", ["venturians"] = "Venturan", ["venusians"] = "Venusian", ["venerians"] = "Venusian", ["volkregians"] = "Volkregian", ["voranians"] = "Voranian", ["vornians"] = "Vornian", ["vulcans"] = "Vulcan", ["vuldarians"] = "Vuldarian", ["vyrgans"] = "Vyrgan", ["weasels"] = "Weasel", ["werewolf"] = "Werewolf", ["wherewolf"] = "Werewolf", ["wherewolves"] = "Werewolf", ["werewolves"] = "Werewolf", ["whales"] = "Whale", ["white martians"] = "White Martian", ["winathians"] = "Winathian", ["wolves"] = "Wolf", ["xanshan"] = "Xanshian", ["xanthuans"] = "Xanthuan", ["xarapions"] = "Xarapion", ["xardans"] = "Xardan", ["xenusians"] = "Xenusian", ["xibalbans"] = "Xibalban", ["xudarians"] = "Xudarian", ["the yodix"] = "Yodix", ["youngenians"] = "Youngenian", ["zadronians"] = "Zadronian", ["zamarons"] = "Zamaron", ["zambaii"] = "Zambaii", ["zarolatts"] = "Zarolatt", ["zaronians"] = "Zaronian", ["zaroxians"] = "Zaroxian", ["zeroxians"] = "Zeroxian", ["zezzites"] = "Zezzite", ["zoans"] = "Zoan", ["zombies"] = "Zombie", ["zsiglonians"] = "Zsiglonian", ["zuunians"] = "Zuunian", ["zwenians"] = "Zwenian", ["zymians"] = "Zymian" }

race_table = { ["valid"] = valid, ["substitutes"] = substitutes }

-- Libraries of functions --

-- stands for High Frequency local HF = require('Module:ComicsHF') -- Parses invocation parameters, trims whitespace, and removes blanks. local getArgs = require('Dev:Arguments').getArgs -- Gives the name of the current page. It's expensive, so we only do it once. -- The _G then makes it global, available to all page functions. _G.vars = { Pagename = mw.title.getCurrentTitle.text }

-- -- Public functions (called from a Template or article) -- --

-- There is no standalone template, so no public functions.

-- Internal functions (used in this and other Modules --

function valid:in_database( name ) if type( self[ name ] ) == 'string' then return true else return nil end end

function valid:pluralize( name ) if self:in_database ( name ) then return self[name] else -- Brute force method of making a singular plural name = name:gsub( 's$', 'es' ) name = name:gsub( 'x$', 'es' ) name = name:gsub( 'z$', 'es' ) name = name:gsub( 'ch$', 'es' ) name = name:gsub( 'sh$', 'es' ) name = name:gsub( 'y$', 'ies' ) name = name:gsub( 'f$', 'ves' ) name = name:gsub( 'fe$', 'ves' ) name = name:gsub( '[^s]$', '%1s' ) return name end end

function valid:link( race ) return HF.CategoryLink( self:pluralize(race), vars.Pagename, race ) end

function substitutes:in_list( name ) if type( self[ string.lower( name ) ] ) == 'string' then return true else return nil end end

function substitutes:sub( name ) if self:in_list( name ) then return self[ string.lower( name ) ] else return nil end end

function substitutes:link( name ) return HF.CategoryLink( valid[name], vars.Pagename, name ) end

function race_table._Race( field, vars ) local output = '' local o = {} -- Check for multiple values separated with commas local values = HF.explode( ',', field.Value ) for i, v in ipairs( values ) do       v = HF.trim( v ) if valid:in_database( v ) then -- Check if it's a valid race with a plural form. -- If yes - add category links table.insert(o, valid:link( v ) ) elseif substitutes:sub( v ) then -- If it's not valid, check for a direct substitution -- If there's one in the database, use the corrected one table.insert(o, valid:link( substitutes:sub( v ) ) ) elseif string.match( v, '%[%[.*%]%]' ) then -- If it's already a link, leave it alone. table.insert(o, v)       else -- 3. If no substitution is found -- fallback to a common grammar rules -- and add a page to a Category:Needs valid race table.insert( o, valid:link( v ) ..               HF.Category( "Needs valid race", vars.Pagename )            ) end end -- If Value2 or ValueRef is provided -- concatenate them to the output if not HF.isempty( field.Value2 ) then output = output .. " " .. field.Value2 end if not HF.isempty( field.ValueRef ) then output = output .. " " .. field.ValueRef end return table.concat(o, ' · ') .. output end

- -- Output (send it back to whatever called it) -- - return race_table