Module:Category Header

local p = {}

local Franchise = require('Module:Franchise') local utilsError = require('Module:UtilsError') local utilsMarkup = require('Module:UtilsMarkup') local utilsPage = require('Module:UtilsPage')

function p.Main(frame) return p.main(frame.args) end

function p.main(args) local pagename = args[1] --Calls local game = args[2] --User input: The game relating to the category (A Link to the Past Articles Needing Improvement would use ALttP, Breath of the Wild Articles Lacking Sources would use BotW, etc.) if (pagename == "Maintenance categories") then returnHeader = "This category is the top-level maintenance category for all of Zelda Wiki. Here you can find subcategories that have very broad topics of problems needing to be fixed on the wiki, and narrowing down subcategory by subcategory you can search through a fine-tuned selection of issues to focus on. No mainspace should be added to this category, they should only appear in this category's subcategories.\n*This category is split into four categories, each separated by namespace. The namespaces are separated by Articles, Files, Modules, and Templates.\n*A fifth category, Category:Tech issues, contains templates, modules, gadgets, and any other background functions with problems, feature requests, or any other unresolved notices that require attention.\n*Category:Maintenance categories by medium also separates issues by game, book, etc. to focus on issues pertaining to specific media.\n" elseif (pagename == "Maintenance categories by medium") then returnHeader = "The following is a list of categories that contain flawed articles, separated by piece of media. All of the articles in these categories have been flagged with maintenance templates. This category and all subcategories are hidden from view in the mainspace.\n"

