<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://project-au.w.kmwc.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rox</id>
	<title>Project AU - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://project-au.w.kmwc.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rox"/>
	<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/w/Special:Contributions/Rox"/>
	<updated>2026-04-10T00:40:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Qrichie&amp;diff=2463</id>
		<title>Qrichie</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Qrichie&amp;diff=2463"/>
		<updated>2026-04-01T15:31:30Z</updated>

		<summary type="html">&lt;p&gt;Rox: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox planet&lt;br /&gt;
|name         = Qrichie&lt;br /&gt;
|image        = Qrichie satellite.png&lt;br /&gt;
|alt          =&lt;br /&gt;
|caption      = Qrichie from orbit&lt;br /&gt;
|designation  = Tbeew III&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;AIC 1419 III&amp;lt;/small&amp;gt;&lt;br /&gt;
|satellites   = {{hlist|2 ([[Xeog]]|[[Jico]])}}&lt;br /&gt;
|semimajor    = {{convert|104718509|km|AU|abbr=on|2|disp=x|&amp;lt;br /&amp;gt;(|)}}&lt;br /&gt;
|diameter     = 15,163 km&amp;lt;br&amp;gt;(1.19 earth radii)&lt;br /&gt;
|year_length  = 234.120 earth days&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;(306.708 local days)&amp;lt;/small&amp;gt;&lt;br /&gt;
|day_length   = 0.763 earth days&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;(18h 19m 12s)&amp;lt;/small&amp;gt;&lt;br /&gt;
|gravity      = 0.6638 g&lt;br /&gt;
|axial_tilt   = 2°&lt;br /&gt;
|temperature  = X°C (Y°F)&lt;br /&gt;
|atmosphere   = &lt;br /&gt;
 {{unbulleted list |class=nowrap&lt;br /&gt;
  | 58.6% nitrogen (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;)&lt;br /&gt;
  | 33.4% oxygen (O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;)&lt;br /&gt;
  | 7% xenon (Xe)&lt;br /&gt;
  | &amp;lt;1% carbon dioxide (CO&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;)&lt;br /&gt;
  | &amp;lt;1% water vapor (H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O)&lt;br /&gt;
 }}&lt;br /&gt;
|adjective    = &lt;br /&gt;
|population   = &lt;br /&gt;
|jurisdiction = [[Serene Union of the Tbeew Cluster]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Qrichie&#039;&#039;&#039; (/ˈkɹi:t͡ʃieɪ̯/, [[Jegcre language|Jegcre]]: &#039;&#039;Qrichĩẽ&#039;&#039; /[[Help:eIPA|ƾ̤ιƈι̤͜ҽ̤]]/) is the third planet from the star [[Tbeew]]. It is the homeworld of the [[Ee&#039;koi]].&lt;br /&gt;
&lt;br /&gt;
==Name==&lt;br /&gt;
The name &#039;&#039;Qrichie&#039;&#039; comes from [[Jegcre language|Jegcre]] &#039;&#039;qri chĩẽ&#039;&#039; meaning &amp;quot;all seas&amp;quot;, which is the Jegcre name for the planet. It is known under different names in each native language, such as X in Y or Z in W. It is also designated by humans as &#039;&#039;Tbeew III&#039;&#039;, after its position from its host star, and as &#039;&#039;AIC 1419 III&#039;&#039; in the [[Astra Incognita Catalogue]].&lt;br /&gt;
&lt;br /&gt;
==Physical characteristics==&lt;br /&gt;
===Size and shape===&lt;br /&gt;
===Chemical composition===&lt;br /&gt;
===Internal structure===&lt;br /&gt;
===Tectonic plates===&lt;br /&gt;
===Surface===&lt;br /&gt;
Qrichie’s surface is almost entirely covered in liquid water, with only small landmasses and islands dotting the ocean. It generally has warm climates, roughly similar to tropical and subtropical climates on Earth, ranging from humid rainforests to drier savannas and deserts. Due to the planet orbiting a K0-type main sequence star, photosynthetic species (analogous to plants) exhibit orange-brown hues.&lt;br /&gt;
&lt;br /&gt;
===Gravitational field===&lt;br /&gt;
===Magnetic field===&lt;br /&gt;
==Orbit and rotation==&lt;br /&gt;
===Rotation===&lt;br /&gt;
Qrichie&#039;s rotation period relative to its host star—its mean solar day—is 65,952 seconds of mean solar time, or around 18 hours, 19 minutes and 12 seconds.&lt;br /&gt;
&lt;br /&gt;
===Orbit===&lt;br /&gt;
Qrichie is the third planet from [[Tbeew]], after [[Xeciq Tbeew]] and [[Qotiq Jiehoc]]. Qrichie&#039;s average orbital distance is about {{convert|104.7|e6km|e6mi|abbr=unit}}, or 0.70 astronomical units, which is equal to roughly 5.82 light-minutes. Qrichie orbits Tbeew every 306.708 solar days, which is equal to 234.120 standard days or 0.641 solar years.&lt;br /&gt;
&lt;br /&gt;
===Axial tilt and seasons===&lt;br /&gt;
Qrichie has a very slight axial tilt of approximately 2.0023°, which leads to fairly consistent climates year-round.&lt;br /&gt;
&lt;br /&gt;
==Life==&lt;br /&gt;
==History==&lt;br /&gt;
===Prehistory===&lt;br /&gt;
===Ee&#039;koi history===&lt;br /&gt;
{{main|Ee&#039;koi history}}&lt;br /&gt;
===Interstellar Age===&lt;br /&gt;
&lt;br /&gt;
[[Category:Planets]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Holy_Worlds_of_Heaven&amp;diff=2462</id>
		<title>Holy Worlds of Heaven</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Holy_Worlds_of_Heaven&amp;diff=2462"/>
		<updated>2026-04-01T15:30:58Z</updated>

		<summary type="html">&lt;p&gt;Rox: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox country&lt;br /&gt;
|conventional_long_name= Holy Worlds of Heaven under the Guidance of the Quorum and the Angel Moroni&lt;br /&gt;
|native_name= &lt;br /&gt;
|common_name=&lt;br /&gt;
|image_flag= HWHFlag.png&lt;br /&gt;
|image_symbol= &lt;br /&gt;
|symbol_type= &lt;br /&gt;
|symbol=&lt;br /&gt;
|capital_type= Capital world&lt;br /&gt;
|capital= [[Diddreta]]&lt;br /&gt;
|largest_settlement_type = &lt;br /&gt;
|largest_settlement = &lt;br /&gt;
|official_languages= [[Classical Diddretic language|Classical Diddretic]] &amp;lt;small&amp;gt;(de jure)&amp;lt;/small&amp;gt;&amp;lt;br&amp;gt;[[Contemporary Diddretic language|Diddretic]] &amp;lt;small&amp;gt;(de facto)&amp;lt;/small&amp;gt;&lt;br /&gt;
|government_type= Semi-constitutional theocratic elective monarchy&lt;br /&gt;
|leader_title1 = Prophet&lt;br /&gt;
|leader_name1 = ?&lt;br /&gt;
|leader_title2 = Archinquisitor &lt;br /&gt;
|leader_name2 = ?&lt;br /&gt;
|legislature = ?&lt;br /&gt;
|demonym= Deseretan&lt;br /&gt;
|upper_house= [[Quorum of the Twelve Apostles]]&lt;br /&gt;
|lower_house= [[Quorum of the Seventy]]&lt;br /&gt;
|currency=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Polities]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Eternal_Rulership_of_the_Four_Fortresses&amp;diff=2461</id>
		<title>Eternal Rulership of the Four Fortresses</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Eternal_Rulership_of_the_Four_Fortresses&amp;diff=2461"/>
		<updated>2026-04-01T15:30:38Z</updated>

		<summary type="html">&lt;p&gt;Rox: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox country&lt;br /&gt;
|conventional_long_name= Eternal Rulership of the Four Fortresses&lt;br /&gt;
|native_name= &#039;&#039;Ḍroó sä Ḍhaamdò Wà Shuòʼtä̀d sä Huág&#039;&#039;&lt;br /&gt;
|common_name=&lt;br /&gt;
|image_symbol= ERFF Crest.png&lt;br /&gt;
|symbol_type= Symbol&lt;br /&gt;
|symbol=&lt;br /&gt;
|capital_type= Capital world&lt;br /&gt;
|capital= [[ʼṬotuq]]&lt;br /&gt;
|largest_settlement_type = planet &lt;br /&gt;
|largest_settlement = [[Heéqʼb]]&lt;br /&gt;
|official_languages= [[Totuqi language|Totuqi]]&amp;lt;br&amp;gt;[[Heeqid language|Heeqid]]&lt;br /&gt;
|government_type= ?&lt;br /&gt;
|demonym= Dhro&amp;lt;br&amp;gt;Tetropsid&lt;br /&gt;
|upper_house=&lt;br /&gt;
|lower_house=&lt;br /&gt;
|currency=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Polities]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=List_of_sophonts&amp;diff=2459</id>
		<title>List of sophonts</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=List_of_sophonts&amp;diff=2459"/>
		<updated>2026-02-07T09:27:14Z</updated>

		<summary type="html">&lt;p&gt;Rox: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[Settled Systems]] are inhabited by a variety of species known as &#039;&#039;&#039;sophonts&#039;&#039;&#039;. The definition of the term &amp;quot;sophont&amp;quot; varies, but is generally used to refer to biological (i.e. non-artificial) beings possessing complex cognitive abilities. Sophonts are any species granted personhood by law in any jurisdiction.&lt;br /&gt;
&lt;br /&gt;
==Definitions==&lt;br /&gt;
Before [[humanity]]&#039;s first contact with other intelligent life, the term &amp;quot;sapience&amp;quot; was used to refer to beings that displayed advanced cognizance, which was therefore exclusive to humans. As first contacts were initiated in the years following the [[Icnosis]], there began to be a gradual distinction between sapience and sophonce. Initially, &amp;quot;sophonce&amp;quot; was defined in unambiguously [[Anthropocentrism|anthropocentric]] terms, so as to place humans above other species. Still in the modern day, definitions of sophonce and sapience are used in some jurisdictions to restrict personhood to specific species.&lt;br /&gt;
&lt;br /&gt;
The modern, scientifically-approved definition of sapience is &amp;quot;the ability to think and solve problems&amp;quot;. The base requirements of sapience include basic pattern recognition, a notion of self, rudimentary tool use and sometimes complex social dynamics. Non-sophont sapients are generally still regarded as &amp;quot;animals&amp;quot;, with notable examples including some [[geofauna]] such as chimpanzees and other human relatives. Sophonce, on the other hand, refers to the ability to form complex thought, often characterized by the presence of philosophy, engineering, spirituality, art and identity. Sophonts are generally considered &amp;quot;people&amp;quot;. However, some scholars argue even those criteria to be imperfect, as not all sophonts have notions of religion, art or identity. A notable example of the latter is hive-minded species as well as various mechanical beings.&lt;br /&gt;
&lt;br /&gt;
===Sophological scales===&lt;br /&gt;
Various scales and measurement systems have been created for measuring a species&#039; level of sentience, each based on different factors. One of the more commonly used systems, and one of the simpler ones, is the Serkēw scale, which classifies all species as Type 0 (artificial, non-Turing), Type 1 (sentient), Type 2 (sapient) and Type 3 (sophont).&lt;br /&gt;
&lt;br /&gt;
==List==&lt;br /&gt;
===Human===&lt;br /&gt;
{{main|Humanity}}&lt;br /&gt;
&lt;br /&gt;
Having arrived to [[Incognita]] aboard the ships of the Icnosis 3,000 years ago, the original homeworld of Humanity is not known. Many believe that humanity originates from a different galaxy entirely, although this belief is [[Ageoism|not universal]]. What is certain however is that the Human homeworld likely lies outside of the Settled Systems, as no pre-Icnosian genetic or archeological link to Humanity has been found. Today, humans are one of the most widespread sophont species in the Settled Systems, with hundreds of billions of individuals across the Settled Systems.&lt;br /&gt;
&lt;br /&gt;
===Bzhao===&lt;br /&gt;
{{main|Bzhao}}&lt;br /&gt;
&lt;br /&gt;
The Bzhao are the native sophonts of [[Rwoth]], located in the [[Pchaa system]]. They are a humanoid species and the second most populous species in the [[Coalition of Allied Star Systems]] after Humans.&lt;br /&gt;
&lt;br /&gt;
===Cobaati===&lt;br /&gt;
{{main|Cobaati}}&lt;br /&gt;
&lt;br /&gt;
===Ee&#039;koi===&lt;br /&gt;
{{main|Ee&#039;koi}}&lt;br /&gt;
&lt;br /&gt;
The Ee&#039;koi are sophonts native to [[Qrichie]] in the [[Tbeew Prime Cluster]]. They are unique among sophonts in that they are colonial beings made up of many zooids, rather than a single mind. Their society is based on a system of collectivist [[Ee&#039;koi clan|clans]] bound by genetic and social bonds. Having entered the interstellar scene relatively late, they have established themselves throughout the entire Tbeew Prime Cluster.&lt;br /&gt;
&lt;br /&gt;
===Gregandupila===&lt;br /&gt;
{{main|Gregandupila}}&lt;br /&gt;
&lt;br /&gt;
The Gregandupilae are a non-humanoid sophont species native to [[Beautiful Eye]]. They are notable for their symbiotic herder relationship with X.&lt;br /&gt;
&lt;br /&gt;
===Janquarian===&lt;br /&gt;
{{main|Janquarians}}&lt;br /&gt;
&lt;br /&gt;
===Kamchrul===&lt;br /&gt;
{{main|Kamchrul}}&lt;br /&gt;
&lt;br /&gt;
The Kamchrul are another one of the sophont species of the CASS, native to the planet [[Taench]].&lt;br /&gt;
&lt;br /&gt;
===Qeyeq===&lt;br /&gt;
{{main|Qeyeq}}&lt;br /&gt;
&lt;br /&gt;
One of the oldest sophont species in the Settled Systems, the Qeyeq are native to the planet [[Sky-And-Sea]]. They are one of the only species that entered the interstellar scene before the Icnosis and see themselves as interstellar caretakers.&lt;br /&gt;
&lt;br /&gt;
===Saltarplectane===&lt;br /&gt;
{{main|Saltarplectane}}&lt;br /&gt;
&lt;br /&gt;
Originating from [[Gafua]] in the [[Hurueefia system]], the Saltarplectanes are the tallest and longest known sophonts on average, measuring well over 9 meters in height and 6 meters in length.&lt;br /&gt;
&lt;br /&gt;
===Sorioyan===&lt;br /&gt;
{{main|Sorioyan}}&lt;br /&gt;
&lt;br /&gt;
===Tetropsid===&lt;br /&gt;
{{main|Tetropsid}}&lt;br /&gt;
&lt;br /&gt;
Tetropsids are the native sophonts of the planet [[Heéqʼb]]. Their homeworld is unique, being the only tidally-locked planet known to harbor native life.&lt;br /&gt;
&lt;br /&gt;
===Weyiwi===&lt;br /&gt;
{{main|Weyiwi}}&lt;br /&gt;
&lt;br /&gt;
==Debated sophonts==&lt;br /&gt;
Species whose sophonce is debated include non-AI mechanical species, animal uplifts and other artificial life.&lt;br /&gt;
&lt;br /&gt;
===Monolith===&lt;br /&gt;
{{main|Monolith}}&lt;br /&gt;
&lt;br /&gt;
===Uplift===&lt;br /&gt;
{{main|Uplift}}&lt;br /&gt;
&lt;br /&gt;
==Extinct sophonts==&lt;br /&gt;
===Sharay===&lt;br /&gt;
{{main|Sharay}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Biology]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Star_Union_of_Systems&amp;diff=2455</id>
		<title>Star Union of Systems</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Star_Union_of_Systems&amp;diff=2455"/>
		<updated>2026-01-24T09:11:05Z</updated>

		<summary type="html">&lt;p&gt;Rox: /* Star systems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox country&lt;br /&gt;
|conventional_long_name=Star Union of Systems&lt;br /&gt;
|native_name=&lt;br /&gt;
|common_name=Star Union&lt;br /&gt;
|image_symbol=SUS symbol.png&lt;br /&gt;
|symbol_type=Symbol&lt;br /&gt;
|symbol=&lt;br /&gt;
|image_flag=&lt;br /&gt;
|flag=&lt;br /&gt;
|capital_type=Administrative capital&lt;br /&gt;
|capital=[[Peace Among Worlds Station]]&lt;br /&gt;
|largest_settlement_type=world&lt;br /&gt;
|largest_settlement=[[Sky-And-Sea]]&lt;br /&gt;
|official_languages=&lt;br /&gt;
|government_type=&lt;br /&gt;
|demonym=&lt;br /&gt;
|upper_house=&lt;br /&gt;
|lower_house=&lt;br /&gt;
|currency=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Star Union of Systems&#039;&#039;&#039; is an interstellar polity in the [[Settled Systems]]&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
==Astrography==&lt;br /&gt;
===Star systems===&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left&amp;quot;&lt;br /&gt;
!Star system&lt;br /&gt;
!Member world(s)&lt;br /&gt;
!Largest settlement&lt;br /&gt;
![[AIC designation|AIC&amp;lt;br&amp;gt;designation]]&lt;br /&gt;
!Species&lt;br /&gt;
|-&lt;br /&gt;
|[[Great Mother system|Great Mother]]&lt;br /&gt;
|[[Sky-And-Sea]]&lt;br /&gt;
|&lt;br /&gt;
|AIC 528&lt;br /&gt;
|[[Qeyeq]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Three Brothers system|Three Brothers]]&lt;br /&gt;
|X&amp;lt;br&amp;gt;Y&amp;lt;br&amp;gt;Z&lt;br /&gt;
|&lt;br /&gt;
|AIC 527&lt;br /&gt;
|Qeyeq (Spacer)&lt;br /&gt;
|-&lt;br /&gt;
|[[First Successor system|First Successor]]&lt;br /&gt;
|[[Discovery]]&lt;br /&gt;
|&lt;br /&gt;
|AIC 520&lt;br /&gt;
|Qeyeq (Tall Folk)&lt;br /&gt;
|-&lt;br /&gt;
|[[Wrathful Eye system|Wrathful Eye]]&lt;br /&gt;
|[[Patience]]&lt;br /&gt;
|&lt;br /&gt;
|AIC 526&lt;br /&gt;
|Qeyeq-Frame&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|AIC 521&lt;br /&gt;
|Qeyeq (Spacer)&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|AIC 523&lt;br /&gt;
|Qeyeq&lt;br /&gt;
|-&lt;br /&gt;
|[[Mausoleum]]&lt;br /&gt;
|[[Rebirth]]&lt;br /&gt;
|&lt;br /&gt;
|AIC 566&lt;br /&gt;
|[[Neont]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Ur-Matrix Prime system|Ur-Matrix Prime]]&lt;br /&gt;
|[[Ur-Matrix]]&lt;br /&gt;
|&lt;br /&gt;
|AIC 517&lt;br /&gt;
|[[Monolith]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|AIC 512&lt;br /&gt;
|[[Yaolu]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Heaven Arch]]&lt;br /&gt;
|&lt;br /&gt;
|AIC 511&lt;br /&gt;
|Yaolu&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|AIC 493&lt;br /&gt;
|[[Crocitor]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|AIC 494&lt;br /&gt;
|Crocitor&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Climate===&lt;br /&gt;
===Biodiversity===&lt;br /&gt;
&lt;br /&gt;
==Politics==&lt;br /&gt;
===Government===&lt;br /&gt;
===Administrative divisions===&lt;br /&gt;
===Foreign relations===&lt;br /&gt;
===Military===&lt;br /&gt;
&lt;br /&gt;
==Demographics==&lt;br /&gt;
===Sophonts===&lt;br /&gt;
===Urbanization===&lt;br /&gt;
===Language===&lt;br /&gt;
===Religion===&lt;br /&gt;
&lt;br /&gt;
==Culture==&lt;br /&gt;
===Architecture===&lt;br /&gt;
===Literature===&lt;br /&gt;
===Art===&lt;br /&gt;
&lt;br /&gt;
[[Category:Polities]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Category:Astronomy&amp;diff=2448</id>
		<title>Category:Astronomy</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Category:Astronomy&amp;diff=2448"/>
		<updated>2026-01-23T03:45:50Z</updated>

		<summary type="html">&lt;p&gt;Rox: Created blank page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Category:Star_systems&amp;diff=2447</id>
		<title>Category:Star systems</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Category:Star_systems&amp;diff=2447"/>
		<updated>2026-01-23T03:45:41Z</updated>

		<summary type="html">&lt;p&gt;Rox: Created page with &amp;quot;Category:Astronomy&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Astronomy]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Category:Celestial_bodies&amp;diff=2446</id>
		<title>Category:Celestial bodies</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Category:Celestial_bodies&amp;diff=2446"/>
		<updated>2026-01-23T03:45:37Z</updated>

		<summary type="html">&lt;p&gt;Rox: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Astronomy]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Incognita&amp;diff=2445</id>
		<title>Incognita</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Incognita&amp;diff=2445"/>
		<updated>2026-01-23T03:44:53Z</updated>

		<summary type="html">&lt;p&gt;Rox: Rox moved page Incognita to Incognita system: adhering to wiki format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Incognita system]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Incognita_system&amp;diff=2444</id>
		<title>Incognita system</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Incognita_system&amp;diff=2444"/>
		<updated>2026-01-23T03:44:53Z</updated>

		<summary type="html">&lt;p&gt;Rox: Rox moved page Incognita to Incognita system: adhering to wiki format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Incognita&#039;&#039;&#039; (&amp;lt;small&amp;gt;[[Iquis]]&amp;lt;/small&amp;gt;: &#039;&#039;Kwnēa&#039;&#039;) is a star system in the [[Settled Systems]]. It is likely the star system in which [[humanity]] first discovered after [[Icnosis]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Star systems]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Old_Iquis&amp;diff=2443</id>
		<title>Old Iquis</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Old_Iquis&amp;diff=2443"/>
		<updated>2026-01-23T03:41:39Z</updated>

		<summary type="html">&lt;p&gt;Rox: Rox moved page Old Iquis to Old Iquis language: adhering to wiki format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Old Iquis language]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Old_Iquis_language&amp;diff=2442</id>
		<title>Old Iquis language</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Old_Iquis_language&amp;diff=2442"/>
		<updated>2026-01-23T03:41:39Z</updated>

		<summary type="html">&lt;p&gt;Rox: Rox moved page Old Iquis to Old Iquis language: adhering to wiki format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Old Iquis&#039;&#039;&#039; (Old Iquis: &#039;&#039;Ikoβois&#039;&#039;) was a language spoken during the era of the First Ecumenopolis on [[Heva]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Languages]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Iquis&amp;diff=2441</id>
		<title>Iquis</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Iquis&amp;diff=2441"/>
		<updated>2026-01-23T03:41:12Z</updated>

		<summary type="html">&lt;p&gt;Rox: Rox moved page Iquis to Iquis language: adhering to wiki format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Iquis language]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Iquis_language&amp;diff=2440</id>
		<title>Iquis language</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Iquis_language&amp;diff=2440"/>
		<updated>2026-01-23T03:41:12Z</updated>

		<summary type="html">&lt;p&gt;Rox: Rox moved page Iquis to Iquis language: adhering to wiki format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Iquis&#039;&#039;&#039; (&amp;lt;small&amp;gt;Iquis:&amp;lt;/small&amp;gt; &#039;&#039;Ikʷīsyiz Tīaton&#039;&#039; [ɪˈkʷisjɪz ˈtiɐtɔn]; &#039;&#039;Ikʷīs&#039;&#039; [ɪˈkʷis]), officially &#039;&#039;&#039;Coalition&#039;&#039;&#039; &#039;&#039;&#039;Interstellar Iquis&#039;&#039;&#039; (&amp;lt;small&amp;gt;Iquis:&amp;lt;/small&amp;gt; &#039;&#039;Ōyintānyiz Zīmoz Ikʷīsyiz Tīaton&#039;&#039; [ojɪnˈtɑnjɪz ˈzimɔz ɪˈkʷisjɪz ˈtiɐtɔn]), is a language spoken mainly in the [[Coalition of Allied Star Systems]].&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
The earliest ancestor of Iquis is reconstructed to be the Earth language [[Proto-Icnotic A]], its endonym attested as &#039;&#039;ikofois&#039;&#039; and romanized as &#039;&#039;Icophois&#039;&#039;. By the 3rd century AAI, Proto-Icnotic A began to display signs of change, morphing fully into Old Iquis by the turn of the millennium.&lt;br /&gt;
&lt;br /&gt;
Old Iquis, spoken mainly on the worlds of Incognita V and Heva, is the earliest well-attested stage of the Iquis language, in which a large of amount of literature was published. Old Iquis continues to be influential in the development of the modern Iquis language, as a large amount of specialist vocabulary are derived from Old Iquis.&lt;br /&gt;
&lt;br /&gt;
== Phonology ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!&lt;br /&gt;
!labial&lt;br /&gt;
!dental&lt;br /&gt;
!palatal&lt;br /&gt;
!velar&lt;br /&gt;
!velar (lab.)&lt;br /&gt;
!uvular&lt;br /&gt;
!uvular (lab.)&lt;br /&gt;
!glottal&lt;br /&gt;
!glottal (lab.)&lt;br /&gt;
|-&lt;br /&gt;
!nasal&lt;br /&gt;
|m&lt;br /&gt;
|n&lt;br /&gt;
|&lt;br /&gt;
|ŋ&lt;br /&gt;
|ŋʷ&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!plosive&lt;br /&gt;
|p (b)&lt;br /&gt;
|t (d)&lt;br /&gt;
|&lt;br /&gt;
|k (g)&lt;br /&gt;
|kʷ (gʷ)&lt;br /&gt;
|q&lt;br /&gt;
|qʷ&lt;br /&gt;
|ʔ&lt;br /&gt;
|ʔʷ&lt;br /&gt;
|-&lt;br /&gt;
!fricative&lt;br /&gt;
|(f) (v)&lt;br /&gt;
|s z&lt;br /&gt;
|ʃ (ʒ)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|h&lt;br /&gt;
|hʷ&lt;br /&gt;
|-&lt;br /&gt;
!affricate&lt;br /&gt;
|&lt;br /&gt;
|ts (dz)&lt;br /&gt;
|tʃ (dʒ)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!trill&lt;br /&gt;
|&lt;br /&gt;
|r&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!approximant&lt;br /&gt;
|&lt;br /&gt;
|(l)&lt;br /&gt;
|j&lt;br /&gt;
|w&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
Phonemes in brackets are found in loanwords, learned borrowings from Old Iquis, and onomatopoeia.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; |front&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; |central&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; |back&lt;br /&gt;
|-&lt;br /&gt;
!&lt;br /&gt;
!tense&lt;br /&gt;
!lax&lt;br /&gt;
!tense&lt;br /&gt;
!lax&lt;br /&gt;
!tense&lt;br /&gt;
!lax&lt;br /&gt;
|-&lt;br /&gt;
!close&lt;br /&gt;
|ī /i/&lt;br /&gt;
|i /ɪ/&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|(ū /u/)&lt;br /&gt;
|(u /ʊ/)&lt;br /&gt;
|-&lt;br /&gt;
!mid&lt;br /&gt;
|ē /e/&lt;br /&gt;
|e /ɛ/&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |ə /ə/&lt;br /&gt;
|ō /o/&lt;br /&gt;
|o /ɔ/&lt;br /&gt;
|-&lt;br /&gt;
!open&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|ā /ɑ/&lt;br /&gt;
|a /ɐ/&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Languages]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Star_Union_of_Systems&amp;diff=2437</id>
		<title>Star Union of Systems</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Star_Union_of_Systems&amp;diff=2437"/>
		<updated>2026-01-22T14:11:00Z</updated>

		<summary type="html">&lt;p&gt;Rox: /* Star systems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox country&lt;br /&gt;
|conventional_long_name=Star Union of Systems&lt;br /&gt;
|native_name=&lt;br /&gt;
|common_name=Star Union&lt;br /&gt;
|image_symbol=SUS symbol.png&lt;br /&gt;
|symbol_type=Symbol&lt;br /&gt;
|symbol=&lt;br /&gt;
|image_flag=&lt;br /&gt;
|flag=&lt;br /&gt;
|capital_type=Administrative capital&lt;br /&gt;
|capital=[[Peace Among Worlds Station]]&lt;br /&gt;
|largest_settlement_type=world&lt;br /&gt;
|largest_settlement=[[Sky-And-Sea]]&lt;br /&gt;
|official_languages=&lt;br /&gt;
|government_type=&lt;br /&gt;
|demonym=&lt;br /&gt;
|upper_house=&lt;br /&gt;
|lower_house=&lt;br /&gt;
|currency=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Star Union of Systems&#039;&#039;&#039; is an interstellar polity in the [[Settled Systems]]&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
==Astrography==&lt;br /&gt;
===Star systems===&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left&amp;quot;&lt;br /&gt;
!Star system&lt;br /&gt;
!Member world(s)&lt;br /&gt;
!Largest settlement&lt;br /&gt;
![[AIC designation|AIC&amp;lt;br&amp;gt;designation]]&lt;br /&gt;
!Species&lt;br /&gt;
|-&lt;br /&gt;
|[[Great Mother system|Great Mother]]&lt;br /&gt;
|[[Sky-And-Sea]]&lt;br /&gt;
|&lt;br /&gt;
|AIC 528&lt;br /&gt;
|[[Qeyeq]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Three Brothers system|Three Brothers]]&lt;br /&gt;
|X&amp;lt;br&amp;gt;Y&amp;lt;br&amp;gt;Z&lt;br /&gt;
|&lt;br /&gt;
|AIC 527&lt;br /&gt;
|Qeyeq (Spacer)&lt;br /&gt;
|-&lt;br /&gt;
|[[First Successor system|First Successor]]&lt;br /&gt;
|[[Discovery]]&lt;br /&gt;
|&lt;br /&gt;
|AIC 520&lt;br /&gt;
|Qeyeq (Tall Folk)&lt;br /&gt;
|-&lt;br /&gt;
|[[Wrathful Eye system|Wrathful Eye]]&lt;br /&gt;
|[[Patience]]&lt;br /&gt;
|&lt;br /&gt;
|AIC 526&lt;br /&gt;
|Qeyeq-Frame&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|AIC 521&lt;br /&gt;
|Qeyeq (Spacer)&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|AIC 523&lt;br /&gt;
|Qeyeq&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|AIC 566&lt;br /&gt;
|[[Neont]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Ur-Matrix Prime system|Ur-Matrix Prime]]&lt;br /&gt;
|[[Ur-Matrix]]&lt;br /&gt;
|&lt;br /&gt;
|AIC 517&lt;br /&gt;
|[[Monolith]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|AIC 512&lt;br /&gt;
|[[Yaolu]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|AIC 511&lt;br /&gt;
|Yaolu&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|AIC 493&lt;br /&gt;
|[[Crocitor]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|AIC 494&lt;br /&gt;
|Crocitor&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Climate===&lt;br /&gt;
===Biodiversity===&lt;br /&gt;
&lt;br /&gt;
==Politics==&lt;br /&gt;
===Government===&lt;br /&gt;
===Administrative divisions===&lt;br /&gt;
===Foreign relations===&lt;br /&gt;
===Military===&lt;br /&gt;
&lt;br /&gt;
==Demographics==&lt;br /&gt;
===Sophonts===&lt;br /&gt;
===Urbanization===&lt;br /&gt;
===Language===&lt;br /&gt;
===Religion===&lt;br /&gt;
&lt;br /&gt;
==Culture==&lt;br /&gt;
===Architecture===&lt;br /&gt;
===Literature===&lt;br /&gt;
===Art===&lt;br /&gt;
&lt;br /&gt;
[[Category:Polities]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=List_of_sophonts&amp;diff=2436</id>
		<title>List of sophonts</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=List_of_sophonts&amp;diff=2436"/>
		<updated>2026-01-22T10:58:23Z</updated>

		<summary type="html">&lt;p&gt;Rox: Created page with &amp;quot;The Settled Systems are inhabited by a variety of species known as &amp;#039;&amp;#039;&amp;#039;sophonts&amp;#039;&amp;#039;&amp;#039;. The definition of the term &amp;quot;sophont&amp;quot; varies, but is generally used to refer to biological (i.e. non-artificial) beings possessing complex cognitive abilities. Sophonts are any species granted personhood by law in any jurisdiction.  ==Definitions== Before humanity&amp;#039;s first contact with other intelligent life, the term &amp;quot;sapience&amp;quot; was used to refer to beings that displayed advanced cog...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[Settled Systems]] are inhabited by a variety of species known as &#039;&#039;&#039;sophonts&#039;&#039;&#039;. The definition of the term &amp;quot;sophont&amp;quot; varies, but is generally used to refer to biological (i.e. non-artificial) beings possessing complex cognitive abilities. Sophonts are any species granted personhood by law in any jurisdiction.&lt;br /&gt;
&lt;br /&gt;
==Definitions==&lt;br /&gt;
Before [[humanity]]&#039;s first contact with other intelligent life, the term &amp;quot;sapience&amp;quot; was used to refer to beings that displayed advanced cognizance, which was therefore exclusive to humans. As first contacts were initiated in the years following the [[Icnosis]], there began to be a gradual distinction between sapience and sophonce. Initially, &amp;quot;sophonce&amp;quot; was defined in unambiguously [[Anthropocentrism|anthropocentric]] terms, so as to place humans above other species. Still in the modern day, definitions of sophonce and sapience are used in some jurisdictions to restrict personhood to specific species.&lt;br /&gt;
&lt;br /&gt;
The modern, scientifically-approved definition of sapience is &amp;quot;the ability to think and solve problems&amp;quot;. The base requirements of sapience include basic pattern recognition, a notion of self, rudimentary tool use and sometimes complex social dynamics. Non-sophont sapients are generally still regarded as &amp;quot;animals&amp;quot;, with notable examples including some [[geofauna]] such as chimpanzees and other human relatives. Sophonce, on the other hand, refers to the ability to form complex thought, often characterized by the presence of philosophy, engineering, spirituality, art and identity. Sophonts are generally considered &amp;quot;people&amp;quot;. However, some scholars argue even those criteria to be imperfect, as not all sophonts have notions of religion, art or identity. A notable example of the latter is hive-minded species as well as various mechanical beings.&lt;br /&gt;
&lt;br /&gt;
===Sophological scales===&lt;br /&gt;
Various scales and measurement systems have been created for measuring a species&#039; level of sentience, each based on different factors. One of the more commonly used systems, and one of the simpler ones, is the Serkēw scale, which classifies all species as Type 0 (artificial, non-Turing), Type 1 (sentient), Type 2 (sapient) and Type 3 (sophont).&lt;br /&gt;
&lt;br /&gt;
==List==&lt;br /&gt;
===Human===&lt;br /&gt;
{{main|Humanity}}&lt;br /&gt;
&lt;br /&gt;
Having arrived to [[Incognita]] aboard the ships of the Icnosis 3,000 years ago, the original homeworld of Humanity is not known. Many believe that humanity originates from a different galaxy entirely, although this belief is [[Ageoism|not universal]]. What is certain however is that the Human homeworld likely lies outside of the Settled Systems, as no pre-Icnosian genetic or archeological link to Humanity has been found. Today, humans are one of the most widespread sophont species in the Settled Systems, with hundreds of billions of individuals across the Settled Systems.&lt;br /&gt;
&lt;br /&gt;
===Bzhao===&lt;br /&gt;
{{main|Bzhao}}&lt;br /&gt;
&lt;br /&gt;
The Bzhao are the native sophonts of [[Rwoth]], located in the [[Pchaa system]]. They are a humanoid species and the second most populous species in the [[Coalition of Allied Star Systems]] after Humans.&lt;br /&gt;
&lt;br /&gt;
===Cobaati===&lt;br /&gt;
{{main|Cobaati}}&lt;br /&gt;
&lt;br /&gt;
===Ee&#039;koi===&lt;br /&gt;
{{main|Ee&#039;koi}}&lt;br /&gt;
&lt;br /&gt;
The Ee&#039;koi are sophonts native to [[Qrichie]] in the [[Tbeew Prime Cluster]]. They are unique among sophonts in that they are colonial beings made up of many zooids, rather than a single mind. Their society is based on a system of collectivist [[Ee&#039;koi clan|clans]] bound by genetic and social bonds. Having entered the interstellar scene relatively late, they have established themselves throughout the entire Tbeew Prime Cluster.&lt;br /&gt;
&lt;br /&gt;
===Gregandupila===&lt;br /&gt;
{{main|Gregandupila}}&lt;br /&gt;
&lt;br /&gt;
The Gregandupilae are a non-humanoid sophont species native to [[Beautiful Eye]]. They are notable for their symbiotic herder relationship with X.&lt;br /&gt;
&lt;br /&gt;
===Janquarian===&lt;br /&gt;
{{main|Janquarians}}&lt;br /&gt;
&lt;br /&gt;
===Kamchrul===&lt;br /&gt;
{{main|Kamchrul}}&lt;br /&gt;
&lt;br /&gt;
The Kamchrul are another one of the sophont species of the CASS, native to the planet [[Taench]].&lt;br /&gt;
&lt;br /&gt;
===Qeyeq===&lt;br /&gt;
{{main|Qeyeq}}&lt;br /&gt;
&lt;br /&gt;
One of the oldest sophont species in the Settled Systems, the Qeyeq are native to the planet [[Sky-And-Sea]]. They are one of the only species that entered the interstellar scene before the Icnosis and see themselves as interstellar caretakers.&lt;br /&gt;
&lt;br /&gt;
==Saltarplectane==&lt;br /&gt;
{{main|Saltarplectane}}&lt;br /&gt;
&lt;br /&gt;
Originating from [[Gafua]] in the [[Hurueefia system]], the Saltarplectanes are the tallest and longest known sophonts on average, measuring well over 9 meters in height and 6 meters in length.&lt;br /&gt;
&lt;br /&gt;
===Sorioyan===&lt;br /&gt;
{{main|Sorioyan}}&lt;br /&gt;
&lt;br /&gt;
===Tetropsid===&lt;br /&gt;
{{main|Tetropsid}}&lt;br /&gt;
&lt;br /&gt;
Tetropsids are the native sophonts of the planet [[Heéqʼb]]. Their homeworld is unique, being the only tidally-locked planet known to harbor native life.&lt;br /&gt;
&lt;br /&gt;
===Weyiwi===&lt;br /&gt;
{{main|Weyiwi}}&lt;br /&gt;
&lt;br /&gt;
==Debated sophonts==&lt;br /&gt;
Species whose sophonce is debated include non-AI mechanical species, animal uplifts and other artificial life.&lt;br /&gt;
&lt;br /&gt;
===Monolith===&lt;br /&gt;
{{main|Monolith}}&lt;br /&gt;
&lt;br /&gt;
===Uplift===&lt;br /&gt;
{{main|Uplift}}&lt;br /&gt;
&lt;br /&gt;
==Extinct sophonts==&lt;br /&gt;
===Sharay===&lt;br /&gt;
{{main|Sharay}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Biology]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Saltarplectane&amp;diff=2435</id>
		<title>Saltarplectane</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Saltarplectane&amp;diff=2435"/>
		<updated>2026-01-22T10:50:48Z</updated>

		<summary type="html">&lt;p&gt;Rox: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Taxobox&lt;br /&gt;
| name               = Saltarplectane&lt;br /&gt;
| image              = Saltarplectane scale.png&lt;br /&gt;
| image_upright      =&lt;br /&gt;
| image_alt          = &lt;br /&gt;
| image_caption      = Diagram showing the side of a Saltarplectane, with a Human for comparison&lt;br /&gt;
| status             = LC&lt;br /&gt;
| colour_as          = Animalia&lt;br /&gt;
| regnum             = [[Dwicozoan]]&lt;br /&gt;
| phylum             = [[Macroflecta]]&lt;br /&gt;
| classis            = [[Commamorpha]]&lt;br /&gt;
| superordo          = [[Scleacroa]]&lt;br /&gt;
| ordo               = [[Pedaopoda]] &lt;br /&gt;
| superfamilia       = [[Saltarplectoidea]]&lt;br /&gt;
| familia            = [[Saltarplectidae]]&lt;br /&gt;
| genus              = [[Saltarplectanus]]&lt;br /&gt;
| species            = &#039;&#039;&#039;S. psilopateas&#039;&#039;&#039;&lt;br /&gt;
| binomial           = &#039;&#039;Saltarplectanus psilopateas&#039;&#039;&lt;br /&gt;
| binomial_authority = &lt;br /&gt;
| range_map          = &amp;lt;!--optional map—also range map2, 3 or 4 --&amp;gt;&lt;br /&gt;
| range_map_upright    = &lt;br /&gt;
| range map_alt      = &lt;br /&gt;
| range_map_caption  = &lt;br /&gt;
| &amp;lt;!--or 115 other parameters--&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Saltarplectanes&#039;&#039;&#039; are a sophont species residing in the X cluster of the [[Settled Systems]]. Originating from [[Gafua]] in the [[Hurueefia system]], they are the most widespread species of Pedaopods, and the tallest and longest known sophonts on average.&lt;br /&gt;
&lt;br /&gt;
==Etymology and name==&lt;br /&gt;
The name “Saltarplectane” means “jumping weaver,” though this is a name used merely for humans to refer to the species. In [[Fahaa language|Fahaa]], the official language of the [[Holy Worlds under Gafua]], the Saltarplectanes refer to themselves as &#039;&#039;Hàhaabàà&#039;&#039; (/[[Help:SPA|˨ᴀϱᴀϱ:˨ƚϱ:]]/). The full binomial name is &#039;&#039;Saltarplectanus psilopateas&#039;&#039; with &amp;quot;psilopateas&amp;quot; meaning &amp;quot;smooth walker.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Evolution==&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
==Habitat and population==&lt;br /&gt;
&lt;br /&gt;
==Biology==&lt;br /&gt;
===Anatomy and physiology===&lt;br /&gt;
Saltarplectanes are extraordinarily long and tall Pedaopods with several hundred pairs of hydraulic limbs, called Solenarions, that serve functions both in locomotion and object manipulation. Like most Pedaopods, these hydraulic limbs are able to provide sudden powerful bursts of force, allowing for high and fast jumps. Saltarplectanes differ from most Pedaopods in that they have grown taller in size and possessing a larger more aerodynamic body and shell, reducing the need for jumping like most smaller Pedaopods by simply retracting their Solenarions and gliding. Saltarplectanes possess a hard shell on their back, for protection from aerial predators and from radiation the star of Gafua naturally produces.&lt;br /&gt;
&lt;br /&gt;
===Life cycle===&lt;br /&gt;
===Diet===&lt;br /&gt;
===Biological variation===&lt;br /&gt;
&lt;br /&gt;
==Culture==&lt;br /&gt;
===Language===&lt;br /&gt;
===Art===&lt;br /&gt;
===Tools and technologies===&lt;br /&gt;
===Religion===&lt;br /&gt;
===Science and philosophy===&lt;br /&gt;
&lt;br /&gt;
==Society==&lt;br /&gt;
&lt;br /&gt;
[[Category:Sophonts]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Ee%27koi_history&amp;diff=2434</id>
		<title>Ee&#039;koi history</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Ee%27koi_history&amp;diff=2434"/>
		<updated>2026-01-22T10:02:55Z</updated>

		<summary type="html">&lt;p&gt;Rox: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Ee&#039;koi&#039;&#039;&#039; history encompasses the history of the [[Ee&#039;koi]] species from prehistory to the present. Originally native to the planet [[Qrichie]] in the [[Tbeew system]], Ee&#039;koi have expanded to the entire [[Tbeew Prime Cluster]] over the last thousand years.&lt;br /&gt;
&lt;br /&gt;
==Prehistory==&lt;br /&gt;
Early ancestors of &#039;&#039;[[Eekoiidae]]&#039;&#039; first diverged on [[South Big Island]] around 1.5 million years ago. Although complicated by the nature of Ee&#039;koi anatomy, the earliest fossils of anatomically modern Ee&#039;koi have been dated to around 100 thousand years old. Little is known about [[early Ee&#039;koi]], other than they presumably lived in small, nomadic tribal groups near the ocean and that their numbers were most likely quite low, given the limited amount of available land. While very few confirmed tools have been found, cut and impact marks left around early archeological sites suggest that early Ee&#039;koi fashioned tools out of material that did not survive in the fossil record, most likely wood and animal teeth. Definitive stone tools would not be found until later periods, coinciding with the peopling of inner lands.&lt;br /&gt;
&lt;br /&gt;
==Qrichie Age==&lt;br /&gt;
As Ee&#039;koi became more sedentary and formed the first organized societies, [[Ee&#039;koi clan|clans]] emerged as the highest-order sociopolitical structures. Built upon shared genetic and social ancestry, clans rose to become almost analogous to humanoid nations, with complex and unique cultural and political structures. Because [[Ee&#039;koi society]] is driven by collectivism and utilitarianism, Ee&#039;koikind progressed from its first complex civilizations to industrialism in just 3,000 years, much less than most other [[List of sophonts|sophont species]]. The first Ee&#039;koi vessel reached space in 2001 AAI and the first Ee&#039;koi stepped on [[Xeog]], Qrichie&#039;s largest moon, in 2003 AAI. However, Qrichie was still divided among several clans, which slowed down the progress of outer space colonization. A first colony was established on Xeog in 2021 AAI as a joint effort between the [[Chii]], [[Jbew]] and [[Chii ẽ Cĩẽ]] clans, but it would be the only one. By the mid-21st century AAI, the bodies of the Tbeew system would each be divided among the many Ee&#039;koi clans. The first interstellar probe would be sent to the [[Trĩ-Trĩ system]], the nearest star to Tbeew Prime, in 2125 AAI using sublight propulsion technology. It was through this probe that Ee&#039;koikind confirmed the presence of a planet orbiting Trĩ-Trĩ Prime that could sustain life similar to Qrichie, which was named [[Treoc|&#039;&#039;Tbrow Khõgõc Trĩ-Trĩ&#039;&#039;]], meaning &amp;quot;[it is] the third one at the nearest&amp;quot; in Jegcre, referring to its position around its host star.&lt;br /&gt;
&lt;br /&gt;
==First Star Age – Age of Isolation==&lt;br /&gt;
Tbrow Khõgõc Trĩ-Trĩ was first colonized in 2140 AAI by the Chii clan, which renamed the planet to [[Treoc|Trẽõc]], meaning &amp;quot;forward&amp;quot;. This launched a wave of colonization of star systems in the Tbeew Cluster, though the absence of any means of FTL propulsion made this a very slow process which left colonies isolated between each other. Over time, the branches of clans which had colonized other star systems would diverge from their common ancestors and, while some would keep the name of their parent clan, new clan lineages would be created. Some star systems within the Ee&#039;koi sphere fared better than others, with many successfully uniting themselves under shared superclan banners. The Trĩ-Trĩ system, which peacefully united in 2277 AAI, became one of the most prosperous of the Tbeew Cluster. On the other hand, the Tbeew system experienced a series of brutal conflicts, the largest being the [[Great Tbeew War]] ([[Jegcre language|Jegcre]]: X), which primarily opposed the [[North Big Island (superclan)|North Big Island]] and [[South Big Island (superclan)|South Big Island]] superclans, as well as the various clans of [[Sand Island]] between 2259 and 2282 AAI. The war was fought across Qrichie and the colonies of the Tbeew system and would leave several worlds in ruins.&lt;br /&gt;
&lt;br /&gt;
The Tbeew system would slowly recover from the Great War, entering a period of relative peace and stability. Great technological advances would be made in the late 23rd and early 24th centuries AAI, culminating in the development of FTL technology known as [[sequence drive]]s in 2317 AAI. Sequence drives functioned by distorting and dislocating a vessel’s position in space, creating a sort of &amp;quot;tunnel&amp;quot; of compressed space between its origin and destination. Sequence drives would revolutionize the Ee&#039;koi sphere, allowing the various star systems to finally be reconnected.&lt;br /&gt;
&lt;br /&gt;
==Second Star Age – Age of Strife==&lt;br /&gt;
While the various Ee&#039;koi systems had been able to communicate using lightspeed methods, the advent of FTL technology allowed them to be much more connected to each other. There was much debate among the superclans of Tbeew whether sequence drive technology should be shared with the rest of Ee&#039;koikind or kept as a tactical advantage, but rumors of FTL testing in the Trĩ-Trĩ system in the 2320s AAI would lead to the [[Technology Sharing Initiative]] ([[Jegcre language|Jegcre]]: &#039;&#039;Ceochõt ẽ Tiecieg&#039;&#039;) in 2329 AAI. From that point, all Ee&#039;koi systems had access to FTL transportation. The various Ee’koi polities were contacted by the [[Star Union of Systems]] in 2340 AAI, which had been observing them for the past 300 years. The Star Union&#039;s first contact policy dictates that sophont civilizations may only be contacted once they reach interstellar FTL capability, or they reach out first. Although the first contact between Ee&#039;koi and alien sophonts was peaceful, the Star Union only shared limited knowledge with the Ee&#039;koi and no technology, deeming them not ready yet. The [[Rulership of Fheqgaa]], which the Ee&#039;koi had known about from Star Union records, first contacted Ee’koi polities in 2343 AAI with the objective of having the Ee&#039;koi join their empire. Debate ensued regarding how to best protect Ee&#039;koikind against [[Tetropsid]] aggression, by either joining the Star Union or remaining independent, which led to rising tensions among Ee&#039;koi polities.&lt;br /&gt;
&lt;br /&gt;
Over the remainder of 2340s AAI and into the 50s and 60s, the Star Union and Rulership of Fheqgaa would fund various opposition groups and Ee&#039;koi polities to sway star systems into the their respective hegemonies. The tensions would come to a head in the late 2360s AAI when armed conflict broke out between Independentist and Union-backed factions. This would be the first of the series of conflicts known as the [[Ee&#039;koi Unification Wars|Unification Wars]] ([[Jegcre language|Jegcre]]: &#039;&#039;Jieg ẽ ii-Hẽwqbiiw&#039;&#039;). The Unification Wars were multilateral conflicts opposing the various Ee&#039;koi clans and superclans, broadly divided into three sides: the Independentists, which fought for Ee&#039;koi sovereignty, the Unionists, which sought to join the the Star Union, and the Tetropsids, which were looking to conquer Ee&#039;koi systems. Allegiances shifted throughout the course of the conflicts and each side had no real central hierarchy. The Unification Wars were the most brutal conflicts in Ee&#039;koi history, killing hundreds of millions over nearly four decades and leading to the extinction of some clans, most prominent among them the Chii ẽ Cĩẽ clan, exterminated by the [[Tbĩw ceo Ĩg]] clan. There is no definitive consensus on when the wars ended, but a common date is 2404 AAI, with the proclamation of the [[Serene Union of the Tbeew Cluster]] ([[Jegcre language|Jegcre]]: &#039;&#039;Choc Jõ ẽ Qri Tbeew ii-Cbriw o&#039;&#039;). Minor conflicts would still continue for the remainder of the 2400s AAI as more star systems were integrated into the Serene Union.&lt;br /&gt;
&lt;br /&gt;
==Third Star Age – Age of Unity==&lt;br /&gt;
&lt;br /&gt;
[[Category:History]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Category:Species&amp;diff=2433</id>
		<title>Category:Species</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Category:Species&amp;diff=2433"/>
		<updated>2026-01-22T10:02:33Z</updated>

		<summary type="html">&lt;p&gt;Rox: Created page with &amp;quot;Category:Biology&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Biology]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Category:Sophonts&amp;diff=2432</id>
		<title>Category:Sophonts</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Category:Sophonts&amp;diff=2432"/>
		<updated>2026-01-22T10:02:18Z</updated>

		<summary type="html">&lt;p&gt;Rox: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Species]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Ee%27koi_history&amp;diff=2431</id>
		<title>Ee&#039;koi history</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Ee%27koi_history&amp;diff=2431"/>
		<updated>2026-01-22T10:01:49Z</updated>

		<summary type="html">&lt;p&gt;Rox: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Ee&#039;koi&#039;&#039;&#039; history encompasses the history of the [[Ee&#039;koi]] species from prehistory to the present. Originally native to the planet [[Qrichie]] in the [[Tbeew system]], Ee&#039;koi have expanded to the entire [[Tbeew Prime Cluster]] over the last thousand years.&lt;br /&gt;
&lt;br /&gt;
==Prehistory==&lt;br /&gt;
Early ancestors of &#039;&#039;[[Eekoiidae]]&#039;&#039; first diverged on [[South Big Island]] around 1.5 million years ago. Although complicated by the nature of Ee&#039;koi anatomy, the earliest fossils of anatomically modern Ee&#039;koi have been dated to around 100 thousand years old. Little is known about [[early Ee&#039;koi]], other than they presumably lived in small, nomadic tribal groups near the ocean and that their numbers were most likely quite low, given the limited amount of available land. While very few confirmed tools have been found, cut and impact marks left around early archeological sites suggest that early Ee&#039;koi fashioned tools out of material that did not survive in the fossil record, most likely wood and animal teeth. Definitive stone tools would not be found until later periods, coinciding with the peopling of inner lands.&lt;br /&gt;
&lt;br /&gt;
==Qrichie Age==&lt;br /&gt;
As Ee&#039;koi became more sedentary and formed the first organized societies, [[Ee&#039;koi clan|clans]] emerged as the highest-order sociopolitical structures. Built upon shared genetic and social ancestry, clans rose to become almost analogous to humanoid nations, with complex and unique cultural and political structures. Because [[Ee&#039;koi society]] is driven by collectivism and utilitarianism, Ee&#039;koikind progressed from its first complex civilizations to industrialism in just 3,000 years, much less than most other [[:Category:Sophonts|sophont species]]. The first Ee&#039;koi vessel reached space in 2001 AAI and the first Ee&#039;koi stepped on [[Xeog]], Qrichie&#039;s largest moon, in 2003 AAI. However, Qrichie was still divided among several clans, which slowed down the progress of outer space colonization. A first colony was established on Xeog in 2021 AAI as a joint effort between the [[Chii]], [[Jbew]] and [[Chii ẽ Cĩẽ]] clans, but it would be the only one. By the mid-21st century AAI, the bodies of the Tbeew system would each be divided among the many Ee&#039;koi clans. The first interstellar probe would be sent to the [[Trĩ-Trĩ system]], the nearest star to Tbeew Prime, in 2125 AAI using sublight propulsion technology. It was through this probe that Ee&#039;koikind confirmed the presence of a planet orbiting Trĩ-Trĩ Prime that could sustain life similar to Qrichie, which was named [[Treoc|&#039;&#039;Tbrow Khõgõc Trĩ-Trĩ&#039;&#039;]], meaning &amp;quot;[it is] the third one at the nearest&amp;quot; in Jegcre, referring to its position around its host star.&lt;br /&gt;
&lt;br /&gt;
==First Star Age – Age of Isolation==&lt;br /&gt;
Tbrow Khõgõc Trĩ-Trĩ was first colonized in 2140 AAI by the Chii clan, which renamed the planet to [[Treoc|Trẽõc]], meaning &amp;quot;forward&amp;quot;. This launched a wave of colonization of star systems in the Tbeew Cluster, though the absence of any means of FTL propulsion made this a very slow process which left colonies isolated between each other. Over time, the branches of clans which had colonized other star systems would diverge from their common ancestors and, while some would keep the name of their parent clan, new clan lineages would be created. Some star systems within the Ee&#039;koi sphere fared better than others, with many successfully uniting themselves under shared superclan banners. The Trĩ-Trĩ system, which peacefully united in 2277 AAI, became one of the most prosperous of the Tbeew Cluster. On the other hand, the Tbeew system experienced a series of brutal conflicts, the largest being the [[Great Tbeew War]] ([[Jegcre language|Jegcre]]: X), which primarily opposed the [[North Big Island (superclan)|North Big Island]] and [[South Big Island (superclan)|South Big Island]] superclans, as well as the various clans of [[Sand Island]] between 2259 and 2282 AAI. The war was fought across Qrichie and the colonies of the Tbeew system and would leave several worlds in ruins.&lt;br /&gt;
&lt;br /&gt;
The Tbeew system would slowly recover from the Great War, entering a period of relative peace and stability. Great technological advances would be made in the late 23rd and early 24th centuries AAI, culminating in the development of FTL technology known as [[sequence drive]]s in 2317 AAI. Sequence drives functioned by distorting and dislocating a vessel’s position in space, creating a sort of &amp;quot;tunnel&amp;quot; of compressed space between its origin and destination. Sequence drives would revolutionize the Ee&#039;koi sphere, allowing the various star systems to finally be reconnected.&lt;br /&gt;
&lt;br /&gt;
==Second Star Age – Age of Strife==&lt;br /&gt;
While the various Ee&#039;koi systems had been able to communicate using lightspeed methods, the advent of FTL technology allowed them to be much more connected to each other. There was much debate among the superclans of Tbeew whether sequence drive technology should be shared with the rest of Ee&#039;koikind or kept as a tactical advantage, but rumors of FTL testing in the Trĩ-Trĩ system in the 2320s AAI would lead to the [[Technology Sharing Initiative]] ([[Jegcre language|Jegcre]]: &#039;&#039;Ceochõt ẽ Tiecieg&#039;&#039;) in 2329 AAI. From that point, all Ee&#039;koi systems had access to FTL transportation. The various Ee’koi polities were contacted by the [[Star Union of Systems]] in 2340 AAI, which had been observing them for the past 300 years. The Star Union&#039;s first contact policy dictates that sophont civilizations may only be contacted once they reach interstellar FTL capability, or they reach out first. Although the first contact between Ee&#039;koi and alien sophonts was peaceful, the Star Union only shared limited knowledge with the Ee&#039;koi and no technology, deeming them not ready yet. The [[Rulership of Fheqgaa]], which the Ee&#039;koi had known about from Star Union records, first contacted Ee’koi polities in 2343 AAI with the objective of having the Ee&#039;koi join their empire. Debate ensued regarding how to best protect Ee&#039;koikind against [[Tetropsid]] aggression, by either joining the Star Union or remaining independent, which led to rising tensions among Ee&#039;koi polities.&lt;br /&gt;
&lt;br /&gt;
Over the remainder of 2340s AAI and into the 50s and 60s, the Star Union and Rulership of Fheqgaa would fund various opposition groups and Ee&#039;koi polities to sway star systems into the their respective hegemonies. The tensions would come to a head in the late 2360s AAI when armed conflict broke out between Independentist and Union-backed factions. This would be the first of the series of conflicts known as the [[Ee&#039;koi Unification Wars|Unification Wars]] ([[Jegcre language|Jegcre]]: &#039;&#039;Jieg ẽ ii-Hẽwqbiiw&#039;&#039;). The Unification Wars were multilateral conflicts opposing the various Ee&#039;koi clans and superclans, broadly divided into three sides: the Independentists, which fought for Ee&#039;koi sovereignty, the Unionists, which sought to join the the Star Union, and the Tetropsids, which were looking to conquer Ee&#039;koi systems. Allegiances shifted throughout the course of the conflicts and each side had no real central hierarchy. The Unification Wars were the most brutal conflicts in Ee&#039;koi history, killing hundreds of millions over nearly four decades and leading to the extinction of some clans, most prominent among them the Chii ẽ Cĩẽ clan, exterminated by the [[Tbĩw ceo Ĩg]] clan. There is no definitive consensus on when the wars ended, but a common date is 2404 AAI, with the proclamation of the [[Serene Union of the Tbeew Cluster]] ([[Jegcre language|Jegcre]]: &#039;&#039;Choc Jõ ẽ Qri Tbeew ii-Cbriw o&#039;&#039;). Minor conflicts would still continue for the remainder of the 2400s AAI as more star systems were integrated into the Serene Union.&lt;br /&gt;
&lt;br /&gt;
==Third Star Age – Age of Unity==&lt;br /&gt;
&lt;br /&gt;
[[Category:History]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Ee%27koi_history&amp;diff=2430</id>
		<title>Ee&#039;koi history</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Ee%27koi_history&amp;diff=2430"/>
		<updated>2026-01-22T07:15:31Z</updated>

		<summary type="html">&lt;p&gt;Rox: Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;Ee&amp;#039;koi&amp;#039;&amp;#039;&amp;#039; history encompasses the history of the Ee&amp;#039;koi species from prehistory to the present. Originally native to the planet Qrichie in the Tbeew system, Ee&amp;#039;koi have expanded to the entire Tbeew Prime Cluster over the last thousand years.  ==Prehistory== Early ancestors of &amp;#039;&amp;#039;Eekoiidae&amp;#039;&amp;#039; first diverged on South Big Island around 1.5 million years ago. Although complicated by the nature of Ee&amp;#039;koi anatomy, the earliest fossils of anatomically m...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Ee&#039;koi&#039;&#039;&#039; history encompasses the history of the [[Ee&#039;koi]] species from prehistory to the present. Originally native to the planet [[Qrichie]] in the [[Tbeew system]], Ee&#039;koi have expanded to the entire [[Tbeew Prime Cluster]] over the last thousand years.&lt;br /&gt;
&lt;br /&gt;
==Prehistory==&lt;br /&gt;
Early ancestors of &#039;&#039;[[Eekoiidae]]&#039;&#039; first diverged on [[South Big Island]] around 1.5 million years ago. Although complicated by the nature of Ee&#039;koi anatomy, the earliest fossils of anatomically modern Ee&#039;koi have been dated to around 100 thousand years old. Little is known about [[early Ee&#039;koi]], other than they presumably lived in small, nomadic tribal groups near the ocean and that their numbers were most likely quite low, given the limited amount of available land. While very few confirmed tools have been found, cut and impact marks left around early archeological sites suggest that early Ee&#039;koi fashioned tools out of material that did not survive in the fossil record, most likely wood and animal teeth. Definitive stone tools would not be found until later periods, coinciding with the peopling of inner lands.&lt;br /&gt;
&lt;br /&gt;
==Qrichie Age==&lt;br /&gt;
As Ee&#039;koi became more sedentary and formed the first organized societies, [[Ee&#039;koi clan|clans]] emerged as the highest-order sociopolitical structures. Built upon shared genetic and social ancestry, clans rose to become almost analogous to humanoid nations, with complex and unique cultural and political structures. Because [[Ee&#039;koi society]] is driven by collectivism and utilitarianism, Ee&#039;koikind progressed from its first complex civilizations to industrialism in just 3,000 years, much less than most other [[Category:Sophonts|sophont species]]. The first Ee&#039;koi vessel reached space in 2001 AAI and the first Ee&#039;koi stepped on [[Xeog]], Qrichie&#039;s largest moon, in 2003 AAI. However, Qrichie was still divided among several clans, which slowed down the progress of outer space colonization. A first colony was established on Xeog in 2021 AAI as a joint effort between the [[Chii]], [[Jbew]] and [[Chii ẽ Cĩẽ]] clans, but it would be the only one. By the mid-21st century AAI, the bodies of the Tbeew system would each be divided among the many Ee&#039;koi clans. The first interstellar probe would be sent to the [[Trĩ-Trĩ system]], the nearest star to Tbeew Prime, in 2125 AAI using sublight propulsion technology. It was through this probe that Ee&#039;koikind confirmed the presence of a planet orbiting Trĩ-Trĩ Prime that could sustain life similar to Qrichie, which was named [[Treoc|&#039;&#039;Tbrow Khõgõc Trĩ-Trĩ&#039;&#039;]], meaning &amp;quot;[it is] the third one at the nearest&amp;quot; in Jegcre, referring to its position around its host star.&lt;br /&gt;
&lt;br /&gt;
==First Star Age – Age of Isolation==&lt;br /&gt;
Tbrow Khõgõc Trĩ-Trĩ was first colonized in 2140 AAI by the Chii clan, which renamed the planet to [[Treoc|Trẽõc]], meaning &amp;quot;forward&amp;quot;. This launched a wave of colonization of star systems in the Tbeew Cluster, though the absence of any means of FTL propulsion made this a very slow process which left colonies isolated between each other. Over time, the branches of clans which had colonized other star systems would diverge from their common ancestors and, while some would keep the name of their parent clan, new clan lineages would be created. Some star systems within the Ee&#039;koi sphere fared better than others, with many successfully uniting themselves under shared superclan banners. The Trĩ-Trĩ system, which peacefully united in 2277 AAI, became one of the most prosperous of the Tbeew Cluster. On the other hand, the Tbeew system experienced a series of brutal conflicts, the largest being the [[Great Tbeew War]] ([[Jegcre language|Jegcre]]: X), which primarily opposed the [[North Big Island (superclan)|North Big Island]] and [[South Big Island (superclan)|South Big Island]] superclans, as well as the various clans of [[Sand Island]] between 2259 and 2282 AAI. The war was fought across Qrichie and the colonies of the Tbeew system and would leave several worlds in ruins.&lt;br /&gt;
&lt;br /&gt;
The Tbeew system would slowly recover from the Great War, entering a period of relative peace and stability. Great technological advances would be made in the late 23rd and early 24th centuries AAI, culminating in the development of FTL technology known as [[sequence drive]]s in 2317 AAI. Sequence drives functioned by distorting and dislocating a vessel’s position in space, creating a sort of &amp;quot;tunnel&amp;quot; of compressed space between its origin and destination. Sequence drives would revolutionize the Ee&#039;koi sphere, allowing the various star systems to finally be reconnected.&lt;br /&gt;
&lt;br /&gt;
==Second Star Age – Age of Strife==&lt;br /&gt;
While the various Ee&#039;koi systems had been able to communicate using lightspeed methods, the advent of FTL technology allowed them to be much more connected to each other. There was much debate among the superclans of Tbeew whether sequence drive technology should be shared with the rest of Ee&#039;koikind or kept as a tactical advantage, but rumors of FTL testing in the Trĩ-Trĩ system in the 2320s AAI would lead to the [[Technology Sharing Initiative]] ([[Jegcre language|Jegcre]]: &#039;&#039;Ceochõt ẽ Tiecieg&#039;&#039;) in 2329 AAI. From that point, all Ee&#039;koi systems had access to FTL transportation. The various Ee’koi polities were contacted by the [[Star Union of Systems]] in 2340 AAI, which had been observing them for the past 300 years. The Star Union&#039;s first contact policy dictates that sophont civilizations may only be contacted once they reach interstellar FTL capability, or they reach out first. Although the first contact between Ee&#039;koi and alien sophonts was peaceful, the Star Union only shared limited knowledge with the Ee&#039;koi and no technology, deeming them not ready yet. The [[Rulership of Fheqgaa]], which the Ee&#039;koi had known about from Star Union records, first contacted Ee’koi polities in 2343 AAI with the objective of having the Ee&#039;koi join their empire. Debate ensued regarding how to best protect Ee&#039;koikind against [[Tetropsid]] aggression, by either joining the Star Union or remaining independent, which led to rising tensions among Ee&#039;koi polities.&lt;br /&gt;
&lt;br /&gt;
Over the remainder of 2340s AAI and into the 50s and 60s, the Star Union and Rulership of Fheqgaa would fund various opposition groups and Ee&#039;koi polities to sway star systems into the their respective hegemonies. The tensions would come to a head in the late 2360s AAI when armed conflict broke out between Independentist and Union-backed factions. This would be the first of the series of conflicts known as the [[Ee&#039;koi Unification Wars|Unification Wars]] ([[Jegcre language|Jegcre]]: &#039;&#039;Jieg ẽ ii-Hẽwqbiiw&#039;&#039;). The Unification Wars were multilateral conflicts opposing the various Ee&#039;koi clans and superclans, broadly divided into three sides: the Independentists, which fought for Ee&#039;koi sovereignty, the Unionists, which sought to join the the Star Union, and the Tetropsids, which were looking to conquer Ee&#039;koi systems. Allegiances shifted throughout the course of the conflicts and each side had no real central hierarchy. The Unification Wars were the most brutal conflicts in Ee&#039;koi history, killing hundreds of millions over nearly four decades and leading to the extinction of some clans, most prominent among them the Chii ẽ Cĩẽ clan, exterminated by the [[Tbĩw ceo Ĩg]] clan. There is no definitive consensus on when the wars ended, but a common date is 2404 AAI, with the proclamation of the [[Serene Union of the Tbeew Cluster]] ([[Jegcre language|Jegcre]]: &#039;&#039;Choc Jõ ẽ Qri Tbeew ii-Cbriw o&#039;&#039;). Minor conflicts would still continue for the remainder of the 2400s AAI as more star systems were integrated into the Serene Union.&lt;br /&gt;
&lt;br /&gt;
==Third Star Age – Age of Unity==&lt;br /&gt;
&lt;br /&gt;
[[Category:History]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Serene_Union_of_the_Tbeew_Cluster&amp;diff=2429</id>
		<title>Serene Union of the Tbeew Cluster</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Serene_Union_of_the_Tbeew_Cluster&amp;diff=2429"/>
		<updated>2026-01-22T06:59:26Z</updated>

		<summary type="html">&lt;p&gt;Rox: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox country&lt;br /&gt;
|conventional_long_name=Serene Union of the Tbeew Cluster&lt;br /&gt;
|native_name=&#039;&#039;Choc Jõ ẽ Qri Tbeew ii-Cbriw o&#039;&#039;&lt;br /&gt;
|common_name=SUTC&lt;br /&gt;
|image_symbol=SUTC symbol.png&lt;br /&gt;
|symbol_type=Symbol&lt;br /&gt;
|symbol=&lt;br /&gt;
|image_flag=&lt;br /&gt;
|flag=&lt;br /&gt;
|capital_type=Capital world&lt;br /&gt;
|capital=[[Qrichie]]&lt;br /&gt;
|official_languages=[[Jegcre language|Jegcre]]&amp;lt;br&amp;gt;X&lt;br /&gt;
|government_type=&lt;br /&gt;
|demonym=Tbeew&lt;br /&gt;
|upper_house=&lt;br /&gt;
|lower_house=&lt;br /&gt;
|established_event1 = Founded&lt;br /&gt;
|established_date1 = 2404 AAI&lt;br /&gt;
|currency=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Serene Union of the Tbeew Cluster&#039;&#039;&#039; ([[Jegcre language|Jegcre]]: &#039;&#039;Choc Jõ ẽ Qri Tbeew ii-Cbriw o&#039;&#039; /[[Help:eIPA|ƈɷʇ ǀɷ̤ ҽ̤ ƾ̤ι ꝥꝍ: ι: ꭃ̤υ ɷ]]/) is an interstellar polity occupying most of the [[Tbeew Prime Cluster]].&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
===Foundation===&lt;br /&gt;
The Serene Union of the Tbeew Cluster was officially founded in 2404 AAI, following the [[Ee&#039;koi Unification Wars]]. The Unification Wars were multilateral conflicts opposing the various [[Ee&#039;koi]] [[Ee&#039;koi clan|clans and superclans]], broadly divided into three sides: the Independentists, which fought for Ee&#039;koi sovereignty, the Unionists, which sought to join the the [[Star Union of Systems]], and the [[Tetropsid]]s, which were looking to conquer Ee&#039;koi systems. Allegiances shifted throughout the course of the conflicts and each side had no real central hierarchy. The Unification Wars were the most brutal conflicts in [[Ee&#039;koi history]], killing hundreds of millions over nearly four decades and leading to the extinction of some clans, most prominent among them the [[Chii ẽ Cĩẽ]] clan, exterminated by the [[Tbĩw ceo Ĩg]] clan. While there is no definitive consensus on when the wars ended, the proclamation of the Serene Union is generally agreed to mark the end of the conflict, though minor conflicts still continued for the remainder of the 2400s AAI as more star systems were integrated into the Serene Union.&lt;br /&gt;
&lt;br /&gt;
==Astrography==&lt;br /&gt;
===Star systems===&lt;br /&gt;
The Serene Union of the Tbeew Cluster has claims on all 17 star systems in the Tbeew Prime Cluster.&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left&amp;quot;&lt;br /&gt;
!Star system&lt;br /&gt;
!Settled world(s)&lt;br /&gt;
!Largest settlement&lt;br /&gt;
!Distance from Tbeew (ly)&lt;br /&gt;
|-&lt;br /&gt;
| [[Tbeew system|Tbeew]]&lt;br /&gt;
| [[Qrichie]]&amp;lt;br&amp;gt;[[Xeog]]&amp;lt;br&amp;gt;[[Tbĩwgbĩwqb Hi]]&amp;lt;br&amp;gt;[[Qriiqĩq Khbõw III]]&lt;br /&gt;
| X&lt;br /&gt;
| &#039;&#039;0&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[Trĩ-Trĩ system|Trĩ-Trĩ]]&lt;br /&gt;
| [[Treoc|Trẽõc]]&lt;br /&gt;
| X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Khig system|Khig]]&lt;br /&gt;
| [[Iikheo]]&lt;br /&gt;
| X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Giiqii system|Giiqii]]&lt;br /&gt;
| [[Jieg-Croot]]&amp;lt;br&amp;gt;Y&lt;br /&gt;
| X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Jeec-Cieg system|Jeec-Cieg]]&lt;br /&gt;
| X&amp;lt;br&amp;gt;Y&lt;br /&gt;
| X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Eqẽ-Thie system|Eqẽ-Thie]]&lt;br /&gt;
| [[Tẽ-Thieg]]&lt;br /&gt;
| X&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Climate===&lt;br /&gt;
===Biodiversity===&lt;br /&gt;
&lt;br /&gt;
==Politics==&lt;br /&gt;
===Government===&lt;br /&gt;
===Administrative divisions===&lt;br /&gt;
===Foreign relations===&lt;br /&gt;
===Military===&lt;br /&gt;
&lt;br /&gt;
==Demographics==&lt;br /&gt;
===Sophonts===&lt;br /&gt;
===Urbanization===&lt;br /&gt;
===Language===&lt;br /&gt;
===Religion===&lt;br /&gt;
&lt;br /&gt;
==Culture==&lt;br /&gt;
===Architecture===&lt;br /&gt;
===Literature===&lt;br /&gt;
===Art===&lt;br /&gt;
&lt;br /&gt;
[[Category:Polities]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Serene_Union_of_the_Tbeew_Cluster&amp;diff=2428</id>
		<title>Serene Union of the Tbeew Cluster</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Serene_Union_of_the_Tbeew_Cluster&amp;diff=2428"/>
		<updated>2026-01-22T06:55:59Z</updated>

		<summary type="html">&lt;p&gt;Rox: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox country&lt;br /&gt;
|conventional_long_name=Serene Union of the Tbeew Cluster&lt;br /&gt;
|native_name=&#039;&#039;Choc Jõ ẽ Qri Tbeew ii-Cbriw o&#039;&#039;&lt;br /&gt;
|common_name=SUTC&lt;br /&gt;
|image_symbol=SUTC symbol.png&lt;br /&gt;
|symbol_type=Symbol&lt;br /&gt;
|symbol=&lt;br /&gt;
|image_flag=&lt;br /&gt;
|flag=&lt;br /&gt;
|capital_type=Capital world&lt;br /&gt;
|capital=[[Qrichie]]&lt;br /&gt;
|official_languages=[[Jegcre language|Jegcre]]&amp;lt;br&amp;gt;X&lt;br /&gt;
|government_type=&lt;br /&gt;
|demonym=Tbeew&lt;br /&gt;
|upper_house=&lt;br /&gt;
|lower_house=&lt;br /&gt;
|established_event1 = Founded&lt;br /&gt;
|established_date1 = 2404 AAI&lt;br /&gt;
|currency=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Serene Union of the Tbeew Cluster&#039;&#039;&#039; ([[Jegcre language|Jegcre]]: &#039;&#039;Choc Jõ ẽ Qri Tbeew ii-Cbriw o&#039;&#039; /[[Help:eIPA|ƈɷʇ ǀɷ̤ ҽ̤ ƾ̤ι ꝥꝍ: ι: ꭃ̤υ ɷ]]/) is an interstellar polity occupying most of the [[Tbeew Prime Cluster]].&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
===Foundation===&lt;br /&gt;
The Serene Union of the Tbeew Cluster was officially founded in 2404 AAI, following the [[Ee&#039;koi Unification Wars]]. The Unification Wars were multilateral conflicts opposing the various [[Ee&#039;koi]] [[Ee&#039;koi#Society|clans and superclans]], broadly divided into three sides: the Independentists, which fought for Ee&#039;koi sovereignty, the Unionists, which sought to join the the [[Star Union of Systems]], and the [[Tetropsid]]s, which were looking to conquer Ee&#039;koi systems. Allegiances shifted throughout the course of the conflicts and each side had no real central hierarchy. The Unification Wars were the most brutal conflicts in [[Ee&#039;koi history]], killing hundreds of millions over nearly four decades and leading to the extinction of some clans, most prominent among them the [[Chii ẽ Cĩẽ]] clan, exterminated by the [[Tbĩw ceo Ĩg]] clan. While there is no definitive consensus on when the wars ended, the proclamation of the Serene Union is generally agreed to mark the end of the conflict, though minor conflicts still continued for the remainder of the 2400s AAI as more star systems were integrated into the Serene Union.&lt;br /&gt;
&lt;br /&gt;
==Astrography==&lt;br /&gt;
===Star systems===&lt;br /&gt;
The Serene Union of the Tbeew Cluster has claims on all 17 star systems in the Tbeew Prime Cluster.&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left&amp;quot;&lt;br /&gt;
!Star system&lt;br /&gt;
!Settled world(s)&lt;br /&gt;
!Largest settlement&lt;br /&gt;
!Distance from Tbeew (ly)&lt;br /&gt;
|-&lt;br /&gt;
| [[Tbeew system|Tbeew]]&lt;br /&gt;
| [[Qrichie]]&amp;lt;br&amp;gt;[[Xeog]]&amp;lt;br&amp;gt;[[Tbĩwgbĩwqb Hi]]&amp;lt;br&amp;gt;[[Qriiqĩq Khbõw III]]&lt;br /&gt;
| X&lt;br /&gt;
| &#039;&#039;0&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[Trĩ-Trĩ system|Trĩ-Trĩ]]&lt;br /&gt;
| [[Treoc|Trẽõc]]&lt;br /&gt;
| X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Khig system|Khig]]&lt;br /&gt;
| [[Iikheo]]&lt;br /&gt;
| X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Giiqii system|Giiqii]]&lt;br /&gt;
| [[Jieg-Croot]]&amp;lt;br&amp;gt;Y&lt;br /&gt;
| X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Jeec-Cieg system|Jeec-Cieg]]&lt;br /&gt;
| X&amp;lt;br&amp;gt;Y&lt;br /&gt;
| X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Eqẽ-Thie system|Eqẽ-Thie]]&lt;br /&gt;
| [[Tẽ-Thieg]]&lt;br /&gt;
| X&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Climate===&lt;br /&gt;
===Biodiversity===&lt;br /&gt;
&lt;br /&gt;
==Politics==&lt;br /&gt;
===Government===&lt;br /&gt;
===Administrative divisions===&lt;br /&gt;
===Foreign relations===&lt;br /&gt;
===Military===&lt;br /&gt;
&lt;br /&gt;
==Demographics==&lt;br /&gt;
===Sophonts===&lt;br /&gt;
===Urbanization===&lt;br /&gt;
===Language===&lt;br /&gt;
===Religion===&lt;br /&gt;
&lt;br /&gt;
==Culture==&lt;br /&gt;
===Architecture===&lt;br /&gt;
===Literature===&lt;br /&gt;
===Art===&lt;br /&gt;
&lt;br /&gt;
[[Category:Polities]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Module:Settlement_short_description/doc&amp;diff=2427</id>
		<title>Module:Settlement short description/doc</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Module:Settlement_short_description/doc&amp;diff=2427"/>
		<updated>2026-01-18T08:32:52Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;br /&gt;
{{High-use|demo=Module:{{ROOTPAGENAME}}}}&lt;br /&gt;
{{Lua|Module:Arguments|Module:Plain text|Module:TableTools}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
Used in [[Template:Infobox settlement]] to generate [[Wikipedia:Short description|short descriptions]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox | |&lt;br /&gt;
&amp;lt;!-- Categories below this line, please; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:Modules that create a short description]]&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Module:Plain_text&amp;diff=2425</id>
		<title>Module:Plain text</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Module:Plain_text&amp;diff=2425"/>
		<updated>2026-01-18T08:32:52Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--converts text with wikilinks to plain text, e.g &amp;quot;[[foo|gah]] is [[bar]]&amp;quot; to &amp;quot;gah is bar&amp;quot;&lt;br /&gt;
--removes anything enclosed in tags that isn&#039;t nested, mediawiki strip markers (references etc), files, italic and bold markup&lt;br /&gt;
require[[strict]]&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local text = frame.args[1]&lt;br /&gt;
	local encode = require(&#039;Module:yesno&#039;)(frame.args.encode)&lt;br /&gt;
	return p._main(text, encode)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(text, encode)&lt;br /&gt;
	if not text then return end&lt;br /&gt;
	text = mw.text.killMarkers(text)&lt;br /&gt;
		:gsub(&#039;&amp;amp;nbsp;&#039;, &#039; &#039;) --replace nbsp spaces with regular spaces&lt;br /&gt;
		:gsub(&#039;&amp;lt;br ?/?&amp;gt;&#039;, &#039;, &#039;) --replace br with commas&lt;br /&gt;
		:gsub(&#039;&amp;lt;span.-&amp;gt;(.-)&amp;lt;/span&amp;gt;&#039;, &#039;%1&#039;) --remove spans while keeping text inside&lt;br /&gt;
		:gsub(&#039;&amp;lt;i.-&amp;gt;(.-)&amp;lt;/i&amp;gt;&#039;, &#039;%1&#039;) --remove italics while keeping text inside&lt;br /&gt;
		:gsub(&#039;&amp;lt;b.-&amp;gt;(.-)&amp;lt;/b&amp;gt;&#039;, &#039;%1&#039;) --remove bold while keeping text inside&lt;br /&gt;
		:gsub(&#039;&amp;lt;em.-&amp;gt;(.-)&amp;lt;/em&amp;gt;&#039;, &#039;%1&#039;) --remove emphasis while keeping text inside&lt;br /&gt;
		:gsub(&#039;&amp;lt;strong.-&amp;gt;(.-)&amp;lt;/strong&amp;gt;&#039;, &#039;%1&#039;) --remove strong while keeping text inside&lt;br /&gt;
		:gsub(&#039;&amp;lt;sub.-&amp;gt;(.-)&amp;lt;/sub&amp;gt;&#039;, &#039;%1&#039;) --remove subscript markup; retain contents&lt;br /&gt;
		:gsub(&#039;&amp;lt;sup.-&amp;gt;(.-)&amp;lt;/sup&amp;gt;&#039;, &#039;%1&#039;) --remove superscript markup; retain contents&lt;br /&gt;
		:gsub(&#039;&amp;lt;u.-&amp;gt;(.-)&amp;lt;/u&amp;gt;&#039;, &#039;%1&#039;) --remove underline markup; retain contents&lt;br /&gt;
		:gsub(&#039;&amp;lt;.-&amp;gt;.-&amp;lt;.-&amp;gt;&#039;, &#039;&#039;) --strip out remaining tags and the text inside&lt;br /&gt;
		:gsub(&#039;&amp;lt;.-&amp;gt;&#039;, &#039;&#039;) --remove any other tag markup&lt;br /&gt;
		:gsub(&#039;%[%[%s*[Ff][Ii][Ll][Ee]%s*:.-%]%]&#039;, &#039;&#039;) --strip out files&lt;br /&gt;
		:gsub(&#039;%[%[%s*[Ii][Mm][Aa][Gg][Ee]%s*:.-%]%]&#039;, &#039;&#039;) --strip out use of image:&lt;br /&gt;
		:gsub(&#039;%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:.-%]%]&#039;, &#039;&#039;) --strip out categories&lt;br /&gt;
		:gsub(&#039;%[%[[^%]]-|&#039;, &#039;&#039;) --strip out piped link text&lt;br /&gt;
		:gsub(&#039;([^%[])%[[^%[%]][^%]]-%s&#039;, &#039;%1&#039;) --strip out external link text&lt;br /&gt;
		:gsub(&#039;^%[[^%[%]][^%]]-%s&#039;, &#039;&#039;) --strip out external link text&lt;br /&gt;
		:gsub(&#039;[%[%]]&#039;, &#039;&#039;) --then strip out remaining [ and ]&lt;br /&gt;
		:gsub(&amp;quot;&#039;&#039;&#039;&#039;&#039;&amp;quot;, &amp;quot;&amp;quot;) --strip out bold italic markup&lt;br /&gt;
		:gsub(&amp;quot;&#039;&#039;&#039;?&amp;quot;, &amp;quot;&amp;quot;) --not stripping out &#039;&#039;&#039;&#039; gives correct output for bolded text in quotes&lt;br /&gt;
		:gsub(&#039;%-%-%-%-+&#039;, &#039;&#039;) --remove ---- lines&lt;br /&gt;
		:gsub(&amp;quot;^%s+&amp;quot;, &amp;quot;&amp;quot;) --strip leading&lt;br /&gt;
		:gsub(&amp;quot;%s+$&amp;quot;, &amp;quot;&amp;quot;) --and trailing spaces&lt;br /&gt;
		:gsub(&amp;quot;%s+&amp;quot;, &amp;quot; &amp;quot;) --strip redundant spaces&lt;br /&gt;
	if encode then&lt;br /&gt;
		return mw.text.encode(text)&lt;br /&gt;
	else&lt;br /&gt;
		return text&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Module:Settlement_short_description&amp;diff=2423</id>
		<title>Module:Settlement short description</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Module:Settlement_short_description&amp;diff=2423"/>
		<updated>2026-01-18T08:32:52Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--generates auto short description for use in infobox settlement&lt;br /&gt;
local p = {}&lt;br /&gt;
p.categories = &amp;quot;&amp;quot;&lt;br /&gt;
local plain = require(&#039;Module:Plain text&#039;)._main&lt;br /&gt;
local getArgs = require(&#039;Module:Arguments&#039;).getArgs&lt;br /&gt;
local tableTools = require (&#039;Module:TableTools&#039;)&lt;br /&gt;
&lt;br /&gt;
function p.reverseTable (init)&lt;br /&gt;
	init[1], init[3] = init[3], init[1]&lt;br /&gt;
	return init&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.assign (args, argname, num)&lt;br /&gt;
	local val&lt;br /&gt;
	local var = {}&lt;br /&gt;
	for i = 0,num do&lt;br /&gt;
		--handle initial &amp;quot;subdivision_foo&amp;quot; without number&lt;br /&gt;
		if i == 0 then&lt;br /&gt;
			val = &amp;quot;&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			val = tostring(i)&lt;br /&gt;
		end&lt;br /&gt;
		var[i+1] = p.validate(plain(args[argname..val]))&lt;br /&gt;
	end&lt;br /&gt;
	return var&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--Display short description using {{short description}}&lt;br /&gt;
function p.shortdesc(text, frame)&lt;br /&gt;
	return frame:expandTemplate{title = &#039;Short description&#039;, args = {text, &#039;noreplace&#039;}}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.category (cattype)&lt;br /&gt;
	local category = string.format(&#039;[[Category:Pages using infobox settlement with bad %s]]&#039;, cattype)&lt;br /&gt;
	if category then p.categories = p.categories..category end --categorize&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--sanity and other checks&lt;br /&gt;
function p.validate (parameter, cat)&lt;br /&gt;
	if not parameter then return nil end&lt;br /&gt;
	parameter = parameter:gsub(&#039;%b()&#039;, &#039;&#039;) --remove things in brackets as extraneous information&lt;br /&gt;
			   :gsub(&#039;%s+&#039;, &#039; &#039;) --fix possible extra spaces from previous cleanup&lt;br /&gt;
			   :gsub(&#039;^%s+&#039;, &#039;&#039;) --trim spaces from beginning&lt;br /&gt;
			   :gsub(&#039;%s+$&#039;, &#039;&#039;) --trim spaces from end&lt;br /&gt;
	if parameter:match(&amp;quot;[,;]&amp;quot;) or not parameter:match(&amp;quot;%a&amp;quot;) then --must have some letters, ignore if multiple types/subdivisions&lt;br /&gt;
		if cat then p.category (cat) end&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	if (parameter == &amp;quot;&amp;quot;) then return nil end&lt;br /&gt;
	return parameter&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--removes redundancy like &amp;quot;England, United Kingdom&amp;quot; and fixes issues like &amp;quot;Foo in United States&amp;quot; (to &amp;quot;Foo in the United States&amp;quot;)&lt;br /&gt;
--also used in Module:Type in location&lt;br /&gt;
function p.cleanupLoc (location)&lt;br /&gt;
	if location == &amp;quot;&amp;quot; then return nil end&lt;br /&gt;
	local replacements = {&lt;br /&gt;
		[&amp;quot;England, United Kingdom&amp;quot;] =  &amp;quot;England&amp;quot;,&lt;br /&gt;
		[&amp;quot;Scotland, United Kingdom&amp;quot;] =  &amp;quot;Scotland&amp;quot;,&lt;br /&gt;
		[&amp;quot;Wales, United Kingdom&amp;quot;] =  &amp;quot;Wales&amp;quot;,&lt;br /&gt;
		[&amp;quot;New York City, New York, United States&amp;quot;] =  &amp;quot;New York City&amp;quot;,&lt;br /&gt;
		[&amp;quot;^United States$&amp;quot;] = &amp;quot;the United States&amp;quot;,&lt;br /&gt;
		[&amp;quot;London, United Kingdom&amp;quot;] = &amp;quot;London, England&amp;quot;&lt;br /&gt;
	}&lt;br /&gt;
	for i, v in pairs(replacements) do &lt;br /&gt;
		location = location:gsub(i, v) --series of replacements&lt;br /&gt;
	end&lt;br /&gt;
	return location&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local categories = &amp;quot;&amp;quot;&lt;br /&gt;
	local subdivision_types = {}&lt;br /&gt;
	local subdivision_names = {}&lt;br /&gt;
	local args = getArgs (frame, {parentOnly = true})&lt;br /&gt;
	local settlement_type = p.validate(plain(args.settlement_type or args.type), &amp;quot;settlement type&amp;quot;) or &amp;quot;Place&amp;quot;&lt;br /&gt;
	local short_description = plain(args.short_description)&lt;br /&gt;
	subdivision_types = p.assign(args, &amp;quot;subdivision_type&amp;quot;, 2)&lt;br /&gt;
	subdivision_names = p.assign(args, &amp;quot;subdivision_name&amp;quot;, 2)&lt;br /&gt;
	&lt;br /&gt;
	if short_description then&lt;br /&gt;
		if (short_description == &#039;no&#039;) then&lt;br /&gt;
			return&lt;br /&gt;
		else&lt;br /&gt;
			local language = mw.language.getContentLanguage()&lt;br /&gt;
			return p.shortdesc(language:ucfirst(short_description), frame)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not(subdivision_names[3] and&lt;br /&gt;
		(string.find(settlement_type, &#039;[nN]eighbo[u]?rhood&#039;) or string.find(settlement_type, &#039;[sS]uburb&#039;))) then&lt;br /&gt;
		subdivision_names[3] = nil --display the third subdivision_type only if suburb or neighborhood&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	--if say &amp;quot;Voivodeship&amp;quot; is found within the subdivision_type, then specially handle&lt;br /&gt;
	--by adding Voivodeship to the end if not already present&lt;br /&gt;
	for x, y in ipairs (subdivision_types) do&lt;br /&gt;
		local special_types = {&lt;br /&gt;
			&amp;quot;Voivodeship&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
		for i, j in ipairs(special_types) do&lt;br /&gt;
			if subdivision_names[x] and string.find(y, j, 1, true)&lt;br /&gt;
				and not string.find(subdivision_names[x], j, 1, true) then&lt;br /&gt;
				subdivision_names[x] = subdivision_names[x]..&amp;quot; &amp;quot;..j&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	for x, y in ipairs (subdivision_names) do&lt;br /&gt;
		if y then&lt;br /&gt;
			if string.find(settlement_type, y, 1, true) then --if the subdivision is found within the settlement type&lt;br /&gt;
				subdivision_names[x] = nil --don&#039;t display redundancy&lt;br /&gt;
				p.category (&amp;quot;settlement type&amp;quot;)&lt;br /&gt;
			end&lt;br /&gt;
			if y == mw.title.getCurrentTitle().text then --if the title is the same as one of the subdivision_names&lt;br /&gt;
				subdivision_names[x] = nil --don&#039;t display redundancy&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local location = table.concat(tableTools.compressSparseArray(p.reverseTable(subdivision_names)), &#039;, &#039;)&lt;br /&gt;
	&lt;br /&gt;
	location = p.cleanupLoc (location)&lt;br /&gt;
	&lt;br /&gt;
	if location then location =  &amp;quot; in &amp;quot; .. location else location = &amp;quot;&amp;quot; end&lt;br /&gt;
	&lt;br /&gt;
	local language = mw.language.getContentLanguage()&lt;br /&gt;
	return p.shortdesc(language:ucfirst(settlement_type..location), frame)..p.categories&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Template:Editnotice_EXPECTUNUSEDTEMPLATE&amp;diff=2421</id>
		<title>Template:Editnotice EXPECTUNUSEDTEMPLATE</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Template:Editnotice_EXPECTUNUSEDTEMPLATE&amp;diff=2421"/>
		<updated>2026-01-18T08:32:43Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#ifeq:Template:Editnotices|{{FULLROOTPAGENAME}}|__EXPECTUNUSEDTEMPLATE__}}&amp;lt;noinclude&amp;gt;{{documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Module:Lua_call&amp;diff=2419</id>
		<title>Module:Lua call</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Module:Lua_call&amp;diff=2419"/>
		<updated>2026-01-18T08:32:42Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;require[[strict]]&lt;br /&gt;
local p={}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
    local parent = frame.getParent(frame) or {}&lt;br /&gt;
    local explist = {}&lt;br /&gt;
    local fnname, varlist&lt;br /&gt;
    local vars = {}&lt;br /&gt;
    for k, v in pairs(_G) do&lt;br /&gt;
        vars[k] = v -- transfer every global directly to our variable table&lt;br /&gt;
    end&lt;br /&gt;
    for k, v in pairs(parent.args or {}) do&lt;br /&gt;
        vars[k] = tonumber(v) or v -- transfer every parameter directly to our variable table&lt;br /&gt;
    end&lt;br /&gt;
    for k, v in pairs(frame.args or {}) do&lt;br /&gt;
        vars[k] = tonumber(v) or v -- transfer every parameter directly to our variable table&lt;br /&gt;
    end&lt;br /&gt;
     --- Alas Scribunto does NOT implement coroutines, according to&lt;br /&gt;
     --- https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format&lt;br /&gt;
     --- this will not stop us from trying to implement one single lousy function call&lt;br /&gt;
    if vars[1] then&lt;br /&gt;
        fnname, varlist = mw.ustring.match(vars[1], &amp;quot;^%s*(%a[^%s%(]*)%(([^%)]*)%)%s*$&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    if varlist then&lt;br /&gt;
        local expn = 0&lt;br /&gt;
        repeat&lt;br /&gt;
            expn = expn + 1&lt;br /&gt;
            explist[expn] = vars[mw.ustring.match(varlist, &amp;quot;([^%,]+)&amp;quot;)]&lt;br /&gt;
            varlist = mw.ustring.match(varlist, &amp;quot;[^%,]+,(.*)$&amp;quot;)&lt;br /&gt;
        until not varlist&lt;br /&gt;
    end&lt;br /&gt;
    local scopetab = vars&lt;br /&gt;
    while mw.ustring.match(fnname, &amp;quot;%.&amp;quot;) do&lt;br /&gt;
        local scopekey&lt;br /&gt;
        scopekey, fnname = mw.ustring.match(fnname, &amp;quot;^(%a[^%.]*)%.(.*)$&amp;quot;)&lt;br /&gt;
        scopetab = scopetab[scopekey]&lt;br /&gt;
    end&lt;br /&gt;
    local fn = scopetab[fnname]&lt;br /&gt;
    if type(fn) ~= &amp;quot;function&amp;quot; then --XXX: What about callable tables?&lt;br /&gt;
        return tostring(fn)&lt;br /&gt;
    else &lt;br /&gt;
    	local output = {fn(unpack(explist))}&lt;br /&gt;
        return output[vars.reserved_return or 1]&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function tonumberOrString(v)&lt;br /&gt;
	return tonumber(v) or v:gsub(&amp;quot;^\\&amp;quot;, &amp;quot;&amp;quot;, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function callWithTonumberOrStringOnPairs(f, ...)&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for _, v in ... do&lt;br /&gt;
		table.insert(args, tonumberOrString(v))&lt;br /&gt;
	end&lt;br /&gt;
	return (f(unpack(args)))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- ipairsAtOffset&lt;br /&gt;
&lt;br /&gt;
-- This is an iterator for arrays. It can be used like ipairs, but with&lt;br /&gt;
-- specified i as first index to iterate. i is an offset from 1&lt;br /&gt;
--&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
--]]&lt;br /&gt;
local function ipairsAtOffset(t, i)&lt;br /&gt;
	local f, s, i0 = ipairs(t)&lt;br /&gt;
	return f, s, i0+i&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function get(s)&lt;br /&gt;
	local G = _G; for _ in mw.text.gsplit(&lt;br /&gt;
		mw.text.trim(s, &#039;%s&#039;), &#039;%s*%.%s*&#039;&lt;br /&gt;
	) do&lt;br /&gt;
		G = G[_]&lt;br /&gt;
	end&lt;br /&gt;
	return G&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- call&lt;br /&gt;
--&lt;br /&gt;
-- This function is usually useful for debugging template parameters.&lt;br /&gt;
-- Prefix parameter with backslash (\) to force interpreting parameter as string.&lt;br /&gt;
-- The leading backslash will be removed before passed to Lua function.&lt;br /&gt;
--&lt;br /&gt;
-- Example:&lt;br /&gt;
--    {{#invoke:Lua call|call|mw.log|a|1|2|3}} will return results of mw.log(&#039;a&#039;, 1, 2, 3)&lt;br /&gt;
--    {{#invoke:Lua call|call|mw.logObject|\a|321|\321| \321 }} will return results of mw.logObject(&#039;a&#039;, 321, &#039;321&#039;, &#039; \\321 &#039;)&lt;br /&gt;
--&lt;br /&gt;
-- This example show the debugging to see which Unicode characters are allowed in template parameters,&lt;br /&gt;
--    {{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x0061}}}} return 97&lt;br /&gt;
--    {{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x0000}}}} return 65533&lt;br /&gt;
--    {{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x0001}}}} return 65533&lt;br /&gt;
--    {{#invoke:Lua call|call|string.format|0x%04x|{{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x0002}}}}}} return 0xfffd&lt;br /&gt;
--    {{#invoke:Lua call|call|string.format|0x%04x|{{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x007e}}}}}} return 0x007e&lt;br /&gt;
--    {{#invoke:Lua call|call|string.format|0x%04x|{{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x007f}}}}}} return 0x007f&lt;br /&gt;
--    {{#invoke:Lua call|call|string.format|0x%04x|{{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x0080}}}}}} return 0x0080&lt;br /&gt;
--    {{#invoke:Lua call|call|string.format|0x%04x|{{#invoke:Lua call|call|mw.ustring.codepoint|{{#invoke:Lua call|call|mw.ustring.char|0x00a0}}}}}} return 0x00a0&lt;br /&gt;
--&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
--]]&lt;br /&gt;
function p.call(frame)&lt;br /&gt;
	return callWithTonumberOrStringOnPairs(get(frame.args[1]),&lt;br /&gt;
		ipairsAtOffset(frame.args, 1)&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--local TableTools = require(&#039;Module:TableTools&#039;)&lt;br /&gt;
--[[&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- get&lt;br /&gt;
--&lt;br /&gt;
-- Example:&lt;br /&gt;
--    {{#invoke:Lua call|get| math.pi }} will return value of math.pi&lt;br /&gt;
--    {{#invoke:Lua call|get|math|pi}} will return value of math.pi&lt;br /&gt;
--    {{#invoke:Lua call|get| math |pi}} will return value of _G[&#039; math &#039;].pi&lt;br /&gt;
--    {{#invoke:Lua call|get|_G| math.pi }} will return value of _G[&#039; math.pi &#039;]&lt;br /&gt;
--    {{#invoke:Lua call|get|obj.a.5.c}} will return value of obj.a[&#039;5&#039;].c&lt;br /&gt;
--    {{#invoke:Lua call|get|obj|a|5|c}} will return value of obj.a[5].c&lt;br /&gt;
--&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
--]]&lt;br /&gt;
function p.get(frame)&lt;br /&gt;
	-- #frame.args always return 0, regardless of number of unnamed&lt;br /&gt;
	-- template parameters, so check manually instead&lt;br /&gt;
	if frame.args[2] == nil then&lt;br /&gt;
		-- not do tonumber() for this args style,&lt;br /&gt;
		-- always treat it as string,&lt;br /&gt;
		-- so &#039;obj.1&#039; will mean obj[&#039;1&#039;] rather obj[1]&lt;br /&gt;
		return get(frame.args[1])&lt;br /&gt;
	else&lt;br /&gt;
		local G = _G&lt;br /&gt;
		for _, v in ipairs(frame.args) do&lt;br /&gt;
			G = G[tonumberOrString(v)]&lt;br /&gt;
		end&lt;br /&gt;
		return G&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- invoke&lt;br /&gt;
--&lt;br /&gt;
-- This function is used by Template:Invoke&lt;br /&gt;
--&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
--]]&lt;br /&gt;
function p.invoke(frame)&lt;br /&gt;
	local pframe, usedpargs = frame:getParent(), {}&lt;br /&gt;
	-- get module and function names from parent args if not provided&lt;br /&gt;
	local pfargs = setmetatable({frame.args[1], frame.args[2]}, {__index = table})&lt;br /&gt;
	if not pfargs[1] then&lt;br /&gt;
		pfargs[1], usedpargs[1] = pframe.args[1], true&lt;br /&gt;
		if not pfargs[2] then&lt;br /&gt;
			pfargs[2], usedpargs[2] = pframe.args[2], true&lt;br /&gt;
		end&lt;br /&gt;
	elseif not pfargs[2] then&lt;br /&gt;
		pfargs[2], usedpargs[1] = pframe.args[1], true&lt;br /&gt;
	end&lt;br /&gt;
	-- repack sequential args&lt;br /&gt;
	for i, v in ipairs(pframe.args) do&lt;br /&gt;
		if not usedpargs[i] then&lt;br /&gt;
			pfargs:insert(v)&lt;br /&gt;
			usedpargs[i] = true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- copy other args&lt;br /&gt;
	for k, v in pairs(pframe.args) do&lt;br /&gt;
		if not pfargs[k] and not usedpargs[k] then&lt;br /&gt;
			pfargs[k], usedpargs[k] = v, true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- #invoke off parent frame so the new frame has the same parent&lt;br /&gt;
	return pframe:callParserFunction{name = &#039;#invoke&#039;, args = pfargs}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Module:Shortcut/styles.css&amp;diff=2417</id>
		<title>Module:Shortcut/styles.css</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Module:Shortcut/styles.css&amp;diff=2417"/>
		<updated>2026-01-18T08:32:42Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* {{pp-template}} */&lt;br /&gt;
.module-shortcutboxplain {&lt;br /&gt;
	float: right;&lt;br /&gt;
	margin: 0 0 0 1em;&lt;br /&gt;
	border: 1px solid var(--border-color-base, #a2a9b1);&lt;br /&gt;
	background-color: var(--background-color-base, #fff);&lt;br /&gt;
	padding: 0.3em 0.6em 0.2em 0.6em;&lt;br /&gt;
	text-align: center;&lt;br /&gt;
	font-size: 85%;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.module-shortcutboxleft {&lt;br /&gt;
	float: left;&lt;br /&gt;
	margin: 0 1em 0 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.module-shortcutlist {&lt;br /&gt;
	display: inline-block;&lt;br /&gt;
	border-bottom: 1px solid var(--border-color-base, #a2a9b1);&lt;br /&gt;
	margin-bottom: 0.2em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.module-shortcutboxplain ul {&lt;br /&gt;
	font-weight: bold;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.module-shortcutanchordiv {&lt;br /&gt;
	position: relative;&lt;br /&gt;
	top: -3em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
li .module-shortcutanchordiv {&lt;br /&gt;
	float: right; /* IE/Edge in list items */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.mbox-imageright .module-shortcutboxplain {&lt;br /&gt;
	padding: 0.4em 1em;&lt;br /&gt;
	line-height: 1.3;&lt;br /&gt;
	margin: 0;&lt;br /&gt;
	float: initial;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Template:Short_description/doc&amp;diff=2415</id>
		<title>Template:Short description/doc</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Template:Short_description/doc&amp;diff=2415"/>
		<updated>2026-01-18T08:32:42Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{pp|small=yes}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{Documentation subpage}}&lt;br /&gt;
&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;br /&gt;
{{High risk}}&lt;br /&gt;
{{cascade-protected template}}&lt;br /&gt;
{{Warning|{{strong|Please do not use redirects or shortcuts for this template}}, as they cause problems with the [[Wikipedia:Shortdesc helper|short description editing gadget]] and other maintenance tools.}}&lt;br /&gt;
{{Lua|Module:Check for unknown parameters|Module:String|Module:SDcat}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Template:Short description]]&#039;&#039;&#039; is used to add a [[Wikipedia:Short description|short description]] (which can be edited from within Wikipedia) to a Wikipedia page. These descriptions may appear in Wikipedia searches and elsewhere, and [[WP:SDPURPOSE|help users identify the desired article]].&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
{{tld|Short description|&#039;&#039;Write your short description here&#039;&#039;}}&lt;br /&gt;
&lt;br /&gt;
This should be limited to about 40 characters, as explained at [[WP:SDFORMAT]], along with the other guidance at [[WP:SDCONTENT]].&lt;br /&gt;
&lt;br /&gt;
If the page&#039;s title is sufficiently descriptive that a [[WP:SDNONE|short description is not needed]], use the following:&lt;br /&gt;
&lt;br /&gt;
{{tld|Short description|none}}&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{{TemplateData header|noheader=1}}&lt;br /&gt;
&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;description&amp;quot;: {&lt;br /&gt;
		&amp;quot;en&amp;quot;: &amp;quot;Creates a short description for a Wikipedia page, which is displayed in search results and other locations.&amp;quot;,&lt;br /&gt;
		&amp;quot;es&amp;quot;: &amp;quot;Crea una breve descripción, para un artículo de Wikipedia, que se utiliza en el Editor Visual para proporcionar contexto en los wikilinks (wikienlaces).&amp;quot;&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;params&amp;quot;: {&lt;br /&gt;
		&amp;quot;1&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: {&lt;br /&gt;
				&amp;quot;en&amp;quot;: &amp;quot;Description&amp;quot;,&lt;br /&gt;
				&amp;quot;es&amp;quot;: &amp;quot;Descripción&amp;quot;&lt;br /&gt;
			},&lt;br /&gt;
			&amp;quot;description&amp;quot;: {&lt;br /&gt;
				&amp;quot;en&amp;quot;: &amp;quot;The short description of the article or &#039;none&#039;. It should be limited to about 40 characters.&amp;quot;,&lt;br /&gt;
				&amp;quot;es&amp;quot;: &amp;quot;La descripción corta del artículo&amp;quot;&lt;br /&gt;
			},&lt;br /&gt;
			&amp;quot;example&amp;quot;: {&lt;br /&gt;
				&amp;quot;en&amp;quot;: &amp;quot;Endangered species of South American fish&amp;quot;,&lt;br /&gt;
				&amp;quot;es&amp;quot;: &amp;quot;La enciclopedia en línea que cualquiera puede editar&amp;quot;&lt;br /&gt;
			},&lt;br /&gt;
			&amp;quot;required&amp;quot;: true,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;2&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: {&lt;br /&gt;
				&amp;quot;en&amp;quot;: &amp;quot;No replace?&amp;quot;,&lt;br /&gt;
				&amp;quot;es&amp;quot;: &amp;quot;2&amp;quot;&lt;br /&gt;
			},&lt;br /&gt;
			&amp;quot;description&amp;quot;: {&lt;br /&gt;
				&amp;quot;en&amp;quot;: &amp;quot;Should be unused or &#039;noreplace&#039;. Templates with noreplace will not replace a short description defined by an earlier template. Mainly for use within transcluded templates.&amp;quot;,&lt;br /&gt;
				&amp;quot;es&amp;quot;: &amp;quot;Se anula una descripción corta si se transcluye.  Debe estar sin usar o  con &#039;noreplace&#039; (que significar no reemplazar).&amp;quot;&lt;br /&gt;
			},&lt;br /&gt;
			&amp;quot;example&amp;quot;: {&lt;br /&gt;
				&amp;quot;es&amp;quot;: &amp;quot;noreplace&amp;quot;&lt;br /&gt;
			},&lt;br /&gt;
			&amp;quot;required&amp;quot;: false,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
			&amp;quot;autovalue&amp;quot;: &amp;quot;noreplace&amp;quot;,&lt;br /&gt;
			&amp;quot;suggestedvalues&amp;quot;: [&lt;br /&gt;
				&amp;quot;noreplace&amp;quot;&lt;br /&gt;
			]&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;pagetype&amp;quot;: {&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
			&amp;quot;description&amp;quot;: {&lt;br /&gt;
				&amp;quot;en&amp;quot;: &amp;quot;The type of page. This puts it in the appropriate category - Things with short description. Normally unneeded, since handled through namespace detection.&amp;quot;,&lt;br /&gt;
				&amp;quot;es&amp;quot;: &amp;quot;El tipo de página. La coloca en la categoría apropiada - Cosas con descripción corta&amp;quot;&lt;br /&gt;
			},&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Redirect, Disambiguation page&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: false&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;format&amp;quot;: &amp;quot;{{_|_ = _}}\n&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== About writing good short descriptions ==&lt;br /&gt;
This page is about the short description {{em|template}}; it does not provide guidelines for writing a good short description. If you plan to use this template, you should make sure you read and follow the detailed guidance at [[WP:HOWTOSD]]. General information can be found at [[Wikipedia:Short description]].&lt;br /&gt;
&lt;br /&gt;
== Template information ==&lt;br /&gt;
Eventually all articles should have a short description:&lt;br /&gt;
* by directly using this template, in which case the short description will be unique to the article&lt;br /&gt;
* transcluded in another template, such as a disambiguation template, where a generic short description is adequate for a large class of pages&lt;br /&gt;
* where the short description is assembled from data in an infobox&lt;br /&gt;
&lt;br /&gt;
Automatically generated descriptions within templates should set the second parameter as {{code|noreplace}} so they do not override any short descriptions specifically added to the transcluding article.&lt;br /&gt;
&lt;br /&gt;
Short descriptions are not normally needed for non-article pages, such as redirects, but can be added if useful.&lt;br /&gt;
&lt;br /&gt;
If the article title alone is sufficient to ensure reliable identification of the desired article, a null value of {{tnull|Short description|none}} may be used.&lt;br /&gt;
&lt;br /&gt;
Short descriptions do not necessarily serve the same function as the Wikidata description for an item and they do not have to be the same, but some overlap is expected in many cases. Some Wikidata descriptions may be unsuitable, and if imported must be checked for relevance, accuracy and fitness for purpose. Responsibility for such imports lies with the importer. {{crossref|(See also [[d:Help:Description|Wikidata:Help:Description]].)}}&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
At [[Oxygen therapy]], add the following at the very top of the article, above everything else:&lt;br /&gt;
* {{tld|Short description|Use of oxygen as medical treatment}}&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
For testing purposes, the display of this template can be enabled by adding a line to your [[Special:MyPage/common.css]]:&lt;br /&gt;
* &amp;lt;syntaxhighlight lang=&amp;quot;CSS&amp;quot; inline&amp;gt;.shortdescription { display:block !important; }&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This can be easily removed or disabled when testing is finished.&lt;br /&gt;
&lt;br /&gt;
If you want to {{em|always}} see short descriptions, you may prefer a more utilitarian layout, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;CSS&amp;quot;&amp;gt;&lt;br /&gt;
.shortdescription {&lt;br /&gt;
  display:block !important;&lt;br /&gt;
  white-space: pre-wrap;&lt;br /&gt;
}&lt;br /&gt;
.shortdescription::before { &lt;br /&gt;
  content: &amp;quot;\A[Short description:\0020&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
.shortdescription::after { &lt;br /&gt;
  content: &amp;quot;]\A&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
There is a test version of this template available as [[Template:Short description/test]] which displays its text by default.&lt;br /&gt;
* {{tld|Short description/test}} displays the short description if supplied&lt;br /&gt;
* {{tld|Short description/test}} displays nothing if &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt; is supplied&lt;br /&gt;
* {{tld|Short description/test}} displays the description from Wikidata if &amp;lt;code&amp;gt;wikidata&amp;lt;/code&amp;gt; is supplied.&lt;br /&gt;
&lt;br /&gt;
Taking {{Q|Q1096878}} as an example:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{short description/test|Underwater diving where breathing is from equipment independent of the surface}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; → {{short description/test|Underwater diving where breathing is from equipment independent of the surface }}&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{short description/test|none}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; → {{short description/test|none}}&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{short description/test|wikidata}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; → {{short description/test|wikidata|qid=Q1096878}}&lt;br /&gt;
&lt;br /&gt;
===Pagetype parameter===&lt;br /&gt;
If {{param|Pagetype}} is &#039;&#039;&#039;not&#039;&#039;&#039; set, then this template adds the article to a category based on the namespace:&lt;br /&gt;
* {{clc|Articles with short description}}&lt;br /&gt;
* {{clc|Redirects with short description}} {{--}} for redirects in any namespace&lt;br /&gt;
&lt;br /&gt;
If {{param|Pagetype}} &#039;&#039;&#039;is&#039;&#039;&#039; set, then this template adds the article to a category matching the parameter. For example:&lt;br /&gt;
* {{cl|Redirects with short description}} {{--}} {{code|pagetype {{=}} Redirect }}&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span class=&amp;quot;anchor&amp;quot; id=&amp;quot;Aliases&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;anchor&amp;quot; id=&amp;quot;No-aliases&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Redirects ==&lt;br /&gt;
{{Shortcut|WP:SDNOALIASES}}&lt;br /&gt;
While there are currently &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[{{fullurl:Special:WhatLinksHere/Template:Short_description|hidetrans=1&amp;amp;hidelinks=1&amp;amp;limit=500}} redirects to this template]&amp;lt;/span&amp;gt;, {{Strong|they must not be used}}, for the reasons below:&lt;br /&gt;
&lt;br /&gt;
* Other templates and gadgets attempt to extract short descriptions from pages by explicitly searching for the transclusions of the {{tl|Short description}} template.&lt;br /&gt;
* For example, {{tl|Annotated link}} searches for the template in its uppercase &amp;quot;Short description&amp;quot; and lowercase form &amp;quot;short description&amp;quot;; either form is acceptable.&lt;br /&gt;
&lt;br /&gt;
See related [[Wikipedia:Redirects for discussion/Log/2021 July 20#Aliases for Short description template|RfD]].&lt;br /&gt;
&lt;br /&gt;
{{Strong|Do not}} start the template with a space: {{code|&amp;lt;nowiki&amp;gt; {{ Short description...&amp;lt;/nowiki&amp;gt;}}. While this does create a valid short description, the space will prevent searches for the {{code|&amp;lt;nowiki&amp;gt;{{Short description...&amp;lt;/nowiki&amp;gt;}} text.&lt;br /&gt;
&lt;br /&gt;
==Tracking categories==&lt;br /&gt;
* {{clc|Templates that generate short descriptions}}&lt;br /&gt;
* {{clc|Modules that create a short description}}&lt;br /&gt;
* {{clc|Short description matches Wikidata}}&lt;br /&gt;
* {{clc|Short description is different from Wikidata}}&lt;br /&gt;
* {{clc|Short description with empty Wikidata description}}&lt;br /&gt;
&lt;br /&gt;
== Maintenance categories ==&lt;br /&gt;
* {{clc|Pages using short description with unknown parameters}}&lt;br /&gt;
* {{clc|Articles with long short description}}&lt;br /&gt;
* {{clc|Pages with lower-case short description}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* {{tlx|Auto short description}}&lt;br /&gt;
* {{tlx|Annotated link}}&lt;br /&gt;
* {{tlx|laal}} – displays an article&#039;s pagelinks alongside its short description&lt;br /&gt;
* [[Module:Is infobox in lead]]&lt;br /&gt;
* [[Wikipedia:Short descriptions]] – background information&lt;br /&gt;
* [[Wikipedia:WikiProject Short descriptions]] – project to add Short descriptions to all articles&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line, please; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:Short description templates]]&lt;br /&gt;
[[Category:Templates that add a tracking category]]&lt;br /&gt;
[[Category:Templates that generate short descriptions]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Template:Short_description/test&amp;diff=2413</id>
		<title>Template:Short description/test</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Template:Short_description/test&amp;diff=2413"/>
		<updated>2026-01-18T08:32:42Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span class=&amp;quot;shortdescription nomobile noexcerpt noprint&amp;quot;&amp;gt;{{nowiki2|1={{#invoke:WikidataIB|getDescription|{{{1|}}}|qid={{{qid|}}}}}}}&amp;lt;/span&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Template:Nowiki2&amp;diff=2411</id>
		<title>Template:Nowiki2</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Template:Nowiki2&amp;diff=2411"/>
		<updated>2026-01-18T08:32:41Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#if: {{{tag|}}}&lt;br /&gt;
| {{#if: {{{style|}}}&lt;br /&gt;
  | &amp;lt;{{{tag}}} style=&amp;quot;{{{style}}}&amp;quot;&amp;gt;&lt;br /&gt;
  | &amp;lt;{{{tag}}}&amp;gt;&lt;br /&gt;
  }}&lt;br /&gt;
}}{{#invoke:Lua call | call | mw.text.nowiki |\{{{1|}}}&amp;lt;!-- --&amp;gt;}}{{#if: {{{tag|}}}&lt;br /&gt;
| &amp;lt;/{{{tag}}}&amp;gt;&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Template:Param&amp;diff=2409</id>
		<title>Template:Param</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Template:Param&amp;diff=2409"/>
		<updated>2026-01-18T08:32:41Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SAFESUBST:&amp;lt;noinclude /&amp;gt;#ifeq:{{SAFESUBST:&amp;lt;noinclude /&amp;gt;Yesno|{{{nested|no}}}}}|yes||&amp;lt;{{{tag|code}}}&amp;gt;}}&amp;amp;#123;&amp;amp;#123;&amp;amp;#123;{{{1&amp;lt;noinclude&amp;gt;|foo&amp;lt;/noinclude&amp;gt;}}}{{SAFESUBST:&amp;lt;noinclude /&amp;gt;#ifeq:{{{2}}}|{{{2|}}} |&amp;amp;#124;}}{{{2|}}}&amp;amp;#125;&amp;amp;#125;&amp;amp;#125;{{SAFESUBST:&amp;lt;noinclude /&amp;gt;#ifeq:{{SAFESUBST:&amp;lt;noinclude /&amp;gt;Yesno|{{{nested|no}}}}}|yes||&amp;lt;/{{{tag|code}}}&amp;gt;}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
   PLEASE ADD CATEGORIES AND INTERWIKIS&lt;br /&gt;
   TO THE /doc SUBPAGE, THANKS&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Template:Shortcut&amp;diff=2407</id>
		<title>Template:Shortcut</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Template:Shortcut&amp;diff=2407"/>
		<updated>2026-01-18T08:32:41Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;{{#invoke:Shortcut|main}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{documentation}}&lt;br /&gt;
&amp;lt;!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Template:Tld&amp;diff=2405</id>
		<title>Template:Tld</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Template:Tld&amp;diff=2405"/>
		<updated>2026-01-18T08:32:41Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Template:Template link code]]&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Template:--&amp;diff=2403</id>
		<title>Template:--</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Template:--&amp;diff=2403"/>
		<updated>2026-01-18T08:32:41Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Template:Em dash]]&lt;br /&gt;
&lt;br /&gt;
{{Redirect category shell|&lt;br /&gt;
{{R from move}}&lt;br /&gt;
{{R from template shortcut}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Template:Warning&amp;diff=2401</id>
		<title>Template:Warning</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Template:Warning&amp;diff=2401"/>
		<updated>2026-01-18T08:32:41Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Mbox&lt;br /&gt;
| name       = Warning&lt;br /&gt;
| demospace  = {{{demospace|}}}&lt;br /&gt;
| style      = {{#if:{{{style|}}} |{{{style}}} }}&lt;br /&gt;
| subst      = &amp;lt;includeonly&amp;gt;{{subst:substcheck}}&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
| type       = content&lt;br /&gt;
| image      = {{#if:{{{image|}}}| [[File:{{{image}}}|{{{imagesize|40px}}}|Warning]] }}&lt;br /&gt;
| small      = {{{small|}}}&lt;br /&gt;
| smallimage = {{#if:{{{image|}}}| [[File:{{{image}}}|30px|Warning]]}}&lt;br /&gt;
| imageright = {{#if:{{{imageright|}}} |{{{imageright}}} |{{#if:{{{shortcut|{{{shortcut1|}}}}}} |{{Ombox/shortcut|{{{shortcut|{{{shortcut1|}}}}}}|{{{shortcut2|}}}|{{{shortcut3|}}}|{{{shortcut4|}}}|{{{shortcut5|}}}}}}} }}&lt;br /&gt;
| textstyle  = {{{textstyle|text-align: {{#if:{{{center|}}}|center|{{{align|left}}}}};}}}&lt;br /&gt;
| text       = {{#if:{{{header|{{{heading|{{{title|}}}}}}}}} |&amp;lt;div style=&amp;quot;{{{headstyle|text-align: {{#if:{{{center|}}}|center|left}};}}}&amp;quot;&amp;gt;&#039;&#039;&#039;{{{header|{{{heading|{{{title|}}}}}}}}}&#039;&#039;&#039;&amp;lt;/div&amp;gt;}}&amp;lt;!--&lt;br /&gt;
            --&amp;gt;{{{text|{{{content|{{{reason|{{{1}}}}}}}}}}}}&lt;br /&gt;
}}{{Editnotice EXPECTUNUSEDTEMPLATE}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;!-- Add categories to the /doc subpage; interwikis go to Wikidata. --&amp;gt;&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Template:No_redirect&amp;diff=2399</id>
		<title>Template:No redirect</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Template:No_redirect&amp;diff=2399"/>
		<updated>2026-01-18T08:32:40Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{safesubst:&amp;lt;noinclude/&amp;gt;#if: {{safesubst:&amp;lt;noinclude/&amp;gt;#invoke:Redirect|isRedirect|{{{1}}}}}&lt;br /&gt;
| &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[{{safesubst:&amp;lt;noinclude/&amp;gt;fullurl:{{{1}}}|redirect=no}} {{{2|{{{1}}}}}}]&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;display: none&amp;quot;&amp;gt;[[:{{{1}}}]]&amp;lt;/span&amp;gt;&lt;br /&gt;
| [[:{{safesubst:&amp;lt;noinclude/&amp;gt;FULLPAGENAME:{{{1}}}}}|{{{2|{{{1}}}}}}]]&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{documentation}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Template:Em_dash&amp;diff=2397</id>
		<title>Template:Em dash</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Template:Em_dash&amp;diff=2397"/>
		<updated>2026-01-18T08:32:40Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;—&amp;lt;noinclude&amp;gt;{{Documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Module:Hatnote_inline&amp;diff=2395</id>
		<title>Module:Hatnote inline</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Module:Hatnote_inline&amp;diff=2395"/>
		<updated>2026-01-18T08:32:40Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--------------------------------------------------------------------------------&lt;br /&gt;
--                              Module:Hatnote-inline                         --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- This module produces hatnote-style links, and links to related articles,	  --&lt;br /&gt;
-- but inside a &amp;lt;span&amp;gt;, instead of the &amp;lt;div&amp;gt; used by Module:Hatnote.  It      --&lt;br /&gt;
-- implements the {{hatnote-inline}} meta-template.                           --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local mHatnote = require(&#039;Module:Hatnote&#039;)&lt;br /&gt;
local mArguments = require(&#039;Module:Arguments&#039;)&lt;br /&gt;
local yesno = require(&#039;Module:Yesno&#039;)&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.hatnoteInline (frame)&lt;br /&gt;
	local args = mArguments.getArgs(frame)&lt;br /&gt;
	local hatnote = mHatnote.hatnote(frame:newChild{title=&amp;quot;Module:Hatnote inline&amp;quot;, args = args})&lt;br /&gt;
	if args.inline == nil or yesno(args.inline, true) then&lt;br /&gt;
		local subs = {&lt;br /&gt;
			[&#039;&amp;lt;div&#039;] = &#039;&amp;lt;span&#039;,&lt;br /&gt;
			[&#039;&amp;lt;/div&amp;gt;$&#039;] = &#039;&amp;lt;/span&amp;gt;&#039;&lt;br /&gt;
		}&lt;br /&gt;
		for k, v in pairs(subs) do hatnote = string.gsub(hatnote, k, v, 1) end&lt;br /&gt;
	end&lt;br /&gt;
	return hatnote&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p.hatnote = p.hatnoteInline --alias&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Template:Hatnote_inline&amp;diff=2393</id>
		<title>Template:Hatnote inline</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Template:Hatnote_inline&amp;diff=2393"/>
		<updated>2026-01-18T08:32:40Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#invoke:Hatnote inline|hatnoteInline&lt;br /&gt;
 |1={{{1|{{{text|{{{content}}}}}}}}}&lt;br /&gt;
 |extraclasses={{{class|{{{extraclasses|}}}}}}&lt;br /&gt;
 |selfref={{#if:{{{printworthy|{{{selfref|}}}}}}||yes}}&lt;br /&gt;
 |category={{{category|}}}&lt;br /&gt;
 |inline={{{inline|true}}}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{documentation}}&lt;br /&gt;
&amp;lt;!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Template:Crossreference/styles.css&amp;diff=2391</id>
		<title>Template:Crossreference/styles.css</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Template:Crossreference/styles.css&amp;diff=2391"/>
		<updated>2026-01-18T08:32:40Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* {{pp-template}} */&lt;br /&gt;
/* This snippet just undoes the default &amp;quot;padding-left: 1.6em;&amp;quot; imposed by&lt;br /&gt;
   div.hatnote, when Template:Crossreference is used in block (div) mode.&lt;br /&gt;
   Ignore the dumb CSS editor&#039;s &amp;quot;Element (div.crossreference) is overqualified&amp;quot;&lt;br /&gt;
   warning.  It is wrong.  We do not want to apply any CSS intended for block&lt;br /&gt;
   mode when it is not in block mode. While it&#039;s unlikely our &amp;quot;padding-left: 0;&amp;quot;&lt;br /&gt;
   does anything wrong in inline (span) mode, we can&#039;t guarantee it forever.  */&lt;br /&gt;
div.crossreference {&lt;br /&gt;
    padding-left: 0;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Template:Crossreference&amp;diff=2389</id>
		<title>Template:Crossreference</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Template:Crossreference&amp;diff=2389"/>
		<updated>2026-01-18T08:32:40Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;templatestyles src=&amp;quot;Crossreference/styles.css&amp;quot; /&amp;gt;{{Hatnote inline&lt;br /&gt;
 |1={{{1|{{{text|{{{content|&amp;lt;noinclude&amp;gt;sample content&amp;lt;/noinclude&amp;gt;}}}}}}}}}&lt;br /&gt;
 |extraclasses=crossreference {{{class|{{{extraclasses|}}}}}}&lt;br /&gt;
 |selfref={{#if:{{{selfref|{{{printworthy|{{{unprintworthy|{{{pw|}}}}}}}}}}}}||yes}}&lt;br /&gt;
 |inline={{{inline|true}}}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{documentation}}&lt;br /&gt;
&amp;lt;!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Template:Crossref&amp;diff=2387</id>
		<title>Template:Crossref</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Template:Crossref&amp;diff=2387"/>
		<updated>2026-01-18T08:32:39Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Template:Crossreference]]&lt;br /&gt;
&lt;br /&gt;
{{Rcat shell|&lt;br /&gt;
{{R from template shortcut}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Module:WikidataIB&amp;diff=2385</id>
		<title>Module:WikidataIB</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Module:WikidataIB&amp;diff=2385"/>
		<updated>2026-01-18T08:32:39Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- Version: 2023-07-10&lt;br /&gt;
-- Module to implement use of a blacklist and whitelist for infobox fields&lt;br /&gt;
-- Can take a named parameter |qid which is the Wikidata ID for the article&lt;br /&gt;
-- if not supplied, it will use the Wikidata ID associated with the current page.&lt;br /&gt;
-- Fields in blacklist are never to be displayed, i.e. module must return nil in all circumstances&lt;br /&gt;
-- Fields in whitelist return local value if it exists or the Wikidata value otherwise&lt;br /&gt;
-- The name of the field that this function is called from is passed in named parameter |name&lt;br /&gt;
-- The name is compulsory when blacklist or whitelist is used,&lt;br /&gt;
-- so the module returns nil if it is not supplied.&lt;br /&gt;
-- blacklist is passed in named parameter |suppressfields (or |spf)&lt;br /&gt;
-- whitelist is passed in named parameter |fetchwikidata (or |fwd)&lt;br /&gt;
&lt;br /&gt;
require(&amp;quot;strict&amp;quot;)&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local cdate -- initialise as nil and only load _complex_date function if needed&lt;br /&gt;
-- Module:Complex date is loaded lazily and has the following dependencies:&lt;br /&gt;
-- Module:Calendar&lt;br /&gt;
-- Module:ISOdate&lt;br /&gt;
-- Module:DateI18n&lt;br /&gt;
-- Module:I18n/complex date&lt;br /&gt;
-- Module:Ordinal&lt;br /&gt;
-- Module:I18n/ordinal&lt;br /&gt;
-- Module:Yesno&lt;br /&gt;
-- Module:Formatnum&lt;br /&gt;
-- Module:Linguistic&lt;br /&gt;
--&lt;br /&gt;
-- The following, taken from https://www.mediawiki.org/wiki/Wikibase/DataModel#Dates_and_times,&lt;br /&gt;
-- is needed to use Module:Complex date which seemingly requires date precision as a string.&lt;br /&gt;
-- It would work better if only the authors of the mediawiki page could spell &#039;millennium&#039;.&lt;br /&gt;
local dp = {&lt;br /&gt;
	[6] = &amp;quot;millennium&amp;quot;,&lt;br /&gt;
	[7] = &amp;quot;century&amp;quot;,&lt;br /&gt;
	[8] = &amp;quot;decade&amp;quot;,&lt;br /&gt;
	[9] = &amp;quot;year&amp;quot;,&lt;br /&gt;
	[10] = &amp;quot;month&amp;quot;,&lt;br /&gt;
	[11] = &amp;quot;day&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local i18n =&lt;br /&gt;
{&lt;br /&gt;
	[&amp;quot;errors&amp;quot;] =&lt;br /&gt;
	{&lt;br /&gt;
		[&amp;quot;property-not-found&amp;quot;] = &amp;quot;Property not found.&amp;quot;,&lt;br /&gt;
		[&amp;quot;No property supplied&amp;quot;] = &amp;quot;No property supplied&amp;quot;,&lt;br /&gt;
		[&amp;quot;entity-not-found&amp;quot;] = &amp;quot;Wikidata entity not found.&amp;quot;,&lt;br /&gt;
		[&amp;quot;unknown-claim-type&amp;quot;] = &amp;quot;Unknown claim type.&amp;quot;,&lt;br /&gt;
		[&amp;quot;unknown-entity-type&amp;quot;] = &amp;quot;Unknown entity type.&amp;quot;,&lt;br /&gt;
		[&amp;quot;qualifier-not-found&amp;quot;] = &amp;quot;Qualifier not found.&amp;quot;,&lt;br /&gt;
		[&amp;quot;site-not-found&amp;quot;] = &amp;quot;Wikimedia project not found.&amp;quot;,&lt;br /&gt;
		[&amp;quot;labels-not-found&amp;quot;] = &amp;quot;No labels found.&amp;quot;,&lt;br /&gt;
		[&amp;quot;descriptions-not-found&amp;quot;] = &amp;quot;No descriptions found.&amp;quot;,&lt;br /&gt;
		[&amp;quot;aliases-not-found&amp;quot;] = &amp;quot;No aliases found.&amp;quot;,&lt;br /&gt;
		[&amp;quot;unknown-datetime-format&amp;quot;] = &amp;quot;Unknown datetime format.&amp;quot;,&lt;br /&gt;
		[&amp;quot;local-article-not-found&amp;quot;] = &amp;quot;Article is available on Wikidata, but not on Wikipedia&amp;quot;,&lt;br /&gt;
		[&amp;quot;dab-page&amp;quot;] = &amp;quot; (dab)&amp;quot;,&lt;br /&gt;
	},&lt;br /&gt;
	[&amp;quot;months&amp;quot;] =&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;January&amp;quot;, &amp;quot;February&amp;quot;, &amp;quot;March&amp;quot;, &amp;quot;April&amp;quot;, &amp;quot;May&amp;quot;, &amp;quot;June&amp;quot;,&lt;br /&gt;
		&amp;quot;July&amp;quot;, &amp;quot;August&amp;quot;, &amp;quot;September&amp;quot;, &amp;quot;October&amp;quot;, &amp;quot;November&amp;quot;, &amp;quot;December&amp;quot;&lt;br /&gt;
	},&lt;br /&gt;
	[&amp;quot;century&amp;quot;] = &amp;quot;century&amp;quot;,&lt;br /&gt;
	[&amp;quot;BC&amp;quot;] = &amp;quot;BC&amp;quot;,&lt;br /&gt;
	[&amp;quot;BCE&amp;quot;] = &amp;quot;BCE&amp;quot;,&lt;br /&gt;
	[&amp;quot;ordinal&amp;quot;] =&lt;br /&gt;
	{&lt;br /&gt;
		[1] = &amp;quot;st&amp;quot;,&lt;br /&gt;
		[2] = &amp;quot;nd&amp;quot;,&lt;br /&gt;
		[3] = &amp;quot;rd&amp;quot;,&lt;br /&gt;
		[&amp;quot;default&amp;quot;] = &amp;quot;th&amp;quot;&lt;br /&gt;
	},&lt;br /&gt;
	[&amp;quot;filespace&amp;quot;] = &amp;quot;File&amp;quot;,&lt;br /&gt;
	[&amp;quot;Unknown&amp;quot;] = &amp;quot;Unknown&amp;quot;,&lt;br /&gt;
	[&amp;quot;NaN&amp;quot;] = &amp;quot;Not a number&amp;quot;,&lt;br /&gt;
	-- set the following to the name of a tracking category,&lt;br /&gt;
	-- e.g. &amp;quot;[[Category:Articles with missing Wikidata information]]&amp;quot;, or &amp;quot;&amp;quot; to disable:&lt;br /&gt;
	[&amp;quot;missinginfocat&amp;quot;] = &amp;quot;[[Category:Articles with missing Wikidata information]]&amp;quot;,&lt;br /&gt;
	[&amp;quot;editonwikidata&amp;quot;] = &amp;quot;Edit this on Wikidata&amp;quot;,&lt;br /&gt;
	[&amp;quot;latestdatequalifier&amp;quot;] = function (date) return &amp;quot;before &amp;quot; .. date end,&lt;br /&gt;
	-- some languages, e.g. Bosnian use a period as a suffix after each number in a date&lt;br /&gt;
	[&amp;quot;datenumbersuffix&amp;quot;] = &amp;quot;&amp;quot;,&lt;br /&gt;
	[&amp;quot;list separator&amp;quot;] = &amp;quot;, &amp;quot;,&lt;br /&gt;
	[&amp;quot;multipliers&amp;quot;] = {&lt;br /&gt;
		[0]  = &amp;quot;&amp;quot;,&lt;br /&gt;
		[3]  = &amp;quot; thousand&amp;quot;,&lt;br /&gt;
		[6]  = &amp;quot; million&amp;quot;,&lt;br /&gt;
		[9]  = &amp;quot; billion&amp;quot;,&lt;br /&gt;
		[12] = &amp;quot; trillion&amp;quot;,&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
-- This allows an internationisation module to override the above table&lt;br /&gt;
if &#039;en&#039; ~= mw.getContentLanguage():getCode() then&lt;br /&gt;
	require(&amp;quot;Module:i18n&amp;quot;).loadI18n(&amp;quot;Module:WikidataIB/i18n&amp;quot;, i18n)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- This piece of html implements a collapsible container. Check the classes exist on your wiki.&lt;br /&gt;
local collapsediv = &#039;&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:100%; overflow:auto;&amp;quot; data-expandtext=&amp;quot;{{int:show}}&amp;quot; data-collapsetext=&amp;quot;{{int:hide}}&amp;quot;&amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
-- Some items should not be linked.&lt;br /&gt;
-- Each wiki can create a list of those in Module:WikidataIB/nolinks&lt;br /&gt;
-- It should return a table called itemsindex, containing true for each item not to be linked&lt;br /&gt;
local donotlink = {}&lt;br /&gt;
local nolinks_exists, nolinks = pcall(mw.loadData, &amp;quot;Module:WikidataIB/nolinks&amp;quot;)&lt;br /&gt;
if nolinks_exists then&lt;br /&gt;
	donotlink = nolinks.itemsindex&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- To satisfy Wikipedia:Manual of Style/Titles, certain types of items are italicised, and others are quoted.&lt;br /&gt;
-- The submodule [[Module:WikidataIB/titleformats]] lists the entity-ids used in &#039;instance of&#039; (P31),&lt;br /&gt;
-- which allows this module to identify the values that should be formatted.&lt;br /&gt;
-- WikidataIB/titleformats exports a table p.formats, which is indexed by entity-id, and contains the value &amp;quot; or &#039;&#039;&lt;br /&gt;
local formats = {}&lt;br /&gt;
local titleformats_exists, titleformats = pcall(mw.loadData, &amp;quot;Module:WikidataIB/titleformats&amp;quot;)&lt;br /&gt;
if titleformats_exists then&lt;br /&gt;
	formats = titleformats.formats&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Private functions&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
--&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- makeOrdinal needs to be internationalised along with the above:&lt;br /&gt;
-- takes cardinal number as a numeric and returns the ordinal as a string&lt;br /&gt;
-- we need three exceptions in English for 1st, 2nd, 3rd, 21st, .. 31st, etc.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local makeOrdinal = function(cardinal)&lt;br /&gt;
	local ordsuffix = i18n.ordinal.default&lt;br /&gt;
	if cardinal % 10 == 1 then&lt;br /&gt;
		ordsuffix = i18n.ordinal[1]&lt;br /&gt;
	elseif cardinal % 10 == 2 then&lt;br /&gt;
		ordsuffix = i18n.ordinal[2]&lt;br /&gt;
	elseif cardinal % 10 == 3 then&lt;br /&gt;
		ordsuffix = i18n.ordinal[3]&lt;br /&gt;
	end&lt;br /&gt;
	-- In English, 1, 21, 31, etc. use &#039;st&#039;, but 11, 111, etc. use &#039;th&#039;&lt;br /&gt;
	-- similarly for 12 and 13, etc.&lt;br /&gt;
	if (cardinal % 100 == 11) or (cardinal % 100 == 12) or (cardinal % 100 == 13) then&lt;br /&gt;
		ordsuffix = i18n.ordinal.default&lt;br /&gt;
	end&lt;br /&gt;
	return tostring(cardinal) .. ordsuffix&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- findLang takes a &amp;quot;langcode&amp;quot; parameter if supplied and valid&lt;br /&gt;
-- otherwise it tries to create it from the user&#039;s set language ({{int:lang}})&lt;br /&gt;
-- failing that it uses the wiki&#039;s content language.&lt;br /&gt;
-- It returns a language object&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local findLang = function(langcode)&lt;br /&gt;
	local langobj&lt;br /&gt;
	langcode = mw.text.trim(langcode or &amp;quot;&amp;quot;)&lt;br /&gt;
	if mw.language.isKnownLanguageTag(langcode) then&lt;br /&gt;
		langobj = mw.language.new( langcode )&lt;br /&gt;
	else&lt;br /&gt;
		langcode = mw.getCurrentFrame():callParserFunction(&#039;int&#039;, {&#039;lang&#039;})&lt;br /&gt;
		if mw.language.isKnownLanguageTag(langcode) then&lt;br /&gt;
			langobj = mw.language.new( langcode )&lt;br /&gt;
		else&lt;br /&gt;
			langobj = mw.language.getContentLanguage()&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return langobj&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- _getItemLangCode takes a qid parameter (using the current page&#039;s qid if blank)&lt;br /&gt;
-- If the item for that qid has property country (P17) it looks at the first preferred value&lt;br /&gt;
-- If the country has an official language (P37), it looks at the first preferred value&lt;br /&gt;
-- If that official language has a language code (P424), it returns the first preferred value&lt;br /&gt;
-- Otherwise it returns nothing.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local _getItemLangCode = function(qid)&lt;br /&gt;
	qid = mw.text.trim(qid or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	if qid == &amp;quot;&amp;quot; then qid = mw.wikibase.getEntityIdForCurrentPage() end&lt;br /&gt;
	if not qid then return end&lt;br /&gt;
	local prop17 = mw.wikibase.getBestStatements(qid, &amp;quot;P17&amp;quot;)[1]&lt;br /&gt;
	if not prop17 or prop17.mainsnak.snaktype ~= &amp;quot;value&amp;quot; then return end&lt;br /&gt;
	local qid17 = prop17.mainsnak.datavalue.value.id&lt;br /&gt;
	local prop37 = mw.wikibase.getBestStatements(qid17, &amp;quot;P37&amp;quot;)[1]&lt;br /&gt;
	if not prop37 or prop37.mainsnak.snaktype ~= &amp;quot;value&amp;quot; then return end&lt;br /&gt;
	local qid37 = prop37.mainsnak.datavalue.value.id&lt;br /&gt;
	local prop424 = mw.wikibase.getBestStatements(qid37, &amp;quot;P424&amp;quot;)[1]&lt;br /&gt;
	if not prop424 or prop424.mainsnak.snaktype ~= &amp;quot;value&amp;quot; then return end&lt;br /&gt;
	return prop424.mainsnak.datavalue.value&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- roundto takes a number (x)&lt;br /&gt;
-- and returns it rounded to (sf) significant figures&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local roundto = function(x, sf)&lt;br /&gt;
	if x == 0 then return 0 end&lt;br /&gt;
	local s = 1&lt;br /&gt;
	if x &amp;lt; 0 then&lt;br /&gt;
		x = -x&lt;br /&gt;
		s = -1&lt;br /&gt;
	end&lt;br /&gt;
	if sf &amp;lt; 1 then sf = 1 end&lt;br /&gt;
	local p = 10 ^ (math.floor(math.log10(x)) - sf + 1)&lt;br /&gt;
	x = math.floor(x / p + 0.5) * p * s&lt;br /&gt;
	-- if it&#039;s integral, cast to an integer:&lt;br /&gt;
	if x == math.floor(x) then x = math.floor(x) end&lt;br /&gt;
	return x&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- decimalToDMS takes a decimal degrees (x) with precision (p)&lt;br /&gt;
-- and returns degrees/minutes/seconds according to the precision&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local decimalToDMS = function(x, p)&lt;br /&gt;
	-- if p is not supplied, use a precision around 0.1 seconds&lt;br /&gt;
	if not tonumber(p) then p = 1e-4 end&lt;br /&gt;
	local d = math.floor(x)&lt;br /&gt;
	local ms = (x - d) * 60&lt;br /&gt;
	if p &amp;gt; 0.5 then -- precision is &amp;gt; 1/2 a degree&lt;br /&gt;
		if ms &amp;gt; 30 then d = d + 1 end&lt;br /&gt;
		ms = 0&lt;br /&gt;
	end&lt;br /&gt;
	local m = math.floor(ms)&lt;br /&gt;
	local s = (ms - m) * 60&lt;br /&gt;
	if p &amp;gt; 0.008 then -- precision is &amp;gt; 1/2 a minute&lt;br /&gt;
		if s &amp;gt; 30 then m = m +1 end&lt;br /&gt;
		s = 0&lt;br /&gt;
	elseif p &amp;gt; 0.00014 then -- precision is &amp;gt; 1/2 a second&lt;br /&gt;
		s = math.floor(s + 0.5)&lt;br /&gt;
	elseif p &amp;gt; 0.000014 then -- precision is &amp;gt; 1/20 second&lt;br /&gt;
		s = math.floor(10 * s + 0.5) / 10&lt;br /&gt;
	elseif p &amp;gt; 0.0000014 then -- precision is &amp;gt; 1/200 second&lt;br /&gt;
		s = math.floor(100 * s + 0.5) / 100&lt;br /&gt;
	else -- cap it at 3 dec places for now&lt;br /&gt;
		s = math.floor(1000 * s + 0.5) / 1000&lt;br /&gt;
	end&lt;br /&gt;
	return d, m, s&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- decimalPrecision takes a decimal (x) with precision (p)&lt;br /&gt;
-- and returns x rounded approximately to the given precision&lt;br /&gt;
-- precision should be between 1 and 1e-6, preferably a power of 10.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local decimalPrecision = function(x, p)&lt;br /&gt;
	local s = 1&lt;br /&gt;
	if x &amp;lt; 0 then&lt;br /&gt;
		x = -x&lt;br /&gt;
		s = -1&lt;br /&gt;
	end&lt;br /&gt;
	-- if p is not supplied, pick an arbitrary precision&lt;br /&gt;
	if not tonumber(p) then p = 1e-4&lt;br /&gt;
	elseif p &amp;gt; 1 then p = 1&lt;br /&gt;
	elseif p &amp;lt; 1e-6 then p = 1e-6&lt;br /&gt;
	else p = 10 ^ math.floor(math.log10(p))&lt;br /&gt;
	end&lt;br /&gt;
	x = math.floor(x / p + 0.5) * p * s&lt;br /&gt;
	-- if it&#039;s integral, cast to an integer:&lt;br /&gt;
	if  x == math.floor(x) then x = math.floor(x) end&lt;br /&gt;
	-- if it&#039;s less than 1e-4, it will be in exponent form, so return a string with 6dp&lt;br /&gt;
	-- 9e-5 becomes 0.000090&lt;br /&gt;
	if math.abs(x) &amp;lt; 1e-4 then x = string.format(&amp;quot;%f&amp;quot;, x) end&lt;br /&gt;
	return x&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- formatDate takes a datetime of the usual format from mw.wikibase.entity:formatPropertyValues&lt;br /&gt;
-- like &amp;quot;1 August 30 BCE&amp;quot; as parameter 1&lt;br /&gt;
-- and formats it according to the df (date format) and bc parameters&lt;br /&gt;
-- df = [&amp;quot;dmy&amp;quot; / &amp;quot;mdy&amp;quot; / &amp;quot;y&amp;quot;] default will be &amp;quot;dmy&amp;quot;&lt;br /&gt;
-- bc = [&amp;quot;BC&amp;quot; / &amp;quot;BCE&amp;quot;] default will be &amp;quot;BCE&amp;quot;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local format_Date = function(datetime, dateformat, bc)&lt;br /&gt;
	local datetime = datetime or &amp;quot;1 August 30 BCE&amp;quot; -- in case of nil value&lt;br /&gt;
	-- chop off multiple vales and/or any hours, mins, etc.&lt;br /&gt;
	-- keep anything before punctuation - we just want a single date:&lt;br /&gt;
	local dateval = string.match( datetime, &amp;quot;[%w ]+&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	local dateformat = string.lower(dateformat or &amp;quot;dmy&amp;quot;) -- default to dmy&lt;br /&gt;
&lt;br /&gt;
	local bc = string.upper(bc or &amp;quot;&amp;quot;) -- can&#039;t use nil for bc&lt;br /&gt;
	-- we only want to accept two possibilities: BC or default to BCE&lt;br /&gt;
	if bc == &amp;quot;BC&amp;quot; then&lt;br /&gt;
		bc = &amp;quot;&amp;amp;nbsp;&amp;quot; .. i18n[&amp;quot;BC&amp;quot;] -- prepend a non-breaking space.&lt;br /&gt;
	else&lt;br /&gt;
		bc = &amp;quot;&amp;amp;nbsp;&amp;quot; .. i18n[&amp;quot;BCE&amp;quot;]&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local postchrist = true -- start by assuming no BCE&lt;br /&gt;
	local dateparts = {}&lt;br /&gt;
	for word in string.gmatch(dateval, &amp;quot;%w+&amp;quot;) do&lt;br /&gt;
		if word == &amp;quot;BCE&amp;quot; or word == &amp;quot;BC&amp;quot; then -- *** internationalise later ***&lt;br /&gt;
			postchrist = false&lt;br /&gt;
		else&lt;br /&gt;
			-- we&#039;ll keep the parts that are not &#039;BCE&#039; in a table&lt;br /&gt;
			dateparts[#dateparts + 1] = word&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if postchrist then bc = &amp;quot;&amp;quot; end -- set AD dates to no suffix *** internationalise later ***&lt;br /&gt;
&lt;br /&gt;
	local sep = &amp;quot;&amp;amp;nbsp;&amp;quot; -- separator is nbsp&lt;br /&gt;
	local fdate = table.concat(dateparts, sep) -- set formatted date to same order as input&lt;br /&gt;
&lt;br /&gt;
	-- if we have day month year, check dateformat&lt;br /&gt;
	if #dateparts == 3 then&lt;br /&gt;
		if dateformat == &amp;quot;y&amp;quot; then&lt;br /&gt;
			fdate = dateparts[3]&lt;br /&gt;
		elseif dateformat == &amp;quot;mdy&amp;quot; then&lt;br /&gt;
			fdate = dateparts[2] .. sep .. dateparts[1] .. &amp;quot;,&amp;quot; .. sep .. dateparts[3]&lt;br /&gt;
		end&lt;br /&gt;
	elseif #dateparts == 2 and dateformat == &amp;quot;y&amp;quot; then&lt;br /&gt;
		fdate = dateparts[2]&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return fdate .. bc&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- dateFormat is the handler for properties that are of type &amp;quot;time&amp;quot;&lt;br /&gt;
-- It takes timestamp, precision (6 to 11 per mediawiki), dateformat (y/dmy/mdy), BC format (BC/BCE),&lt;br /&gt;
-- a plaindate switch (yes/no/adj) to en/disable &amp;quot;sourcing circumstances&amp;quot;/use adjectival form,&lt;br /&gt;
-- any qualifiers for the property, the language, and any adjective to use like &#039;before&#039;.&lt;br /&gt;
-- It passes the date through the &amp;quot;complex date&amp;quot; function&lt;br /&gt;
-- and returns a string with the internatonalised date formatted according to preferences.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: findLang(); cdate(); dp[]&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local dateFormat = function(timestamp, dprec, df, bcf, pd, qualifiers, lang, adj, model)&lt;br /&gt;
	-- output formatting according to preferences (y/dmy/mdy/ymd)&lt;br /&gt;
	df = (df or &amp;quot;&amp;quot;):lower()&lt;br /&gt;
	-- if ymd is required, return the part of the timestamp in YYYY-MM-DD form&lt;br /&gt;
	-- but apply Year zero#Astronomers fix: 1 BC = 0000; 2 BC = -0001; etc.&lt;br /&gt;
	if df == &amp;quot;ymd&amp;quot; then&lt;br /&gt;
		if timestamp:sub(1,1) == &amp;quot;+&amp;quot; then&lt;br /&gt;
			return timestamp:sub(2,11)&lt;br /&gt;
		else&lt;br /&gt;
			local yr = tonumber(timestamp:sub(2,5)) - 1&lt;br /&gt;
			yr = (&amp;quot;000&amp;quot; .. yr):sub(-4)&lt;br /&gt;
			if yr ~= &amp;quot;0000&amp;quot; then yr = &amp;quot;-&amp;quot; .. yr end&lt;br /&gt;
			return yr .. timestamp:sub(6,11)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- A year can be stored like this: &amp;quot;+1872-00-00T00:00:00Z&amp;quot;,&lt;br /&gt;
	-- which is processed here as if it were the day before &amp;quot;+1872-01-01T00:00:00Z&amp;quot;,&lt;br /&gt;
	-- and that&#039;s the last day of 1871, so the year is wrong.&lt;br /&gt;
	-- So fix the month 0, day 0 timestamp to become 1 January instead:&lt;br /&gt;
	timestamp = timestamp:gsub(&amp;quot;%-00%-00T&amp;quot;, &amp;quot;-01-01T&amp;quot;)&lt;br /&gt;
	-- just in case date precision is missing&lt;br /&gt;
	dprec = dprec or 11&lt;br /&gt;
	-- override more precise dates if required dateformat is year alone:&lt;br /&gt;
	if df == &amp;quot;y&amp;quot; and dprec &amp;gt; 9 then dprec = 9 end&lt;br /&gt;
	-- complex date only deals with precisions from 6 to 11, so clip range&lt;br /&gt;
	dprec = dprec&amp;gt;11 and 11 or dprec&lt;br /&gt;
	dprec = dprec&amp;lt;6 and 6 or dprec&lt;br /&gt;
	-- BC format is &amp;quot;BC&amp;quot; or &amp;quot;BCE&amp;quot;&lt;br /&gt;
	bcf = (bcf or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	-- plaindate only needs the first letter (y/n/a)&lt;br /&gt;
	pd = (pd or &amp;quot;&amp;quot;):sub(1,1):lower()&lt;br /&gt;
	if pd == &amp;quot;&amp;quot; or pd == &amp;quot;n&amp;quot; or pd == &amp;quot;f&amp;quot; or pd == &amp;quot;0&amp;quot; then pd = false end&lt;br /&gt;
	-- in case language isn&#039;t passed&lt;br /&gt;
	lang = lang or findLang().code&lt;br /&gt;
	-- set adj as empty if nil&lt;br /&gt;
	adj = adj or &amp;quot;&amp;quot;&lt;br /&gt;
	-- extract the day, month, year from the timestamp&lt;br /&gt;
	local bc = timestamp:sub(1, 1)==&amp;quot;-&amp;quot; and &amp;quot;BC&amp;quot; or &amp;quot;&amp;quot;&lt;br /&gt;
	local year, month, day = timestamp:match(&amp;quot;[+-](%d*)-(%d*)-(%d*)T&amp;quot;)&lt;br /&gt;
	local iso = tonumber(year) -- if year is missing, let it throw an error&lt;br /&gt;
	-- this will adjust the date format to be compatible with cdate&lt;br /&gt;
	-- possible formats are Y, YY, YYY0, YYYY, YYYY-MM, YYYY-MM-DD&lt;br /&gt;
	if dprec == 6 then iso = math.floor( (iso - 1) / 1000 ) + 1 end&lt;br /&gt;
	if dprec == 7 then iso = math.floor( (iso - 1) / 100 ) + 1 end&lt;br /&gt;
	if dprec == 8 then iso = math.floor( iso / 10 ) .. &amp;quot;0&amp;quot; end&lt;br /&gt;
	if dprec == 10 then iso = year .. &amp;quot;-&amp;quot; .. month end&lt;br /&gt;
	if dprec == 11 then iso = year .. &amp;quot;-&amp;quot; .. month .. &amp;quot;-&amp;quot; .. day end&lt;br /&gt;
	-- add &amp;quot;circa&amp;quot; (Q5727902) from &amp;quot;sourcing circumstances&amp;quot; (P1480)&lt;br /&gt;
	local sc = not pd and qualifiers and qualifiers.P1480&lt;br /&gt;
	if sc then&lt;br /&gt;
		for k1, v1 in pairs(sc) do&lt;br /&gt;
			if v1.datavalue and v1.datavalue.value.id == &amp;quot;Q5727902&amp;quot; then&lt;br /&gt;
				adj = &amp;quot;circa&amp;quot;&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- deal with Julian dates:&lt;br /&gt;
	-- no point in saying that dates before 1582 are Julian - they are by default&lt;br /&gt;
	-- doesn&#039;t make sense for dates less precise than year&lt;br /&gt;
	-- we can suppress it by setting |plaindate, e.g. for use in constructing categories.&lt;br /&gt;
	local calendarmodel = &amp;quot;&amp;quot;&lt;br /&gt;
	if tonumber(year) &amp;gt; 1582&lt;br /&gt;
		and dprec &amp;gt; 8&lt;br /&gt;
		and not pd&lt;br /&gt;
		and model == &amp;quot;http://www.wikidata.org/entity/Q1985786&amp;quot; then&lt;br /&gt;
		calendarmodel = &amp;quot;julian&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	if not cdate then&lt;br /&gt;
		cdate = require(&amp;quot;Module:Complex date&amp;quot;)._complex_date&lt;br /&gt;
	end&lt;br /&gt;
	local fdate = cdate(calendarmodel, adj, tostring(iso), dp[dprec], bc, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;, lang, 1)&lt;br /&gt;
	-- this may have QuickStatements info appended to it in a div, so remove that&lt;br /&gt;
	fdate = fdate:gsub(&#039; &amp;lt;div style=&amp;quot;display: none;&amp;quot;&amp;gt;[^&amp;lt;]*&amp;lt;/div&amp;gt;&#039;, &#039;&#039;)&lt;br /&gt;
	-- it may also be returned wrapped in a microformat, so remove that&lt;br /&gt;
	fdate = fdate:gsub(&amp;quot;&amp;lt;[^&amp;gt;]*&amp;gt;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
	-- there may be leading zeros that we should remove&lt;br /&gt;
	fdate = fdate:gsub(&amp;quot;^0*&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
	-- if a plain date is required, then remove any links (like BC linked)&lt;br /&gt;
	if pd then&lt;br /&gt;
		fdate = fdate:gsub(&amp;quot;%[%[.*|&amp;quot;, &amp;quot;&amp;quot;):gsub(&amp;quot;]]&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	-- if &#039;circa&#039;, use the abbreviated form *** internationalise later ***&lt;br /&gt;
	fdate = fdate:gsub(&#039;circa &#039;, &#039;&amp;lt;abbr title=&amp;quot;circa&amp;quot;&amp;gt;c.&amp;lt;/abbr&amp;gt;&amp;amp;nbsp;&#039;)&lt;br /&gt;
	-- deal with BC/BCE&lt;br /&gt;
	if bcf == &amp;quot;BCE&amp;quot; then&lt;br /&gt;
		fdate = fdate:gsub(&#039;BC&#039;, &#039;BCE&#039;)&lt;br /&gt;
	end&lt;br /&gt;
	-- deal with mdy format&lt;br /&gt;
	if df == &amp;quot;mdy&amp;quot; then&lt;br /&gt;
		fdate = fdate:gsub(&amp;quot;(%d+) (%w+) (%d+)&amp;quot;, &amp;quot;%2 %1, %3&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	-- deal with adjectival form *** internationalise later ***&lt;br /&gt;
	if pd == &amp;quot;a&amp;quot; then&lt;br /&gt;
		fdate = fdate:gsub(&#039; century&#039;, &#039;-century&#039;)&lt;br /&gt;
	end&lt;br /&gt;
	return fdate&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- parseParam takes a (string) parameter, e.g. from the list of frame arguments,&lt;br /&gt;
-- and makes &amp;quot;false&amp;quot;, &amp;quot;no&amp;quot;, and &amp;quot;0&amp;quot; into the (boolean) false&lt;br /&gt;
-- it makes the empty string and nil into the (boolean) value passed as default&lt;br /&gt;
-- allowing the parameter to be true or false by default.&lt;br /&gt;
-- It returns a boolean.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local parseParam = function(param, default)&lt;br /&gt;
	if type(param) == &amp;quot;boolean&amp;quot; then param = tostring(param) end&lt;br /&gt;
	if param and param ~= &amp;quot;&amp;quot; then&lt;br /&gt;
		param = param:lower()&lt;br /&gt;
		if (param == &amp;quot;false&amp;quot;) or (param:sub(1,1) == &amp;quot;n&amp;quot;) or (param == &amp;quot;0&amp;quot;) then&lt;br /&gt;
			return false&lt;br /&gt;
		else&lt;br /&gt;
			return true&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		return default&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- _getSitelink takes the qid of a Wikidata entity passed as |qid=&lt;br /&gt;
-- It takes an optional parameter |wiki= to determine which wiki is to be checked for a sitelink&lt;br /&gt;
-- If the parameter is blank, then it uses the local wiki.&lt;br /&gt;
-- If there is a sitelink to an article available, it returns the plain text link to the article&lt;br /&gt;
-- If there is no sitelink, it returns nil.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local _getSitelink = function(qid, wiki)&lt;br /&gt;
	qid = (qid or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	if qid == &amp;quot;&amp;quot; then qid = mw.wikibase.getEntityIdForCurrentPage() end&lt;br /&gt;
	if not qid then return nil end&lt;br /&gt;
	wiki = wiki or &amp;quot;&amp;quot;&lt;br /&gt;
	local sitelink&lt;br /&gt;
	if wiki == &amp;quot;&amp;quot; then&lt;br /&gt;
		sitelink = mw.wikibase.getSitelink(qid)&lt;br /&gt;
	else&lt;br /&gt;
		sitelink = mw.wikibase.getSitelink(qid, wiki)&lt;br /&gt;
	end&lt;br /&gt;
	return sitelink&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- _getCommonslink takes an optional qid of a Wikidata entity passed as |qid=&lt;br /&gt;
-- It returns one of the following in order of preference:&lt;br /&gt;
-- 	the Commons sitelink of the Wikidata entity - but not if onlycat=true and it&#039;s not a category;&lt;br /&gt;
-- 	the Commons sitelink of the topic&#039;s main category of the Wikidata entity;&lt;br /&gt;
-- 	the Commons category of the Wikidata entity - unless fallback=false.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: _getSitelink(); parseParam()&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local _getCommonslink = function(qid, onlycat, fallback)&lt;br /&gt;
	qid = (qid or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	if qid == &amp;quot;&amp;quot; then qid = mw.wikibase.getEntityIdForCurrentPage() end&lt;br /&gt;
	if not qid then return nil end&lt;br /&gt;
	onlycat = parseParam(onlycat, false)&lt;br /&gt;
	if fallback == &amp;quot;&amp;quot; then fallback = nil end&lt;br /&gt;
	local sitelink = _getSitelink(qid, &amp;quot;commonswiki&amp;quot;)&lt;br /&gt;
	if onlycat and sitelink and sitelink:sub(1,9) ~= &amp;quot;Category:&amp;quot; then sitelink = nil end&lt;br /&gt;
	if not sitelink then&lt;br /&gt;
		-- check for topic&#039;s main category&lt;br /&gt;
		local prop910 = mw.wikibase.getBestStatements(qid, &amp;quot;P910&amp;quot;)[1]&lt;br /&gt;
		if prop910 then&lt;br /&gt;
			local tmcid = prop910.mainsnak.datavalue and prop910.mainsnak.datavalue.value.id&lt;br /&gt;
			sitelink = _getSitelink(tmcid, &amp;quot;commonswiki&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
		if not sitelink then&lt;br /&gt;
			-- check for list&#039;s main category&lt;br /&gt;
			local prop1754 = mw.wikibase.getBestStatements(qid, &amp;quot;P1754&amp;quot;)[1]&lt;br /&gt;
			if prop1754 then&lt;br /&gt;
				local tmcid = prop1754.mainsnak.datavalue and prop1754.mainsnak.datavalue.value.id&lt;br /&gt;
				sitelink = _getSitelink(tmcid, &amp;quot;commonswiki&amp;quot;)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if not sitelink and fallback then&lt;br /&gt;
		-- check for Commons category (string value)&lt;br /&gt;
		local prop373 = mw.wikibase.getBestStatements(qid, &amp;quot;P373&amp;quot;)[1]&lt;br /&gt;
		if prop373 then&lt;br /&gt;
			sitelink = prop373.mainsnak.datavalue and prop373.mainsnak.datavalue.value&lt;br /&gt;
			if sitelink then sitelink = &amp;quot;Category:&amp;quot; .. sitelink end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return sitelink&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- The label in a Wikidata item is subject to vulnerabilities&lt;br /&gt;
-- that an attacker might try to exploit.&lt;br /&gt;
-- It needs to be &#039;sanitised&#039; by removing any wikitext before use.&lt;br /&gt;
-- If it doesn&#039;t exist, return the id for the item&lt;br /&gt;
-- a second (boolean) value is also returned, value is true when the label exists&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local labelOrId = function(id, lang)&lt;br /&gt;
	if lang == &amp;quot;default&amp;quot; then lang = findLang().code end&lt;br /&gt;
	local label&lt;br /&gt;
	if lang then&lt;br /&gt;
		label = mw.wikibase.getLabelByLang(id, lang)&lt;br /&gt;
	else&lt;br /&gt;
		label = mw.wikibase.getLabel(id)&lt;br /&gt;
	end&lt;br /&gt;
	if label then&lt;br /&gt;
		return mw.text.nowiki(label), true&lt;br /&gt;
	else&lt;br /&gt;
		return id, false&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- linkedItem takes an entity-id and returns a string, linked if possible.&lt;br /&gt;
-- This is the handler for &amp;quot;wikibase-item&amp;quot;. Preferences:&lt;br /&gt;
-- 1. Display linked disambiguated sitelink if it exists&lt;br /&gt;
-- 2. Display linked label if it is a redirect&lt;br /&gt;
-- 3. TBA: Display an inter-language link for the label if it exists other than in default language&lt;br /&gt;
-- 4. Display unlinked label if it exists&lt;br /&gt;
-- 5. Display entity-id for now to indicate a label could be provided&lt;br /&gt;
-- dtxt is text to be used instead of label, or nil.&lt;br /&gt;
-- shortname is boolean switch to use P1813 (short name) instead of label if true.&lt;br /&gt;
-- lang is the current language code.&lt;br /&gt;
-- uselbl is boolean switch to force display of the label instead of the sitelink (default: false)&lt;br /&gt;
-- linkredir is boolean switch to allow linking to a redirect (default: false)&lt;br /&gt;
-- formatvalue is boolean switch to allow formatting as italics or quoted (default: false)&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: labelOrId(); donotlink[]&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local linkedItem = function(id, args)&lt;br /&gt;
	local lprefix = (args.lp or args.lprefix or args.linkprefix or &amp;quot;&amp;quot;):gsub(&#039;&amp;quot;&#039;, &#039;&#039;) -- toughen against nil values passed&lt;br /&gt;
	local lpostfix = (args.lpostfix or &amp;quot;&amp;quot;):gsub(&#039;&amp;quot;&#039;, &#039;&#039;)&lt;br /&gt;
	local prefix = (args.prefix or &amp;quot;&amp;quot;):gsub(&#039;&amp;quot;&#039;, &#039;&#039;)&lt;br /&gt;
	local postfix = (args.postfix or &amp;quot;&amp;quot;):gsub(&#039;&amp;quot;&#039;, &#039;&#039;)&lt;br /&gt;
	local dtxt = args.dtxt&lt;br /&gt;
	local shortname = args.shortname or args.sn&lt;br /&gt;
	local lang = args.lang or &amp;quot;en&amp;quot; -- fallback to default if missing&lt;br /&gt;
	local uselbl = args.uselabel or args.uselbl&lt;br /&gt;
	uselbl = parseParam(uselbl, false)&lt;br /&gt;
	local linkredir = args.linkredir&lt;br /&gt;
	linkredir = parseParam(linkredir, false)&lt;br /&gt;
	local formatvalue = args.formatvalue or args.fv&lt;br /&gt;
	formatvalue = parseParam(formatvalue, false)&lt;br /&gt;
	-- see if item might need italics or quotes&lt;br /&gt;
	local fmt = &amp;quot;&amp;quot;&lt;br /&gt;
	if next(formats) and formatvalue then&lt;br /&gt;
		for k, v in ipairs( mw.wikibase.getBestStatements(id, &amp;quot;P31&amp;quot;) ) do&lt;br /&gt;
			if v.mainsnak.datavalue and formats[v.mainsnak.datavalue.value.id] then&lt;br /&gt;
				fmt = formats[v.mainsnak.datavalue.value.id]&lt;br /&gt;
				break -- pick the first match&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local disp&lt;br /&gt;
	local sitelink = mw.wikibase.getSitelink(id)&lt;br /&gt;
	local label, islabel&lt;br /&gt;
	if dtxt then&lt;br /&gt;
		label, islabel = dtxt, true&lt;br /&gt;
	elseif shortname then&lt;br /&gt;
		-- see if there is a shortname in our language, and set label to it&lt;br /&gt;
		for k, v in ipairs( mw.wikibase.getBestStatements(id, &amp;quot;P1813&amp;quot;) ) do&lt;br /&gt;
			if v.mainsnak.datavalue.value.language == lang then&lt;br /&gt;
				label, islabel = v.mainsnak.datavalue.value.text, true&lt;br /&gt;
				break&lt;br /&gt;
			end -- test for language match&lt;br /&gt;
		end -- loop through values of short name&lt;br /&gt;
		-- if we have no label set, then there was no shortname available&lt;br /&gt;
		if not islabel then&lt;br /&gt;
			label, islabel = labelOrId(id)&lt;br /&gt;
			shortname = false&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		label, islabel = labelOrId(id)&lt;br /&gt;
	end&lt;br /&gt;
	if mw.site.siteName ~= &amp;quot;Wikimedia Commons&amp;quot; then&lt;br /&gt;
		if sitelink then&lt;br /&gt;
			if not (dtxt or shortname) then&lt;br /&gt;
				-- if sitelink and label are the same except for case, no need to process further&lt;br /&gt;
				if sitelink:lower() ~= label:lower() then&lt;br /&gt;
					-- strip any namespace or dab from the sitelink&lt;br /&gt;
					local pos = sitelink:find(&amp;quot;:&amp;quot;) or 0&lt;br /&gt;
					local slink = sitelink&lt;br /&gt;
					if pos &amp;gt; 0 then&lt;br /&gt;
						local pfx = sitelink:sub(1,pos-1)&lt;br /&gt;
						if mw.site.namespaces[pfx] then -- that prefix is a valid namespace, so remove it&lt;br /&gt;
							slink = sitelink:sub(pos+1)&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
					-- remove stuff after commas or inside parentheses - ie. dabs&lt;br /&gt;
					slink = slink:gsub(&amp;quot;%s%(.+%)$&amp;quot;, &amp;quot;&amp;quot;):gsub(&amp;quot;,.+$&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
					-- if uselbl is false, use sitelink instead of label&lt;br /&gt;
					if not uselbl then&lt;br /&gt;
						--  use slink as display, preserving label case - find(&amp;quot;^%u&amp;quot;) is true for 1st char uppercase&lt;br /&gt;
						if label:find(&amp;quot;^%u&amp;quot;) then&lt;br /&gt;
							label = slink:gsub(&amp;quot;^(%l)&amp;quot;, string.upper)&lt;br /&gt;
						else&lt;br /&gt;
							label = slink:gsub(&amp;quot;^(%u)&amp;quot;, string.lower)&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			if donotlink[label] then&lt;br /&gt;
				disp = prefix .. fmt .. label .. fmt .. postfix&lt;br /&gt;
			else&lt;br /&gt;
				disp = &amp;quot;[[&amp;quot; .. lprefix .. sitelink .. lpostfix .. &amp;quot;|&amp;quot; .. prefix .. fmt .. label .. fmt .. postfix .. &amp;quot;]]&amp;quot;&lt;br /&gt;
			end&lt;br /&gt;
		elseif islabel then&lt;br /&gt;
			-- no sitelink, label exists, so check if a redirect with that title exists, if linkredir is true&lt;br /&gt;
			-- display plain label by default&lt;br /&gt;
			disp = prefix .. fmt .. label .. fmt .. postfix&lt;br /&gt;
			if linkredir then&lt;br /&gt;
				local artitle = mw.title.new(label, 0) -- only nil if label has invalid chars&lt;br /&gt;
				if not donotlink[label] and artitle and artitle.redirectTarget then&lt;br /&gt;
					-- there&#039;s a redirect with the same title as the label, so let&#039;s link to that&lt;br /&gt;
					disp = &amp;quot;[[&amp;quot;.. lprefix .. label .. lpostfix .. &amp;quot;|&amp;quot; .. prefix .. fmt .. label .. fmt .. postfix .. &amp;quot;]]&amp;quot;&lt;br /&gt;
				end&lt;br /&gt;
			end -- test if article title exists as redirect on current Wiki&lt;br /&gt;
		else&lt;br /&gt;
			-- no sitelink and no label, so return whatever was returned from labelOrId for now&lt;br /&gt;
			-- add tracking category [[Category:Articles with missing Wikidata information]]&lt;br /&gt;
			-- for enwiki, just return the tracking category&lt;br /&gt;
			if mw.wikibase.getGlobalSiteId() == &amp;quot;enwiki&amp;quot; then&lt;br /&gt;
				disp = i18n.missinginfocat&lt;br /&gt;
			else&lt;br /&gt;
				disp = prefix .. label .. postfix .. i18n.missinginfocat&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		local ccat = mw.wikibase.getBestStatements(id, &amp;quot;P373&amp;quot;)[1]&lt;br /&gt;
		if ccat and ccat.mainsnak.datavalue then&lt;br /&gt;
			ccat = ccat.mainsnak.datavalue.value&lt;br /&gt;
			disp = &amp;quot;[[&amp;quot; .. lprefix .. &amp;quot;Category:&amp;quot; .. ccat .. lpostfix .. &amp;quot;|&amp;quot; .. prefix .. label .. postfix .. &amp;quot;]]&amp;quot;&lt;br /&gt;
		elseif sitelink then&lt;br /&gt;
			-- this asumes that if a sitelink exists, then a label also exists&lt;br /&gt;
			disp = &amp;quot;[[&amp;quot; .. lprefix .. sitelink .. lpostfix .. &amp;quot;|&amp;quot; .. prefix .. label .. postfix .. &amp;quot;]]&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			-- no sitelink and no Commons cat, so return label from labelOrId for now&lt;br /&gt;
			disp = prefix .. label .. postfix&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return disp&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- sourced takes a table representing a statement that may or may not have references&lt;br /&gt;
-- it looks for a reference sourced to something not containing the word &amp;quot;wikipedia&amp;quot;&lt;br /&gt;
-- it returns a boolean = true if it finds a sourced reference.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local sourced = function(claim)&lt;br /&gt;
	if claim.references then&lt;br /&gt;
		for kr, vr in pairs(claim.references) do&lt;br /&gt;
			local ref = mw.wikibase.renderSnaks(vr.snaks)&lt;br /&gt;
			if not ref:find(&amp;quot;Wiki&amp;quot;) then&lt;br /&gt;
				return true&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- setRanks takes a flag (parameter passed) that requests the values to return&lt;br /&gt;
-- &amp;quot;b[est]&amp;quot; returns preferred if available, otherwise normal&lt;br /&gt;
-- &amp;quot;p[referred]&amp;quot; returns preferred&lt;br /&gt;
-- &amp;quot;n[ormal]&amp;quot; returns normal&lt;br /&gt;
-- &amp;quot;d[eprecated]&amp;quot; returns deprecated&lt;br /&gt;
-- multiple values are allowed, e.g. &amp;quot;preferred normal&amp;quot; (which is the default)&lt;br /&gt;
-- &amp;quot;best&amp;quot; will override the other flags, and set p and n&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local setRanks = function(rank)&lt;br /&gt;
	rank = (rank or &amp;quot;&amp;quot;):lower()&lt;br /&gt;
	-- if nothing passed, return preferred and normal&lt;br /&gt;
	-- if rank == &amp;quot;&amp;quot; then rank = &amp;quot;p n&amp;quot; end&lt;br /&gt;
	local ranks = {}&lt;br /&gt;
	for w in string.gmatch(rank, &amp;quot;%a+&amp;quot;) do&lt;br /&gt;
		w = w:sub(1,1)&lt;br /&gt;
		if w == &amp;quot;b&amp;quot; or w == &amp;quot;p&amp;quot; or w == &amp;quot;n&amp;quot; or w == &amp;quot;d&amp;quot; then&lt;br /&gt;
			ranks[w] = true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- check if &amp;quot;best&amp;quot; is requested or no ranks requested; and if so, set preferred and normal&lt;br /&gt;
	if ranks.b or not next(ranks) then&lt;br /&gt;
		ranks.p = true&lt;br /&gt;
		ranks.n = true&lt;br /&gt;
	end&lt;br /&gt;
	return ranks&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- parseInput processes the Q-id , the blacklist and the whitelist&lt;br /&gt;
-- if an input parameter is supplied, it returns that and ends the call.&lt;br /&gt;
-- it returns (1) either the qid or nil indicating whether or not the call should continue&lt;br /&gt;
-- and (2) a table containing all of the statements for the propertyID and relevant Qid&lt;br /&gt;
-- if &amp;quot;best&amp;quot; ranks are requested, it returns those instead of all non-deprecated ranks&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local parseInput = function(frame, input_parm, property_id)&lt;br /&gt;
	-- There may be a local parameter supplied, if it&#039;s blank, set it to nil&lt;br /&gt;
	input_parm = mw.text.trim(input_parm or &amp;quot;&amp;quot;)&lt;br /&gt;
	if input_parm == &amp;quot;&amp;quot; then input_parm = nil end&lt;br /&gt;
&lt;br /&gt;
	-- return nil if Wikidata is not available&lt;br /&gt;
	if not mw.wikibase then return false, input_parm end&lt;br /&gt;
&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
&lt;br /&gt;
	-- can take a named parameter |qid which is the Wikidata ID for the article.&lt;br /&gt;
	-- if it&#039;s not supplied, use the id for the current page&lt;br /&gt;
	local qid = args.qid or &amp;quot;&amp;quot;&lt;br /&gt;
	if qid == &amp;quot;&amp;quot; then qid = mw.wikibase.getEntityIdForCurrentPage() end&lt;br /&gt;
	-- if there&#039;s no Wikidata item for the current page return nil&lt;br /&gt;
	if not qid then return false, input_parm end&lt;br /&gt;
&lt;br /&gt;
	-- The blacklist is passed in named parameter |suppressfields&lt;br /&gt;
	local blacklist = args.suppressfields or args.spf or &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	-- The whitelist is passed in named parameter |fetchwikidata&lt;br /&gt;
	local whitelist = args.fetchwikidata or args.fwd or &amp;quot;&amp;quot;&lt;br /&gt;
	if whitelist == &amp;quot;&amp;quot; then whitelist = &amp;quot;NONE&amp;quot; end&lt;br /&gt;
&lt;br /&gt;
	-- The name of the field that this function is called from is passed in named parameter |name&lt;br /&gt;
	local fieldname = args.name or &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	if blacklist ~= &amp;quot;&amp;quot; then&lt;br /&gt;
		-- The name is compulsory when blacklist is used, so return nil if it is not supplied&lt;br /&gt;
		if fieldname == &amp;quot;&amp;quot; then return false, nil end&lt;br /&gt;
		-- If this field is on the blacklist, then return nil&lt;br /&gt;
		if blacklist:find(fieldname) then return false, nil end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- If we got this far then we&#039;re not on the blacklist&lt;br /&gt;
	-- The blacklist overrides any locally supplied parameter as well&lt;br /&gt;
	-- If a non-blank input parameter was supplied return it&lt;br /&gt;
	if input_parm then return false, input_parm end&lt;br /&gt;
&lt;br /&gt;
	-- We can filter out non-valid properties&lt;br /&gt;
	if property_id:sub(1,1):upper() ~=&amp;quot;P&amp;quot; or property_id == &amp;quot;P0&amp;quot; then return false, nil end&lt;br /&gt;
&lt;br /&gt;
	-- Otherwise see if this field is on the whitelist:&lt;br /&gt;
	-- needs a bit more logic because find will return its second value = 0 if fieldname is &amp;quot;&amp;quot;&lt;br /&gt;
	-- but nil if fieldname not found on whitelist&lt;br /&gt;
	local _, found = whitelist:find(fieldname)&lt;br /&gt;
	found = ((found or 0) &amp;gt; 0)&lt;br /&gt;
	if whitelist ~= &#039;ALL&#039; and (whitelist:upper() == &amp;quot;NONE&amp;quot; or not found) then&lt;br /&gt;
		return false, nil&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- See what&#039;s on Wikidata (the call always returns a table, but it may be empty):&lt;br /&gt;
	local props = {}&lt;br /&gt;
	if args.reqranks.b then&lt;br /&gt;
		props = mw.wikibase.getBestStatements(qid, property_id)&lt;br /&gt;
	else&lt;br /&gt;
		props = mw.wikibase.getAllStatements(qid, property_id)&lt;br /&gt;
	end&lt;br /&gt;
	if props[1] then&lt;br /&gt;
		return qid, props&lt;br /&gt;
	end&lt;br /&gt;
	-- no property on Wikidata&lt;br /&gt;
	return false, nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- createicon assembles the &amp;quot;Edit at Wikidata&amp;quot; pen icon.&lt;br /&gt;
-- It returns a wikitext string inside a span class=&amp;quot;penicon&amp;quot;&lt;br /&gt;
-- if entityID is nil or empty, the ID associated with current page is used&lt;br /&gt;
-- langcode and propertyID may be nil or empty&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: i18n[];&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local createicon = function(langcode, entityID, propertyID)&lt;br /&gt;
	langcode = langcode or &amp;quot;&amp;quot;&lt;br /&gt;
	if not entityID or entityID == &amp;quot;&amp;quot; then entityID= mw.wikibase.getEntityIdForCurrentPage() end&lt;br /&gt;
	propertyID = propertyID or &amp;quot;&amp;quot;&lt;br /&gt;
	local icon = &amp;quot;&amp;amp;nbsp;&amp;lt;span class=&#039;penicon autoconfirmed-show&#039;&amp;gt;[[&amp;quot;&lt;br /&gt;
	-- &amp;quot;&amp;amp;nbsp;&amp;lt;span data-bridge-edit-flow=&#039;overwrite&#039; class=&#039;penicon&#039;&amp;gt;[[&amp;quot; -&amp;gt; enable Wikidata Bridge&lt;br /&gt;
	.. i18n[&amp;quot;filespace&amp;quot;]&lt;br /&gt;
	.. &amp;quot;:OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=&amp;quot;&lt;br /&gt;
	.. i18n[&amp;quot;editonwikidata&amp;quot;]&lt;br /&gt;
	.. &amp;quot;|link=https://www.wikidata.org/wiki/&amp;quot; .. entityID&lt;br /&gt;
	if langcode ~= &amp;quot;&amp;quot; then icon = icon .. &amp;quot;?uselang=&amp;quot; .. langcode end&lt;br /&gt;
	if propertyID ~= &amp;quot;&amp;quot; then icon = icon .. &amp;quot;#&amp;quot; .. propertyID end&lt;br /&gt;
	icon = icon .. &amp;quot;|&amp;quot; .. i18n[&amp;quot;editonwikidata&amp;quot;] .. &amp;quot;]]&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
	return icon&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- assembleoutput takes the sequence table containing the property values&lt;br /&gt;
-- and formats it according to switches given. It returns a string or nil.&lt;br /&gt;
-- It uses the entityID (and optionally propertyID) to create a link in the pen icon.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: parseParam();&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local assembleoutput = function(out, args, entityID, propertyID)&lt;br /&gt;
&lt;br /&gt;
	-- sorted is a boolean passed to enable sorting of the values returned&lt;br /&gt;
	-- if nothing or an empty string is passed set it false&lt;br /&gt;
	-- if &amp;quot;false&amp;quot; or &amp;quot;no&amp;quot; or &amp;quot;0&amp;quot; is passed set it false&lt;br /&gt;
	local sorted = parseParam(args.sorted, false)&lt;br /&gt;
&lt;br /&gt;
	-- noicon is a boolean passed to suppress the trailing &amp;quot;edit at Wikidata&amp;quot; icon&lt;br /&gt;
	-- for use when the value is processed further by the infobox&lt;br /&gt;
	-- if nothing or an empty string is passed set it false&lt;br /&gt;
	-- if &amp;quot;false&amp;quot; or &amp;quot;no&amp;quot; or &amp;quot;0&amp;quot; is passed set it false&lt;br /&gt;
	local noic = parseParam(args.noicon, false)&lt;br /&gt;
&lt;br /&gt;
	-- list is the name of a template that a list of multiple values is passed through&lt;br /&gt;
	-- examples include &amp;quot;hlist&amp;quot; and &amp;quot;ubl&amp;quot;&lt;br /&gt;
	-- setting it to &amp;quot;prose&amp;quot; produces something like &amp;quot;1, 2, 3, and 4&amp;quot;&lt;br /&gt;
	local list = args.list or &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	-- sep is a string that is used to separate multiple returned values&lt;br /&gt;
	-- if nothing or an empty string is passed set it to the default&lt;br /&gt;
	-- any double-quotes &amp;quot; are stripped out, so that spaces may be passed&lt;br /&gt;
	-- e.g. |sep=&amp;quot; - &amp;quot;&lt;br /&gt;
	local sepdefault = i18n[&amp;quot;list separator&amp;quot;]&lt;br /&gt;
	local separator = args.sep or &amp;quot;&amp;quot;&lt;br /&gt;
	separator = string.gsub(separator, &#039;&amp;quot;&#039;, &#039;&#039;)&lt;br /&gt;
	if separator == &amp;quot;&amp;quot; then&lt;br /&gt;
		separator = sepdefault&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- collapse is a number that determines the maximum number of returned values&lt;br /&gt;
	-- before the output is collapsed.&lt;br /&gt;
	-- Zero or not a number result in no collapsing (default becomes 0).&lt;br /&gt;
	local collapse = tonumber(args.collapse) or 0&lt;br /&gt;
&lt;br /&gt;
	-- replacetext (rt) is a string that is returned instead of any non-empty Wikidata value&lt;br /&gt;
	-- this is useful for tracking and debugging&lt;br /&gt;
	local replacetext = mw.text.trim(args.rt or args.replacetext or &amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	-- if there&#039;s anything to return, then return a list&lt;br /&gt;
	-- comma-separated by default, but may be specified by the sep parameter&lt;br /&gt;
	-- optionally specify a hlist or ubl or a prose list, etc.&lt;br /&gt;
	local strout&lt;br /&gt;
	if #out &amp;gt; 0 then&lt;br /&gt;
		if sorted then table.sort(out) end&lt;br /&gt;
		-- if there&#039;s something to display and a pen icon is wanted, add it the end of the last value&lt;br /&gt;
		local hasdisplay = false&lt;br /&gt;
		for i, v in ipairs(out) do&lt;br /&gt;
			if v ~= i18n.missinginfocat then&lt;br /&gt;
				hasdisplay = true&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if not noic and hasdisplay then&lt;br /&gt;
			out[#out] = out[#out] .. createicon(args.langobj.code, entityID, propertyID)&lt;br /&gt;
		end&lt;br /&gt;
		if list == &amp;quot;&amp;quot; then&lt;br /&gt;
			strout = table.concat(out, separator)&lt;br /&gt;
		elseif list:lower() == &amp;quot;prose&amp;quot; then&lt;br /&gt;
			strout = mw.text.listToText( out )&lt;br /&gt;
		else&lt;br /&gt;
			strout = mw.getCurrentFrame():expandTemplate{title = list, args = out}&lt;br /&gt;
		end&lt;br /&gt;
		if collapse &amp;gt;0 and #out &amp;gt; collapse then&lt;br /&gt;
			strout = collapsediv .. strout .. &amp;quot;&amp;lt;/div&amp;gt;&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		strout = nil -- no items had valid reference&lt;br /&gt;
	end&lt;br /&gt;
	if replacetext ~= &amp;quot;&amp;quot; and strout then strout = replacetext end&lt;br /&gt;
	return strout&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- rendersnak takes a table (propval) containing the information stored on one property value&lt;br /&gt;
-- and returns the value as a string and its language if monolingual text.&lt;br /&gt;
-- It handles data of type:&lt;br /&gt;
--		wikibase-item&lt;br /&gt;
--		time&lt;br /&gt;
--		string, url, commonsMedia, external-id&lt;br /&gt;
--		quantity&lt;br /&gt;
--		globe-coordinate&lt;br /&gt;
--		monolingualtext&lt;br /&gt;
-- It also requires linked, the link/pre/postfixes, uabbr, and the arguments passed from frame.&lt;br /&gt;
-- The optional filter parameter allows quantities to be be filtered by unit Qid.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: parseParam(); labelOrId(); i18n[]; dateFormat();&lt;br /&gt;
-- roundto(); decimalPrecision(); decimalToDMS(); linkedItem();&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local rendersnak = function(propval, args, linked, lpre, lpost, pre, post, uabbr, filter)&lt;br /&gt;
	lpre = lpre or &amp;quot;&amp;quot;&lt;br /&gt;
	lpost = lpost or &amp;quot;&amp;quot;&lt;br /&gt;
	pre = pre or &amp;quot;&amp;quot;&lt;br /&gt;
	post = post or &amp;quot;&amp;quot;&lt;br /&gt;
	args.lang = args.lang or findLang().code&lt;br /&gt;
	-- allow values to display a fixed text instead of label&lt;br /&gt;
	local dtxt = args.displaytext or args.dt&lt;br /&gt;
	if dtxt == &amp;quot;&amp;quot; then dtxt = nil end&lt;br /&gt;
	-- switch to use display of short name (P1813) instead of label&lt;br /&gt;
	local shortname = args.shortname or args.sn&lt;br /&gt;
	shortname = parseParam(shortname, false)&lt;br /&gt;
	local snak = propval.mainsnak or propval&lt;br /&gt;
	local dtype = snak.datatype&lt;br /&gt;
	local dv = snak.datavalue&lt;br /&gt;
	dv = dv and dv.value&lt;br /&gt;
	-- value and monolingual text language code returned&lt;br /&gt;
	local val, mlt&lt;br /&gt;
	if propval.rank and not args.reqranks[propval.rank:sub(1, 1)] then&lt;br /&gt;
		-- val is nil: value has a rank that isn&#039;t requested&lt;br /&gt;
		------------------------------------&lt;br /&gt;
	elseif snak.snaktype == &amp;quot;somevalue&amp;quot; then -- value is unknown&lt;br /&gt;
		val = i18n[&amp;quot;Unknown&amp;quot;]&lt;br /&gt;
		------------------------------------&lt;br /&gt;
	elseif snak.snaktype == &amp;quot;novalue&amp;quot; then -- value is none&lt;br /&gt;
		-- val = &amp;quot;No value&amp;quot; -- don&#039;t return anything&lt;br /&gt;
		------------------------------------&lt;br /&gt;
	elseif dtype == &amp;quot;wikibase-item&amp;quot; then -- data type is a wikibase item:&lt;br /&gt;
		-- it&#039;s wiki-linked value, so output as link if enabled and possible&lt;br /&gt;
		local qnumber = dv.id&lt;br /&gt;
		if linked then&lt;br /&gt;
			val = linkedItem(qnumber, args)&lt;br /&gt;
		else -- no link wanted so check for display-text, otherwise test for lang code&lt;br /&gt;
			local label, islabel&lt;br /&gt;
			if dtxt then&lt;br /&gt;
				label = dtxt&lt;br /&gt;
			else&lt;br /&gt;
				label, islabel = labelOrId(qnumber)&lt;br /&gt;
				local langlabel = mw.wikibase.getLabelByLang(qnumber, args.lang)&lt;br /&gt;
				if langlabel then&lt;br /&gt;
					label = mw.text.nowiki( langlabel )&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			val = pre .. label .. post&lt;br /&gt;
		end -- test for link required&lt;br /&gt;
		------------------------------------&lt;br /&gt;
	elseif dtype == &amp;quot;time&amp;quot; then -- data type is time:&lt;br /&gt;
		-- time is in timestamp format&lt;br /&gt;
		-- date precision is integer per mediawiki&lt;br /&gt;
		-- output formatting according to preferences (y/dmy/mdy)&lt;br /&gt;
		-- BC format as BC or BCE&lt;br /&gt;
		-- plaindate is passed to disable looking for &amp;quot;sourcing cirumstances&amp;quot;&lt;br /&gt;
		-- or to set the adjectival form&lt;br /&gt;
		-- qualifiers (if any) is a nested table or nil&lt;br /&gt;
		-- lang is given, or user language, or site language&lt;br /&gt;
		--&lt;br /&gt;
		-- Here we can check whether args.df has a value&lt;br /&gt;
		-- If not, use code from Module:Sandbox/RexxS/Getdateformat to set it from templates like {{Use mdy dates}}&lt;br /&gt;
		val = dateFormat(dv.time, dv.precision, args.df, args.bc, args.pd, propval.qualifiers, args.lang, &amp;quot;&amp;quot;, dv.calendarmodel)&lt;br /&gt;
		------------------------------------&lt;br /&gt;
	-- data types which are strings:&lt;br /&gt;
	elseif dtype == &amp;quot;commonsMedia&amp;quot; or dtype == &amp;quot;external-id&amp;quot; or dtype == &amp;quot;string&amp;quot; or dtype == &amp;quot;url&amp;quot; then&lt;br /&gt;
		-- commonsMedia or external-id or string or url&lt;br /&gt;
		-- all have mainsnak.datavalue.value as string&lt;br /&gt;
		if (lpre == &amp;quot;&amp;quot; or lpre == &amp;quot;:&amp;quot;) and lpost == &amp;quot;&amp;quot; then&lt;br /&gt;
			-- don&#039;t link if no linkpre/postfix or linkprefix is just &amp;quot;:&amp;quot;&lt;br /&gt;
			val = pre .. dv .. post&lt;br /&gt;
		elseif dtype == &amp;quot;external-id&amp;quot; then&lt;br /&gt;
			val = &amp;quot;[&amp;quot; .. lpre .. dv .. lpost .. &amp;quot; &amp;quot; .. pre .. dv .. post .. &amp;quot;]&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			val = &amp;quot;[[&amp;quot; .. lpre .. dv .. lpost .. &amp;quot;|&amp;quot; .. pre .. dv .. post .. &amp;quot;]]&amp;quot;&lt;br /&gt;
		end -- check for link requested (i.e. either linkprefix or linkpostfix exists)&lt;br /&gt;
		------------------------------------&lt;br /&gt;
	-- data types which are quantities:&lt;br /&gt;
	elseif dtype == &amp;quot;quantity&amp;quot; then&lt;br /&gt;
		-- quantities have mainsnak.datavalue.value.amount and mainsnak.datavalue.value.unit&lt;br /&gt;
		-- the unit is of the form http://www.wikidata.org/entity/Q829073&lt;br /&gt;
		--&lt;br /&gt;
		-- implement a switch to turn on/off numerical formatting later&lt;br /&gt;
		local fnum = true&lt;br /&gt;
		--&lt;br /&gt;
		-- a switch to turn on/off conversions - only for en-wiki&lt;br /&gt;
		local conv = parseParam(args.conv or args.convert, false)&lt;br /&gt;
		-- if we have conversions, we won&#039;t have formatted numbers or scales&lt;br /&gt;
		if conv then&lt;br /&gt;
			uabbr = true&lt;br /&gt;
			fnum = false&lt;br /&gt;
			args.scale = &amp;quot;0&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
		--&lt;br /&gt;
		-- a switch to turn on/off showing units, default is true&lt;br /&gt;
		local showunits = parseParam(args.su or args.showunits, true)&lt;br /&gt;
		--&lt;br /&gt;
		-- convert amount to a number&lt;br /&gt;
		local amount = tonumber(dv.amount) or i18n[&amp;quot;NaN&amp;quot;]&lt;br /&gt;
		--&lt;br /&gt;
		-- scale factor for millions, billions, etc.&lt;br /&gt;
		local sc = tostring(args.scale or &amp;quot;&amp;quot;):sub(1,1):lower()&lt;br /&gt;
		local scale&lt;br /&gt;
		if sc == &amp;quot;a&amp;quot; then&lt;br /&gt;
			-- automatic scaling&lt;br /&gt;
			if amount &amp;gt; 1e15 then&lt;br /&gt;
				scale = 12&lt;br /&gt;
			elseif amount &amp;gt; 1e12 then&lt;br /&gt;
				scale = 9&lt;br /&gt;
			elseif amount &amp;gt; 1e9 then&lt;br /&gt;
				scale = 6&lt;br /&gt;
			elseif amount &amp;gt; 1e6 then&lt;br /&gt;
				scale = 3&lt;br /&gt;
			else&lt;br /&gt;
				scale = 0&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			scale = tonumber(args.scale) or 0&lt;br /&gt;
			if scale &amp;lt; 0 or scale &amp;gt; 12 then scale = 0 end&lt;br /&gt;
			scale = math.floor(scale/3) * 3&lt;br /&gt;
		end&lt;br /&gt;
		local factor = 10^scale&lt;br /&gt;
		amount = amount / factor&lt;br /&gt;
		-- ranges:&lt;br /&gt;
		local range = &amp;quot;&amp;quot;&lt;br /&gt;
		-- check if upper and/or lower bounds are given and significant&lt;br /&gt;
		local upb = tonumber(dv.upperBound)&lt;br /&gt;
		local lowb = tonumber(dv.lowerBound)&lt;br /&gt;
		if upb and lowb then&lt;br /&gt;
			-- differences rounded to 2 sig fig:&lt;br /&gt;
			local posdif = roundto(upb - amount, 2) / factor&lt;br /&gt;
			local negdif = roundto(amount - lowb, 2) / factor&lt;br /&gt;
			upb, lowb = amount + posdif, amount - negdif&lt;br /&gt;
			-- round scaled numbers to integers or 4 sig fig&lt;br /&gt;
			if (scale &amp;gt; 0 or sc == &amp;quot;a&amp;quot;) then&lt;br /&gt;
				if amount &amp;lt; 1e4 then&lt;br /&gt;
					amount = roundto(amount, 4)&lt;br /&gt;
				else&lt;br /&gt;
					amount = math.floor(amount + 0.5)&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			if fnum then amount = args.langobj:formatNum( amount ) end&lt;br /&gt;
			if posdif ~= negdif then&lt;br /&gt;
				-- non-symmetrical&lt;br /&gt;
				range = &amp;quot; +&amp;quot; .. posdif .. &amp;quot; -&amp;quot; .. negdif&lt;br /&gt;
			elseif posdif ~= 0 then&lt;br /&gt;
				-- symmetrical and non-zero&lt;br /&gt;
				range = &amp;quot; ±&amp;quot; .. posdif&lt;br /&gt;
			else&lt;br /&gt;
				-- otherwise range is zero, so leave it as &amp;quot;&amp;quot;&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			-- round scaled numbers to integers or 4 sig fig&lt;br /&gt;
			if (scale &amp;gt; 0 or sc == &amp;quot;a&amp;quot;) then&lt;br /&gt;
				if amount &amp;lt; 1e4 then&lt;br /&gt;
					amount = roundto(amount, 4)&lt;br /&gt;
				else&lt;br /&gt;
					amount = math.floor(amount + 0.5)&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			if fnum then amount = args.langobj:formatNum( amount ) end&lt;br /&gt;
		end&lt;br /&gt;
		-- unit names and symbols:&lt;br /&gt;
		-- extract the qid in the form &#039;Qnnn&#039; from the value.unit url&lt;br /&gt;
		-- and then fetch the label from that - or symbol if unitabbr is true&lt;br /&gt;
		local unit = &amp;quot;&amp;quot;&lt;br /&gt;
		local usep = &amp;quot;&amp;quot;&lt;br /&gt;
		local usym = &amp;quot;&amp;quot;&lt;br /&gt;
		local unitqid = string.match( dv.unit, &amp;quot;(Q%d+)&amp;quot; )&lt;br /&gt;
		if filter and unitqid ~= filter then return nil end&lt;br /&gt;
		if unitqid and showunits then&lt;br /&gt;
			local uname = mw.wikibase.getLabelByLang(unitqid, args.lang) or &amp;quot;&amp;quot;&lt;br /&gt;
			if uname ~= &amp;quot;&amp;quot; then usep, unit = &amp;quot; &amp;quot;, uname end&lt;br /&gt;
			if uabbr then&lt;br /&gt;
				-- see if there&#039;s a unit symbol (P5061)&lt;br /&gt;
				local unitsymbols = mw.wikibase.getBestStatements(unitqid, &amp;quot;P5061&amp;quot;)&lt;br /&gt;
				-- construct fallback table, add local lang and multiple languages&lt;br /&gt;
				local fbtbl = mw.language.getFallbacksFor( args.lang )&lt;br /&gt;
				table.insert( fbtbl, 1, args.lang )&lt;br /&gt;
				table.insert( fbtbl, 1, &amp;quot;mul&amp;quot; )&lt;br /&gt;
				local found = false&lt;br /&gt;
				for idx1, us in ipairs(unitsymbols) do&lt;br /&gt;
					for idx2, fblang in ipairs(fbtbl) do&lt;br /&gt;
						if us.mainsnak.datavalue.value.language == fblang then&lt;br /&gt;
							usym = us.mainsnak.datavalue.value.text&lt;br /&gt;
							found = true&lt;br /&gt;
							break&lt;br /&gt;
						end&lt;br /&gt;
					if found then break end&lt;br /&gt;
					end -- loop through fallback table&lt;br /&gt;
				end -- loop through values of P5061&lt;br /&gt;
				if found then usep, unit = &amp;quot;&amp;amp;nbsp;&amp;quot;, usym end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		-- format display:&lt;br /&gt;
		if conv then&lt;br /&gt;
			if range == &amp;quot;&amp;quot; then&lt;br /&gt;
				val = mw.getCurrentFrame():expandTemplate{title = &amp;quot;cvt&amp;quot;, args = {amount, unit}}&lt;br /&gt;
			else&lt;br /&gt;
				val = mw.getCurrentFrame():expandTemplate{title = &amp;quot;cvt&amp;quot;, args = {lowb, &amp;quot;to&amp;quot;, upb, unit}}&lt;br /&gt;
			end&lt;br /&gt;
		elseif unit == &amp;quot;$&amp;quot; or unit == &amp;quot;£&amp;quot; then&lt;br /&gt;
			val = unit .. amount .. range .. i18n.multipliers[scale]&lt;br /&gt;
		else&lt;br /&gt;
			val = amount .. range .. i18n.multipliers[scale] .. usep .. unit&lt;br /&gt;
		end&lt;br /&gt;
		------------------------------------&lt;br /&gt;
	-- datatypes which are global coordinates:&lt;br /&gt;
	elseif dtype == &amp;quot;globe-coordinate&amp;quot; then&lt;br /&gt;
		-- &#039;display&#039; parameter defaults to &amp;quot;inline, title&amp;quot; *** unused for now ***&lt;br /&gt;
		-- local disp = args.display or &amp;quot;&amp;quot;&lt;br /&gt;
		-- if disp == &amp;quot;&amp;quot; then disp = &amp;quot;inline, title&amp;quot; end&lt;br /&gt;
		--&lt;br /&gt;
		-- format parameter switches from deg/min/sec to decimal degrees&lt;br /&gt;
		-- default is deg/min/sec -- decimal degrees needs |format = dec&lt;br /&gt;
		local form = (args.format or &amp;quot;&amp;quot;):lower():sub(1,3)&lt;br /&gt;
		if form ~= &amp;quot;dec&amp;quot; then form = &amp;quot;dms&amp;quot; end -- not needed for now&lt;br /&gt;
		--&lt;br /&gt;
		-- show parameter allows just the latitude, or just the longitude, or both&lt;br /&gt;
		-- to be returned as a signed decimal, ignoring the format parameter.&lt;br /&gt;
		local show = (args.show or &amp;quot;&amp;quot;):lower()&lt;br /&gt;
		if show ~= &amp;quot;longlat&amp;quot; then show = show:sub(1,3) end&lt;br /&gt;
		--&lt;br /&gt;
		local lat, long, prec = dv.latitude, dv.longitude, dv.precision&lt;br /&gt;
		if show == &amp;quot;lat&amp;quot; then&lt;br /&gt;
			val = decimalPrecision(lat, prec)&lt;br /&gt;
		elseif show == &amp;quot;lon&amp;quot; then&lt;br /&gt;
			val = decimalPrecision(long, prec)&lt;br /&gt;
		elseif show == &amp;quot;longlat&amp;quot; then&lt;br /&gt;
			val = decimalPrecision(long, prec) .. &amp;quot;, &amp;quot; .. decimalPrecision(lat, prec)&lt;br /&gt;
		else&lt;br /&gt;
			local ns = &amp;quot;N&amp;quot;&lt;br /&gt;
			local ew = &amp;quot;E&amp;quot;&lt;br /&gt;
			if lat &amp;lt; 0 then&lt;br /&gt;
				ns = &amp;quot;S&amp;quot;&lt;br /&gt;
				lat = - lat&lt;br /&gt;
			end&lt;br /&gt;
			if long &amp;lt; 0 then&lt;br /&gt;
				ew = &amp;quot;W&amp;quot;&lt;br /&gt;
				long = - long&lt;br /&gt;
			end&lt;br /&gt;
			if form == &amp;quot;dec&amp;quot; then&lt;br /&gt;
				lat = decimalPrecision(lat, prec)&lt;br /&gt;
				long = decimalPrecision(long, prec)&lt;br /&gt;
				val = lat .. &amp;quot;°&amp;quot; .. ns .. &amp;quot; &amp;quot; .. long ..  &amp;quot;°&amp;quot; .. ew&lt;br /&gt;
			else&lt;br /&gt;
				local latdeg, latmin, latsec = decimalToDMS(lat, prec)&lt;br /&gt;
				local longdeg, longmin, longsec = decimalToDMS(long, prec)&lt;br /&gt;
&lt;br /&gt;
				if latsec == 0 and longsec == 0 then&lt;br /&gt;
					if latmin == 0 and longmin == 0 then&lt;br /&gt;
						val = latdeg .. &amp;quot;°&amp;quot; .. ns .. &amp;quot; &amp;quot; .. longdeg ..  &amp;quot;°&amp;quot; .. ew&lt;br /&gt;
					else&lt;br /&gt;
						val = latdeg .. &amp;quot;°&amp;quot; .. latmin .. &amp;quot;′&amp;quot; .. ns .. &amp;quot; &amp;quot;&lt;br /&gt;
						val = val .. longdeg .. &amp;quot;°&amp;quot;.. longmin .. &amp;quot;′&amp;quot; .. ew&lt;br /&gt;
					end&lt;br /&gt;
				else&lt;br /&gt;
					val = latdeg .. &amp;quot;°&amp;quot; .. latmin .. &amp;quot;′&amp;quot; .. latsec .. &amp;quot;″&amp;quot; .. ns .. &amp;quot; &amp;quot;&lt;br /&gt;
					val = val .. longdeg .. &amp;quot;°&amp;quot; .. longmin .. &amp;quot;′&amp;quot; .. longsec .. &amp;quot;″&amp;quot; .. ew&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		------------------------------------&lt;br /&gt;
	elseif dtype == &amp;quot;monolingualtext&amp;quot; then -- data type is Monolingual text:&lt;br /&gt;
		-- has mainsnak.datavalue.value as a table containing language/text pairs&lt;br /&gt;
		-- collect all the values in &#039;out&#039; and languages in &#039;mlt&#039; and process them later&lt;br /&gt;
		val = pre .. dv.text .. post&lt;br /&gt;
		mlt = dv.language&lt;br /&gt;
		------------------------------------&lt;br /&gt;
	else&lt;br /&gt;
		-- some other data type so write a specific handler&lt;br /&gt;
		val = &amp;quot;unknown data type: &amp;quot; .. dtype&lt;br /&gt;
	end -- of datatype/unknown value/sourced check&lt;br /&gt;
	return val, mlt&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- propertyvalueandquals takes a property object, the arguments passed from frame,&lt;br /&gt;
-- and a qualifier propertyID.&lt;br /&gt;
-- It returns a sequence (table) of values representing the values of that property&lt;br /&gt;
-- and qualifiers that match the qualifierID if supplied.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: parseParam(); sourced(); labelOrId(); i18n.latestdatequalifier(); format_Date();&lt;br /&gt;
-- makeOrdinal(); roundto(); decimalPrecision(); decimalToDMS(); assembleoutput();&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local function propertyvalueandquals(objproperty, args, qualID)&lt;br /&gt;
	-- needs this style of declaration because it&#039;s re-entrant&lt;br /&gt;
&lt;br /&gt;
	-- onlysourced is a boolean passed to return only values sourced to other than Wikipedia&lt;br /&gt;
	-- if nothing or an empty string is passed set it true&lt;br /&gt;
	local onlysrc = parseParam(args.onlysourced or args.osd, true)&lt;br /&gt;
&lt;br /&gt;
	-- linked is a a boolean that enables the link to a local page via sitelink&lt;br /&gt;
	-- if nothing or an empty string is passed set it true&lt;br /&gt;
	local linked = parseParam(args.linked, true)&lt;br /&gt;
&lt;br /&gt;
	-- prefix is a string that may be nil, empty (&amp;quot;&amp;quot;), or a string of characters&lt;br /&gt;
	-- this is prefixed to each value&lt;br /&gt;
	-- useful when when multiple values are returned&lt;br /&gt;
	-- any double-quotes &amp;quot; are stripped out, so that spaces may be passed&lt;br /&gt;
	local prefix = (args.prefix or &amp;quot;&amp;quot;):gsub(&#039;&amp;quot;&#039;, &#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
	-- postfix is a string that may be nil, empty (&amp;quot;&amp;quot;), or a string of characters&lt;br /&gt;
	-- this is postfixed to each value&lt;br /&gt;
	-- useful when when multiple values are returned&lt;br /&gt;
	-- any double-quotes &amp;quot; are stripped out, so that spaces may be passed&lt;br /&gt;
	local postfix = (args.postfix or &amp;quot;&amp;quot;):gsub(&#039;&amp;quot;&#039;, &#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
	-- linkprefix is a string that may be nil, empty (&amp;quot;&amp;quot;), or a string of characters&lt;br /&gt;
	-- this creates a link and is then prefixed to each value&lt;br /&gt;
	-- useful when when multiple values are returned and indirect links are needed&lt;br /&gt;
	-- any double-quotes &amp;quot; are stripped out, so that spaces may be passed&lt;br /&gt;
	local lprefix = (args.linkprefix or args.lp or &amp;quot;&amp;quot;):gsub(&#039;&amp;quot;&#039;, &#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
	-- linkpostfix is a string that may be nil, empty (&amp;quot;&amp;quot;), or a string of characters&lt;br /&gt;
	-- this is postfixed to each value when linking is enabled with lprefix&lt;br /&gt;
	-- useful when when multiple values are returned&lt;br /&gt;
	-- any double-quotes &amp;quot; are stripped out, so that spaces may be passed&lt;br /&gt;
	local lpostfix = (args.linkpostfix or &amp;quot;&amp;quot;):gsub(&#039;&amp;quot;&#039;, &#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
	-- wdlinks is a boolean passed to enable links to Wikidata when no article exists&lt;br /&gt;
	-- if nothing or an empty string is passed set it false&lt;br /&gt;
	local wdl = parseParam(args.wdlinks or args.wdl, false)&lt;br /&gt;
&lt;br /&gt;
	-- unitabbr is a boolean passed to enable unit abbreviations for common units&lt;br /&gt;
	-- if nothing or an empty string is passed set it false&lt;br /&gt;
	local uabbr = parseParam(args.unitabbr or args.uabbr, false)&lt;br /&gt;
&lt;br /&gt;
	-- qualsonly is a boolean passed to return just the qualifiers&lt;br /&gt;
	-- if nothing or an empty string is passed set it false&lt;br /&gt;
	local qualsonly = parseParam(args.qualsonly or args.qo, false)&lt;br /&gt;
&lt;br /&gt;
	-- maxvals is a string that may be nil, empty (&amp;quot;&amp;quot;), or a number&lt;br /&gt;
	-- this determines how many items may be returned when multiple values are available&lt;br /&gt;
	-- setting it = 1 is useful where the returned string is used within another call, e.g. image&lt;br /&gt;
	local maxvals = tonumber(args.maxvals) or 0&lt;br /&gt;
&lt;br /&gt;
	-- pd (plain date) is a string: yes/true/1 | no/false/0 | adj&lt;br /&gt;
	-- to disable/enable &amp;quot;sourcing cirumstances&amp;quot; or use adjectival form for the plain date&lt;br /&gt;
	local pd = args.plaindate or args.pd or &amp;quot;no&amp;quot;&lt;br /&gt;
	args.pd = pd&lt;br /&gt;
&lt;br /&gt;
	-- allow qualifiers to have a different date format; default to year unless qualsonly is set&lt;br /&gt;
	args.qdf = args.qdf or args.qualifierdateformat or args.df or (not qualsonly and &amp;quot;y&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	local lang = args.lang or findLang().code&lt;br /&gt;
&lt;br /&gt;
    -- qualID is a string list of wanted qualifiers or &amp;quot;ALL&amp;quot;&lt;br /&gt;
    qualID = qualID or &amp;quot;&amp;quot;&lt;br /&gt;
    -- capitalise list of wanted qualifiers and substitute &amp;quot;DATES&amp;quot;&lt;br /&gt;
    qualID = qualID:upper():gsub(&amp;quot;DATES&amp;quot;, &amp;quot;P580, P582&amp;quot;)&lt;br /&gt;
    local allflag = (qualID == &amp;quot;ALL&amp;quot;)&lt;br /&gt;
    -- create table of wanted qualifiers as key&lt;br /&gt;
    local qwanted = {}&lt;br /&gt;
    -- create sequence of wanted qualifiers&lt;br /&gt;
    local qorder = {}&lt;br /&gt;
    for q in mw.text.gsplit(qualID, &amp;quot;%p&amp;quot;) do -- split at punctuation and iterate&lt;br /&gt;
        local qtrim = mw.text.trim(q)&lt;br /&gt;
        if qtrim ~= &amp;quot;&amp;quot; then&lt;br /&gt;
            qwanted[mw.text.trim(q)] = true&lt;br /&gt;
            qorder[#qorder+1] = qtrim&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    -- qsep is the output separator for rendering qualifier list&lt;br /&gt;
    local qsep = (args.qsep or &amp;quot;&amp;quot;):gsub(&#039;&amp;quot;&#039;, &#039;&#039;)&lt;br /&gt;
    -- qargs are the arguments to supply to assembleoutput()&lt;br /&gt;
    local qargs = {&lt;br /&gt;
        [&amp;quot;osd&amp;quot;]         = &amp;quot;false&amp;quot;,&lt;br /&gt;
        [&amp;quot;linked&amp;quot;]      = tostring(linked),&lt;br /&gt;
        [&amp;quot;prefix&amp;quot;]      = args.qprefix,&lt;br /&gt;
        [&amp;quot;postfix&amp;quot;]     = args.qpostfix,&lt;br /&gt;
        [&amp;quot;linkprefix&amp;quot;]  = args.qlinkprefix or args.qlp,&lt;br /&gt;
        [&amp;quot;linkpostfix&amp;quot;] = args.qlinkpostfix,&lt;br /&gt;
        [&amp;quot;wdl&amp;quot;]         = &amp;quot;false&amp;quot;,&lt;br /&gt;
        [&amp;quot;unitabbr&amp;quot;]    = tostring(uabbr),&lt;br /&gt;
        [&amp;quot;maxvals&amp;quot;]     = 0,&lt;br /&gt;
        [&amp;quot;sorted&amp;quot;]      = tostring(args.qsorted),&lt;br /&gt;
        [&amp;quot;noicon&amp;quot;]      = &amp;quot;true&amp;quot;,&lt;br /&gt;
        [&amp;quot;list&amp;quot;]        = args.qlist,&lt;br /&gt;
        [&amp;quot;sep&amp;quot;]         = qsep,&lt;br /&gt;
        [&amp;quot;langobj&amp;quot;]     = args.langobj,&lt;br /&gt;
        [&amp;quot;lang&amp;quot;]        = args.langobj.code,&lt;br /&gt;
        [&amp;quot;df&amp;quot;]          = args.qdf,&lt;br /&gt;
        [&amp;quot;sn&amp;quot;]          = parseParam(args.qsn or args.qshortname, false),&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
	-- all proper values of a Wikidata property will be the same type as the first&lt;br /&gt;
	-- qualifiers don&#039;t have a mainsnak, properties do&lt;br /&gt;
	local datatype = objproperty[1].datatype or objproperty[1].mainsnak.datatype&lt;br /&gt;
&lt;br /&gt;
	-- out[] holds the a list of returned values for this property&lt;br /&gt;
	-- mlt[] holds the language code if the datatype is monolingual text&lt;br /&gt;
	local out = {}&lt;br /&gt;
	local mlt = {}&lt;br /&gt;
&lt;br /&gt;
	for k, v in ipairs(objproperty) do&lt;br /&gt;
		local hasvalue = true&lt;br /&gt;
		if (onlysrc and not sourced(v)) then&lt;br /&gt;
			-- no value: it isn&#039;t sourced when onlysourced=true&lt;br /&gt;
			hasvalue = false&lt;br /&gt;
		else&lt;br /&gt;
			local val, lcode = rendersnak(v, args, linked, lprefix, lpostfix, prefix, postfix, uabbr)&lt;br /&gt;
			if not val then&lt;br /&gt;
				hasvalue = false -- rank doesn&#039;t match&lt;br /&gt;
			elseif qualsonly and qualID then&lt;br /&gt;
				-- suppress value returned: only qualifiers are requested&lt;br /&gt;
			else&lt;br /&gt;
				out[#out+1], mlt[#out+1] = val, lcode&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		-- See if qualifiers are to be returned:&lt;br /&gt;
		local snak = v.mainsnak or v&lt;br /&gt;
		if hasvalue and v.qualifiers and qualID ~= &amp;quot;&amp;quot; and snak.snaktype~=&amp;quot;novalue&amp;quot; then&lt;br /&gt;
            -- collect all wanted qualifier values returned in qlist, indexed by propertyID&lt;br /&gt;
			local qlist = {}&lt;br /&gt;
			local timestart, timeend = &amp;quot;&amp;quot;, &amp;quot;&amp;quot;&lt;br /&gt;
            -- loop through qualifiers&lt;br /&gt;
            for k1, v1 in pairs(v.qualifiers) do&lt;br /&gt;
                if allflag or qwanted[k1] then&lt;br /&gt;
                    if k1 == &amp;quot;P1326&amp;quot; then&lt;br /&gt;
                        local ts = v1[1].datavalue.value.time&lt;br /&gt;
                        local dp = v1[1].datavalue.value.precision&lt;br /&gt;
                        qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, &amp;quot;&amp;quot;, lang, &amp;quot;before&amp;quot;)&lt;br /&gt;
                    elseif k1 == &amp;quot;P1319&amp;quot; then&lt;br /&gt;
                        local ts = v1[1].datavalue.value.time&lt;br /&gt;
                        local dp = v1[1].datavalue.value.precision&lt;br /&gt;
                        qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, &amp;quot;&amp;quot;, lang, &amp;quot;after&amp;quot;)&lt;br /&gt;
                    elseif k1 == &amp;quot;P580&amp;quot; then&lt;br /&gt;
                        timestart = propertyvalueandquals(v1, qargs)[1] or &amp;quot;&amp;quot; -- treat only one start time as valid&lt;br /&gt;
                    elseif k1 == &amp;quot;P582&amp;quot; then&lt;br /&gt;
                        timeend = propertyvalueandquals(v1, qargs)[1] or &amp;quot;&amp;quot; -- treat only one end time as valid&lt;br /&gt;
                    else&lt;br /&gt;
                        local q = assembleoutput(propertyvalueandquals(v1, qargs), qargs)&lt;br /&gt;
                        -- we already deal with circa via &#039;sourcing circumstances&#039; if the datatype was time&lt;br /&gt;
                        -- circa may be either linked or unlinked *** internationalise later ***&lt;br /&gt;
                        if datatype ~= &amp;quot;time&amp;quot; or q ~= &amp;quot;circa&amp;quot; and not (type(q) == &amp;quot;string&amp;quot; and q:find(&amp;quot;circa]]&amp;quot;)) then&lt;br /&gt;
                            qlist[k1] = q&lt;br /&gt;
                        end&lt;br /&gt;
                    end&lt;br /&gt;
                end -- of test for wanted&lt;br /&gt;
            end -- of loop through qualifiers&lt;br /&gt;
            -- set date separator&lt;br /&gt;
			local t = timestart .. timeend&lt;br /&gt;
			-- *** internationalise date separators later ***&lt;br /&gt;
			local dsep = &amp;quot;&amp;amp;ndash;&amp;quot;&lt;br /&gt;
			if t:find(&amp;quot;%s&amp;quot;) or t:find(&amp;quot;&amp;amp;nbsp;&amp;quot;) then dsep = &amp;quot; &amp;amp;ndash; &amp;quot; end&lt;br /&gt;
            -- set the order for the list of qualifiers returned; start time and end time go last&lt;br /&gt;
			if next(qlist) then&lt;br /&gt;
                local qlistout = {}&lt;br /&gt;
                if allflag then&lt;br /&gt;
                    for k2, v2 in pairs(qlist) do&lt;br /&gt;
                        qlistout[#qlistout+1] = v2&lt;br /&gt;
                    end&lt;br /&gt;
                else&lt;br /&gt;
                    for i2, v2 in ipairs(qorder) do&lt;br /&gt;
                        qlistout[#qlistout+1] = qlist[v2]&lt;br /&gt;
                    end&lt;br /&gt;
                end&lt;br /&gt;
                if t ~= &amp;quot;&amp;quot; then&lt;br /&gt;
                    qlistout[#qlistout+1] = timestart .. dsep .. timeend&lt;br /&gt;
                end&lt;br /&gt;
				local qstr = assembleoutput(qlistout, qargs)&lt;br /&gt;
				if qualsonly then&lt;br /&gt;
					out[#out+1] = qstr&lt;br /&gt;
				else&lt;br /&gt;
					out[#out] = out[#out] .. &amp;quot; (&amp;quot; .. qstr .. &amp;quot;)&amp;quot;&lt;br /&gt;
				end&lt;br /&gt;
			elseif t ~= &amp;quot;&amp;quot; then&lt;br /&gt;
				if qualsonly then&lt;br /&gt;
					if timestart == &amp;quot;&amp;quot; then&lt;br /&gt;
						out[#out+1] = timeend&lt;br /&gt;
					elseif timeend == &amp;quot;&amp;quot; then&lt;br /&gt;
						out[#out+1] = timestart&lt;br /&gt;
					else&lt;br /&gt;
						out[#out+1] = timestart .. dsep .. timeend&lt;br /&gt;
					end&lt;br /&gt;
				else&lt;br /&gt;
					out[#out] = out[#out] .. &amp;quot; (&amp;quot; .. timestart .. dsep .. timeend .. &amp;quot;)&amp;quot;&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end -- of test for qualifiers wanted&lt;br /&gt;
&lt;br /&gt;
		if maxvals &amp;gt; 0 and #out &amp;gt;= maxvals then break end&lt;br /&gt;
	end -- of for each value loop&lt;br /&gt;
&lt;br /&gt;
	-- we need to pick one value to return if the datatype was &amp;quot;monolingualtext&amp;quot;&lt;br /&gt;
	-- if there&#039;s only one value, use that&lt;br /&gt;
	-- otherwise look through the fallback languages for a match&lt;br /&gt;
	if datatype == &amp;quot;monolingualtext&amp;quot; and #out &amp;gt;1 then&lt;br /&gt;
		lang = mw.text.split( lang, &#039;-&#039;, true )[1]&lt;br /&gt;
		local fbtbl = mw.language.getFallbacksFor( lang )&lt;br /&gt;
		table.insert( fbtbl, 1, lang )&lt;br /&gt;
		local bestval = &amp;quot;&amp;quot;&lt;br /&gt;
		local found = false&lt;br /&gt;
		for idx1, lang1 in ipairs(fbtbl) do&lt;br /&gt;
			for idx2, lang2 in ipairs(mlt) do&lt;br /&gt;
				if (lang1 == lang2) and not found then&lt;br /&gt;
					bestval = out[idx2]&lt;br /&gt;
					found = true&lt;br /&gt;
					break&lt;br /&gt;
				end&lt;br /&gt;
			end -- loop through values of property&lt;br /&gt;
		end -- loop through fallback languages&lt;br /&gt;
		if found then&lt;br /&gt;
			-- replace output table with a table containing the best value&lt;br /&gt;
			out = { bestval }&lt;br /&gt;
		else&lt;br /&gt;
			-- more than one value and none of them on the list of fallback languages&lt;br /&gt;
			-- sod it, just give them the first one&lt;br /&gt;
			out = { out[1] }&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return out&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Common code for p.getValueByQual and p.getValueByLang&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: parseParam; setRanks; parseInput; sourced; assembleoutput;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local _getvaluebyqual = function(frame, qualID, checkvalue)&lt;br /&gt;
&lt;br /&gt;
	-- The property ID that will have a qualifier is the first unnamed parameter&lt;br /&gt;
	local propertyID = mw.text.trim(frame.args[1] or &amp;quot;&amp;quot;)&lt;br /&gt;
	if propertyID == &amp;quot;&amp;quot; then return &amp;quot;no property supplied&amp;quot; end&lt;br /&gt;
&lt;br /&gt;
	if qualID == &amp;quot;&amp;quot; then return &amp;quot;no qualifier supplied&amp;quot; end&lt;br /&gt;
&lt;br /&gt;
	-- onlysourced is a boolean passed to return property values&lt;br /&gt;
	-- only when property values are sourced to something other than Wikipedia&lt;br /&gt;
	-- if nothing or an empty string is passed set it true&lt;br /&gt;
	-- if &amp;quot;false&amp;quot; or &amp;quot;no&amp;quot; or 0 is passed set it false&lt;br /&gt;
	local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true)&lt;br /&gt;
&lt;br /&gt;
	-- set the requested ranks flags&lt;br /&gt;
	frame.args.reqranks = setRanks(frame.args.rank)&lt;br /&gt;
&lt;br /&gt;
	-- set a language object and code in the frame.args table&lt;br /&gt;
	frame.args.langobj = findLang(frame.args.lang)&lt;br /&gt;
	frame.args.lang = frame.args.langobj.code&lt;br /&gt;
&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
&lt;br /&gt;
	-- check for locally supplied parameter in second unnamed parameter&lt;br /&gt;
	-- success means no local parameter and the property exists&lt;br /&gt;
	local qid, props = parseInput(frame, args[2], propertyID)&lt;br /&gt;
&lt;br /&gt;
	local linked = parseParam(args.linked, true)&lt;br /&gt;
	local lpre = (args.linkprefix or args.lp or &amp;quot;&amp;quot;):gsub(&#039;&amp;quot;&#039;, &#039;&#039;)&lt;br /&gt;
	local lpost = (args.linkpostfix or &amp;quot;&amp;quot;):gsub(&#039;&amp;quot;&#039;, &#039;&#039;)&lt;br /&gt;
	local pre = (args.prefix or &amp;quot;&amp;quot;):gsub(&#039;&amp;quot;&#039;, &#039;&#039;)&lt;br /&gt;
	local post = (args.postfix or &amp;quot;&amp;quot;):gsub(&#039;&amp;quot;&#039;, &#039;&#039;)&lt;br /&gt;
	local uabbr = parseParam(args.unitabbr or args.uabbr, false)&lt;br /&gt;
	local filter = (args.unit or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	local maxvals = tonumber(args.maxvals) or 0&lt;br /&gt;
	if filter == &amp;quot;&amp;quot; then filter = nil end&lt;br /&gt;
&lt;br /&gt;
	if qid then&lt;br /&gt;
		local out = {}&lt;br /&gt;
		-- Scan through the values of the property&lt;br /&gt;
		-- we want something like property is &amp;quot;pronunciation audio (P443)&amp;quot; in propertyID&lt;br /&gt;
		-- with a qualifier like &amp;quot;language of work or name (P407)&amp;quot; in qualID&lt;br /&gt;
		-- whose value has the required ID, like &amp;quot;British English (Q7979)&amp;quot;, in qval&lt;br /&gt;
		for k1, v1 in ipairs(props) do&lt;br /&gt;
			if v1.mainsnak.snaktype == &amp;quot;value&amp;quot; then&lt;br /&gt;
				-- check if it has the right qualifier&lt;br /&gt;
				local v1q = v1.qualifiers&lt;br /&gt;
				if v1q and v1q[qualID] then&lt;br /&gt;
					if onlysrc == false or sourced(v1) then&lt;br /&gt;
						-- if we&#039;ve got this far, we have a (sourced) claim with qualifiers&lt;br /&gt;
						-- so see if matches the required value&lt;br /&gt;
						-- We&#039;ll only deal with wikibase-items and strings for now&lt;br /&gt;
						if v1q[qualID][1].datatype == &amp;quot;wikibase-item&amp;quot; then&lt;br /&gt;
							if checkvalue(v1q[qualID][1].datavalue.value.id) then&lt;br /&gt;
								out[#out + 1] = rendersnak(v1, args, linked, lpre, lpost, pre, post, uabbr, filter)&lt;br /&gt;
							end&lt;br /&gt;
						elseif v1q[qualID][1].datatype == &amp;quot;string&amp;quot; then&lt;br /&gt;
							if checkvalue(v1q[qualID][1].datavalue.value) then&lt;br /&gt;
								out[#out + 1] = rendersnak(v1, args, linked, lpre, lpost, pre, post, uabbr, filter)&lt;br /&gt;
							end&lt;br /&gt;
						end&lt;br /&gt;
					end -- of check for sourced&lt;br /&gt;
				end -- of check for matching required value and has qualifiers&lt;br /&gt;
			else&lt;br /&gt;
				return nil&lt;br /&gt;
			end -- of check for string&lt;br /&gt;
			if maxvals &amp;gt; 0 and #out &amp;gt;= maxvals then break end&lt;br /&gt;
		end -- of loop through values of propertyID&lt;br /&gt;
		return assembleoutput(out, frame.args, qid, propertyID)&lt;br /&gt;
	else&lt;br /&gt;
		return props -- either local parameter or nothing&lt;br /&gt;
	end -- of test for success&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- _location takes Q-id and follows P276 (location)&lt;br /&gt;
-- or P131 (located in the administrative territorial entity) or P706 (located on terrain feature)&lt;br /&gt;
-- from the initial item to higher level territories/locations until it reaches the highest.&lt;br /&gt;
-- An optional boolean, &#039;first&#039;, determines whether the first item is returned (default: false).&lt;br /&gt;
-- An optional boolean &#039;skip&#039; toggles the display to skip to the last item (default: false).&lt;br /&gt;
-- It returns a table containing the locations - linked where possible, except for the highest.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: findLang(); labelOrId(); linkedItem&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local _location = function(qid, first, skip)&lt;br /&gt;
	first = parseParam(first, false)&lt;br /&gt;
	skip = parseParam(skip, false)&lt;br /&gt;
	local locs = {&amp;quot;P276&amp;quot;, &amp;quot;P131&amp;quot;, &amp;quot;P706&amp;quot;}&lt;br /&gt;
	local out = {}&lt;br /&gt;
	local langcode = findLang():getCode()&lt;br /&gt;
	local finished = false&lt;br /&gt;
	local count = 0&lt;br /&gt;
	local prevqid = &amp;quot;Q0&amp;quot;&lt;br /&gt;
	repeat&lt;br /&gt;
		local prop&lt;br /&gt;
		for i1, v1 in ipairs(locs) do&lt;br /&gt;
			local proptbl = mw.wikibase.getBestStatements(qid, v1)&lt;br /&gt;
			if #proptbl &amp;gt; 1 then&lt;br /&gt;
				-- there is more than one higher location&lt;br /&gt;
				local prevP131, prevP131id&lt;br /&gt;
				if prevqid ~= &amp;quot;Q0&amp;quot; then&lt;br /&gt;
					prevP131 = mw.wikibase.getBestStatements(prevqid, &amp;quot;P131&amp;quot;)[1]&lt;br /&gt;
					prevP131id = prevP131&lt;br /&gt;
					and prevP131.mainsnak.datavalue&lt;br /&gt;
					and prevP131.mainsnak.datavalue.value.id&lt;br /&gt;
				end&lt;br /&gt;
				for i2, v2 in ipairs(proptbl) do&lt;br /&gt;
					local parttbl = v2.qualifiers and v2.qualifiers.P518&lt;br /&gt;
					if parttbl then&lt;br /&gt;
						-- this higher location has qualifier &#039;applies to part&#039; (P518)&lt;br /&gt;
						for i3, v3 in ipairs(parttbl) do&lt;br /&gt;
							if v3.snaktype == &amp;quot;value&amp;quot; and v3.datavalue.value.id == prevqid then&lt;br /&gt;
								-- it has a value equal to the previous location&lt;br /&gt;
								prop = proptbl[i2]&lt;br /&gt;
								break&lt;br /&gt;
							end -- of test for matching last location&lt;br /&gt;
						end -- of loop through values of &#039;applies to part&#039;&lt;br /&gt;
					else&lt;br /&gt;
						-- there&#039;s no qualifier &#039;applies to part&#039; (P518)&lt;br /&gt;
						-- so check if the previous location had a P131 that matches this alternate&lt;br /&gt;
						if qid == prevP131id then&lt;br /&gt;
								prop = proptbl[i2]&lt;br /&gt;
								break&lt;br /&gt;
						end -- of test for matching previous P131&lt;br /&gt;
					end&lt;br /&gt;
				end -- of loop through parent locations&lt;br /&gt;
				-- fallback to second value if match not found&lt;br /&gt;
				prop = prop or proptbl[2]&lt;br /&gt;
			elseif #proptbl &amp;gt; 0 then&lt;br /&gt;
				prop = proptbl[1]&lt;br /&gt;
			end&lt;br /&gt;
			if prop then break end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		-- check if it&#039;s an instance of (P31) a country (Q6256) or sovereign state (Q3624078)&lt;br /&gt;
		-- and terminate the chain if it is&lt;br /&gt;
		local inst = mw.wikibase.getAllStatements(qid, &amp;quot;P31&amp;quot;)&lt;br /&gt;
		if #inst &amp;gt; 0 then&lt;br /&gt;
			for k, v in ipairs(inst) do&lt;br /&gt;
				local instid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id&lt;br /&gt;
				-- stop if it&#039;s a country (or a country within the United Kingdom if skip is true)&lt;br /&gt;
				if instid == &amp;quot;Q6256&amp;quot; or instid == &amp;quot;Q3624078&amp;quot; or (skip and instid == &amp;quot;Q3336843&amp;quot;) then&lt;br /&gt;
					prop = nil -- this will ensure this is treated as top-level location&lt;br /&gt;
					break&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		-- get the name of this location and update qid to point to the parent location&lt;br /&gt;
		if prop and prop.mainsnak.datavalue then&lt;br /&gt;
			if not skip or count == 0 then&lt;br /&gt;
				local args = { lprefix = &amp;quot;:&amp;quot; }&lt;br /&gt;
				out[#out+1] = linkedItem(qid, args) -- get a linked value if we can&lt;br /&gt;
			end&lt;br /&gt;
			qid, prevqid = prop.mainsnak.datavalue.value.id, qid&lt;br /&gt;
		else&lt;br /&gt;
			-- This is top-level location, so get short name except when this is the first item&lt;br /&gt;
			-- Use full label if there&#039;s no short name or this is the first item&lt;br /&gt;
			local prop1813 = mw.wikibase.getAllStatements(qid, &amp;quot;P1813&amp;quot;)&lt;br /&gt;
			-- if there&#039;s a short name and this isn&#039;t the only item&lt;br /&gt;
			if prop1813[1] and (#out &amp;gt; 0)then&lt;br /&gt;
				local shortname&lt;br /&gt;
				-- short name is monolingual text, so look for match to the local language&lt;br /&gt;
				-- choose the shortest &#039;short name&#039; in that language&lt;br /&gt;
				for k, v in pairs(prop1813) do&lt;br /&gt;
					if v.mainsnak.datavalue.value.language == langcode then&lt;br /&gt;
						local name = v.mainsnak.datavalue.value.text&lt;br /&gt;
						if (not shortname) or (#name &amp;lt; #shortname) then&lt;br /&gt;
							shortname = name&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
				-- add the shortname if one is found, fallback to the label&lt;br /&gt;
				-- but skip it if it&#039;s &amp;quot;USA&amp;quot;&lt;br /&gt;
				if shortname ~= &amp;quot;USA&amp;quot; then&lt;br /&gt;
					out[#out+1] = shortname or labelOrId(qid)&lt;br /&gt;
				else&lt;br /&gt;
					if skip then out[#out+1] = &amp;quot;US&amp;quot; end&lt;br /&gt;
				end&lt;br /&gt;
			else&lt;br /&gt;
				-- no shortname, so just add the label&lt;br /&gt;
				local loc = labelOrId(qid)&lt;br /&gt;
				-- exceptions go here:&lt;br /&gt;
				if loc == &amp;quot;United States of America&amp;quot; then&lt;br /&gt;
					out[#out+1] = &amp;quot;United States&amp;quot;&lt;br /&gt;
				else&lt;br /&gt;
					out[#out+1] = loc&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			finished = true&lt;br /&gt;
		end&lt;br /&gt;
		count = count + 1&lt;br /&gt;
	until finished or count &amp;gt;= 10 -- limit to 10 levels to avoid infinite loops&lt;br /&gt;
&lt;br /&gt;
	-- remove the first location if not required&lt;br /&gt;
	if not first then table.remove(out, 1) end&lt;br /&gt;
&lt;br /&gt;
	-- we might have duplicate text for consecutive locations, so remove them&lt;br /&gt;
	if #out &amp;gt; 2 then&lt;br /&gt;
		local plain = {}&lt;br /&gt;
		for i, v in ipairs(out) do&lt;br /&gt;
			-- strip any links&lt;br /&gt;
			plain[i] = v:gsub(&amp;quot;^%[%[[^|]*|&amp;quot;, &amp;quot;&amp;quot;):gsub(&amp;quot;]]$&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
		local idx = 2&lt;br /&gt;
		repeat&lt;br /&gt;
			if plain[idx] == plain[idx-1] then&lt;br /&gt;
				-- duplicate found&lt;br /&gt;
				local removeidx = 0&lt;br /&gt;
				if (plain[idx] ~= out[idx]) and (plain[idx-1] == out[idx-1]) then&lt;br /&gt;
					-- only second one is linked, so drop the first&lt;br /&gt;
					removeidx = idx - 1&lt;br /&gt;
				elseif (plain[idx] == out[idx]) and (plain[idx-1] ~= out[idx-1]) then&lt;br /&gt;
					-- only first one is linked, so drop the second&lt;br /&gt;
					removeidx = idx&lt;br /&gt;
				else&lt;br /&gt;
					-- pick one&lt;br /&gt;
					removeidx = idx - (os.time()%2)&lt;br /&gt;
				end&lt;br /&gt;
				table.remove(out, removeidx)&lt;br /&gt;
				table.remove(plain, removeidx)&lt;br /&gt;
			else&lt;br /&gt;
				idx = idx +1&lt;br /&gt;
			end&lt;br /&gt;
		until idx &amp;gt;= #out&lt;br /&gt;
	end&lt;br /&gt;
	return out&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- _getsumofparts scans the property &#039;has part&#039; (P527) for values matching a list.&lt;br /&gt;
-- The list (args.vlist) consists of a string of Qids separated by spaces or any usual punctuation.&lt;br /&gt;
-- If the matched values have a qualifer &#039;quantity&#039; (P1114), those quantites are summed.&lt;br /&gt;
-- The sum is returned as a number (i.e. 0 if none)&lt;br /&gt;
-- a table of arguments is supplied implementing the usual parameters.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: setRanks; parseParam; parseInput; sourced; assembleoutput;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local _getsumofparts = function(args)&lt;br /&gt;
	local vallist = (args.vlist or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	if vallist == &amp;quot;&amp;quot; then return end&lt;br /&gt;
	args.reqranks = setRanks(args.rank)&lt;br /&gt;
	local f = {}&lt;br /&gt;
	f.args = args&lt;br /&gt;
	local qid, props = parseInput(f, &amp;quot;&amp;quot;, &amp;quot;P527&amp;quot;)&lt;br /&gt;
	if not qid then return 0 end&lt;br /&gt;
	local onlysrc = parseParam(args.onlysourced or args.osd, true)&lt;br /&gt;
	local sum = 0&lt;br /&gt;
	for k1, v1 in ipairs(props) do&lt;br /&gt;
		if (onlysrc == false or sourced(v1))&lt;br /&gt;
			and v1.mainsnak.snaktype == &amp;quot;value&amp;quot;&lt;br /&gt;
			and v1.mainsnak.datavalue.type == &amp;quot;wikibase-entityid&amp;quot;&lt;br /&gt;
			and vallist:match( v1.mainsnak.datavalue.value.id )&lt;br /&gt;
			and v1.qualifiers&lt;br /&gt;
			then&lt;br /&gt;
			local quals = v1.qualifiers[&amp;quot;P1114&amp;quot;]&lt;br /&gt;
			if quals then&lt;br /&gt;
				for k2, v2 in ipairs(quals) do&lt;br /&gt;
					sum = sum + v2.datavalue.value.amount&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return sum&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Public functions&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- _getValue makes the functionality of getValue available to other modules&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: setRanks; parseInput; propertyvalueandquals; assembleoutput; parseParam; sourced;&lt;br /&gt;
-- labelOrId; i18n.latestdatequalifier; format_Date; makeOrdinal; roundto; decimalPrecision; decimalToDMS;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p._getValue = function(args)&lt;br /&gt;
	-- parameter sets for commonly used groups of parameters&lt;br /&gt;
	local paraset = tonumber(args.ps or args.parameterset or 0)&lt;br /&gt;
	if paraset == 1 then&lt;br /&gt;
		-- a common setting, not usable in infoboxes because the 2018 RFC requires sources&lt;br /&gt;
		args.rank = &amp;quot;best&amp;quot;&lt;br /&gt;
		args.fetchwikidata = &amp;quot;ALL&amp;quot;&lt;br /&gt;
		args.onlysourced = &amp;quot;no&amp;quot;&lt;br /&gt;
		args.noicon = &amp;quot;true&amp;quot;&lt;br /&gt;
	elseif paraset == 2 then&lt;br /&gt;
		-- equivalent to raw, not usable in infoboxes because the 2018 RFC requires sources&lt;br /&gt;
		args.rank = &amp;quot;best&amp;quot;&lt;br /&gt;
		args.fetchwikidata = &amp;quot;ALL&amp;quot;&lt;br /&gt;
		args.onlysourced = &amp;quot;no&amp;quot;&lt;br /&gt;
		args.noicon = &amp;quot;true&amp;quot;&lt;br /&gt;
		args.linked = &amp;quot;no&amp;quot;&lt;br /&gt;
		args.pd = &amp;quot;true&amp;quot;&lt;br /&gt;
	elseif paraset == 3 then&lt;br /&gt;
		-- parameterset 1, but usable in infoboxes because the 2018 RFC requires sources&lt;br /&gt;
		args.rank = &amp;quot;best&amp;quot;&lt;br /&gt;
		args.fetchwikidata = &amp;quot;ALL&amp;quot;&lt;br /&gt;
		args.onlysourced = &amp;quot;yes&amp;quot;&lt;br /&gt;
		args.noicon = &amp;quot;true&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- implement eid parameter&lt;br /&gt;
	local eid = args.eid&lt;br /&gt;
	if eid == &amp;quot;&amp;quot; then&lt;br /&gt;
		return nil&lt;br /&gt;
	elseif eid then&lt;br /&gt;
		args.qid = eid&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local propertyID = mw.text.trim(args[1] or &amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	args.reqranks = setRanks(args.rank)&lt;br /&gt;
&lt;br /&gt;
	-- replacetext (rt) is a string that is returned instead of any non-empty Wikidata value&lt;br /&gt;
	-- this is useful for tracking and debugging, so we set fetchwikidata=ALL to fill the whitelist&lt;br /&gt;
	local replacetext = mw.text.trim(args.rt or args.replacetext or &amp;quot;&amp;quot;)&lt;br /&gt;
	if replacetext ~= &amp;quot;&amp;quot; then&lt;br /&gt;
		args.fetchwikidata = &amp;quot;ALL&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local f = {}&lt;br /&gt;
	f.args = args&lt;br /&gt;
	local entityid, props = parseInput(f, f.args[2], propertyID)&lt;br /&gt;
&lt;br /&gt;
	if not entityid then&lt;br /&gt;
		return props -- either the input parameter or nothing&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- qual is a string containing the property ID of the qualifier(s) to be returned&lt;br /&gt;
	-- if qual == &amp;quot;ALL&amp;quot; then all qualifiers returned&lt;br /&gt;
	-- if qual == &amp;quot;DATES&amp;quot; then qualifiers P580 (start time) and P582 (end time) returned&lt;br /&gt;
	-- if nothing or an empty string is passed set it nil -&amp;gt; no qualifiers returned&lt;br /&gt;
	local qualID = mw.text.trim(args.qual or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	if qualID == &amp;quot;&amp;quot; then qualID = nil end&lt;br /&gt;
&lt;br /&gt;
	-- set a language object and code in the args table&lt;br /&gt;
	args.langobj = findLang(args.lang)&lt;br /&gt;
	args.lang = args.langobj.code&lt;br /&gt;
&lt;br /&gt;
	-- table &#039;out&#039; stores the return value(s):&lt;br /&gt;
	local out = propertyvalueandquals(props, args, qualID)&lt;br /&gt;
&lt;br /&gt;
	-- format the table of values and return it as a string:&lt;br /&gt;
	return assembleoutput(out, args, entityid, propertyID)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getValue is used to get the value(s) of a property&lt;br /&gt;
-- The property ID is passed as the first unnamed parameter and is required.&lt;br /&gt;
-- A locally supplied parameter may optionaly be supplied as the second unnamed parameter.&lt;br /&gt;
-- The function will now also return qualifiers if parameter qual is supplied&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: _getValue; setRanks; parseInput; propertyvalueandquals; assembleoutput; parseParam; sourced;&lt;br /&gt;
-- labelOrId; i18n.latestdatequalifier; format_Date; makeOrdinal; roundto; decimalPrecision; decimalToDMS;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getValue = function(frame)&lt;br /&gt;
	local args= frame.args&lt;br /&gt;
	if not args[1] then&lt;br /&gt;
		args = frame:getParent().args&lt;br /&gt;
		if not args[1] then return i18n.errors[&amp;quot;No property supplied&amp;quot;] end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return p._getValue(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getPreferredValue is used to get a value,&lt;br /&gt;
-- (or a comma separated list of them if multiple values exist).&lt;br /&gt;
-- If preferred ranks are set, it will return those values, otherwise values with normal ranks&lt;br /&gt;
-- now redundant to getValue with |rank=best&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: p.getValue; setRanks; parseInput; propertyvalueandquals; assembleoutput;&lt;br /&gt;
-- parseParam; sourced; labelOrId; i18n.latestdatequalifier; format_Date;&lt;br /&gt;
-- makeOrdinal; roundto; decimalPrecision; decimalToDMS;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getPreferredValue = function(frame)&lt;br /&gt;
	frame.args.rank = &amp;quot;best&amp;quot;&lt;br /&gt;
	return p.getValue(frame)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getCoords is used to get coordinates for display in an infobox&lt;br /&gt;
-- whitelist and blacklist are implemented&lt;br /&gt;
-- optional &#039;display&#039; parameter is allowed, defaults to nil - was &amp;quot;inline, title&amp;quot;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: setRanks(); parseInput(); decimalPrecision();&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getCoords = function(frame)&lt;br /&gt;
	local propertyID = &amp;quot;P625&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	-- if there is a &#039;display&#039; parameter supplied, use it&lt;br /&gt;
	-- otherwise default to nothing&lt;br /&gt;
	local disp = frame.args.display or &amp;quot;&amp;quot;&lt;br /&gt;
	if disp == &amp;quot;&amp;quot; then&lt;br /&gt;
		disp = nil -- default to not supplying display parameter, was &amp;quot;inline, title&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- there may be a format parameter to switch from deg/min/sec to decimal degrees&lt;br /&gt;
	-- default is deg/min/sec&lt;br /&gt;
	-- decimal degrees needs |format = dec&lt;br /&gt;
	local form = (frame.args.format or &amp;quot;&amp;quot;):lower():sub(1,3)&lt;br /&gt;
	if form ~= &amp;quot;dec&amp;quot; then&lt;br /&gt;
		form = &amp;quot;dms&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- just deal with best values&lt;br /&gt;
	frame.args.reqranks = setRanks(&amp;quot;best&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	local qid, props = parseInput(frame, frame.args[1], propertyID)&lt;br /&gt;
	if not qid then&lt;br /&gt;
		return props -- either local parameter or nothing&lt;br /&gt;
	else&lt;br /&gt;
		local dv = props[1].mainsnak.datavalue.value&lt;br /&gt;
		local lat, long, prec = dv.latitude, dv.longitude, dv.precision&lt;br /&gt;
		lat = decimalPrecision(lat, prec)&lt;br /&gt;
		long = decimalPrecision(long, prec)&lt;br /&gt;
		local lat_long = { lat, long }&lt;br /&gt;
		lat_long[&amp;quot;display&amp;quot;] = disp&lt;br /&gt;
		lat_long[&amp;quot;format&amp;quot;] = form&lt;br /&gt;
		-- invoke template Coord with the values stored in the table&lt;br /&gt;
		return frame:expandTemplate{title = &#039;coord&#039;, args = lat_long}&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getQualifierValue is used to get a formatted value of a qualifier&lt;br /&gt;
--&lt;br /&gt;
-- The call needs:	a property (the unnamed parameter or 1=)&lt;br /&gt;
-- 					a target value for that property (pval=)&lt;br /&gt;
--					a qualifier for that target value (qual=)&lt;br /&gt;
-- The usual whitelisting and blacklisting of the property is implemented&lt;br /&gt;
-- The boolean onlysourced= parameter can be set to return nothing&lt;br /&gt;
-- when the property is unsourced (or only sourced to Wikipedia)&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: parseParam(); setRanks(); parseInput(); sourced();&lt;br /&gt;
-- propertyvalueandquals(); assembleoutput();&lt;br /&gt;
-- labelOrId(); i18n.latestdatequalifier(); format_Date();&lt;br /&gt;
-- findLang(); makeOrdinal(); roundto(); decimalPrecision(); decimalToDMS();&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getQualifierValue = function(frame)&lt;br /&gt;
&lt;br /&gt;
	-- The property ID that will have a qualifier is the first unnamed parameter&lt;br /&gt;
	local propertyID = mw.text.trim(frame.args[1] or &amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	-- The value of the property we want to match whose qualifier value is to be returned&lt;br /&gt;
	-- is passed in named parameter |pval=&lt;br /&gt;
	local propvalue = frame.args.pval&lt;br /&gt;
&lt;br /&gt;
	-- The property ID of the qualifier&lt;br /&gt;
	-- whose value is to be returned is passed in named parameter |qual=&lt;br /&gt;
	local qualifierID = frame.args.qual&lt;br /&gt;
&lt;br /&gt;
	-- A filter can be set like this: filter=P642==Q22674854&lt;br /&gt;
	local filter, fprop, fval&lt;br /&gt;
	local ftable = mw.text.split(frame.args.filter or &amp;quot;&amp;quot;, &amp;quot;==&amp;quot;)&lt;br /&gt;
	if ftable[2] then&lt;br /&gt;
		fprop = mw.text.trim(ftable[1])&lt;br /&gt;
		fval = mw.text.trim(ftable[2])&lt;br /&gt;
		filter = true&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- onlysourced is a boolean passed to return qualifiers&lt;br /&gt;
	-- only when property values are sourced to something other than Wikipedia&lt;br /&gt;
	-- if nothing or an empty string is passed set it true&lt;br /&gt;
	-- if &amp;quot;false&amp;quot; or &amp;quot;no&amp;quot; or 0 is passed set it false&lt;br /&gt;
	local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true)&lt;br /&gt;
&lt;br /&gt;
	-- set a language object and language code in the frame.args table&lt;br /&gt;
	frame.args.langobj = findLang(frame.args.lang)&lt;br /&gt;
	frame.args.lang = frame.args.langobj.code&lt;br /&gt;
&lt;br /&gt;
	-- set the requested ranks flags&lt;br /&gt;
	frame.args.reqranks = setRanks(frame.args.rank)&lt;br /&gt;
&lt;br /&gt;
	-- check for locally supplied parameter in second unnamed parameter&lt;br /&gt;
	-- success means no local parameter and the property exists&lt;br /&gt;
	local qid, props = parseInput(frame, frame.args[2], propertyID)&lt;br /&gt;
	if qid then&lt;br /&gt;
		local out = {}&lt;br /&gt;
		-- Scan through the values of the property&lt;br /&gt;
		-- we want something like property is P793, significant event (in propertyID)&lt;br /&gt;
		-- whose value is something like Q385378, construction (in propvalue)&lt;br /&gt;
		-- then we can return the value(s) of a qualifier such as P580, start time (in qualifierID)&lt;br /&gt;
		for k1, v1 in pairs(props) do&lt;br /&gt;
			if v1.mainsnak.snaktype == &amp;quot;value&amp;quot; and v1.mainsnak.datavalue.type == &amp;quot;wikibase-entityid&amp;quot; then&lt;br /&gt;
				-- It&#039;s a wiki-linked value, so check if it&#039;s the target (in propvalue) and if it has qualifiers&lt;br /&gt;
				if v1.mainsnak.datavalue.value.id == propvalue and v1.qualifiers then&lt;br /&gt;
					if onlysrc == false or sourced(v1) then&lt;br /&gt;
						-- if we&#039;ve got this far, we have a (sourced) claim with qualifiers&lt;br /&gt;
						-- which matches the target, so apply the filter and find the value(s) of the qualifier we want&lt;br /&gt;
						if not filter or (v1.qualifiers[fprop] and v1.qualifiers[fprop][1].datavalue.value.id == fval) then&lt;br /&gt;
							local quals = v1.qualifiers[qualifierID]&lt;br /&gt;
							if quals then&lt;br /&gt;
								-- can&#039;t reference qualifer, so set onlysourced = &amp;quot;no&amp;quot; (args are strings, not boolean)&lt;br /&gt;
								local qargs = frame.args&lt;br /&gt;
								qargs.onlysourced = &amp;quot;no&amp;quot;&lt;br /&gt;
								local vals = propertyvalueandquals(quals, qargs, qid)&lt;br /&gt;
								for k, v in ipairs(vals) do&lt;br /&gt;
									out[#out + 1] = v&lt;br /&gt;
								end&lt;br /&gt;
							end&lt;br /&gt;
						end&lt;br /&gt;
					end -- of check for sourced&lt;br /&gt;
				end -- of check for matching required value and has qualifiers&lt;br /&gt;
			end -- of check for wikibase entity&lt;br /&gt;
		end -- of loop through values of propertyID&lt;br /&gt;
		return assembleoutput(out, frame.args, qid, propertyID)&lt;br /&gt;
	else&lt;br /&gt;
		return props -- either local parameter or nothing&lt;br /&gt;
	end -- of test for success&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getSumOfParts scans the property &#039;has part&#039; (P527) for values matching a list.&lt;br /&gt;
-- The list is passed in parameter vlist.&lt;br /&gt;
-- It consists of a string of Qids separated by spaces or any usual punctuation.&lt;br /&gt;
-- If the matched values have a qualifier &#039;quantity&#039; (P1114), those quantities are summed.&lt;br /&gt;
-- The sum is returned as a number or nothing if zero.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: _getsumofparts;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getSumOfParts = function(frame)&lt;br /&gt;
	local sum = _getsumofparts(frame.args)&lt;br /&gt;
	if sum == 0 then return end&lt;br /&gt;
	return sum&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getValueByQual gets the value of a property which has a qualifier with a given entity value&lt;br /&gt;
-- The call needs:&lt;br /&gt;
--					a property ID (the unnamed parameter or 1=Pxxx)&lt;br /&gt;
--					the ID of a qualifier for that property (qualID=Pyyy)&lt;br /&gt;
--					either the Wikibase-entity ID of a value for that qualifier (qvalue=Qzzz)&lt;br /&gt;
--					or a string value for that qualifier (qvalue=abc123)&lt;br /&gt;
-- The usual whitelisting, blacklisting, onlysourced, etc. are implemented&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: _getvaluebyqual; parseParam; setRanks; parseInput; sourced;&lt;br /&gt;
-- assembleoutput;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getValueByQual = function(frame)&lt;br /&gt;
	local qualID = frame.args.qualID&lt;br /&gt;
	-- The Q-id of the value for the qualifier we want to match is in named parameter |qvalue=&lt;br /&gt;
	local qval = frame.args.qvalue or &amp;quot;&amp;quot;&lt;br /&gt;
	if qval == &amp;quot;&amp;quot; then return &amp;quot;no qualifier value supplied&amp;quot; end&lt;br /&gt;
	local function checkQID(id)&lt;br /&gt;
		return id == qval&lt;br /&gt;
	end&lt;br /&gt;
	return _getvaluebyqual(frame, qualID, checkQID)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getValueByLang gets the value of a property which has a qualifier P407&lt;br /&gt;
-- (&amp;quot;language of work or name&amp;quot;) whose value has the given language code&lt;br /&gt;
-- The call needs:&lt;br /&gt;
--					a property ID (the unnamed parameter or 1=Pxxx)&lt;br /&gt;
--					the MediaWiki language code to match the language (lang=xx[-yy])&lt;br /&gt;
--					(if no code is supplied, it uses the default language)&lt;br /&gt;
-- The usual whitelisting, blacklisting, onlysourced, etc. are implemented&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: _getvaluebyqual; parseParam; setRanks; parseInput; sourced; assembleoutput;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getValueByLang = function(frame)&lt;br /&gt;
	-- The language code for the qualifier we want to match is in named parameter |lang=&lt;br /&gt;
	local langcode = findLang(frame.args.lang).code&lt;br /&gt;
	local function checkLanguage(id)&lt;br /&gt;
		-- id should represent a language like &amp;quot;British English (Q7979)&amp;quot;&lt;br /&gt;
		-- it should have string property &amp;quot;Wikimedia language code (P424)&amp;quot;&lt;br /&gt;
		-- qlcode will be a table:&lt;br /&gt;
		local qlcode = mw.wikibase.getBestStatements(id, &amp;quot;P424&amp;quot;)&lt;br /&gt;
		if (#qlcode &amp;gt; 0) and (qlcode[1].mainsnak.datavalue.value == langcode) then&lt;br /&gt;
			return true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return _getvaluebyqual(frame, &amp;quot;P407&amp;quot;, checkLanguage)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getValueByRefSource gets the value of a property which has a reference &amp;quot;stated in&amp;quot; (P248)&lt;br /&gt;
-- whose value has the given entity-ID.&lt;br /&gt;
-- The call needs:&lt;br /&gt;
--					a property ID (the unnamed parameter or 1=Pxxx)&lt;br /&gt;
--					the entity ID of a value to match where the reference is stated in (match=Qzzz)&lt;br /&gt;
-- The usual whitelisting, blacklisting, onlysourced, etc. are implemented&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getValueByRefSource = function(frame)&lt;br /&gt;
	-- The property ID that we want to check is the first unnamed parameter&lt;br /&gt;
	local propertyID = mw.text.trim(frame.args[1] or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	if propertyID == &amp;quot;&amp;quot; then return &amp;quot;no property supplied&amp;quot; end&lt;br /&gt;
&lt;br /&gt;
	-- The Q-id of the value we want to match is in named parameter |qvalue=&lt;br /&gt;
	local qval = (frame.args.match or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	if qval == &amp;quot;&amp;quot; then qval = &amp;quot;Q21540096&amp;quot; end&lt;br /&gt;
&lt;br /&gt;
	local unit = (frame.args.unit or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	if unit == &amp;quot;&amp;quot; then unit = &amp;quot;Q4917&amp;quot; end&lt;br /&gt;
&lt;br /&gt;
	local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true)&lt;br /&gt;
&lt;br /&gt;
	-- set the requested ranks flags&lt;br /&gt;
	frame.args.reqranks = setRanks(frame.args.rank)&lt;br /&gt;
&lt;br /&gt;
	-- set a language object and code in the frame.args table&lt;br /&gt;
	frame.args.langobj = findLang(frame.args.lang)&lt;br /&gt;
	frame.args.lang = frame.args.langobj.code&lt;br /&gt;
&lt;br /&gt;
	local linked = parseParam(frame.args.linked, true)&lt;br /&gt;
&lt;br /&gt;
	local uabbr = parseParam(frame.args.uabbr or frame.args.unitabbr, false)&lt;br /&gt;
&lt;br /&gt;
	-- qid not nil means no local parameter and the property exists&lt;br /&gt;
	local qid, props = parseInput(frame, frame.args[2], propertyID)&lt;br /&gt;
&lt;br /&gt;
	if qid then&lt;br /&gt;
		local out = {}&lt;br /&gt;
		local mlt= {}&lt;br /&gt;
		for k1, v1 in ipairs(props) do&lt;br /&gt;
			if onlysrc == false or sourced(v1) then&lt;br /&gt;
				if v1.references then&lt;br /&gt;
					for k2, v2 in ipairs(v1.references) do&lt;br /&gt;
						if v2.snaks.P248 then&lt;br /&gt;
							for k3, v3 in ipairs(v2.snaks.P248) do&lt;br /&gt;
								if v3.datavalue.value.id == qval then&lt;br /&gt;
									out[#out+1], mlt[#out+1] = rendersnak(v1, frame.args, linked, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;, uabbr, unit)&lt;br /&gt;
									if not mlt[#out] then&lt;br /&gt;
										-- we only need one match per property value&lt;br /&gt;
										-- unless datatype was monolingual text&lt;br /&gt;
										break&lt;br /&gt;
									end&lt;br /&gt;
								end -- of test for match&lt;br /&gt;
							end -- of loop through values &amp;quot;stated in&amp;quot;&lt;br /&gt;
						end -- of test that &amp;quot;stated in&amp;quot; exists&lt;br /&gt;
					end -- of loop through references&lt;br /&gt;
				end -- of test that references exist&lt;br /&gt;
			end -- of test for sourced&lt;br /&gt;
		end -- of loop through values of propertyID&lt;br /&gt;
		if #mlt &amp;gt; 0 then&lt;br /&gt;
			local langcode = frame.args.lang&lt;br /&gt;
			langcode = mw.text.split( langcode, &#039;-&#039;, true )[1]&lt;br /&gt;
			local fbtbl = mw.language.getFallbacksFor( langcode )&lt;br /&gt;
			table.insert( fbtbl, 1, langcode )&lt;br /&gt;
			local bestval = &amp;quot;&amp;quot;&lt;br /&gt;
			local found = false&lt;br /&gt;
			for idx1, lang1 in ipairs(fbtbl) do&lt;br /&gt;
				for idx2, lang2 in ipairs(mlt) do&lt;br /&gt;
					if (lang1 == lang2) and not found then&lt;br /&gt;
						bestval = out[idx2]&lt;br /&gt;
						found = true&lt;br /&gt;
						break&lt;br /&gt;
					end&lt;br /&gt;
				end -- loop through values of property&lt;br /&gt;
			end -- loop through fallback languages&lt;br /&gt;
			if found then&lt;br /&gt;
				-- replace output table with a table containing the best value&lt;br /&gt;
				out = { bestval }&lt;br /&gt;
			else&lt;br /&gt;
				-- more than one value and none of them on the list of fallback languages&lt;br /&gt;
				-- sod it, just give them the first one&lt;br /&gt;
				out = { out[1] }&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return assembleoutput(out, frame.args, qid, propertyID)&lt;br /&gt;
	else&lt;br /&gt;
		return props -- no property or local parameter supplied&lt;br /&gt;
	end -- of test for success&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getPropertyIDs takes most of the usual parameters.&lt;br /&gt;
-- The usual whitelisting, blacklisting, onlysourced, etc. are implemented.&lt;br /&gt;
-- It returns the Entity-IDs (Qids) of the values of a property if it is a Wikibase-Entity.&lt;br /&gt;
-- Otherwise it returns nothing.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p._getPropertyIDs = function(args)&lt;br /&gt;
	args.reqranks = setRanks(args.rank)&lt;br /&gt;
	args.langobj = findLang(args.lang)&lt;br /&gt;
	args.lang = args.langobj.code&lt;br /&gt;
	-- change default for noicon to true&lt;br /&gt;
	args.noicon = tostring(parseParam(args.noicon or &amp;quot;&amp;quot;, true))&lt;br /&gt;
	local f = {}&lt;br /&gt;
	f.args = args&lt;br /&gt;
	local pid = mw.text.trim(args[1] or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
&lt;br /&gt;
	-- get the qid and table of claims for the property, or nothing and the local value passed&lt;br /&gt;
	local qid, props = parseInput(f, args[2], pid)&lt;br /&gt;
	if not qid then return props end&lt;br /&gt;
	if not props[1] then return nil end&lt;br /&gt;
	local onlysrc = parseParam(args.onlysourced or args.osd, true)&lt;br /&gt;
	local maxvals = tonumber(args.maxvals) or 0&lt;br /&gt;
&lt;br /&gt;
	local out = {}&lt;br /&gt;
	for i, v in ipairs(props) do&lt;br /&gt;
		local snak = v.mainsnak&lt;br /&gt;
		if ( snak.datatype == &amp;quot;wikibase-item&amp;quot; )&lt;br /&gt;
			and ( v.rank and args.reqranks[v.rank:sub(1, 1)] )&lt;br /&gt;
			and ( snak.snaktype == &amp;quot;value&amp;quot; )&lt;br /&gt;
			and ( sourced(v) or not onlysrc )&lt;br /&gt;
			then&lt;br /&gt;
			out[#out+1] = snak.datavalue.value.id&lt;br /&gt;
		end&lt;br /&gt;
		if maxvals &amp;gt; 0 and #out &amp;gt;= maxvals then break end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return assembleoutput(out, args, qid, pid)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p.getPropertyIDs = function(frame)&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
	return p._getPropertyIDs(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getQualifierIDs takes most of the usual parameters.&lt;br /&gt;
-- The usual whitelisting, blacklisting, onlysourced, etc. are implemented.&lt;br /&gt;
-- It takes a property-id as the first unnamed parameter, and an optional parameter qlist&lt;br /&gt;
-- which is a list of qualifier property-ids to search for (default is &amp;quot;ALL&amp;quot;)&lt;br /&gt;
-- It returns the Entity-IDs (Qids) of the values of a property if it is a Wikibase-Entity.&lt;br /&gt;
-- Otherwise it returns nothing.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getQualifierIDs = function(frame)&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
	args.reqranks = setRanks(args.rank)&lt;br /&gt;
	args.langobj = findLang(args.lang)&lt;br /&gt;
	args.lang = args.langobj.code&lt;br /&gt;
	-- change default for noicon to true&lt;br /&gt;
	args.noicon = tostring(parseParam(args.noicon or &amp;quot;&amp;quot;, true))&lt;br /&gt;
	local f = {}&lt;br /&gt;
	f.args = args&lt;br /&gt;
	local pid = mw.text.trim(args[1] or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
&lt;br /&gt;
	-- get the qid and table of claims for the property, or nothing and the local value passed&lt;br /&gt;
	local qid, props = parseInput(f, args[2], pid)&lt;br /&gt;
	if not qid then return props end&lt;br /&gt;
	if not props[1] then return nil end&lt;br /&gt;
	-- get the other parameters&lt;br /&gt;
	local onlysrc = parseParam(args.onlysourced or args.osd, true)&lt;br /&gt;
	local maxvals = tonumber(args.maxvals) or 0&lt;br /&gt;
	local qlist = args.qlist or &amp;quot;&amp;quot;&lt;br /&gt;
	if qlist == &amp;quot;&amp;quot; then qlist = &amp;quot;ALL&amp;quot; end&lt;br /&gt;
	qlist = qlist:gsub(&amp;quot;[%p%s]+&amp;quot;, &amp;quot; &amp;quot;) .. &amp;quot; &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	local out = {}&lt;br /&gt;
	for i, v in ipairs(props) do&lt;br /&gt;
		local snak = v.mainsnak&lt;br /&gt;
		if ( v.rank and args.reqranks[v.rank:sub(1, 1)] )&lt;br /&gt;
			and ( snak.snaktype == &amp;quot;value&amp;quot; )&lt;br /&gt;
			and ( sourced(v) or not onlysrc )&lt;br /&gt;
			then&lt;br /&gt;
			if v.qualifiers then&lt;br /&gt;
				for k1, v1 in pairs(v.qualifiers) do&lt;br /&gt;
					if qlist == &amp;quot;ALL &amp;quot; or qlist:match(k1 .. &amp;quot; &amp;quot;) then&lt;br /&gt;
						for i2, v2 in ipairs(v1) do&lt;br /&gt;
							if v2.datatype == &amp;quot;wikibase-item&amp;quot; and v2.snaktype == &amp;quot;value&amp;quot; then&lt;br /&gt;
								out[#out+1] = v2.datavalue.value.id&lt;br /&gt;
							end -- of test that id exists&lt;br /&gt;
						end -- of loop through qualifier values&lt;br /&gt;
					end -- of test for kq in qlist&lt;br /&gt;
				end -- of loop through qualifiers&lt;br /&gt;
			end -- of test for qualifiers&lt;br /&gt;
		end -- of test for rank value, sourced, and value exists&lt;br /&gt;
		if maxvals &amp;gt; 0 and #out &amp;gt;= maxvals then break end&lt;br /&gt;
	end -- of loop through property values&lt;br /&gt;
&lt;br /&gt;
	return assembleoutput(out, args, qid, pid)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getPropOfProp takes two propertyIDs: prop1 and prop2 (as well as the usual parameters)&lt;br /&gt;
-- If the value(s) of prop1 are of type &amp;quot;wikibase-item&amp;quot; then it returns the value(s) of prop2&lt;br /&gt;
-- of each of those wikibase-items.&lt;br /&gt;
-- The usual whitelisting, blacklisting, onlysourced, etc. are implemented&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p._getPropOfProp = function(args)&lt;br /&gt;
	-- parameter sets for commonly used groups of parameters&lt;br /&gt;
	local paraset = tonumber(args.ps or args.parameterset or 0)&lt;br /&gt;
	if paraset == 1 then&lt;br /&gt;
		-- a common setting&lt;br /&gt;
		args.rank = &amp;quot;best&amp;quot;&lt;br /&gt;
		args.fetchwikidata = &amp;quot;ALL&amp;quot;&lt;br /&gt;
		args.onlysourced = &amp;quot;no&amp;quot;&lt;br /&gt;
		args.noicon = &amp;quot;true&amp;quot;&lt;br /&gt;
	elseif paraset == 2 then&lt;br /&gt;
		-- equivalent to raw&lt;br /&gt;
		args.rank = &amp;quot;best&amp;quot;&lt;br /&gt;
		args.fetchwikidata = &amp;quot;ALL&amp;quot;&lt;br /&gt;
		args.onlysourced = &amp;quot;no&amp;quot;&lt;br /&gt;
		args.noicon = &amp;quot;true&amp;quot;&lt;br /&gt;
		args.linked = &amp;quot;no&amp;quot;&lt;br /&gt;
		args.pd = &amp;quot;true&amp;quot;&lt;br /&gt;
	elseif paraset == 3 then&lt;br /&gt;
		-- third set goes here&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	args.reqranks = setRanks(args.rank)&lt;br /&gt;
	args.langobj = findLang(args.lang)&lt;br /&gt;
	args.lang = args.langobj.code&lt;br /&gt;
	local pid1 = args.prop1 or args.pid1 or &amp;quot;&amp;quot;&lt;br /&gt;
	local pid2 = args.prop2 or args.pid2 or &amp;quot;&amp;quot;&lt;br /&gt;
	if pid1 == &amp;quot;&amp;quot; or pid2 == &amp;quot;&amp;quot; then return nil end&lt;br /&gt;
&lt;br /&gt;
	local f = {}&lt;br /&gt;
	f.args = args&lt;br /&gt;
	local qid1, statements1 = parseInput(f, args[1], pid1)&lt;br /&gt;
	-- parseInput nulls empty args[1] and returns args[1] if nothing on Wikidata&lt;br /&gt;
	if not qid1 then return statements1 end&lt;br /&gt;
	-- otherwise it returns the qid and a table for the statement&lt;br /&gt;
	local onlysrc = parseParam(args.onlysourced or args.osd, true)&lt;br /&gt;
	local maxvals = tonumber(args.maxvals) or 0&lt;br /&gt;
	local qualID = mw.text.trim(args.qual or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	if qualID == &amp;quot;&amp;quot; then qualID = nil end&lt;br /&gt;
	local out = {}&lt;br /&gt;
	for k, v in ipairs(statements1) do&lt;br /&gt;
		if not onlysrc or sourced(v) then&lt;br /&gt;
			local snak = v.mainsnak&lt;br /&gt;
			if snak.datatype == &amp;quot;wikibase-item&amp;quot; and snak.snaktype == &amp;quot;value&amp;quot; then&lt;br /&gt;
				local qid2 = snak.datavalue.value.id&lt;br /&gt;
				local statements2 = {}&lt;br /&gt;
				if args.reqranks.b then&lt;br /&gt;
					statements2 = mw.wikibase.getBestStatements(qid2, pid2)&lt;br /&gt;
				else&lt;br /&gt;
					statements2 = mw.wikibase.getAllStatements(qid2, pid2)&lt;br /&gt;
				end&lt;br /&gt;
				if statements2[1] then&lt;br /&gt;
					local out2 = propertyvalueandquals(statements2, args, qualID)&lt;br /&gt;
					out[#out+1] = assembleoutput(out2, args, qid2, pid2)&lt;br /&gt;
				end&lt;br /&gt;
			end -- of test for valid property1 value&lt;br /&gt;
		end -- of test for sourced&lt;br /&gt;
		if maxvals &amp;gt; 0 and #out &amp;gt;= maxvals then break end&lt;br /&gt;
	end -- of loop through values of property1&lt;br /&gt;
	return assembleoutput(out, args, qid1, pid1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p.getPropOfProp = function(frame)&lt;br /&gt;
	local args= frame.args&lt;br /&gt;
	if not args.prop1 and not args.pid1 then&lt;br /&gt;
		args = frame:getParent().args&lt;br /&gt;
		if not args.prop1 and not args.pid1 then return i18n.errors[&amp;quot;No property supplied&amp;quot;] end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return p._getPropOfProp(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getAwardCat takes most of the usual parameters. If the item has values of P166 (award received),&lt;br /&gt;
-- then it examines each of those awards for P2517 (category for recipients of this award).&lt;br /&gt;
-- If it exists, it returns the corresponding category,&lt;br /&gt;
-- with the item&#039;s P734 (family name) as sort key, or no sort key if there is no family name.&lt;br /&gt;
-- The sort key may be overridden by the parameter |sortkey (alias |sk).&lt;br /&gt;
-- The usual whitelisting, blacklisting, onlysourced, etc. are implemented&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getAwardCat = function(frame)&lt;br /&gt;
	frame.args.reqranks = setRanks(frame.args.rank)&lt;br /&gt;
	frame.args.langobj = findLang(frame.args.lang)&lt;br /&gt;
	frame.args.lang = frame.args.langobj.code&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
	args.sep = &amp;quot; &amp;quot;&lt;br /&gt;
	local pid1 = args.prop1 or &amp;quot;P166&amp;quot;&lt;br /&gt;
	local pid2 = args.prop2 or &amp;quot;P2517&amp;quot;&lt;br /&gt;
	if pid1 == &amp;quot;&amp;quot; or pid2 == &amp;quot;&amp;quot; then return nil end&lt;br /&gt;
	-- locally supplied value:&lt;br /&gt;
	local localval = mw.text.trim(args[1] or &amp;quot;&amp;quot;)&lt;br /&gt;
	local qid1, statements1 = parseInput(frame, localval, pid1)&lt;br /&gt;
	if not qid1 then return localval end&lt;br /&gt;
	-- linkprefix (strip quotes)&lt;br /&gt;
	local lp = (args.linkprefix or args.lp or &amp;quot;&amp;quot;):gsub(&#039;&amp;quot;&#039;, &#039;&#039;)&lt;br /&gt;
	-- sort key (strip quotes, hyphens and periods):&lt;br /&gt;
	local sk = (args.sortkey or args.sk or &amp;quot;&amp;quot;):gsub(&#039;[&amp;quot;-.]&#039;, &#039;&#039;)&lt;br /&gt;
	-- family name:&lt;br /&gt;
	local famname = &amp;quot;&amp;quot;&lt;br /&gt;
	if sk == &amp;quot;&amp;quot; then&lt;br /&gt;
		local p734 = mw.wikibase.getBestStatements(qid1, &amp;quot;P734&amp;quot;)[1]&lt;br /&gt;
		local p734id = p734 and p734.mainsnak.snaktype == &amp;quot;value&amp;quot; and p734.mainsnak.datavalue.value.id or &amp;quot;&amp;quot;&lt;br /&gt;
		famname = mw.wikibase.getSitelink(p734id) or &amp;quot;&amp;quot;&lt;br /&gt;
		-- strip namespace and disambigation&lt;br /&gt;
		local pos = famname:find(&amp;quot;:&amp;quot;) or 0&lt;br /&gt;
		famname = famname:sub(pos+1):gsub(&amp;quot;%s%(.+%)$&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
		if famname == &amp;quot;&amp;quot; then&lt;br /&gt;
			local lbl = mw.wikibase.getLabel(p734id)&lt;br /&gt;
			famname = lbl and mw.text.nowiki(lbl) or &amp;quot;&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local onlysrc = parseParam(args.onlysourced or args.osd, true)&lt;br /&gt;
	local maxvals = tonumber(args.maxvals) or 0&lt;br /&gt;
	local qualID = mw.text.trim(args.qual or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	if qualID == &amp;quot;&amp;quot; then qualID = nil end&lt;br /&gt;
	local out = {}&lt;br /&gt;
	for k, v in ipairs(statements1) do&lt;br /&gt;
		if not onlysrc or sourced(v) then&lt;br /&gt;
			local snak = v.mainsnak&lt;br /&gt;
			if snak.datatype == &amp;quot;wikibase-item&amp;quot; and snak.snaktype == &amp;quot;value&amp;quot; then&lt;br /&gt;
				local qid2 = snak.datavalue.value.id&lt;br /&gt;
				local statements2 = {}&lt;br /&gt;
				if args.reqranks.b then&lt;br /&gt;
					statements2 = mw.wikibase.getBestStatements(qid2, pid2)&lt;br /&gt;
				else&lt;br /&gt;
					statements2 = mw.wikibase.getAllStatements(qid2, pid2)&lt;br /&gt;
				end&lt;br /&gt;
				if statements2[1] and statements2[1].mainsnak.snaktype == &amp;quot;value&amp;quot; then&lt;br /&gt;
					local qid3 = statements2[1].mainsnak.datavalue.value.id&lt;br /&gt;
					local sitelink = mw.wikibase.getSitelink(qid3)&lt;br /&gt;
					-- if there&#039;s no local sitelink, create the sitelink from English label&lt;br /&gt;
					if not sitelink then&lt;br /&gt;
						local lbl = mw.wikibase.getLabelByLang(qid3, &amp;quot;en&amp;quot;)&lt;br /&gt;
						if lbl then&lt;br /&gt;
							if lbl:sub(1,9) == &amp;quot;Category:&amp;quot; then&lt;br /&gt;
								sitelink = mw.text.nowiki(lbl)&lt;br /&gt;
							else&lt;br /&gt;
								sitelink = &amp;quot;Category:&amp;quot; .. mw.text.nowiki(lbl)&lt;br /&gt;
							end&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
					if sitelink then&lt;br /&gt;
						if sk ~= &amp;quot;&amp;quot; then&lt;br /&gt;
							out[#out+1] = &amp;quot;[[&amp;quot; .. lp .. sitelink .. &amp;quot;|&amp;quot; .. sk .. &amp;quot;]]&amp;quot;&lt;br /&gt;
						elseif famname ~= &amp;quot;&amp;quot; then&lt;br /&gt;
							out[#out+1] = &amp;quot;[[&amp;quot; .. lp .. sitelink .. &amp;quot;|&amp;quot; .. famname .. &amp;quot;]]&amp;quot;&lt;br /&gt;
						else&lt;br /&gt;
							out[#out+1] = &amp;quot;[[&amp;quot; .. lp .. sitelink .. &amp;quot;]]&amp;quot;&lt;br /&gt;
						end -- of check for sort keys&lt;br /&gt;
					end -- of test for sitelink&lt;br /&gt;
				end -- of test for category&lt;br /&gt;
			end -- of test for wikibase item has a value&lt;br /&gt;
		end -- of test for sourced&lt;br /&gt;
		if maxvals &amp;gt; 0 and #out &amp;gt;= maxvals then break end&lt;br /&gt;
	end -- of loop through values of property1&lt;br /&gt;
	return assembleoutput(out, args, qid1, pid1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getIntersectCat takes most of the usual parameters.&lt;br /&gt;
-- The usual whitelisting, blacklisting, onlysourced, etc. are implemented&lt;br /&gt;
-- It takes two properties, |prop1 and |prop2 (e.g. occupation and country of citizenship)&lt;br /&gt;
-- Each property&#039;s value is a wiki-base entity&lt;br /&gt;
-- For each value of the first parameter (ranks implemented) it fetches the value&#039;s main category&lt;br /&gt;
-- and then each value of the second parameter (possibly substituting a simpler description)&lt;br /&gt;
-- then it returns all of the categories representing the intersection of those properties,&lt;br /&gt;
-- (e.g. Category:Actors from Canada). A joining term may be supplied (e.g. |join=from).&lt;br /&gt;
-- The item&#039;s P734 (family name) is the sort key, or no sort key if there is no family name.&lt;br /&gt;
-- The sort key may be overridden by the parameter |sortkey (alias |sk).&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getIntersectCat = function(frame)&lt;br /&gt;
	frame.args.reqranks = setRanks(frame.args.rank)&lt;br /&gt;
	frame.args.langobj = findLang(frame.args.lang)&lt;br /&gt;
	frame.args.lang = frame.args.langobj.code&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
	args.sep = &amp;quot; &amp;quot;&lt;br /&gt;
	args.linked = &amp;quot;no&amp;quot;&lt;br /&gt;
	local pid1 = args.prop1 or &amp;quot;P106&amp;quot;&lt;br /&gt;
	local pid2 = args.prop2 or &amp;quot;P27&amp;quot;&lt;br /&gt;
	if pid1 == &amp;quot;&amp;quot; or pid2 == &amp;quot;&amp;quot; then return nil end&lt;br /&gt;
	local qid, statements1 = parseInput(frame, &amp;quot;&amp;quot;, pid1)&lt;br /&gt;
	if not qid then return nil end&lt;br /&gt;
	local qid, statements2 = parseInput(frame, &amp;quot;&amp;quot;, pid2)&lt;br /&gt;
	if not qid then return nil end&lt;br /&gt;
	-- topics like countries may have different names in categories from their label in Wikidata&lt;br /&gt;
	local subs_exists, subs = pcall(mw.loadData, &amp;quot;Module:WikidataIB/subs&amp;quot;)&lt;br /&gt;
	local join = args.join or &amp;quot;&amp;quot;&lt;br /&gt;
	local onlysrc = parseParam(args.onlysourced or args.osd, true)&lt;br /&gt;
	local maxvals = tonumber(args.maxvals) or 0&lt;br /&gt;
	-- linkprefix (strip quotes)&lt;br /&gt;
	local lp = (args.linkprefix or args.lp or &amp;quot;&amp;quot;):gsub(&#039;&amp;quot;&#039;, &#039;&#039;)&lt;br /&gt;
	-- sort key (strip quotes, hyphens and periods):&lt;br /&gt;
	local sk = (args.sortkey or args.sk or &amp;quot;&amp;quot;):gsub(&#039;[&amp;quot;-.]&#039;, &#039;&#039;)&lt;br /&gt;
	-- family name:&lt;br /&gt;
	local famname = &amp;quot;&amp;quot;&lt;br /&gt;
	if sk == &amp;quot;&amp;quot; then&lt;br /&gt;
		local p734 = mw.wikibase.getBestStatements(qid, &amp;quot;P734&amp;quot;)[1]&lt;br /&gt;
		local p734id = p734 and p734.mainsnak.snaktype == &amp;quot;value&amp;quot; and p734.mainsnak.datavalue.value.id or &amp;quot;&amp;quot;&lt;br /&gt;
		famname = mw.wikibase.getSitelink(p734id) or &amp;quot;&amp;quot;&lt;br /&gt;
		-- strip namespace and disambigation&lt;br /&gt;
		local pos = famname:find(&amp;quot;:&amp;quot;) or 0&lt;br /&gt;
		famname = famname:sub(pos+1):gsub(&amp;quot;%s%(.+%)$&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
		if famname == &amp;quot;&amp;quot; then&lt;br /&gt;
			local lbl = mw.wikibase.getLabel(p734id)&lt;br /&gt;
			famname = lbl and mw.text.nowiki(lbl) or &amp;quot;&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local cat1 = {}&lt;br /&gt;
	for k, v in ipairs(statements1) do&lt;br /&gt;
		if not onlysrc or sourced(v) then&lt;br /&gt;
			-- get the ID representing the value of the property&lt;br /&gt;
			local pvalID = (v.mainsnak.snaktype == &amp;quot;value&amp;quot;) and v.mainsnak.datavalue.value.id&lt;br /&gt;
			if pvalID then&lt;br /&gt;
				-- get the topic&#039;s main category (P910) for that entity&lt;br /&gt;
				local p910 = mw.wikibase.getBestStatements(pvalID, &amp;quot;P910&amp;quot;)[1]&lt;br /&gt;
				if p910 and p910.mainsnak.snaktype == &amp;quot;value&amp;quot; then&lt;br /&gt;
					local tmcID = p910.mainsnak.datavalue.value.id&lt;br /&gt;
					-- use sitelink or the English label for the cat&lt;br /&gt;
					local cat = mw.wikibase.getSitelink(tmcID)&lt;br /&gt;
					if not cat then&lt;br /&gt;
						local lbl = mw.wikibase.getLabelByLang(tmcID, &amp;quot;en&amp;quot;)&lt;br /&gt;
						if lbl then&lt;br /&gt;
							if lbl:sub(1,9) == &amp;quot;Category:&amp;quot; then&lt;br /&gt;
								cat = mw.text.nowiki(lbl)&lt;br /&gt;
							else&lt;br /&gt;
								cat = &amp;quot;Category:&amp;quot; .. mw.text.nowiki(lbl)&lt;br /&gt;
							end&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
					cat1[#cat1+1] = cat&lt;br /&gt;
				end -- of test for topic&#039;s main category exists&lt;br /&gt;
			end -- of test for property has vaild value&lt;br /&gt;
		end -- of test for sourced&lt;br /&gt;
		if maxvals &amp;gt; 0 and #cat1 &amp;gt;= maxvals then break end&lt;br /&gt;
	end&lt;br /&gt;
	local cat2 = {}&lt;br /&gt;
	for k, v in ipairs(statements2) do&lt;br /&gt;
		if not onlysrc or sourced(v) then&lt;br /&gt;
			local cat = rendersnak(v, args)&lt;br /&gt;
			if subs[cat] then cat = subs[cat] end&lt;br /&gt;
			cat2[#cat2+1] = cat&lt;br /&gt;
		end&lt;br /&gt;
		if maxvals &amp;gt; 0 and #cat2 &amp;gt;= maxvals then break end&lt;br /&gt;
	end&lt;br /&gt;
	local out = {}&lt;br /&gt;
	for k1, v1 in ipairs(cat1) do&lt;br /&gt;
		for k2, v2 in ipairs(cat2) do&lt;br /&gt;
			if sk ~= &amp;quot;&amp;quot; then&lt;br /&gt;
				out[#out+1] = &amp;quot;[[&amp;quot; .. lp .. v1 .. &amp;quot; &amp;quot; .. join .. &amp;quot; &amp;quot; .. v2 .. &amp;quot;|&amp;quot; .. sk .. &amp;quot;]]&amp;quot;&lt;br /&gt;
			elseif famname ~= &amp;quot;&amp;quot; then&lt;br /&gt;
				out[#out+1] = &amp;quot;[[&amp;quot; .. lp .. v1 .. &amp;quot; &amp;quot; .. join .. &amp;quot; &amp;quot; .. v2 .. &amp;quot;|&amp;quot; .. famname .. &amp;quot;]]&amp;quot;&lt;br /&gt;
			else&lt;br /&gt;
				out[#out+1] = &amp;quot;[[&amp;quot; .. lp .. v1 .. &amp;quot; &amp;quot; .. join .. &amp;quot; &amp;quot; .. v2 .. &amp;quot;]]&amp;quot;&lt;br /&gt;
			end -- of check for sort keys&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	args.noicon = &amp;quot;true&amp;quot;&lt;br /&gt;
	return assembleoutput(out, args, qid, pid1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- qualsToTable takes most of the usual parameters.&lt;br /&gt;
-- The usual whitelisting, blacklisting, onlysourced, etc. are implemented.&lt;br /&gt;
-- A qid may be given, and the first unnamed parameter is the property ID, which is of type wikibase item.&lt;br /&gt;
-- It takes a list of qualifier property IDs as |quals=&lt;br /&gt;
-- For a given qid and property, it creates the rows of an html table,&lt;br /&gt;
-- each row being a value of the property (optionally only if the property matches the value in |pval= )&lt;br /&gt;
-- each cell being the first value of the qualifier corresponding to the list in |quals&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: parseParam; setRanks; parseInput; sourced;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.qualsToTable = function(frame)&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
&lt;br /&gt;
	local quals = args.quals or &amp;quot;&amp;quot;&lt;br /&gt;
	if quals == &amp;quot;&amp;quot; then return &amp;quot;&amp;quot; end&lt;br /&gt;
&lt;br /&gt;
	args.reqranks = setRanks(args.rank)&lt;br /&gt;
&lt;br /&gt;
	local propertyID = mw.text.trim(args[1] or &amp;quot;&amp;quot;)&lt;br /&gt;
	local f = {}&lt;br /&gt;
	f.args = args&lt;br /&gt;
	local entityid, props = parseInput(f, &amp;quot;&amp;quot;, propertyID)&lt;br /&gt;
	if not entityid then return &amp;quot;&amp;quot; end&lt;br /&gt;
&lt;br /&gt;
	args.langobj = findLang(args.lang)&lt;br /&gt;
	args.lang = args.langobj.code&lt;br /&gt;
&lt;br /&gt;
	local pval = args.pval or &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	local qplist = mw.text.split(quals, &amp;quot;%p&amp;quot;) -- split at punctuation and make a sequential table&lt;br /&gt;
	for i, v in ipairs(qplist) do&lt;br /&gt;
		qplist[i] = mw.text.trim(v):upper() -- remove whitespace and capitalise&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local col1 = args.firstcol or &amp;quot;&amp;quot;&lt;br /&gt;
	if col1 ~= &amp;quot;&amp;quot; then&lt;br /&gt;
		col1 = col1 .. &amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local emptycell = args.emptycell or &amp;quot;&amp;amp;nbsp;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	-- construct a 2-D array of qualifier values in qvals&lt;br /&gt;
	local qvals = {}&lt;br /&gt;
	for i, v in ipairs(props) do&lt;br /&gt;
		local skip = false&lt;br /&gt;
		if pval ~= &amp;quot;&amp;quot; then&lt;br /&gt;
			local pid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id&lt;br /&gt;
			if pid ~= pval then skip = true end&lt;br /&gt;
		end&lt;br /&gt;
		if not skip then&lt;br /&gt;
			local qval = {}&lt;br /&gt;
			local vqualifiers = v.qualifiers or {}&lt;br /&gt;
			-- go through list of wanted qualifier properties&lt;br /&gt;
			for i1, v1 in ipairs(qplist) do&lt;br /&gt;
				-- check for that property ID in the statement&#039;s qualifiers&lt;br /&gt;
				local qv, qtype&lt;br /&gt;
				if vqualifiers[v1] then&lt;br /&gt;
					qtype = vqualifiers[v1][1].datatype&lt;br /&gt;
					if qtype == &amp;quot;time&amp;quot; then&lt;br /&gt;
						if vqualifiers[v1][1].snaktype == &amp;quot;value&amp;quot; then&lt;br /&gt;
							qv = mw.wikibase.renderSnak(vqualifiers[v1][1])&lt;br /&gt;
							qv = frame:expandTemplate{title=&amp;quot;dts&amp;quot;, args={qv}}&lt;br /&gt;
						else&lt;br /&gt;
							qv = &amp;quot;?&amp;quot;&lt;br /&gt;
						end&lt;br /&gt;
					elseif qtype == &amp;quot;url&amp;quot; then&lt;br /&gt;
						if vqualifiers[v1][1].snaktype == &amp;quot;value&amp;quot; then&lt;br /&gt;
							qv = mw.wikibase.renderSnak(vqualifiers[v1][1])&lt;br /&gt;
							local display = mw.ustring.match( mw.uri.decode(qv, &amp;quot;WIKI&amp;quot;), &amp;quot;([%w ]+)$&amp;quot; )&lt;br /&gt;
							if display then&lt;br /&gt;
								qv = &amp;quot;[&amp;quot; .. qv .. &amp;quot; &amp;quot; .. display .. &amp;quot;]&amp;quot;&lt;br /&gt;
							end&lt;br /&gt;
						end&lt;br /&gt;
					else&lt;br /&gt;
						qv = mw.wikibase.formatValue(vqualifiers[v1][1])&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
				-- record either the value or a placeholder&lt;br /&gt;
				qval[i1] = qv or emptycell&lt;br /&gt;
			end -- of loop through list of qualifiers&lt;br /&gt;
			-- add the list of qualifier values as a &amp;quot;row&amp;quot; in the main list&lt;br /&gt;
			qvals[#qvals+1] = qval&lt;br /&gt;
		end&lt;br /&gt;
	end -- of for each value loop&lt;br /&gt;
&lt;br /&gt;
	local out = {}&lt;br /&gt;
	for i, v in ipairs(qvals) do&lt;br /&gt;
		out[i] = &amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;quot; .. col1 .. table.concat(qvals[i], &amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;quot;) .. &amp;quot;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(out, &amp;quot;\n&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getGlobe takes an optional qid of a Wikidata entity passed as |qid=&lt;br /&gt;
-- otherwise it uses the linked item for the current page.&lt;br /&gt;
-- If returns the Qid of the globe used in P625 (coordinate location),&lt;br /&gt;
-- or nil if there isn&#039;t one.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getGlobe = function(frame)&lt;br /&gt;
	local qid = frame.args.qid or frame.args[1] or &amp;quot;&amp;quot;&lt;br /&gt;
	if qid == &amp;quot;&amp;quot; then qid = mw.wikibase.getEntityIdForCurrentPage() end&lt;br /&gt;
	local coords = mw.wikibase.getBestStatements(qid, &amp;quot;P625&amp;quot;)[1]&lt;br /&gt;
	local globeid&lt;br /&gt;
	if coords and coords.mainsnak.snaktype == &amp;quot;value&amp;quot; then&lt;br /&gt;
		globeid = coords.mainsnak.datavalue.value.globe:match(&amp;quot;(Q%d+)&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	return globeid&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getCommonsLink takes an optional qid of a Wikidata entity passed as |qid=&lt;br /&gt;
-- It returns one of the following in order of preference:&lt;br /&gt;
-- the Commons sitelink of the linked Wikidata item;&lt;br /&gt;
-- the Commons sitelink of the topic&#039;s main category of the linked Wikidata item;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: _getCommonslink(); _getSitelink(); parseParam()&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getCommonsLink = function(frame)&lt;br /&gt;
	local oc = frame.args.onlycat or frame.args.onlycategories&lt;br /&gt;
	local fb = parseParam(frame.args.fallback or frame.args.fb, true)&lt;br /&gt;
	return _getCommonslink(frame.args.qid, oc, fb)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getSitelink takes the qid of a Wikidata entity passed as |qid=&lt;br /&gt;
-- It takes an optional parameter |wiki= to determine which wiki is to be checked for a sitelink&lt;br /&gt;
-- If the parameter is blank, then it uses the local wiki.&lt;br /&gt;
-- If there is a sitelink to an article available, it returns the plain text link to the article&lt;br /&gt;
-- If there is no sitelink, it returns nil.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getSiteLink = function(frame)&lt;br /&gt;
	return _getSitelink(frame.args.qid, frame.args.wiki or mw.text.trim(frame.args[1] or &amp;quot;&amp;quot;))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getLink has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid=&lt;br /&gt;
-- If there is a sitelink to an article on the local Wiki, it returns a link to the article&lt;br /&gt;
-- with the Wikidata label as the displayed text.&lt;br /&gt;
-- If there is no sitelink, it returns the label as plain text.&lt;br /&gt;
-- If there is no label in the local language, it displays the qid instead.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getLink = function(frame)&lt;br /&gt;
	local itemID = mw.text.trim(frame.args[1] or frame.args.qid or &amp;quot;&amp;quot;)&lt;br /&gt;
	if itemID == &amp;quot;&amp;quot; then return end&lt;br /&gt;
	local sitelink = mw.wikibase.getSitelink(itemID)&lt;br /&gt;
	local label = labelOrId(itemID)&lt;br /&gt;
	if sitelink then&lt;br /&gt;
		return &amp;quot;[[:&amp;quot; .. sitelink .. &amp;quot;|&amp;quot; .. label .. &amp;quot;]]&amp;quot;&lt;br /&gt;
	else&lt;br /&gt;
		return label&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getLabel has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid=&lt;br /&gt;
-- It returns the Wikidata label for the local language as plain text.&lt;br /&gt;
-- If there is no label in the local language, it displays the qid instead.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getLabel = function(frame)&lt;br /&gt;
	local itemID = mw.text.trim(frame.args[1] or frame.args.qid or &amp;quot;&amp;quot;)&lt;br /&gt;
	if itemID == &amp;quot;&amp;quot; then return end&lt;br /&gt;
	local lang = frame.args.lang or &amp;quot;&amp;quot;&lt;br /&gt;
	if lang == &amp;quot;&amp;quot; then lang = nil end&lt;br /&gt;
	local label = labelOrId(itemID, lang)&lt;br /&gt;
	return label&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- label has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid=&lt;br /&gt;
-- if no qid is supplied, it uses the qid associated with the current page.&lt;br /&gt;
-- It returns the Wikidata label for the local language as plain text.&lt;br /&gt;
-- If there is no label in the local language, it returns nil.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.label = function(frame)&lt;br /&gt;
	local qid = mw.text.trim(frame.args[1] or frame.args.qid or &amp;quot;&amp;quot;)&lt;br /&gt;
	if qid == &amp;quot;&amp;quot; then qid = mw.wikibase.getEntityIdForCurrentPage() end&lt;br /&gt;
	if not qid then return end&lt;br /&gt;
	local lang = frame.args.lang or &amp;quot;&amp;quot;&lt;br /&gt;
	if lang == &amp;quot;&amp;quot; then lang = nil end&lt;br /&gt;
	local label, success = labelOrId(qid, lang)&lt;br /&gt;
	if success then return label end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getAT (Article Title)&lt;br /&gt;
-- has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid=&lt;br /&gt;
-- If there is a sitelink to an article on the local Wiki, it returns the sitelink as plain text.&lt;br /&gt;
-- If there is no sitelink or qid supplied, it returns nothing.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getAT = function(frame)&lt;br /&gt;
	local itemID = mw.text.trim(frame.args[1] or frame.args.qid or &amp;quot;&amp;quot;)&lt;br /&gt;
	if itemID == &amp;quot;&amp;quot; then return end&lt;br /&gt;
	return mw.wikibase.getSitelink(itemID)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getDescription has the qid of a Wikidata entity passed as |qid=&lt;br /&gt;
-- (it defaults to the associated qid of the current article if omitted)&lt;br /&gt;
-- and a local parameter passed as the first unnamed parameter.&lt;br /&gt;
-- Any local parameter passed (other than &amp;quot;Wikidata&amp;quot; or &amp;quot;none&amp;quot;) becomes the return value.&lt;br /&gt;
-- It returns the article description for the Wikidata entity if the local parameter is &amp;quot;Wikidata&amp;quot;.&lt;br /&gt;
-- Nothing is returned if the description doesn&#039;t exist or &amp;quot;none&amp;quot; is passed as the local parameter.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getDescription = function(frame)&lt;br /&gt;
	local desc = mw.text.trim(frame.args[1] or &amp;quot;&amp;quot;)&lt;br /&gt;
	local itemID = mw.text.trim(frame.args.qid or &amp;quot;&amp;quot;)&lt;br /&gt;
	if itemID == &amp;quot;&amp;quot; then itemID = nil end&lt;br /&gt;
	if desc:lower() == &#039;wikidata&#039; then&lt;br /&gt;
		return mw.wikibase.getDescription(itemID)&lt;br /&gt;
	elseif desc:lower() == &#039;none&#039; then&lt;br /&gt;
		return nil&lt;br /&gt;
	else&lt;br /&gt;
		return desc&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getAliases has the qid of a Wikidata entity passed as |qid=&lt;br /&gt;
-- (it defaults to the associated qid of the current article if omitted)&lt;br /&gt;
-- and a local parameter passed as the first unnamed parameter.&lt;br /&gt;
-- It implements blacklisting and whitelisting with a field name of &amp;quot;alias&amp;quot; by default.&lt;br /&gt;
-- Any local parameter passed becomes the return value.&lt;br /&gt;
-- Otherwise it returns the aliases for the Wikidata entity with the usual list options.&lt;br /&gt;
-- Nothing is returned if the aliases do not exist.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: findLang(); assembleoutput()&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getAliases = function(frame)&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
&lt;br /&gt;
	local fieldname = args.name or &amp;quot;&amp;quot;&lt;br /&gt;
	if fieldname == &amp;quot;&amp;quot; then fieldname = &amp;quot;alias&amp;quot; end&lt;br /&gt;
&lt;br /&gt;
	local blacklist = args.suppressfields or args.spf or &amp;quot;&amp;quot;&lt;br /&gt;
	if blacklist:find(fieldname) then return nil end&lt;br /&gt;
&lt;br /&gt;
	local localval = mw.text.trim(args[1] or &amp;quot;&amp;quot;)&lt;br /&gt;
	if localval ~= &amp;quot;&amp;quot; then return localval end&lt;br /&gt;
&lt;br /&gt;
	local whitelist = args.fetchwikidata or args.fwd or &amp;quot;&amp;quot;&lt;br /&gt;
	if whitelist == &amp;quot;&amp;quot; then whitelist = &amp;quot;NONE&amp;quot; end&lt;br /&gt;
	if not (whitelist == &#039;ALL&#039; or whitelist:find(fieldname)) then return nil end&lt;br /&gt;
&lt;br /&gt;
	local qid = args.qid or &amp;quot;&amp;quot;&lt;br /&gt;
	if qid == &amp;quot;&amp;quot; then qid = mw.wikibase.getEntityIdForCurrentPage() end&lt;br /&gt;
	if not qid or not mw.wikibase.entityExists(qid) then return nil end&lt;br /&gt;
&lt;br /&gt;
	local aliases = mw.wikibase.getEntity(qid).aliases&lt;br /&gt;
	if not aliases then return nil end&lt;br /&gt;
&lt;br /&gt;
	args.langobj = findLang(args.lang)&lt;br /&gt;
	local langcode = args.langobj.code&lt;br /&gt;
	args.lang = langcode&lt;br /&gt;
&lt;br /&gt;
	local out = {}&lt;br /&gt;
	for k1, v1 in pairs(aliases) do&lt;br /&gt;
		if v1[1].language == langcode then&lt;br /&gt;
			for k1, v2 in ipairs(v1) do&lt;br /&gt;
				out[#out+1] = v2.value&lt;br /&gt;
			end&lt;br /&gt;
			break&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return assembleoutput(out, args, qid)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- pageId returns the page id (entity ID, Qnnn) of the current page&lt;br /&gt;
-- returns nothing if the page is not connected to Wikidata&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.pageId = function(frame)&lt;br /&gt;
	return mw.wikibase.getEntityIdForCurrentPage()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- formatDate is a wrapper to export the private function format_Date&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: format_Date();&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.formatDate = function(frame)&lt;br /&gt;
	return format_Date(frame.args[1], frame.args.df, frame.args.bc)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- location is a wrapper to export the private function _location&lt;br /&gt;
-- it takes the entity-id as qid or the first unnamed parameter&lt;br /&gt;
-- optional boolean parameter first toggles the display of the first item&lt;br /&gt;
-- optional boolean parameter skip toggles the display to skip to the last item&lt;br /&gt;
-- parameter debug=&amp;lt;y/n&amp;gt; (default &#039;n&#039;) adds error msg if not a location&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: _location();&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.location = function(frame)&lt;br /&gt;
	local debug = (frame.args.debug or &amp;quot;&amp;quot;):sub(1, 1):lower()&lt;br /&gt;
	if debug == &amp;quot;&amp;quot; then debug = &amp;quot;n&amp;quot; end&lt;br /&gt;
	local qid = mw.text.trim(frame.args.qid or frame.args[1] or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	if qid == &amp;quot;&amp;quot; then qid=mw.wikibase.getEntityIdForCurrentPage() end&lt;br /&gt;
	if not qid then&lt;br /&gt;
		if debug ~= &amp;quot;n&amp;quot; then&lt;br /&gt;
			return i18n.errors[&amp;quot;entity-not-found&amp;quot;]&lt;br /&gt;
		else&lt;br /&gt;
			return nil&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local first = mw.text.trim(frame.args.first or &amp;quot;&amp;quot;)&lt;br /&gt;
	local skip = mw.text.trim(frame.args.skip or &amp;quot;&amp;quot;)&lt;br /&gt;
	return table.concat( _location(qid, first, skip), &amp;quot;, &amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- checkBlacklist implements a test to check whether a named field is allowed&lt;br /&gt;
-- returns true if the field is not blacklisted (i.e. allowed)&lt;br /&gt;
-- returns false if the field is blacklisted (i.e. disallowed)&lt;br /&gt;
-- {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Joe |suppressfields=Dave; Joe; Fred}} | not blacklisted | blacklisted}}&lt;br /&gt;
-- displays &amp;quot;blacklisted&amp;quot;&lt;br /&gt;
-- {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Jim |suppressfields=Dave; Joe; Fred}} | not blacklisted | blacklisted}}&lt;br /&gt;
-- displays &amp;quot;not blacklisted&amp;quot;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.checkBlacklist = function(frame)&lt;br /&gt;
	local blacklist = frame.args.suppressfields or frame.args.spf or &amp;quot;&amp;quot;&lt;br /&gt;
	local fieldname = frame.args.name or &amp;quot;&amp;quot;&lt;br /&gt;
	if blacklist ~= &amp;quot;&amp;quot; and fieldname ~= &amp;quot;&amp;quot; then&lt;br /&gt;
		if blacklist:find(fieldname) then&lt;br /&gt;
			return false&lt;br /&gt;
		else&lt;br /&gt;
			return true&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		-- one of the fields is missing: let&#039;s call that &amp;quot;not on the list&amp;quot;&lt;br /&gt;
		return true&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- emptyor returns nil if its first unnamed argument is just punctuation, whitespace or html tags&lt;br /&gt;
-- otherwise it returns the argument unchanged (including leading/trailing space).&lt;br /&gt;
-- If the argument may contain &amp;quot;=&amp;quot;, then it must be called explicitly:&lt;br /&gt;
-- |1=arg&lt;br /&gt;
-- (In that case, leading and trailing spaces are trimmed)&lt;br /&gt;
-- It finds use in infoboxes where it can replace tests like:&lt;br /&gt;
-- {{#if: {{#invoke:WikidatIB |getvalue |P99 |fwd=ALL}} | &amp;lt;span class=&amp;quot;xxx&amp;quot;&amp;gt;{{#invoke:WikidatIB |getvalue |P99 |fwd=ALL}}&amp;lt;/span&amp;gt; | }}&lt;br /&gt;
-- with a form that uses just a single call to Wikidata:&lt;br /&gt;
-- {{#invoke |WikidataIB |emptyor |1= &amp;lt;span class=&amp;quot;xxx&amp;quot;&amp;gt;{{#invoke:WikidataIB |getvalue |P99 |fwd=ALL}}&amp;lt;/span&amp;gt; }}&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.emptyor = function(frame)&lt;br /&gt;
	local s = frame.args[1] or &amp;quot;&amp;quot;&lt;br /&gt;
	if s == &amp;quot;&amp;quot; then return nil end&lt;br /&gt;
	local sx = s:gsub(&amp;quot;%s&amp;quot;, &amp;quot;&amp;quot;):gsub(&amp;quot;&amp;lt;[^&amp;gt;]*&amp;gt;&amp;quot;, &amp;quot;&amp;quot;):gsub(&amp;quot;%p&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
	if sx == &amp;quot;&amp;quot; then&lt;br /&gt;
		return nil&lt;br /&gt;
	else&lt;br /&gt;
		return s&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- labelorid is a public function to expose the output of labelOrId()&lt;br /&gt;
-- Pass the Q-number as |qid= or as an unnamed parameter.&lt;br /&gt;
-- It returns the Wikidata label for that entity or the qid if no label exists.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: labelOrId&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.labelorid = function(frame)&lt;br /&gt;
	return (labelOrId(frame.args.qid or frame.args[1]))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getLang returns the MediaWiki language code of the current content.&lt;br /&gt;
-- If optional parameter |style=full, it returns the language name.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getLang = function(frame)&lt;br /&gt;
	local style = (frame.args.style or &amp;quot;&amp;quot;):lower()&lt;br /&gt;
	local langcode = mw.language.getContentLanguage().code&lt;br /&gt;
	if style == &amp;quot;full&amp;quot; then&lt;br /&gt;
		return mw.language.fetchLanguageName( langcode )&lt;br /&gt;
	end&lt;br /&gt;
	return langcode&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getItemLangCode takes a qid parameter (using the current page&#039;s qid if blank)&lt;br /&gt;
-- If the item for that qid has property country (P17) it looks at the first preferred value&lt;br /&gt;
-- If the country has an official language (P37), it looks at the first preferred value&lt;br /&gt;
-- If that official language has a language code (P424), it returns the first preferred value&lt;br /&gt;
-- Otherwise it returns nothing.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: _getItemLangCode()&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getItemLangCode = function(frame)&lt;br /&gt;
	return _getItemLangCode(frame.args.qid or frame.args[1])&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- findLanguage exports the local findLang() function&lt;br /&gt;
-- It takes an optional language code and returns, in order of preference:&lt;br /&gt;
-- the code if a known language;&lt;br /&gt;
-- the user&#039;s language, if set;&lt;br /&gt;
-- the server&#039;s content language.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: findLang&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.findLanguage = function(frame)&lt;br /&gt;
	return findLang(frame.args.lang or frame.args[1]).code&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getQid returns the qid, if supplied&lt;br /&gt;
-- failing that, the Wikidata entity ID of the &amp;quot;category&#039;s main topic (P301)&amp;quot;, if it exists&lt;br /&gt;
-- failing that, the Wikidata entity ID associated with the current page, if it exists&lt;br /&gt;
-- otherwise, nothing&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getQid = function(frame)&lt;br /&gt;
	local qid = (frame.args.qid or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	-- check if a qid was passed; if so, return it:&lt;br /&gt;
	if qid ~= &amp;quot;&amp;quot; then return qid end&lt;br /&gt;
	-- check if there&#039;s a &amp;quot;category&#039;s main topic (P301)&amp;quot;:&lt;br /&gt;
	qid = mw.wikibase.getEntityIdForCurrentPage()&lt;br /&gt;
	if qid then&lt;br /&gt;
		local prop301 = mw.wikibase.getBestStatements(qid, &amp;quot;P301&amp;quot;)&lt;br /&gt;
		if prop301[1] then&lt;br /&gt;
			local mctid = prop301[1].mainsnak.datavalue.value.id&lt;br /&gt;
			if mctid then return mctid end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- otherwise return the page qid (if any)&lt;br /&gt;
	return qid&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- followQid takes four optional parameters: qid, props, list and all.&lt;br /&gt;
-- If qid is not given, it uses the qid for the connected page&lt;br /&gt;
-- or returns nil if there isn&#039;t one.&lt;br /&gt;
-- props is a list of properties, separated by punctuation.&lt;br /&gt;
-- If props is given, the Wikidata item for the qid is examined for each property in turn.&lt;br /&gt;
-- If that property contains a value that is another Wikibase-item, that item&#039;s qid is returned,&lt;br /&gt;
-- and the search terminates, unless |all=y when all of the qids are returned, separated by spaces.&lt;br /&gt;
-- If |list= is set to a template, the qids are passed as arguments to the template.&lt;br /&gt;
-- If props is not given, the qid is returned.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: parseParam()&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p._followQid = function(args)&lt;br /&gt;
	local qid = (args.qid or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	local all = parseParam(args.all, false)&lt;br /&gt;
	local list = args.list or &amp;quot;&amp;quot;&lt;br /&gt;
	if list == &amp;quot;&amp;quot; then list = nil end&lt;br /&gt;
	if qid == &amp;quot;&amp;quot; then&lt;br /&gt;
		qid = mw.wikibase.getEntityIdForCurrentPage()&lt;br /&gt;
	end&lt;br /&gt;
	if not qid then return nil end&lt;br /&gt;
	local out = {}&lt;br /&gt;
	local props = (args.props or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	if props ~= &amp;quot;&amp;quot; then&lt;br /&gt;
		for p in mw.text.gsplit(props, &amp;quot;%p&amp;quot;) do -- split at punctuation and iterate&lt;br /&gt;
			p = mw.text.trim(p)&lt;br /&gt;
			for i, v in ipairs( mw.wikibase.getBestStatements(qid, p) ) do&lt;br /&gt;
				local linkedid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id&lt;br /&gt;
				if linkedid then&lt;br /&gt;
					if all then&lt;br /&gt;
						out[#out+1] = linkedid&lt;br /&gt;
					else&lt;br /&gt;
						return linkedid&lt;br /&gt;
					end -- test for all or just the first one found&lt;br /&gt;
				end -- test for value exists for that property&lt;br /&gt;
			end -- loop through values of property to follow&lt;br /&gt;
		end -- loop through list of properties to follow&lt;br /&gt;
	end&lt;br /&gt;
	if #out &amp;gt; 0 then&lt;br /&gt;
		local ret = &amp;quot;&amp;quot;&lt;br /&gt;
		if list then&lt;br /&gt;
			ret = mw.getCurrentFrame():expandTemplate{title = list, args = out}&lt;br /&gt;
		else&lt;br /&gt;
			ret = table.concat(out, &amp;quot; &amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
		return ret&lt;br /&gt;
	else&lt;br /&gt;
		return qid&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p.followQid = function(frame)&lt;br /&gt;
	return p._followQid(frame.args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- globalSiteID returns the globalSiteID for the current wiki&lt;br /&gt;
-- e.g. returns &amp;quot;enwiki&amp;quot; for the English Wikipedia, &amp;quot;enwikisource&amp;quot; for English Wikisource, etc.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.globalSiteID = function(frame)&lt;br /&gt;
	return mw.wikibase.getGlobalSiteId()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- siteID returns the root of the globalSiteID&lt;br /&gt;
-- e.g. &amp;quot;en&amp;quot; for &amp;quot;enwiki&amp;quot;, &amp;quot;enwikisource&amp;quot;, etc.&lt;br /&gt;
-- treats &amp;quot;en-gb&amp;quot; as &amp;quot;en&amp;quot;, etc.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.siteID = function(frame)&lt;br /&gt;
	local txtlang = frame:callParserFunction(&#039;int&#039;, {&#039;lang&#039;}) or &amp;quot;&amp;quot;&lt;br /&gt;
	-- This deals with specific exceptions: be-tarask -&amp;gt; be-x-old&lt;br /&gt;
	if txtlang == &amp;quot;be-tarask&amp;quot; then&lt;br /&gt;
		return &amp;quot;be_x_old&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	local pos = txtlang:find(&amp;quot;-&amp;quot;)&lt;br /&gt;
	local ret = &amp;quot;&amp;quot;&lt;br /&gt;
	if pos then&lt;br /&gt;
		ret = txtlang:sub(1, pos-1)&lt;br /&gt;
	else&lt;br /&gt;
		ret = txtlang&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- projID returns the code used to link to the reader&#039;s language&#039;s project&lt;br /&gt;
-- e.g &amp;quot;en&amp;quot; for [[:en:WikidataIB]]&lt;br /&gt;
-- treats &amp;quot;en-gb&amp;quot; as &amp;quot;en&amp;quot;, etc.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.projID = function(frame)&lt;br /&gt;
	local txtlang = frame:callParserFunction(&#039;int&#039;, {&#039;lang&#039;}) or &amp;quot;&amp;quot;&lt;br /&gt;
	-- This deals with specific exceptions: be-tarask -&amp;gt; be-x-old&lt;br /&gt;
	if txtlang == &amp;quot;be-tarask&amp;quot; then&lt;br /&gt;
		return &amp;quot;be-x-old&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	local pos = txtlang:find(&amp;quot;-&amp;quot;)&lt;br /&gt;
	local ret = &amp;quot;&amp;quot;&lt;br /&gt;
	if pos then&lt;br /&gt;
		ret = txtlang:sub(1, pos-1)&lt;br /&gt;
	else&lt;br /&gt;
		ret = txtlang&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- formatNumber formats a number according to the the supplied language code (&amp;quot;|lang=&amp;quot;)&lt;br /&gt;
-- or the default language if not supplied.&lt;br /&gt;
-- The number is the first unnamed parameter or &amp;quot;|num=&amp;quot;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: findLang()&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.formatNumber = function(frame)&lt;br /&gt;
	local lang&lt;br /&gt;
	local num = tonumber(frame.args[1] or frame.args.num) or 0&lt;br /&gt;
	lang = findLang(frame.args.lang)&lt;br /&gt;
	return lang:formatNum( num )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- examine dumps the property (the unnamed parameter or pid)&lt;br /&gt;
-- from the item given by the parameter &#039;qid&#039; (or the other unnamed parameter)&lt;br /&gt;
-- or from the item corresponding to the current page if qid is not supplied.&lt;br /&gt;
-- e.g. {{#invoke:WikidataIB |examine |pid=P26 |qid=Q42}}&lt;br /&gt;
-- or {{#invoke:WikidataIB |examine |P26 |Q42}} or any combination of these&lt;br /&gt;
-- or {{#invoke:WikidataIB |examine |P26}} for the current page.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.examine = function( frame )&lt;br /&gt;
	local args&lt;br /&gt;
	if frame.args[1] or frame.args.pid or frame.args.qid then&lt;br /&gt;
		args = frame.args&lt;br /&gt;
	else&lt;br /&gt;
		args = frame:getParent().args&lt;br /&gt;
	end&lt;br /&gt;
	local par = {}&lt;br /&gt;
	local pid = (args.pid or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	local qid = (args.qid or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	par[1] = mw.text.trim( args[1] or &amp;quot;&amp;quot; ):upper()&lt;br /&gt;
	par[2] = mw.text.trim( args[2] or &amp;quot;&amp;quot; ):upper()&lt;br /&gt;
	table.sort(par)&lt;br /&gt;
	if par[2]:sub(1,1) == &amp;quot;P&amp;quot; then par[1], par[2] = par[2], par[1] end&lt;br /&gt;
	if pid == &amp;quot;&amp;quot; then pid = par[1] end&lt;br /&gt;
	if qid == &amp;quot;&amp;quot; then qid = par[2] end&lt;br /&gt;
	local q1 = qid:sub(1,1)&lt;br /&gt;
	if pid:sub(1,1) ~= &amp;quot;P&amp;quot; then return &amp;quot;No property supplied&amp;quot; end&lt;br /&gt;
	if q1 ~= &amp;quot;Q&amp;quot; and q1 ~= &amp;quot;M&amp;quot; then qid = mw.wikibase.getEntityIdForCurrentPage() end&lt;br /&gt;
	if not qid then return &amp;quot;No item for this page&amp;quot; end&lt;br /&gt;
	return &amp;quot;&amp;lt;pre&amp;gt;&amp;quot; .. mw.dumpObject( mw.wikibase.getAllStatements( qid, pid ) ) .. &amp;quot;&amp;lt;/pre&amp;gt;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- checkvalue looks for &#039;val&#039; as a wikibase-item value of a property (the unnamed parameter or pid)&lt;br /&gt;
-- from the item given by the parameter &#039;qid&#039;&lt;br /&gt;
-- or from the Wikidata item associated with the current page if qid is not supplied.&lt;br /&gt;
-- It only checks ranks that are requested (preferred and normal by default)&lt;br /&gt;
-- If property is not supplied, then P31 (instance of) is assumed.&lt;br /&gt;
-- It returns val if found or nothing if not found.&lt;br /&gt;
-- e.g. {{#invoke:WikidataIB |checkvalue |val=Q5 |pid=P31 |qid=Q42}}&lt;br /&gt;
-- or {{#invoke:WikidataIB |checkvalue |val=Q5 |P31 |qid=Q42}}&lt;br /&gt;
-- or {{#invoke:WikidataIB |checkvalue |val=Q5 |qid=Q42}}&lt;br /&gt;
-- or {{#invoke:WikidataIB |checkvalue |val=Q5 |P31}} for the current page.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.checkvalue = function( frame )&lt;br /&gt;
	local args&lt;br /&gt;
	if frame.args.val then&lt;br /&gt;
		args = frame.args&lt;br /&gt;
	else&lt;br /&gt;
		args = frame:getParent().args&lt;br /&gt;
	end&lt;br /&gt;
	local val = args.val&lt;br /&gt;
	if not val then return nil end&lt;br /&gt;
	local pid = mw.text.trim(args.pid or args[1] or &amp;quot;P31&amp;quot;):upper()&lt;br /&gt;
	local qid = (args.qid or &amp;quot;&amp;quot;):upper()&lt;br /&gt;
	if pid:sub(1,1) ~= &amp;quot;P&amp;quot; then return nil end&lt;br /&gt;
	if qid:sub(1,1) ~= &amp;quot;Q&amp;quot; then qid = mw.wikibase.getEntityIdForCurrentPage() end&lt;br /&gt;
	if not qid then return nil end&lt;br /&gt;
	local ranks = setRanks(args.rank)&lt;br /&gt;
	local stats = {}&lt;br /&gt;
	if ranks.b then&lt;br /&gt;
		stats = mw.wikibase.getBestStatements(qid, pid)&lt;br /&gt;
	else&lt;br /&gt;
		stats = mw.wikibase.getAllStatements( qid, pid )&lt;br /&gt;
	end&lt;br /&gt;
	if not stats[1] then return nil end&lt;br /&gt;
	if stats[1].mainsnak.datatype == &amp;quot;wikibase-item&amp;quot; then&lt;br /&gt;
		for k, v in pairs( stats ) do&lt;br /&gt;
			local ms = v.mainsnak&lt;br /&gt;
			if ranks[v.rank:sub(1,1)] and ms.snaktype == &amp;quot;value&amp;quot; and ms.datavalue.value.id == val then&lt;br /&gt;
				return val&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- url2 takes a parameter url= that is a proper url and formats it for use in an infobox.&lt;br /&gt;
-- If no parameter is supplied, it returns nothing.&lt;br /&gt;
-- This is the equivalent of Template:URL&lt;br /&gt;
-- but it keeps the &amp;quot;edit at Wikidata&amp;quot; pen icon out of the microformat.&lt;br /&gt;
-- Usually it will take its url parameter directly from a Wikidata call:&lt;br /&gt;
-- e.g. {{#invoke:WikidataIB |url2 |url={{wdib |P856 |qid=Q23317 |fwd=ALL |osd=no}} }}&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.url2 = function(frame)&lt;br /&gt;
	local txt = frame.args.url or &amp;quot;&amp;quot;&lt;br /&gt;
	if txt == &amp;quot;&amp;quot; then return nil end&lt;br /&gt;
	-- extract any icon&lt;br /&gt;
	local url, icon = txt:match(&amp;quot;(.+)&amp;amp;nbsp;(.+)&amp;quot;)&lt;br /&gt;
	-- make sure there&#039;s at least a space at the end&lt;br /&gt;
	url = (url or txt) .. &amp;quot; &amp;quot;&lt;br /&gt;
	icon = icon or &amp;quot;&amp;quot;&lt;br /&gt;
	-- extract any protocol like https://&lt;br /&gt;
	local prot = url:match(&amp;quot;(https*://).+[ \&amp;quot;\&#039;]&amp;quot;)&lt;br /&gt;
	-- extract address&lt;br /&gt;
	local addr = &amp;quot;&amp;quot;&lt;br /&gt;
	if prot then&lt;br /&gt;
		addr = url:match(&amp;quot;https*://(.+)[ \&amp;quot;\&#039;]&amp;quot;) or &amp;quot; &amp;quot;&lt;br /&gt;
	else&lt;br /&gt;
		prot = &amp;quot;//&amp;quot;&lt;br /&gt;
		addr = url:match(&amp;quot;[^%p%s]+%.(.+)[ \&amp;quot;\&#039;]&amp;quot;) or &amp;quot; &amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	-- strip trailing / from end of domain-only url and add &amp;lt;wbr/&amp;gt; before . and /&lt;br /&gt;
	local disp, n = addr:gsub( &amp;quot;^([^/]+)/$&amp;quot;, &amp;quot;%1&amp;quot; ):gsub(&amp;quot;%/&amp;quot;, &amp;quot;&amp;lt;wbr/&amp;gt;/&amp;quot;):gsub(&amp;quot;%.&amp;quot;, &amp;quot;&amp;lt;wbr/&amp;gt;.&amp;quot;)&lt;br /&gt;
	return &#039;&amp;lt;span class=&amp;quot;url&amp;quot;&amp;gt;[&#039; .. prot .. addr .. &amp;quot; &amp;quot; .. disp .. &amp;quot;]&amp;lt;/span&amp;gt;&amp;amp;nbsp;&amp;quot; .. icon&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getWebsite fetches the Official website (P856) and formats it for use in an infobox.&lt;br /&gt;
-- This is similar to Template:Official website but with a url displayed,&lt;br /&gt;
-- and it adds the &amp;quot;edit at Wikidata&amp;quot; pen icon beyond the microformat if enabled.&lt;br /&gt;
-- A local value will override the Wikidata value. &amp;quot;NONE&amp;quot; returns nothing.&lt;br /&gt;
-- e.g. {{#invoke:WikidataIB |getWebsite |qid= |noicon= |lang= |url= }}&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: findLang(); parseParam();&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getWebsite = function(frame)&lt;br /&gt;
	local url = frame.args.url or &amp;quot;&amp;quot;&lt;br /&gt;
	if url:upper() == &amp;quot;NONE&amp;quot; then return nil end&lt;br /&gt;
	local urls = {}&lt;br /&gt;
	local quals = {}&lt;br /&gt;
	local qid = frame.args.qid or &amp;quot;&amp;quot;&lt;br /&gt;
	if url and url ~= &amp;quot;&amp;quot; then&lt;br /&gt;
		urls[1] = url&lt;br /&gt;
	else&lt;br /&gt;
		if qid == &amp;quot;&amp;quot; then qid = mw.wikibase.getEntityIdForCurrentPage() end&lt;br /&gt;
		if not qid then return nil end&lt;br /&gt;
&lt;br /&gt;
		local prop856 = mw.wikibase.getBestStatements(qid, &amp;quot;P856&amp;quot;)&lt;br /&gt;
		for k, v in pairs(prop856) do&lt;br /&gt;
			if v.mainsnak.snaktype == &amp;quot;value&amp;quot; then&lt;br /&gt;
				urls[#urls+1] = v.mainsnak.datavalue.value&lt;br /&gt;
				if v.qualifiers and v.qualifiers[&amp;quot;P1065&amp;quot;] then&lt;br /&gt;
					 -- just take the first archive url (P1065)&lt;br /&gt;
					local au = v.qualifiers[&amp;quot;P1065&amp;quot;][1]&lt;br /&gt;
					if au.snaktype == &amp;quot;value&amp;quot; then&lt;br /&gt;
						quals[#urls] = au.datavalue.value&lt;br /&gt;
					end -- test for archive url having a value&lt;br /&gt;
				end -- test for qualifers&lt;br /&gt;
			end -- test for website having a value&lt;br /&gt;
		end -- loop through website(s)&lt;br /&gt;
	end&lt;br /&gt;
	if #urls == 0 then return nil end&lt;br /&gt;
&lt;br /&gt;
	local out = {}&lt;br /&gt;
	for i, u in ipairs(urls) do&lt;br /&gt;
		local link = quals[i] or u&lt;br /&gt;
		local prot, addr = u:match(&amp;quot;(http[s]*://)(.+)&amp;quot;)&lt;br /&gt;
		addr = addr or u&lt;br /&gt;
		local disp, n = addr:gsub(&amp;quot;%.&amp;quot;, &amp;quot;&amp;lt;wbr/&amp;gt;%.&amp;quot;)&lt;br /&gt;
		out[#out+1] = &#039;&amp;lt;span class=&amp;quot;url&amp;quot;&amp;gt;[&#039; .. link .. &amp;quot; &amp;quot; .. disp .. &amp;quot;]&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local langcode = findLang(frame.args.lang).code&lt;br /&gt;
	local noicon = parseParam(frame.args.noicon, false)&lt;br /&gt;
	if url == &amp;quot;&amp;quot; and not noicon then&lt;br /&gt;
		out[#out] = out[#out] .. createicon(langcode, qid, &amp;quot;P856&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local ret = &amp;quot;&amp;quot;&lt;br /&gt;
	if #out &amp;gt; 1 then&lt;br /&gt;
		ret = mw.getCurrentFrame():expandTemplate{title = &amp;quot;ubl&amp;quot;, args = out}&lt;br /&gt;
	else&lt;br /&gt;
		ret = out[1]&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getAllLabels fetches the set of labels and formats it for display as wikitext.&lt;br /&gt;
-- It takes a parameter &#039;qid&#039; for arbitrary access, otherwise it uses the current page.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getAllLabels = function(frame)&lt;br /&gt;
	local args = frame.args or frame:getParent().args or {}&lt;br /&gt;
&lt;br /&gt;
	local qid = args.qid or &amp;quot;&amp;quot;&lt;br /&gt;
	if qid == &amp;quot;&amp;quot; then qid = mw.wikibase.getEntityIdForCurrentPage() end&lt;br /&gt;
	if not qid or not mw.wikibase.entityExists(qid) then return i18n[&amp;quot;entity-not-found&amp;quot;] end&lt;br /&gt;
&lt;br /&gt;
	local labels = mw.wikibase.getEntity(qid).labels&lt;br /&gt;
	if not labels then return i18n[&amp;quot;labels-not-found&amp;quot;] end&lt;br /&gt;
&lt;br /&gt;
	local out = {}&lt;br /&gt;
	for k, v in pairs(labels) do&lt;br /&gt;
		out[#out+1] = v.value .. &amp;quot; (&amp;quot; .. v.language .. &amp;quot;)&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return table.concat(out, &amp;quot;; &amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getAllDescriptions fetches the set of descriptions and formats it for display as wikitext.&lt;br /&gt;
-- It takes a parameter &#039;qid&#039; for arbitrary access, otherwise it uses the current page.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getAllDescriptions = function(frame)&lt;br /&gt;
	local args = frame.args or frame:getParent().args or {}&lt;br /&gt;
&lt;br /&gt;
	local qid = args.qid or &amp;quot;&amp;quot;&lt;br /&gt;
	if qid == &amp;quot;&amp;quot; then qid = mw.wikibase.getEntityIdForCurrentPage() end&lt;br /&gt;
	if not qid or not mw.wikibase.entityExists(qid) then return i18n[&amp;quot;entity-not-found&amp;quot;] end&lt;br /&gt;
&lt;br /&gt;
	local descriptions = mw.wikibase.getEntity(qid).descriptions&lt;br /&gt;
	if not descriptions then return i18n[&amp;quot;descriptions-not-found&amp;quot;] end&lt;br /&gt;
&lt;br /&gt;
	local out = {}&lt;br /&gt;
	for k, v in pairs(descriptions) do&lt;br /&gt;
		out[#out+1] = v.value .. &amp;quot; (&amp;quot; .. v.language .. &amp;quot;)&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return table.concat(out, &amp;quot;; &amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getAllAliases fetches the set of aliases and formats it for display as wikitext.&lt;br /&gt;
-- It takes a parameter &#039;qid&#039; for arbitrary access, otherwise it uses the current page.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.getAllAliases = function(frame)&lt;br /&gt;
	local args = frame.args or frame:getParent().args or {}&lt;br /&gt;
&lt;br /&gt;
	local qid = args.qid or &amp;quot;&amp;quot;&lt;br /&gt;
	if qid == &amp;quot;&amp;quot; then qid = mw.wikibase.getEntityIdForCurrentPage() end&lt;br /&gt;
	if not qid or not mw.wikibase.entityExists(qid) then return i18n[&amp;quot;entity-not-found&amp;quot;] end&lt;br /&gt;
&lt;br /&gt;
	local aliases = mw.wikibase.getEntity(qid).aliases&lt;br /&gt;
	if not aliases then return i18n[&amp;quot;aliases-not-found&amp;quot;] end&lt;br /&gt;
&lt;br /&gt;
	local out = {}&lt;br /&gt;
	for k1, v1 in pairs(aliases) do&lt;br /&gt;
		local lang = v1[1].language&lt;br /&gt;
		local val = {}&lt;br /&gt;
		for k1, v2 in ipairs(v1) do&lt;br /&gt;
			val[#val+1] = v2.value&lt;br /&gt;
		end&lt;br /&gt;
		out[#out+1] = table.concat(val, &amp;quot;, &amp;quot;) .. &amp;quot; (&amp;quot; .. lang .. &amp;quot;)&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return table.concat(out, &amp;quot;; &amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- showNoLinks displays the article titles that should not be linked.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p.showNoLinks = function(frame)&lt;br /&gt;
	local out = {}&lt;br /&gt;
	for k, v in pairs(donotlink) do&lt;br /&gt;
		out[#out+1] = k&lt;br /&gt;
	end&lt;br /&gt;
	table.sort( out )&lt;br /&gt;
	return table.concat(out, &amp;quot;; &amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- checkValidity checks whether the first unnamed parameter represents a valid entity-id,&lt;br /&gt;
-- that is, something like Q1235 or P123.&lt;br /&gt;
-- It returns the strings &amp;quot;true&amp;quot; or &amp;quot;false&amp;quot;.&lt;br /&gt;
-- Change false to nil to return &amp;quot;true&amp;quot; or &amp;quot;&amp;quot; (easier to test with #if:).&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
function p.checkValidity(frame)&lt;br /&gt;
	local id = mw.text.trim(frame.args[1] or &amp;quot;&amp;quot;)&lt;br /&gt;
	if mw.wikibase.isValidEntityId(id) 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;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getEntityFromTitle returns the Entity-ID (Q-number) for a given title.&lt;br /&gt;
-- Modification of Module:ResolveEntityId&lt;br /&gt;
-- The title is the first unnamed parameter.&lt;br /&gt;
-- The site parameter determines the site/language for the title. Defaults to current wiki.&lt;br /&gt;
-- The showdab parameter determines whether dab pages should return the Q-number or nil. Defaults to true.&lt;br /&gt;
-- Returns the Q-number or nil if it does not exist.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: parseParam&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
function p.getEntityFromTitle(frame)&lt;br /&gt;
	local args=frame.args&lt;br /&gt;
	if not args[1] then args=frame:getParent().args end&lt;br /&gt;
	if not args[1] then return nil end&lt;br /&gt;
	local title = mw.text.trim(args[1])&lt;br /&gt;
	local site = args.site or &amp;quot;&amp;quot;&lt;br /&gt;
	local showdab = parseParam(args.showdab, true)&lt;br /&gt;
	local qid = mw.wikibase.getEntityIdForTitle(title, site)&lt;br /&gt;
	if qid then&lt;br /&gt;
		local prop31 = mw.wikibase.getBestStatements(qid, &amp;quot;P31&amp;quot;)[1]&lt;br /&gt;
		if not showdab and prop31 and prop31.mainsnak.datavalue.value.id == &amp;quot;Q4167410&amp;quot; then&lt;br /&gt;
			return nil&lt;br /&gt;
		else&lt;br /&gt;
			return qid&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- getDatePrecision returns the number representing the precision of the first best date value&lt;br /&gt;
-- for the given property.&lt;br /&gt;
-- It takes the qid and property ID&lt;br /&gt;
-- The meanings are given at https://www.mediawiki.org/wiki/Wikibase/DataModel#Dates_and_times&lt;br /&gt;
-- 0 = 1 billion years .. 6 = millennium, 7 = century, 8 = decade, 9 = year, 10 = month, 11 = day&lt;br /&gt;
-- Returns 0 (or the second unnamed parameter) if the Wikidata does not exist.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: parseParam; sourced;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
function p.getDatePrecision(frame)&lt;br /&gt;
	local args=frame.args&lt;br /&gt;
	if not args[1] then args=frame:getParent().args end&lt;br /&gt;
	local default = tonumber(args[2] or args.default) or 0&lt;br /&gt;
	local prop = mw.text.trim(args[1] or &amp;quot;&amp;quot;)&lt;br /&gt;
	if prop == &amp;quot;&amp;quot; then return default end&lt;br /&gt;
	local qid = args.qid or &amp;quot;&amp;quot;&lt;br /&gt;
	if qid == &amp;quot;&amp;quot; then qid = mw.wikibase.getEntityIdForCurrentPage() end&lt;br /&gt;
	if not qid then return default end&lt;br /&gt;
	local onlysrc = parseParam(args.onlysourced or args.osd, true)&lt;br /&gt;
	local stat = mw.wikibase.getBestStatements(qid, prop)&lt;br /&gt;
	for i, v in ipairs(stat) do&lt;br /&gt;
		local prec = (onlysrc == false or sourced(v))&lt;br /&gt;
			and v.mainsnak.datavalue&lt;br /&gt;
			and v.mainsnak.datavalue.value&lt;br /&gt;
			and v.mainsnak.datavalue.value.precision&lt;br /&gt;
		if prec then return prec end&lt;br /&gt;
	end&lt;br /&gt;
	return default&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return p&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- List of exported functions&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
--[[&lt;br /&gt;
_getValue&lt;br /&gt;
getValue&lt;br /&gt;
getPreferredValue&lt;br /&gt;
getCoords&lt;br /&gt;
getQualifierValue&lt;br /&gt;
getSumOfParts&lt;br /&gt;
getValueByQual&lt;br /&gt;
getValueByLang&lt;br /&gt;
getValueByRefSource&lt;br /&gt;
getPropertyIDs&lt;br /&gt;
getQualifierIDs&lt;br /&gt;
getPropOfProp&lt;br /&gt;
getAwardCat&lt;br /&gt;
getIntersectCat&lt;br /&gt;
getGlobe&lt;br /&gt;
getCommonsLink&lt;br /&gt;
getSiteLink&lt;br /&gt;
getLink&lt;br /&gt;
getLabel&lt;br /&gt;
label&lt;br /&gt;
getAT&lt;br /&gt;
getDescription&lt;br /&gt;
getAliases&lt;br /&gt;
pageId&lt;br /&gt;
formatDate&lt;br /&gt;
location&lt;br /&gt;
checkBlacklist&lt;br /&gt;
emptyor&lt;br /&gt;
labelorid&lt;br /&gt;
getLang&lt;br /&gt;
getItemLangCode&lt;br /&gt;
findLanguage&lt;br /&gt;
getQID&lt;br /&gt;
followQid&lt;br /&gt;
globalSiteID&lt;br /&gt;
siteID&lt;br /&gt;
projID&lt;br /&gt;
formatNumber&lt;br /&gt;
examine&lt;br /&gt;
checkvalue&lt;br /&gt;
url2&lt;br /&gt;
getWebsite&lt;br /&gt;
getAllLabels&lt;br /&gt;
getAllDescriptions&lt;br /&gt;
getAllAliases&lt;br /&gt;
showNoLinks&lt;br /&gt;
checkValidity&lt;br /&gt;
getEntityFromTitle&lt;br /&gt;
getDatePrecision&lt;br /&gt;
--]]&lt;br /&gt;
-------------------------------------------------------------------------------&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Module:Hatnote/styles.css&amp;diff=2383</id>
		<title>Module:Hatnote/styles.css</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Module:Hatnote/styles.css&amp;diff=2383"/>
		<updated>2026-01-18T08:32:39Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* {{pp|small=y}} */&lt;br /&gt;
.hatnote {&lt;br /&gt;
	font-style: italic;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Limit structure CSS to divs because of [[Module:Hatnote inline]] */&lt;br /&gt;
div.hatnote {&lt;br /&gt;
	/* @noflip */&lt;br /&gt;
	padding-left: 1.6em;&lt;br /&gt;
	margin-bottom: 0.5em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.hatnote i {&lt;br /&gt;
	font-style: normal;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* The templatestyles element inserts a link element before hatnotes.&lt;br /&gt;
 * TODO: Remove link if/when WMF resolves T200206 */&lt;br /&gt;
.hatnote + link + .hatnote {&lt;br /&gt;
	margin-top: -0.5em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
@media print {&lt;br /&gt;
	body.ns-0 .hatnote {&lt;br /&gt;
		display: none !important;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Template:Short_description/lowercasecheck&amp;diff=2381</id>
		<title>Template:Short description/lowercasecheck</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Template:Short_description/lowercasecheck&amp;diff=2381"/>
		<updated>2026-01-18T08:32:39Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#ifeq:&amp;lt;!--test first character for lower-case letter--&amp;gt;{{#invoke:string|find|1={{{1|}}}|2=^%l|plain=false}}|1&lt;br /&gt;
|&amp;lt;!-- first character is a lower case letter; test against whitelist&lt;br /&gt;
--&amp;gt;{{#switch: {{First word|{{{1|}}}}}&amp;lt;!--begin whitelist--&amp;gt;&lt;br /&gt;
|c. &amp;lt;!--for circa--&amp;gt;&lt;br /&gt;
|gTLD&lt;br /&gt;
|iMac&lt;br /&gt;
|iOS&lt;br /&gt;
|iOS,&lt;br /&gt;
|iPad&lt;br /&gt;
|iPhone&lt;br /&gt;
|iTunes&lt;br /&gt;
|macOS&lt;br /&gt;
|none&lt;br /&gt;
|pH&lt;br /&gt;
|pH-dependent=&amp;lt;!-- end whitelist; short description starts with an allowed lower-case string; whitelist matched; do nothing --&amp;gt; &lt;br /&gt;
|#default=&amp;lt;!-- apply category to track lower-case short descriptions --&amp;gt;{{main other|[[Category:Pages with lower-case short description|{{trim|{{{1|}}}}}]]}}{{Testcases other|{{red|CATEGORY APPLIED}}}}&amp;lt;!-- end whitelist test --&amp;gt;}}&lt;br /&gt;
|&amp;lt;!-- short description does not start with lower-case letter; do nothing; end lower-case test --&amp;gt;&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{documentation}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Template:Short_description&amp;diff=2379</id>
		<title>Template:Short description</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Template:Short_description&amp;diff=2379"/>
		<updated>2026-01-18T08:32:39Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#ifeq:{{lc:{{{1|}}}}}|none|{{SHORTDESC:}}&amp;lt;nowiki/&amp;gt;&amp;lt;!--Prevents whitespace issues when used with adjacent newlines--&amp;gt;|&amp;lt;div class=&amp;quot;shortdescription nomobile noexcerpt noprint searchaux&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;{{{1|}}}{{SHORTDESC:{{{1|}}}|{{{2|}}}}}&amp;lt;/div&amp;gt;}}&amp;lt;includeonly&amp;gt;{{#ifeq:{{{pagetype}}}|Disambiguation pages||{{#ifeq:{{pagetype |defaultns = all |user=exclude}}|exclude||{{#ifeq:{{#switch: {{NAMESPACENUMBER}} | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 100 | 101 | 118 | 119 | 828 | 829 | = exclude|#default=}}|exclude||[[Category:{{{pagetype|{{pagetype |defaultns = extended |plural=y}}}}} with short description]]}}}}}}&amp;lt;/includeonly&amp;gt;&amp;lt;!-- Start tracking&lt;br /&gt;
--&amp;gt;{{#invoke:Check for unknown parameters|check|unknown={{Main other|[[Category:Pages using short description with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Short description]] with unknown parameter &amp;quot;_VALUE_&amp;quot;|ignoreblank=y| 1 | 2 | pagetype | bot |plural }}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#ifexpr: {{#invoke:String|len|{{{1|}}}}}&amp;gt;100 | [[Category:{{{pagetype|{{pagetype |defaultns = extended |plural=y}}}}} with long short description]]}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;includeonly&amp;gt;{{#if:{{{1|}}}||[[Category:Pages with empty short description]]}}&amp;lt;/includeonly&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{Short description/lowercasecheck|{{{1|}}}}}&amp;lt;!-- &lt;br /&gt;
--&amp;gt;{{Main other |{{SDcat |sd={{{1|}}} }} }}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
	<entry>
		<id>http://project-au.w.kmwc.org/index.php?title=Template:SDcat/doc&amp;diff=2377</id>
		<title>Template:SDcat/doc</title>
		<link rel="alternate" type="text/html" href="http://project-au.w.kmwc.org/index.php?title=Template:SDcat/doc&amp;diff=2377"/>
		<updated>2026-01-18T08:28:20Z</updated>

		<summary type="html">&lt;p&gt;Rox: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
{{High risk}}&lt;br /&gt;
{{cascade-protected template}}&lt;br /&gt;
&amp;lt;!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;br /&gt;
{{lua|Module:SDcat}}&lt;br /&gt;
This template is merely a wrapper for [[Module:SDcat]], which adds tracking categories to articles depending on whether their [[WP:short description|short description]] matches the associated description field on Wikidata. Complete documentation is available at [[Module:SDcat]].&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{SDcat |sd={{{shortdescription|}}} }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== For testing ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{SDcat |sd=short description |qid=Wikidata entity ID |lp=link prefix (usually &amp;quot;:&amp;quot;) }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:Short description templates]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rox</name></author>
	</entry>
</feed>