<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rosiesocrossing.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ACapitalizationCheck</id>
	<title>Module:CapitalizationCheck - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rosiesocrossing.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ACapitalizationCheck"/>
	<link rel="alternate" type="text/html" href="https://rosiesocrossing.com/index.php?title=Module:CapitalizationCheck&amp;action=history"/>
	<updated>2026-04-30T11:00:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://rosiesocrossing.com/index.php?title=Module:CapitalizationCheck&amp;diff=3111&amp;oldid=prev</id>
		<title>Rosie: Created page with &quot;local p = {} local getArgs = require(&#039;Module:Arguments&#039;).getArgs data = mw.loadData(&quot;Module:CapitalizationCheck/Data&quot;)  function checkFirstGen(s) 	if s == &quot;DnM&quot; then 		return true 	elseif s == &quot;Doubutsu no Mori&quot; then 		return true 	elseif s == &quot;DnM+&quot; then 		return true 	elseif s == &quot;Doubutsu no Mori+&quot; then 		return true 	elseif s == &quot;PG&quot; then 		return true 	elseif s == &quot;Animal Crossing&quot; then 		return true 	elseif s == &quot;DnMe+&quot; then 		return true 	elseif s == &quot;Doubutsu no...&quot;</title>
		<link rel="alternate" type="text/html" href="https://rosiesocrossing.com/index.php?title=Module:CapitalizationCheck&amp;diff=3111&amp;oldid=prev"/>
		<updated>2026-01-12T14:35:02Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local p = {} local getArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs data = mw.loadData(&amp;quot;Module:CapitalizationCheck/Data&amp;quot;)  function checkFirstGen(s) 	if s == &amp;quot;DnM&amp;quot; then 		return true 	elseif s == &amp;quot;Doubutsu no Mori&amp;quot; then 		return true 	elseif s == &amp;quot;DnM+&amp;quot; then 		return true 	elseif s == &amp;quot;Doubutsu no Mori+&amp;quot; then 		return true 	elseif s == &amp;quot;PG&amp;quot; then 		return true 	elseif s == &amp;quot;Animal Crossing&amp;quot; then 		return true 	elseif s == &amp;quot;DnMe+&amp;quot; then 		return true 	elseif s == &amp;quot;Doubutsu no...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
local getArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs&lt;br /&gt;
data = mw.loadData(&amp;quot;Module:CapitalizationCheck/Data&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
function checkFirstGen(s)&lt;br /&gt;
	if s == &amp;quot;DnM&amp;quot; then&lt;br /&gt;
		return true&lt;br /&gt;
	elseif s == &amp;quot;Doubutsu no Mori&amp;quot; then&lt;br /&gt;
		return true&lt;br /&gt;
	elseif s == &amp;quot;DnM+&amp;quot; then&lt;br /&gt;
		return true&lt;br /&gt;
	elseif s == &amp;quot;Doubutsu no Mori+&amp;quot; then&lt;br /&gt;
		return true&lt;br /&gt;
	elseif s == &amp;quot;PG&amp;quot; then&lt;br /&gt;
		return true&lt;br /&gt;
	elseif s == &amp;quot;Animal Crossing&amp;quot; then&lt;br /&gt;
		return true&lt;br /&gt;
	elseif s == &amp;quot;DnMe+&amp;quot; then&lt;br /&gt;
		return true&lt;br /&gt;
	elseif s == &amp;quot;Doubutsu no Mori e+&amp;quot; then&lt;br /&gt;
		return true&lt;br /&gt;
	elseif s == &amp;quot;iQue&amp;quot; then&lt;br /&gt;
		return true&lt;br /&gt;
	elseif s == &amp;quot;Dòngwù Sēnlín&amp;quot; then&lt;br /&gt;
		return true&lt;br /&gt;
	elseif s == &amp;quot;Dongwu Senlin&amp;quot; then&lt;br /&gt;
		return true&lt;br /&gt;
	else&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function isEmpty(s)&lt;br /&gt;
	return s == nil or s == &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local print = &amp;#039;&amp;#039;&lt;br /&gt;
    local args         = getArgs(frame)&lt;br /&gt;
    local compare      = args[1] or &amp;#039;&amp;#039;&lt;br /&gt;
    local game         = args[2] or &amp;#039;&amp;#039;&lt;br /&gt;
    if checkCaps(compare, game) == false then&lt;br /&gt;
		print = &amp;quot;[[Category:Pages with item names improperly capitalized]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	return print&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- https://stackoverflow.com/questions/2421695/first-character-uppercase-lua&lt;br /&gt;
function firstToUpper(str)&lt;br /&gt;
    return (str:gsub(&amp;quot;^%l&amp;quot;, string.upper))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function checkCaps(compare, game)&lt;br /&gt;
	local sentenceCase = &amp;quot;&amp;quot;&lt;br /&gt;
	if checkFirstGen(game) and not isEmpty(data.firstGen[compare:lower()]) then&lt;br /&gt;
		if compare == firstToUpper(data.firstGen[compare:lower()]) then&lt;br /&gt;
			return true&lt;br /&gt;
		elseif compare == data.firstGen[compare:lower()] then&lt;br /&gt;
			return true&lt;br /&gt;
		else&lt;br /&gt;
			return false&lt;br /&gt;
		end&lt;br /&gt;
	elseif (game == &amp;quot;WW&amp;quot; or game == &amp;quot;Wild World&amp;quot;) and not isEmpty(data.wildWorld[compare:lower()]) then&lt;br /&gt;
		if compare == firstToUpper(data.wildWorld[compare:lower()]) then&lt;br /&gt;
			return true&lt;br /&gt;
		elseif compare == data.wildWorld[compare:lower()] then&lt;br /&gt;
			return true&lt;br /&gt;
		else&lt;br /&gt;
			return false&lt;br /&gt;
		end&lt;br /&gt;
	elseif (game == &amp;quot;CF&amp;quot; or game == &amp;quot;City Folk&amp;quot;) and not isEmpty(data.cityFolk[compare:lower()]) then&lt;br /&gt;
		if compare == firstToUpper(data.cityFolk[compare:lower()]) then&lt;br /&gt;
			return true&lt;br /&gt;
		elseif compare == data.cityFolk[compare:lower()] then&lt;br /&gt;
			return true&lt;br /&gt;
		else&lt;br /&gt;
			return false&lt;br /&gt;
		end&lt;br /&gt;
	elseif (game == &amp;quot;NL&amp;quot; or game == &amp;quot;New Leaf&amp;quot;) and not isEmpty(data.newLeaf[compare:lower()]) then&lt;br /&gt;
		if compare == firstToUpper(data.newLeaf[compare:lower()]) then&lt;br /&gt;
			return true&lt;br /&gt;
		elseif compare == data.newLeaf[compare:lower()] then&lt;br /&gt;
			return true&lt;br /&gt;
		else&lt;br /&gt;
			return false&lt;br /&gt;
		end&lt;br /&gt;
	elseif (game == &amp;quot;NH&amp;quot; or game == &amp;quot;New Horizons&amp;quot;) and not isEmpty(data.newHorizons[compare:lower()]) then&lt;br /&gt;
		if compare == firstToUpper(data.newHorizons[compare:lower()]) then&lt;br /&gt;
			return true&lt;br /&gt;
		elseif compare == data.newHorizons[compare:lower()] then&lt;br /&gt;
			return true&lt;br /&gt;
		else&lt;br /&gt;
			return false&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Rosie</name></author>
	</entry>
</feed>