-- "ARTICLES" CATEGORIES elseif (string.match(string.lower(pagename), "articles needing attention")) then if (pagename == "Articles needing attention") then returnHeader = "__EXPECTUNUSEDCATEGORY__\nThe following is a list of articles that have been flagged with maintenance templates. They are grouped into sub-categories according to the nature of their defects. All of this category's subcategories are hidden from view in the mainspace.\n*Category:Articles lacking files contains articles that do not have an file in their infobox. This category is almost entirely automated by .\n*Category:Articles lacking sources contains articles that have one or more statements or claims that do not have a citation to support it.\n*Category:Articles needing deletion contains articles that do not meet the nessecary qualifications in order to justify having an article, and therefore should be deleted.\n*Category:Articles needing improvement contains articles that have multiple non-specific flaws and are poorly written overall.\n*Category:Articles needing reorganization contains articles that are very sporadic, unorganized, and generally do not fit the Article Guidelines.\n*Category:Articles to be updated contains articles with outdated content that need to be updated to fit recent releases.\n*Category:Articles using invalid arguments in template calls contains articles with disfunctioning templates, typically due to typos or out-of-date articles.\n*Category:Articles using names and having translations stored contains articles that use the outdated   template while having translations stored in data pages for the new template,  .\n*Category:Articles with invalid or missing terms contains articles that call the   template for a term that is not stored.\n*Category:Incomplete articles contains article that are unfinished and lacking important content.\n" elseif (pagename == "Community articles needing attention") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following is a list of articles in the Community: namespace that have been flagged with maintenance templates. They are grouped into sub-categories according to the nature of their defects. This category and all subcategories are hidden from view in the mainspace.\n*Category:Community articles lacking sources contains articles with unsourced content that need citations added to them.\n*Category:Community articles needing improvement contains articles that have multiple non-specific flaws and are in general need of improvement.\n*Category:Community articles needing reorganization contains articles that are disorganized and/or outdated and need reorganization.\n*Category:Community articles with file(s) requested contains articles that are lacking files throughout the article.\n" else if (utilsPage.exists("Category:Articles lacking information from " .. Franchise.shortName(game))) then returnHeader = string.format("__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following is a list of articles pertaining to %s that have been flagged with maintenance templates. They are grouped into sub-categories according to the nature of their defects. This category is hidden from view in the mainspace.\n*Category:Articles lacking information from %s contains articles that are outdated and require \n*Category:%s articles lacking files contains articles that do not have an file in their infobox.\n*Category:%s articles lacking sources contains articles that have one or more statements or claims that do not have a citation to support it.\n*Category:%s articles needing improvement contains articles that have multiple non-specific flaws and are poorly written overall.\n*Category:%s articles needing reorganization contains articles that are disorganized and use outdated formatting.\n*Category:%s articles with invalid or missing terms contains articles that call the  template for a term that is not stored.\n*Category:Incomplete %s articles contains articles that are incomplete or stubs and need to be expanded upon.\n\n", Franchise.link(game), Franchise.shortName(game), Franchise.shortName(game), Franchise.shortName(game), Franchise.shortName(game), Franchise.shortName(game), Franchise.shortName(game), Franchise.shortName(game), Franchise.shortName(game)) else returnHeader = string.format("__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following is a list of articles pertaining to %s that have been flagged with maintenance templates. They are grouped into sub-categories according to the nature of their defects. This category is hidden from view in the mainspace.\n*Category:%s articles lacking files contains articles that do not have an file in their infobox.\n*Category:%s articles lacking sources contains articles that have one or more statements or claims that do not have a citation to support it.\n*Category:%s articles needing improvement contains articles that have multiple non-specific flaws and are poorly written overall.\n*Category:%s articles needing reorganization contains articles that are disorganized and use outdated formatting.\n*Category:%s articles with invalid or missing terms contains articles that call the  template for a term that is not stored.\n*Category:Incomplete %s articles contains articles that are incomplete or stubs and need to be expanded upon.\n\n", Franchise.link(game), Franchise.shortName(game), Franchise.shortName(game), Franchise.shortName(game), Franchise.shortName(game), Franchise.shortName(game), Franchise.shortName(game), Franchise.shortName(game)) local gameCategory = "Category:"..Franchise.shortName(game) -- Without this existence check a lot of categories appear in Special:WantedCategories that no one seems to care enough about to add (e.g. Category:A Link to the Past (Barcode Battler II)) -- We may want to consider removing this existence check and create those categories. if utilsPage.exists(gameCategory) then returnHeader = returnHeader..""..gameCategory.."" end end end elseif (string.match(string.lower(pagename), "articles lacking files")) then if (pagename == "Articles lacking files") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles lack files. In the infobox, any tabs that do not have files are instead filled with a \"No Image\" notice, which you may click to be taken to a place to upload a file. This category is almost entirely automated by the  template, so when all files are uploaded for an article, the article will automatically be taken out of this category. This category also contains subcategories that separate this large list by piece of media or type: Category:Articles lacking files by medium sorts by medium (BotW, TPHD, TCT, etc.) while Category:Articles lacking files by type sorts by type of file missing (sprite, model, map, etc.). This category and all subcategories are hidden from view in the mainspace.\n\nAlongside the main subcategories that separate by piece of media or type, the Articles with file(s) requested category contains articles that are marked with the   template; these articles have been marked as needing more files outside of just the infobox, in the article content and/or the gallery section.\n" elseif (pagename == "Articles lacking files by medium") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles lack files, and the subcategories separate those articles into groups by piece of media. In the infobox, any tabs that do not have files are instead filled with a \"No Image\" notice, which you may click to be taken to a place to upload a file. This category is almost entirely automated by the  template, so when all files are uploaded for an article, the article will automatically be taken out of this category. This category is hidden from view in the mainspace.\n" elseif (pagename == "Articles lacking files by type") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles lack files, and the subcategories separate those articles into groups by type of file. In the infobox, any tabs that do not have files are instead filled with a \"No Image\" notice, which you may click to be taken to a place to upload a file. This category is almost entirely automated by the  template, so when all files are uploaded for an article, the article will automatically be taken out of this category. This category is hidden from view in the mainspace.\n" else returnHeader = string.format("__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles lack files pertaining to %s. In the infobox, any tabs that do not have files are instead filled with a \"No Image\" notice, which you may click to be taken to a place to upload a file. This category is almost entirely automated by the  template, so when all files are uploaded for an article, the article will automatically be taken out of this category. This category is hidden from view in the mainspace.\n\nThe %s file(s) requested subcategory contains articles that are marked with the   template; these articles have been marked as needing more files outside of just the infobox, in the article content and/or the gallery section.\n\n", Franchise.link(game), Franchise.shortName(game), Franchise.shortName(game), game, Franchise.shortName(game)) end elseif (pagename == "Articles lacking artwork") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles lack artwork in the infobox. In the infobox, any \"Artwork\" tabs that do not have files are instead filled with a \"No Image\" notice, which you may click to be taken to a place to upload an artwork. This category is almost entirely automated by the  template, so when all artworks are uploaded for an article, the article will automatically be taken out of this category. This category is hidden from view in the mainspace.\n" elseif (pagename == "Articles lacking maps") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles lack maps in the infobox. In the infobox, any \"Map\" tabs that do not have files are instead filled with a \"No Image\" notice, which you may click to be taken to a place to upload an artwork. This category is almost entirely automated by the  template, so when all artworks are uploaded for an article, the article will automatically be taken out of this category. This category is hidden from view in the mainspace.\n" elseif (pagename == "Articles lacking models") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles lack models in the infobox. In the infobox, any \"Models\" tabs that do not have files are instead filled with a \"No Image\" notice, which you may click to be taken to a place to upload an artwork. This category is almost entirely automated by the  template, so when all artworks are uploaded for an article, the article will automatically be taken out of this category. This category is hidden from view in the mainspace.\n" elseif (pagename == "Articles lacking renders") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles lack renders in the infobox. In the infobox, any \"Render\" tabs that do not have files are instead filled with a \"No Image\" notice, which you may click to be taken to a place to upload an artwork. This category is almost entirely automated by the  template, so when all artworks are uploaded for an article, the article will automatically be taken out of this category. This category is hidden from view in the mainspace.\n" elseif (pagename == "Articles lacking screenshots") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles lack screenshots in the infobox. In the infobox, any \"Screenshot\" tabs that do not have files are instead filled with a \"No Image\" notice, which you may click to be taken to a place to upload an artwork. This category is almost entirely automated by the  template, so when all artworks are uploaded for an article, the article will automatically be taken out of this category. This category is hidden from view in the mainspace.\n" elseif (pagename == "Articles lacking sprites") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles lack sprites in the infobox. In the infobox, any \"Sprites\" tabs that do not have files are instead filled with a \"No Image\" notice, which you may click to be taken to a place to upload an artwork. This category is almost entirely automated by the  template, so when all artworks are uploaded for an article, the article will automatically be taken out of this category. This category is hidden from view in the mainspace.\n" elseif (string.match(string.lower(pagename), "articles lacking sources")) then if (pagename == "Articles lacking sources") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles lack citations. All articles in this category contain pieces of information that are possibly false and require verification to be kept on the article. This category also contains subcategories that separate this large list by piece of media, and all of these categories are hidden from view in the mainspace.\n\nTo remove articles from this category, you must either:\n*Add a citation next to the skeptical information on the article. For more information on how to add citations effectively, see Guidelines:References.\n*Remove the information from the article if you are confident that it is untrue and cannot find any references to back it up. If the information in question is an entire article, you may use the  template to mark the article for deletion.\n\nTo add articles to this category, you can use one of these two templates:\n*, if whole articles or sections generally lack citations. Place this underneath the header for the section in question, or in the case of an article, place it underneath the lead sentence and infobox.\n*, if a specific portion of info needs a citation. Place this after the punctuation in the skeptical sentence.\nIf the information that needs a citation pertains to a specific game or other piece of media, you may add the abbreviation of said media to the template. For example, if a statement about Breath of the Wild seems untrue, you may use  to add it to the \"Breath of the Wild articles lacking sources\" category.\n\nAlongside the main subcategories that separate by piece of media, there are a few extra subcategories that group articles by other issues:\n*Category:Articles lacking name references contains articles that do not have an official name, as outlined in the Terminology Guidelines.\n*Category:Articles with suspected plagiarism contains articles with content that is suspected to be plagiarized, which constitutes copyright infringement.\n*Category:Articles with unsourced excerpts contains articles that have excerpts from official media that have not been properly sourced and therefore constitute plagiarism and copyright infringement, and must either have a citation attached to them or be removed.\n" else returnHeader = string.format("__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles lack citations pertaining to %s. All articles in this category contain pieces of information that are possibly false and require verification to be kept on the article. This category is hidden on mainspace articles.\n\nTo remove articles from this category, you must either:\n*Add a citation next to the skeptical information on the article. For more information on how to add citations effectively, see Guidelines:References.\n*Remove the information from the article if you are confident that it is untrue and cannot find any references to back it up. If the information in question is an entire article, you may use the  template to mark the article for deletion.\n\nTo add articles to this category, you can use one of these two templates:\n*, if whole articles or sections generally lack citations. Place this underneath the header for the section in question, or in the case of an article, place it underneath the lead sentence and infobox.\n*, if a specific portion of info needs a citation. Place this after the punctuation in the skeptical sentence.\nThe subcategory %s articles lacking name references contains articles that are lacking official names, which are marked by the  template.\n\n", Franchise.link(game), game, game, Franchise.shortName(game), Franchise.shortName(game), Franchise.shortName(game))		end    elseif (string.match(string.lower(pagename), "articles lacking name references")) then    	if (pagename == "Articles lacking name references") then	        returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles lack official names. All articles in this category have a name that is not confirmed to be official and needs a reference added. This category also contains subcategories that separate this large list by piece of media, and all of these categories are hidden from view in the mainspace.\n\nTo remove articles from this category, you must either:\n*Add a citation in the lead sentence(s) about where an offical name can be found, making sure it fits the Terminology Guidelines.\n*If you are confident that there is no official name for the subject anywhere, you may mark the article with the   template. From there, the article will be reviewed and determined if the content is better fit elsewhere or if the article should just be deleted.\n\nTo add articles to this category, you can use the  template, putting it after the first lead sentence on the article. To mark an article for a specific game or other piece of media, you may add the abbreviation of said media to the template. For example, if a subject is missing a name for Breath of the Wild, you may use \" \" to add it to the \"Breath of the Wild articles lacking name references\" category.\n\nAlongside the main subcategories that separate by piece of media, the Articles with conjectural titles category contains articles that are marked with the  as having a fan-made title.\n"    	else	        returnHeader = string.format("__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles lack official names pertaining to %s. All articles in this category have a name that is not confirmed to be official and needs a reference added. This category is hidden from view in the mainspace.\n\nTo remove articles from this category, you must either:\n*Add a citation in the lead sentence(s) about where an offical name can be found, making sure it fits the Terminology Guidelines.\n*If you are confident that there is no official name for the subject anywhere, you may mark the article with the   template. From there, the article will be reviewed and determined if the content is better fit elsewhere or if the article should just be deleted.\n\nTo add articles to this category, you can use the  template, putting it after the first lead sentence on the article.\n\n", Franchise.link(game), game, Franchise.shortName(game), Franchise.shortName(game))    	end	elseif (pagename == "Articles with conjectural titles") then		returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles use titles that are fan-created and unofficial; official names should replace all the names of these articles based on the Terminology and Reference Guidelines. All articles in this category are marked with the   template which should be removed when an official name is found. This category is hidden from view in the mainspace.\n"    elseif (pagename == "Articles with suspected plagiarism") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles are suspected to contain plagiarism and therefore infringe upon copyright. If you confirm the information to be plagiarism, please remove the content from the article and notify a staff member. This category is hidden from view in the mainspace.\n\nPages are added to this category when marked with the  template.\n" elseif (pagename == "Articles with unsourced excerpts") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles contain excerpts from official media that have not been properly sourced and therefore constitute plagiarism and copyright infringement. The unsourced information should either have a citation added to it in accordance with the Reference Guidelines or should be removed. All articles in this category are marked with the  template which should be removed when the excerpt is dealt with. This category is hidden from view in the mainspace.\n"

