<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://salisford.net/index.php?action=history&amp;feed=atom&amp;title=Module%3AEnglish_variant_notice</id>
	<title>Module:English variant notice - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://salisford.net/index.php?action=history&amp;feed=atom&amp;title=Module%3AEnglish_variant_notice"/>
	<link rel="alternate" type="text/html" href="https://salisford.net/index.php?title=Module:English_variant_notice&amp;action=history"/>
	<updated>2026-04-30T22:21:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://salisford.net/index.php?title=Module:English_variant_notice&amp;diff=2136&amp;oldid=prev</id>
		<title>Cascadia2: Created page with &quot;local p = {} local categoryHandler = require( 'Module:Category handler' ).main local yesno = require('Module:Yesno') local mArguments = require('Module:Arguments') local n  fu...&quot;</title>
		<link rel="alternate" type="text/html" href="https://salisford.net/index.php?title=Module:English_variant_notice&amp;diff=2136&amp;oldid=prev"/>
		<updated>2023-04-12T18:14:07Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local p = {} local categoryHandler = require( &amp;#039;Module:Category handler&amp;#039; ).main local yesno = require(&amp;#039;Module:Yesno&amp;#039;) local mArguments = require(&amp;#039;Module:Arguments&amp;#039;) local n  fu...&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 categoryHandler = require( 'Module:Category handler' ).main&lt;br /&gt;
local yesno = require('Module:Yesno')&lt;br /&gt;
local mArguments = require('Module:Arguments')&lt;br /&gt;
local n&lt;br /&gt;
&lt;br /&gt;
function p.main (frame)&lt;br /&gt;
	local fulltitle = frame:getParent():getTitle()&lt;br /&gt;
	local templatetitle = string.sub(fulltitle, 10)&lt;br /&gt;
	local title = mw.title.getCurrentTitle()&lt;br /&gt;
	if mw.title.equals(title, mw.title.makeTitle('Template', title.rootText)) then --if it is on the main template page, load doc&lt;br /&gt;
		n = mArguments.getArgs(frame, {parentFirst = true})&lt;br /&gt;
		n.variant = n.variant or templatetitle --automatically use title generated from template name&lt;br /&gt;
		if  n.doc ~= 'no' then&lt;br /&gt;
			return frame:expandTemplate {title = 'English variant notice/documentation', args = n}&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return p._main (frame, templatetitle)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main (frame, templatetitle)&lt;br /&gt;
	n = mArguments.getArgs(frame, {parentFirst = true})&lt;br /&gt;
	n.variant = n.variant or templatetitle --automatically use title generated from template name&lt;br /&gt;
	n.category = ''&lt;br /&gt;
	n.spelling_examples = n.spelling_examples or n['spelling examples']&lt;br /&gt;
	n.bid = not not n.id --bool of n.id, for making iupac and oxford not be added to the id if it doesn't exist&lt;br /&gt;
	--Generate the text if it isn't specified&lt;br /&gt;
	if not n.text then&lt;br /&gt;
		p.modify_text ()&lt;br /&gt;
		p.base_text (frame)&lt;br /&gt;
	end&lt;br /&gt;
	p.cat ('Wikipedia articles that use '..n.variant)&lt;br /&gt;
	return p.style(frame)..(n.category or '')&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.cat (category)&lt;br /&gt;
	category = string.format ('[[Category:%s]]', category)&lt;br /&gt;
	n.category = n.category..(categoryHandler{category, nocat = n.nocat, page = n.page, talk = category, template = category} or '')&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.modify_text ()&lt;br /&gt;
	n.spelling = ''&lt;br /&gt;
	n.extravariant = ''&lt;br /&gt;
	n.extraguide = ''&lt;br /&gt;
	bOxford = yesno(n.Oxford)&lt;br /&gt;
	bIUPAC = yesno(n.IUPAC)&lt;br /&gt;
	chemtext = &amp;quot;; ''aluminium'', ''sulfur'', and ''caesium''&amp;quot;&lt;br /&gt;
	if bOxford then&lt;br /&gt;
		n.spelling_examples = &amp;quot;''colour'', ''realize'', ''organization'', ''analyse''; note that '''-ize''' is used instead of -ise&amp;quot;&lt;br /&gt;
		p.cat ('Wikipedia articles that use Oxford spelling')&lt;br /&gt;
		if n.bid then n.id = n.id..n.Oxford end&lt;br /&gt;
		if bIUPAC then&lt;br /&gt;
			n.extravariant = ' with [[Oxford spelling|Oxford]] and [[IUPAC]] spelling'&lt;br /&gt;
			n.spelling_examples= n.spelling_examples..chemtext&lt;br /&gt;
			p.IUPAC ()&lt;br /&gt;
			return&lt;br /&gt;
		end&lt;br /&gt;
		n.extravariant = n.extravariant..' with [[Oxford spelling]]'&lt;br /&gt;
		return&lt;br /&gt;
	elseif bIUPAC then&lt;br /&gt;
		n.extravariant = ' with [[IUPAC]] spelling'&lt;br /&gt;
		n.spelling_examples = n.spelling_examples and n.spelling_examples..chemtext or &amp;quot;''aluminium'', ''sulfur'', and ''caesium''&amp;quot;&lt;br /&gt;
		p.IUPAC ()&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	--only if there are spelling examples, put 'has its own spelling conventions'&lt;br /&gt;
	if n.spelling_examples then n.spelling = ', which has its own spelling conventions' end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.IUPAC ()&lt;br /&gt;
	n.extraguide = ' and [[Wikipedia:Naming conventions (chemistry)|chemistry naming conventions]]'&lt;br /&gt;
	p.cat('Wikipedia articles that use IUPAC spelling')&lt;br /&gt;
	n.flag = 'no'&lt;br /&gt;
	if n.bid then n.id = n.id..'iupac' end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.base_text (frame)&lt;br /&gt;
	n.subjectspace = require('Module:Pagetype').main()&lt;br /&gt;
	n.spelling_examples = n.spelling_examples and string.format(' (%s)', n.spelling_examples) or ''&lt;br /&gt;
	n.terms = n[1] or n.terms&lt;br /&gt;
	n.terms = n.terms and string.format(' (including %s)', n.terms) or ''&lt;br /&gt;
	n.compare = n.compare and (n.compare..' ') or ''&lt;br /&gt;
	n.text = string.format([=[This %s is '''written in [[%s]]%s'''%s%s, and some terms that are used in it%s may be different or absent from %sother [[List of dialects of English|varieties of English]]. According to the [[Wikipedia:Manual of Style#National varieties of English|relevant style guide]]%s, this should not be changed without broad consensus.]=],&lt;br /&gt;
		n.subjectspace, n.variant, n.extravariant, n.spelling, n.spelling_examples, n.terms, n.compare, n.extraguide)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.style (frame)&lt;br /&gt;
	local size&lt;br /&gt;
	if yesno(n.small) then size = '30px'&lt;br /&gt;
	elseif n.size then size = n.size&lt;br /&gt;
	else size = '50px'&lt;br /&gt;
	end&lt;br /&gt;
	if n.image then&lt;br /&gt;
		if n.flag == nil or yesno(n.flag) then&lt;br /&gt;
			n.image = string.format('[[File:%s|%s]]', n.image, size)&lt;br /&gt;
		else&lt;br /&gt;
			--check if the globe should be &amp;quot;color&amp;quot; instead of &amp;quot;colour&amp;quot;&lt;br /&gt;
			if yesno(n.color) then&lt;br /&gt;
				n.image = string.format('[[File:Globe spelling color.png|%s]]', size)&lt;br /&gt;
			else&lt;br /&gt;
				n.image = string.format('[[File:Globe spelling colour.svg|%s]]', size)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if n.form == 'editnotice' then&lt;br /&gt;
		if n.bid then n.id = n.id..'editnotice' end&lt;br /&gt;
		n.expiry = n.expiry or 'indefinite'&lt;br /&gt;
		--categorize editnotice if specified&lt;br /&gt;
		if yesno(n.editnotice_cat) then&lt;br /&gt;
			p.cat(string.format('Pages with %s editnotice', n.variant))&lt;br /&gt;
		end&lt;br /&gt;
		return frame:expandTemplate{title = 'editnotice', args = n}&lt;br /&gt;
	else&lt;br /&gt;
		local message_box = require('Module:Message box').main&lt;br /&gt;
		if not n.image then n.image = 'none' end&lt;br /&gt;
		n['type'] = 'style'&lt;br /&gt;
		return message_box ('tmbox', n)&lt;br /&gt;
	end	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Cascadia2</name></author>
	</entry>
</feed>