<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://hna.wiki/Module:Yesno?action=history&amp;feed=atom</id>
	<title>Module:Yesno - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://hna.wiki/Module:Yesno?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://hna.wiki/Module:Yesno?action=history"/>
	<updated>2026-07-14T19:12:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://hna.wiki/Module:Yesno?diff=986&amp;oldid=prev</id>
		<title>919dd: Protected &quot;Module:Yesno&quot; ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))</title>
		<link rel="alternate" type="text/html" href="https://hna.wiki/Module:Yesno?diff=986&amp;oldid=prev"/>
		<updated>2025-08-29T22:07:28Z</updated>

		<summary type="html">&lt;p&gt;Protected &amp;quot;&lt;a href=&quot;/Module:Yesno&quot; title=&quot;Module:Yesno&quot;&gt;Module:Yesno&lt;/a&gt;&amp;quot; ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:07, 29 August 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key mediawiki:diff:1.41:old-191:rev-986 --&gt;
&lt;/table&gt;</summary>
		<author><name>919dd</name></author>
	</entry>
	<entry>
		<id>https://hna.wiki/Module:Yesno?diff=191&amp;oldid=prev</id>
		<title>Sangodono: Created page with &quot;--  &lt;nowiki&gt; --- Yesno module for processing of boolean-like wikitext input. --   --  It works similarly to the Yesno Wikipedia --  template. This module is a consistent Lua interface for wikitext --  input from templates. --   --  Wikitext markup used by MediaWiki templates only permit --  string parameters like `&quot;0&quot;`, `&quot;yes&quot;`, `&quot;no&quot;` etc. As Lua --  has a boolean primitive type, Yesno converts this --  wikitext into boolean output for Lua t...&quot;</title>
		<link rel="alternate" type="text/html" href="https://hna.wiki/Module:Yesno?diff=191&amp;oldid=prev"/>
		<updated>2025-08-29T11:35:32Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;--  &amp;lt;nowiki&amp;gt; --- Yesno module for processing of boolean-like wikitext input. --   --  It works similarly to the &lt;a href=&quot;https://en.wikipedia.org/wiki/Template:Yesno&quot; class=&quot;extiw&quot; title=&quot;wikipedia:Template:Yesno&quot;&gt;Yesno Wikipedia --  template&lt;/a&gt;. This module is a consistent Lua interface for wikitext --  input from templates. --   --  Wikitext markup used by MediaWiki templates only permit --  string parameters like `&amp;quot;0&amp;quot;`, `&amp;quot;yes&amp;quot;`, `&amp;quot;no&amp;quot;` etc. As Lua --  has a boolean primitive type, Yesno converts this --  wikitext into boolean output for Lua t...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--  &amp;lt;nowiki&amp;gt;&lt;br /&gt;