elseif (pagename == "Articles needing deletion") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles should be deleted by staff member. They have been marked with the  template for being disorganized, lacking a name reference, or otherwise are not up to Zelda Wiki's quality standards. This category is hidden from view in the mainspace.\n\nThe partner category for this category, Files needing deletion, focuses on files instead of articles.\n"

elseif (string.match(string.lower(pagename), "articles needing improvement")) then if (pagename == "Articles needing improvement") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles (or sections within articles) are in general need of improvement. They may be poorly written, disorganized, unprofessional, or otherwise not up to Zelda Wiki's quality standards. These articles require general clean up and fixes throughout a large area of the article, and in some cases complete rewrites may be required. This category also contains subcategories that separate this large list by piece of media, and all of these categories are hidden from view in the mainspace.\n\nMore articles can be added to this list by tagging them with the  template. If the article (or section of the article) that needs clean-up pertains to a specific piece of media, you may add the abbreviation of the media into the template to sort the article into a specific subcategory. The template should be formatted as \" .\" For example, if the area of the article that needs fixing relates to Phantom Hourglass, you may tag the section with. When a article on this list is fixed, be sure to remove the template from the article to remove it from this category.\n\nAlongside the main subcategories that separate by piece of media, there are three other subcategories that group articles by problem type:\n*Articles with improper style or tone category contains pages that do are written less like an encyclopedia and more like a forum or strategy guide. These articles need to be rewritten to better fit the article style guidelines.\n*Category:Statements Needing Clarification contains articles with unclear and vague information that needs adjustment.\n*Category:Statements needing verification contains articles with skeptical information that needs verification to be kept on the page.\n"		elseif (pagename == "Community articles needing improvement") then	       returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following community articles (or sections within community articles) are in general need of improvement. They may be poorly written, disorganized, unprofessional, or otherwise not up to Zelda Wiki's quality standards. These articles require general clean up and fixes throughout a large area of the article, and in some cases complete rewrites may be required. This category is hidden from view in the mainspace.\n\nMore articles can be added to this list by tagging them with the  template, which should be formatted as \" ,\" or by tagging them with the   template if the problem is with the article's formallity and style, which should be formatted as \" .\" (For examples on what to enter for, see here.) When a article on this list is fixed, be sure to remove the template from the article to remove it from this category.\n\n"		else	        returnHeader = string.format("__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles (or sections within articles) relating to %s are in general need of improvement. They may be poorly written, disorganized, unprofessional, or otherwise not up to Zelda Wiki's quality standards. These articles require general clean up and fixes throughout a large area of the article, and in some cases complete rewrites may be required. This category is hidden from view in the mainspace.\n\nMore articles can be added to this list by tagging them with the  template, which should be formatted as \" ,\" or by tagging them with the   template if the problem is with the article's formallity and style, which should be formatted as \" .\" (For examples on what to enter for, see here.) When a article on this list is fixed, be sure to remove the template from the article to remove it from this category.\n\n", Franchise.link(game), game, game, Franchise.shortName(game))		end	elseif (pagename == "Articles with improper style or tone") then		returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles do not meet Zelda Wiki's style and tone standards. These articles are all written less like an encyclopedia and more like a forum or strategy guide, requiring rewrites. All articles in this category are marked with the   template that describes the issue with the article, which may vary between articles. This category is hidden from view in the mainspace.\n"	elseif (string.match(string.lower(pagename), "statements needing clarification")) then		if (pagename == "Statements needing clarification") then			returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles contain one or more vague and unspecific statements. For example, they may contain weasel words such as \"in some games,\" \"a certain amount,\" \"some people,\" etc., which should be clarified to make the information more accurate and reliable.\n\nTo add articles to this category, you can tag a sentence with any of these templates:\n* can be used to mark statements that vaguely point towards a group without specifying one subject. (\"in some games,\" \"in some areas\")\n* can be used to mark statements that are very opinionated and less fact-based, especially if they do not have a citation to do along with them. (\"Fi is the most popular character in The Legend of Zelda series,\" \"The Fire Rod is the coolest Item\")\n* can be used to mark vague time periods. (\"eventually,\" \"after some time\")\n* can be used to mark vague statements relating to actions. (\"Link defeated Ganon,\" \"The layout of the room was changed in the final version,\" \"Big Switches can open paths forward\")\n* can be used to mark statements with unspecific quantifiers. (\"a certain amount,\" \"lots of,\" \"many,\" \"some\")\n* can be used when none of the previous templates fit.\n"	    else			returnHeader = string.format("__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles contain one or more vague and unspecific statements pertaining to %s. For example, they may contain weasel words such as \"in some games,\" \"a certain amount,\" \"some people,\" etc., which should be clarified to make the information more accurate and reliable.\n\nTo add articles to this category, you can tag a sentence with any of these templates:\n*  can be used to mark statements that vaguely point towards a group without specifying one subject. (\"in some games,\" \"in some areas\")\n*  can be used to mark statements that are very opinionated and less fact-based, especially if they do not have a citation to do along with them. (\"Fi is the most popular character in The Legend of Zelda series,\" \"The Fire Rod is the coolest Item\")\n* can be used to mark vague time periods. (\"eventually,\" \"after some time\")\n* can be used to mark vague statements relating to actions. (\"Link defeated Ganon,\" \"The layout of the room was changed in the final version,\" \"Big Switches can open paths forward\")\n* can be used to mark statements with unspecific quantifiers. (\"a certain amount,\" \"lots of,\" \"many,\" \"some\")\n* can be used when none of the previous templates fit.\n\n", Franchise.link(game), game, game, game, game, game, game, Franchise.shortName(game))		end

elseif (string.match(string.lower(pagename), "statements needing verification")) then if (pagename == "Statements needing verification") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles contain one or more unsourced and possibly dubious statements. More articles can be added to this category by using the  template. If a reliable citation cannot be found to verify the claim, you may instead either test the claim in-game yourself or find a video or image that proves the statement. Once you have verified the statement, you may remove the   tag (or remove the claim if you find it to be false). When removing the tag, please add the citation or provide visual proof (i.e. a video or image) if possible; verification tags removed without proof may be re-added.\n" else returnHeader = string.format("__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles contain one or more unsourced and possibly dubious statements pertaining to %s. More articles can be added to this category by using the  template. If a reliable citation cannot be found to verify the claim, you may instead either test the claim in-game yourself or find a video or image that proves the statement. Once you have verified the statement, you may remove the   tag (or remove the claim if you find it to be false). When removing the tag, please add the citation or provide visual proof (i.e. a video or image) if possible; verification tags removed without proof may be re-added.\n\n", Franchise.link(game), game, game, Franchise.shortName(game)) end

elseif (string.match(string.lower(pagename), "articles needing reorganization")) then if (pagename == "Articles needing reorganization") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles (or sections within articles) are in need of reorganization. They may use an outdated article structure, outdated formatting, or are generally disorganized and otherwise not up to Zelda Wiki's quality standards. These articles need content and sometimes entire sections moved around, either to other locations in the article or to a different article entirely. This category also contains subcategories that separate this list by common problems, and all of these categories are hidden from view in the mainspace.\n*Category:Articles to be merged contains lists of two or more articles that need to be combined into one article.\n*Category:Articles to be moved contains articles that need to be moved to a different name.\n*Category:Articles to be split contains articles that need to be split into two or more articles.\n*Category:Articles to harmonize contains lists of two or more articles that need to have their content linked together properly.\n*Category:Improper trivia sections contains articles that have content in their Trivia section that does not belong there. The content may either fit better in the main body of the article or not belong in the article entirely.\n\nMore articles can be added to this list by tagging them with the  template. When an article on this list is fixed, be sure to remove the template from the article to remove it from this category.\n"		elseif (pagename == "Community articles needing reorganization") then			returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following community articles (or sections within community articles) are in need of reorganization. They may use an outdated article structure, outdated formatting, or are generally disorganized and otherwise not up to Zelda Wiki's quality standards. These articles need content and sometimes entire sections moved around, either to other locations in the article or to a different article entirely. This category is hidden from view in the mainspace.\n\nMore articles can be added to this list by tagging them with the  template. When an article on this list is fixed, be sure to remove the template from the article to remove it from this category.\n\n"		else			returnHeader = string.format("__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles (or sections within articles) pertaining to %s are in need of reorganization. They may use an outdated article structure, outdated formatting, or are generally disorganized and otherwise not up to Zelda Wiki's quality standards. These articles need content and sometimes entire sections moved around, either to other locations in the article or to a different article entirely. This category is hidden from view in the mainspace.\n\nMore articles can be added to this list by tagging them with the  template. When an article on this list is fixed, be sure to remove the template from the article to remove it from this category.\n\n", Franchise.link(game), game, Franchise.shortName(game)) end elseif (pagename == "Articles to be merged") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles are subject to potential merging with other articles relating to them, which is usually determined by the Terminology Guidelines. The status of these articles can be discussed on each article's talk page. All articles in this category are marked with the  template which should be removed after moving the article to remove it from this category. This category is hidden from view in the mainspace.\n" elseif (pagename == "Articles to be moved") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles are in need of a move, which means to rename the article. The status of these articles can be discussed on each article's talk page. All articles in this category are marked with the  template which should be removed after moving the article to remove it from this category. This category is hidden from view in the mainspace.\n" elseif (pagename == "Articles to be split") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles are in need of a split, which means to turn one article into multiple. This usually occurs when a new term is found for a subject on an article. All articles in this category are marked with the  template which should be removed after moving the article to remove it from this category. This category is hidden from view in the mainspace.\n" elseif (pagename == "Articles to harmonize") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles contain content that do not properly complement other articles of a related topic, and as such they must be rewritten in order to reduce redundancy and inconsistency. All articles in this category are marked with the  template which should be removed after moving the article to remove it from this category. This category is hidden from view in the mainspace.\n" elseif (pagename == "Improper trivia sections") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles contain content in their trivia sections that do not belong there. Any information that is relevant to the page but doesn't fit in the trivia section can be moved into the main body of the article. Any information that does not fit anywhere on the page can be removed. All articles in this category are marked with the  template which should be removed after moving the article to remove it from this category. This category is hidden from view in the mainspace.\n" elseif (pagename == "Articles to be updated") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles are outdated and need to be updated following the release of new information. All articles in this category are marked with the  template which should be removed after the article content is updated. This category and all subcategories is hidden from view in the mainspace.\n*Category:Articles citing games with remakes contains articles with outdated references.\n*Category:Articles with dead external links contaisn articles with web citations that link to dead websites.\n" elseif (pagename == "Articles citing games with remakes") then returnHeader = string.format("__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles have outdated citations that reference games with remakes. For example, an article might cite %s for a piece of information, but since that citation was added, %s was released. The citation should then be updated with the new text from the recent remake in order to keep the information accurate. This category is almost entirely automated by the  template, so when all citations are updated in an article, the article will automatically be taken out of this category. This category is hidden from view in the mainspace.\n", Franchise.link("OoT"), Franchise.link("OoT3D")) elseif (pagename == "Articles with dead external links") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles have web citations that link to deleted or broken websites. In most cases, this is caused by the website being taken down or moved to a different URL, and most of these pages can be fixed using the Wayback Machine web archive. All articles in this category are marked with the  template which should be removed when an official name is found. This category is hidden from view in the mainspace.\n" elseif (string.match(string.lower(pagename), "articles lacking information from")) then returnHeader = string.format("__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles pertaining to %s are outdated and need to be updated following the release of new information. All articles in this category are marked with the  template which should be removed after the article content is updated. This category is hidden from view in the mainspace.\n\n", Franchise.link(game), game, Franchise.shortName(game)) elseif (pagename == "Articles using invalid arguments in template calls") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles are using templates with parameters that either do not exist or are being phased out. This is typically due to typos or out-of-date articles. This category is hidden from view in the mainspace.\n*Category:Articles using invalid color names contains articles using the  template with a color name that does not exist in Module:Color/Data.\n*Category:Articles using invalid icon names contains articles using the   template with an icon name that does not exist.\n*Category:Infoboxes using br tags contains articles with infoboxes that use br tags to create lists, resulting in poor HTML semantics.\n*Category:Infoboxes using Exp Game contains articles with infoboxes using the   template instead of the   template.\n*Category:Terms with redundant display arguments contains articles that use   and   with a   argument that is the exact same as the term itself and is therefore redundant.\n===Fixing Invalid Arguments===\n====Viewing Warnings====\nPages in this category should have editor warnings that describe which template usages are invalid and how to fix them.\n\nWarning messages are displayed above page previews, unless the preference   is enabled. In this case, the warnings can also be viewed in the Lua logs at the very bottom of the preview page beneath the editing area, under \"parser profiling data.\" Unfortunately warning messages cannot be viewed when using VisualEditor, even in source mode. To switch to the regular source editor, go to Special:Preferences,  tab, and from the   dropdown select  .\n\n====Transcluded Errors====\nIf a page appears in this category but no editor warning appears when previewing the page, it may be that the error is being transcluded from another page. This happens quite often with errors in Data:Translations being transcluded into articles via, and on redirect pages that use .\n\nIn this case, you can use Special:ExpandTemplates to find out where the error is coming from. Put the name of the article in the context title field and the article wikitext in the input wikitext field, then submit the form. Search for  in the Result section. The category name will appear where the error is.\nOnce the transcluded page (e.g. Data:Translations) is fixed, you must null edit the transcluding page (e.g. an article with Nomenclature) to clear it from this category.\n"	elseif (pagename == "Articles using deprecated colors") then		returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles use the  template with colors that are to be phased out in favor of newer, more accurate colors. This category is hidden from view in the mainspace.\n"	elseif (pagename == "Articles using invalid color names") then		returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles use the  template with a color name that does not exist in Module:Color/Data. This category is hidden from view in the mainspace.\n"	elseif (pagename == "Articles using names and having translations stored") then		returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles use  or   but already have translations stored in data pages. The  template is outdated and should be replaced with the   template. This category is completely automated, and when an article is transitioned from using  to , the article will be removed from this category. This category is hidden from view in the mainspace.\n"   elseif (string.match(string.lower(pagename), "articles with invalid or missing terms")) then    	if (pagename == "Articles with invalid or missing terms") then	        returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles use the   template to call terms that do not exist in the cargo table. This can be caused by either a typo causing an invalid term, which the solution would be fixing the typo, or by a term that has yet to be stored, which the solution is to store the term after a name reference is added.\n\nAll articles in this category are automatically added by the  template and once the terms are fixed or stored, they will automatically be removed. This category and all subcategories are hidden from view in the mainspace.\n*Category:Articles with invalid or missing terms by medium separates these pages by piece of media.\n"	   elseif (pagename == "Articles with invalid or missing terms by medium") then	        returnHeader = "__HIDDENCAT__\nThis category is a subcategory of Category:Articles with invalid or missing terms that contains subcategories separated by piece of media, each with a focus on pages that contain invalid terms. This category and all subcategories are hidden from view in the mainspace.\n"		else	       returnHeader = string.format("__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles use the   template to call terms in %s that do not exist in the cargo table. This can be caused by either a typo causing an invalid term, which the solution would be fixing the typo, or by a term that has yet to be stored, which the solution is to store the term after a name reference is added.\n\nAll articles in this category are automatically added by the   template and once the terms are fixed or stored, they will automatically be removed. This category is hidden from view in the mainspace.\n", Franchise.link(game))	        if game ~= "Series" then	        	returnHeader = returnHeader..string.format("", Franchise.shortName(game)) end end elseif (pagename == "Incomplete articles") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following is a list of unfinished articles that are generally lacking content. All articles in this category are marked with the  template. The Incomplete articles by medium category separates the artcles by piece of media, and there are a few extra subcategories that separate by problem type. This category and all subcategories is hidden from view in the mainspace.\n*Category:Characters missing genders contains character articles that don't have anything entered for the   parameter.\n*Category:Incomplete listings contains article listings that are incomplete.\n*Category:Incomplete nomenclatures contains articles with incomplete nomenclature sections.\n*Category:Incomplete sections contains articles that have only specific sections that are incomplete. Articles in this category are marked with the   template.\n*Category:Staff articles lacking birthdays contains articles for Nintendo staff members that are lacking birthdays in their infoboxes.\n" elseif (string.match(string.lower(pagename), "incomplete") and string.match(string.lower(pagename), "sections")) then returnHeader = string.format("__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following is a list of articles contain one or more sections pertaining to %s that are largely incomplete. These articles may lack general content, have incomplete tables, or generally do not cover the topic well. All articles in this category are marked with the  template which should be removed once the holes in the articles are filled in. This category is hidden from view in the mainspace.\n\n", Franchise.link(game), game, Franchise.shortName(game)) elseif (string.match(string.lower(pagename), "incomplete") and string.match(string.lower(pagename), "articles")) then returnHeader = string.format("__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following is a list of articles pertaining to %s that are largely incomplete. These articles may lack general content, have incomplete tables, or generally do not cover the topic well. All articles in this category are marked with the  template which should be removed once the holes in the articles are filled in. The Incomplete %s sections category contains articles that have only sections of a page that are incomplete. This category and its subcategory are hidden from view in the mainspace.\n\n", Franchise.link(game), game, Franchise.shortName(game), Franchise.shortName(game), Franchise.shortName(game)) elseif string.find(pagename, "Articles with incomplete data") then returnHeader = mw.getCurrentFrame:expandTemplate({			title = "Category Header/Incomplete Data",			args = {game}		}) -- "FILE" CATEGORIES elseif (pagename == "Files needing attention") then returnHeader = "__EXPECTUNUSEDCATEGORY__\nThe following is a list of files that have been flagges with maintenance templates. They are grouped into sub-categories according to the nature of their defects. All of this category's subcategories are hidden from view in the mainspace.\n*Category:Files needing deletion contains files that need to be deleted and possibly replaced with a better file.\n" elseif (pagename == "Files needing deletion") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following files should be deleted by staff member. They have been marked with the  template for being low quality, lacking a source, or for being superseded by a better version of the same file. This category is hidden from view in the mainspace.\n\nThe partner category for this category, Articles needing deletion, focuses on articles instead of files.\n" elseif (string.match(string.lower(pagename), "file%(s%) requested")) then if (pagename == "Articles with file(s) requested") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles have been requested to have more files added to them. Articles in this category have been marked with the  template; these articles have been marked as needing more files outside of just the infobox, in the article content and/or the gallery section. This category has been sorted into subcategories grouped by piece of media.\n" elseif (pagename == "Community articles with file(s) requested") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following community articles have been requested to have more files added to them. Articles in this category have been marked with the  template; these articles have been marked as needing more files outside of just the infobox, in the article content and/or the gallery section. This category has been sorted into subcategories grouped by piece of media.\n\n" else returnHeader = string.format("__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThe following articles pertaining to %s have been requested to have more files added to them. Articles in this category have been marked with the  template; these articles have been marked as needing more files outside of just the infobox, in the article content and/or the gallery section. This category has been sorted into subcategories grouped by piece of media.\n\n", Franchise.link(game), game, Franchise.shortName(game)) end -- "MODULE" CATEGORIES elseif (pagename == "Modules needing attention") then returnHeader = "__EXPECTUNUSEDCATEGORY__\nThe following is a list of modules that have either been flagged with maintenance templates or are throwing exceptions (outputting errors). They are grouped into sub-categories according to the nature of their defects. All of this category's subcategories are hidden from view in the mainspace.\n*Category:Deprecated modules contains modules that have been replaced with newer modules.\n*Category:Modules with failing tests contains modules that are outputting differently than what is expected and need fixes.\n*Category:Modules with invalid data contains modules that fail schema validation.\n*Category:Pages with script errors contains any mainspace pages with syntax errors in the modules they use.\n*Category:Scribunto modules with errors contains modules using scribunto that contain errors.\n" elseif (pagename == "Deprecated modules") then returnHeader = "__EXPECTUNUSEDCATEGORY__\nThe following is a list of modules that have been replaced and need to be removed from use across the wiki.\n" elseif (pagename == "Modules with failing tests") then returnHeader = "__EXPECTUNUSEDCATEGORY__\nThe following modules are outputting differently than what is expected, as defined in their documentation.\n" elseif (pagename == "Modules with invalid data") then returnHeader = "__EXPECTUNUSEDCATEGORY__\nThe following module data pages are failing schema validation. Detailed error messages will appear when previewing the page.\n"