--- Yesno module for processing of boolean-like wikitext input.&lt;br /&gt;
--  &lt;br /&gt;
--  It works similarly to the [[wikipedia:Template:Yesno|Yesno Wikipedia&lt;br /&gt;
--  template]]. This module is a consistent Lua interface for wikitext&lt;br /&gt;
--  input from templates.&lt;br /&gt;
--  &lt;br /&gt;
--  Wikitext markup used by MediaWiki templates only permit&lt;br /&gt;
--  string parameters like `&amp;quot;0&amp;quot;`, `&amp;quot;yes&amp;quot;`, `&amp;quot;no&amp;quot;` etc. As Lua&lt;br /&gt;
--  has a boolean primitive type, Yesno converts this&lt;br /&gt;
--  wikitext into boolean output for Lua to process.&lt;br /&gt;
--  &lt;br /&gt;
--  @script             yesno&lt;br /&gt;
--  @release            stable&lt;br /&gt;
--  @author             [[User:Dessamator|Dessamator]]&lt;br /&gt;
--  @attribution        [[wikipedia:User:ATDT|ATDT]]&lt;br /&gt;
--  @attribution        [[wikipedia:User:Mr. Stradivarius|Mr. Stradivarius]]&lt;br /&gt;
--  @attribution        [[wikipedia:Special:PageHistory/Module:Yesno|Other Wikipedia contributors]]&lt;br /&gt;
--  @see                [[wikipedia:Module:Yesno|Original module on&lt;br /&gt;
--                      Wikipedia]]&lt;br /&gt;
--  @see                [[Module:Yesno/testcases|Test cases for this&lt;br /&gt;
--                      module]]&lt;br /&gt;
--  @param              {?boolean|string} value Wikitext boolean-style&lt;br /&gt;
--                      or Lua boolean input.&lt;br /&gt;
--                       * Truthy wikitext input (`&amp;#039;yes&amp;#039;`, `&amp;#039;y&amp;#039;`, `&amp;#039;1&amp;#039;`,&lt;br /&gt;
--                      `&amp;#039;t&amp;#039;` or `&amp;#039;on&amp;#039;`) produces `true` as output.&lt;br /&gt;
--                       * The string representations of Lua&amp;#039;s true&lt;br /&gt;
--                      boolean value (`&amp;#039;true&amp;#039;`) also produces `true`.&lt;br /&gt;
--                       * Falsy wikitext input (`&amp;#039;no&amp;#039;`, `&amp;#039;n&amp;#039;`, `&amp;#039;0&amp;#039;`,&lt;br /&gt;
--                      `&amp;#039;f&amp;#039;` or `&amp;#039;off&amp;#039;`) produces `false` as output.&lt;br /&gt;
--                       * The string representation of Lua&amp;#039;s false&lt;br /&gt;
--                      boolean value (`&amp;#039;false&amp;#039;`) also produces `false`.&lt;br /&gt;
--                       * Localised text meaning `&amp;#039;yes&amp;#039;` or `&amp;#039;no&amp;#039;` also&lt;br /&gt;
--                      evaluate to `true` or `false` respectively.&lt;br /&gt;
--  @param[opt]         {?boolean|string} default Output to return if&lt;br /&gt;
--                      the Yesno `value` input is unrecognised.&lt;br /&gt;
--  @return             {?boolean} Boolean output corresponding to&lt;br /&gt;
--                      `val`:&lt;br /&gt;
--                       * The strings documented above produce a&lt;br /&gt;
--                      boolean value.&lt;br /&gt;
--                       * A `nil` value produces an output of `nil`.&lt;br /&gt;
--                      As this is falsy, additional logic may be needed&lt;br /&gt;
--                      to treat missing template parameters as truthy.&lt;br /&gt;
--                       * Unrecognised values return the `default`&lt;br /&gt;
--                      parameter. Blank strings are a key example&lt;br /&gt;
--                      of Yesno&amp;#039;s unrecognised values and can evaluate&lt;br /&gt;
--                      to `true` if there is a default value.&lt;br /&gt;
local lower = mw.ustring.lower&lt;br /&gt;
local msg = mw.message.new&lt;br /&gt;
&lt;br /&gt;
local yes = lower(msg(&amp;#039;htmlform-yes&amp;#039;):plain())&lt;br /&gt;
local no = lower(msg(&amp;#039;htmlform-no&amp;#039;):plain())&lt;br /&gt;
local en_yes = lower(msg(&amp;#039;htmlform-yes&amp;#039;):inLanguage(&amp;#039;en&amp;#039;):plain())&lt;br /&gt;
local en_no = lower(msg(&amp;#039;htmlform-no&amp;#039;):inLanguage(&amp;#039;en&amp;#039;):plain())&lt;br /&gt;
&lt;br /&gt;
return function(value, default)&lt;br /&gt;
    value = type(value) == &amp;#039;string&amp;#039; and lower(value) or value&lt;br /&gt;
&lt;br /&gt;
    if value == nil then&lt;br /&gt;
        return nil&lt;br /&gt;
&lt;br /&gt;
    elseif value == true&lt;br /&gt;
        or value == yes&lt;br /&gt;
        or value == en_yes&lt;br /&gt;
        or value == &amp;#039;y&amp;#039;&lt;br /&gt;
        or value == &amp;#039;true&amp;#039;&lt;br /&gt;
        or value == &amp;#039;t&amp;#039;&lt;br /&gt;
        or value == &amp;#039;on&amp;#039;&lt;br /&gt;
        or value == &amp;#039;enable&amp;#039;&lt;br /&gt;
        or tonumber(value) == 1&lt;br /&gt;
    then&lt;br /&gt;
        return true&lt;br /&gt;
&lt;br /&gt;
    elseif value == false&lt;br /&gt;
        or value == no&lt;br /&gt;
        or value == en_no&lt;br /&gt;
        or value == &amp;#039;n&amp;#039;&lt;br /&gt;
        or value == &amp;#039;false&amp;#039;&lt;br /&gt;
        or value == &amp;#039;f&amp;#039;&lt;br /&gt;
        or value == &amp;#039;off&amp;#039;&lt;br /&gt;
        or value == &amp;#039;disable&amp;#039;&lt;br /&gt;
        or tonumber(value) == 0&lt;br /&gt;
    then&lt;br /&gt;
        return false&lt;br /&gt;
&lt;br /&gt;
    else&lt;br /&gt;
        return default&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
--  &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sangodono</name></author>
	</entry>
</feed>