elseif (pagename == "Pages with script errors") then returnHeader = "__EXPECTUNUSEDCATEGORY__\nThis category is hidden from view in the mainspace.\n"

elseif (pagename == "Scribunto modules with errors") then returnHeader = "__EXPECTUNUSEDCATEGORY__\nThe following modules using scribunto have errors.\n"

-- "TEMPLATE" CATEGORIES elseif (pagename == "Templates needing attention") then returnHeader = "__EXPECTUNUSEDCATEGORY__\nThe following is a list of templates that have been flagged with maintenance templates. They are grouped into sub-categories according to the nature of their defects. All of this category's subcategories are hidden from view in the mainspace.\n*Category:Navigation templates needing attention contains navigation templates that have a general need of improvement.\n*Category:Pages with template errors contains subcategories of different errors that result from incorrect usage of templates.\n*Category:Templates needing CSS improvements contains templates that need changes to better fit the CSS guidelines.\n*Category:Templates needing deletion contains templates that need to be or have been replaced by newer templates and should to be removed on pages across the wiki and deleted.\n"

elseif (pagename == "Navigation templates needing attention") then returnHeader = "__EXPECTUNUSEDCATEGORY__\nThe following is a list of navigation templates that have issues needing addressing. These issues are detected by the navbox module and automatically added to this category. A report is generated on the template page that explains all the issues detected, and resolving all the issues in the report will automatically remove it from this category.\n*Category:Navboxes with other contains navigation templates with subgroups named  or   that should be replaced.\n" elseif (pagename == "Navboxes with other") then returnHeader = "__EXPECTUNUSEDCATEGORY__\nThe following navboxes have a subgroup named  or  . If possible, new subgroups should be created to replace this subgroup. Navboxes using this subgroup are detected by the navbox module and automatically added to this category. Removing the subgroup from a navbox will automatically remove it from this category. \n" elseif (pagename == "Pages with template errors") then returnHeader = "__EXPECTUNUSEDCATEGORY__\nThis category contains several subcategories of pages that use templates incorrectly or in a nonoptimal fashion.\n" elseif (pagename == "Articles using deprecated parameters in template calls") then returnHeader = "__EXPECTUNUSEDCATEGORY__\nThe following pages use template parameters that have been deprecated. These template usages must be updated.\n"

elseif (pagename == "Templates needing CSS improvements") then returnHeader = "__EXPECTUNUSEDCATEGORY__\nThe following templates do not adhere to the best practices outlined in Guidelines:CSS.\n"

elseif (pagename == "Templates needing deletion") then returnHeader = "__EXPECTUNUSEDCATEGORY__\nThe following templates have been marked with the  template. This is typically the final stage of deprecated templates and contains a list of these templates that have been fully removed from use across the wiki and are ready to be deleted by an administrator. Alternatively, templates in this list may be marked for being unused or unnessecary.\n" elseif (pagename == "Deprecated templates") then returnHeader = "__EXPECTUNUSEDCATEGORY__\nThe following is a list of templates that have been replaced and need to be removed from use across the wiki. When all uses of a template are removed from the wiki, (use Special:WhatLinksHere to check), mark a template with the  template to move it to the Templates needing deletion category and signal an administrator to delete it.\n"

-- "TECH ISSUES" CATEGORIES elseif (pagename == "Tech issues") then returnHeader = "__HIDDENCAT__ __EXPECTUNUSEDCATEGORY__\nThis category includes talk pages of templates, modules, gadgets, or other pages that need attention from someone with programming skills. Think GitHub issues. This category is hidden from view in the mainspace.\n" --Activates when someone enters an invalid value for "game" else utilsError.warn(string.format("\"%s\" is not a valid game code, see here for all accepted values. If this is a mistake, please contact a staff member on the Discord server.", game)) end return returnHeader end

return p