CINXE.COM
Módulo:Yesno - Wikisource
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available" lang="pt" dir="ltr"> <head> <meta charset="UTF-8"> <title>Módulo:Yesno - Wikisource</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )ptwikisourcemwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":[",\t."," \t,"],"wgDigitTransformTable":["",""], "wgDefaultDateFormat":"dmy","wgMonthNames":["","janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],"wgRequestId":"9788ccc6-9548-44a2-8ebc-2be81180a3f6","wgCanonicalNamespace":"Module","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":828,"wgPageName":"Módulo:Yesno","wgTitle":"Yesno","wgCurRevisionId":400037,"wgRevisionId":400037,"wgArticleId":142418,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["!Módulos"],"wgPageViewLanguage":"pt","wgPageContentLanguage":"pt","wgPageContentModel":"Scribunto","wgRelevantPageName":"Módulo:Yesno","wgRelevantArticleId":142418,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikisource","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgVisualEditor":{"pageLanguageCode":"en", "pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":800,"prpProofreadPageBookNamespaces":[0],"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q15098140","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"]};RLSTATE={"ext.gadget.Site":"ready","ext.gadget.charinsert-styles":"ready","ext.gadget.CoresNS":"ready","ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.pygments":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready", "ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.pygments.view","site","mediawiki.page.ready","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.TitleRewrite","ext.gadget.RetallaImatges","ext.gadget.charinsert","ext.gadget.Extra_toolbar","ext.gadget.FeedbackHighlight","ext.gadget.Modernizacao","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","wikibase.client.vector-2022","ext.checkUser.clientHints","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=pt&modules=ext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=pt&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=pt&modules=ext.gadget.CoresNS%2CSite%2Ccharinsert-styles&only=styles&skin=vector-2022"> <link rel="stylesheet" href="/w/load.php?lang=pt&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.5"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Módulo:Yesno - Wikisource"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//pt.m.wikisource.org/wiki/M%C3%B3dulo:Yesno"> <link rel="alternate" type="application/x-wiki" title="Editar" href="/w/index.php?title=M%C3%B3dulo:Yesno&action=edit"> <link rel="icon" href="/static/favicon/wikisource.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikisource (pt)"> <link rel="EditURI" type="application/rsd+xml" href="//pt.wikisource.org/w/api.php?action=rsd"> <link rel="canonical" href="https://pt.wikisource.org/wiki/M%C3%B3dulo:Yesno"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.pt"> <link rel="alternate" type="application/atom+xml" title="''Feed'' Atom Wikisource" href="/w/index.php?title=Especial:Mudan%C3%A7as_recentes&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-828 ns-subject mw-editable page-Módulo_Yesno rootpage-Módulo_Yesno skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Saltar para o conteúdo</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="''Site''"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Menu principal" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Menu principal</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Menu principal</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">mover para a barra lateral</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">ocultar</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navegação </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Wikisource:P%C3%A1gina_principal" title="Visitar a página principal [z]" accesskey="z"><span>Página principal</span></a></li><li id="n-Como-participar" class="mw-list-item"><a href="/wiki/Wikisource:Contribuindo"><span>Como participar</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikisource:Portal_comunit%C3%A1rio" title="Sobre o projeto, o que se pode fazer e onde encontrar as coisas"><span>Portal comunitário</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Especial:Mudan%C3%A7as_recentes" title="Uma lista de mudanças recentes nesta wiki [r]" accesskey="r"><span>Mudanças recentes</span></a></li><li id="n-randomwork" class="mw-list-item"><a href="/wiki/Especial:RandomRootpage/Main"><span>Obra aleatória</span></a></li><li id="n-randomauthor" class="mw-list-item"><a href="/wiki/Especial:Aleat%C3%B3ria/Autor"><span>Autor aleatório</span></a></li><li id="n-help" class="mw-list-item"><a href="/wiki/Ajuda:Introdu%C3%A7%C3%A3o" title="Um local reservado para auxílio."><span>Ajuda</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Wikisource:P%C3%A1gina_principal" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikisource.svg" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikisource" src="/static/images/mobile/copyright/wikisource-wordmark.svg" style="width: 7.5em; height: 1.0625em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Especial:Pesquisar" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Pesquisar na wiki Wikisource [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Pesquisa</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Pesquisar na wiki Wikisource" aria-label="Pesquisar na wiki Wikisource" autocapitalize="sentences" title="Pesquisar na wiki Wikisource [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Especial:Pesquisar"> </div> <button class="cdx-button cdx-search-input__end-button">Pesquisar</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Ferramentas pessoais"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Aspeto"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Aspeto" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Aspeto</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_pt.wikisource.org&uselang=pt" class=""><span>Donativos</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Especial:Criar_conta&returnto=M%C3%B3dulo%3AYesno" title="É encorajado a criar uma conta e iniciar sessão; no entanto, não é obrigatório" class=""><span>Criar uma conta</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Especial:Entrar&returnto=M%C3%B3dulo%3AYesno" title="É encorajado que inicie sessão, apesar de não ser obrigatório. [o]" accesskey="o" class=""><span>Entrar</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Mais opções" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Ferramentas pessoais" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Ferramentas pessoais</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="Menu do utilizador" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_pt.wikisource.org&uselang=pt"><span>Donativos</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Especial:Criar_conta&returnto=M%C3%B3dulo%3AYesno" title="É encorajado a criar uma conta e iniciar sessão; no entanto, não é obrigatório"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Criar uma conta</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Especial:Entrar&returnto=M%C3%B3dulo%3AYesno" title="É encorajado que inicie sessão, apesar de não ser obrigatório. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Entrar</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Páginas para editores sem sessão iniciada <a href="/wiki/Ajuda:Introduction" aria-label="Saiba mais sobre edição"><span>saber mais</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Especial:Minhas_contribui%C3%A7%C3%B5es" title="Uma lista de edições feitas a partir deste endereço IP [y]" accesskey="y"><span>Contribuições</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Especial:Minha_discuss%C3%A3o" title="Discussão sobre edições feitas a partir deste endereço IP [n]" accesskey="n"><span>Discussão</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="''Site''"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Conteúdo" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Conteúdo</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">mover para a barra lateral</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">ocultar</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">Início</div> </a> </li> <li id="toc-Sintaxe" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Sintaxe"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Sintaxe</span> </div> </a> <ul id="toc-Sintaxe-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Uso" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Uso"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Uso</span> </div> </a> <ul id="toc-Uso-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Conteúdo" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Alternar o índice" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Alternar o índice</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-namespace">Módulo</span><span class="mw-page-title-separator">:</span><span class="mw-page-title-main">Yesno</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Ir para um artigo noutra língua. Disponível em 54 línguas" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-54" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">54 línguas</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikisource.org/wiki/%D9%88%D8%AD%D8%AF%D8%A9:Yesno" title="وحدة:Yesno — árabe" lang="ar" hreflang="ar" data-title="وحدة:Yesno" data-language-autonym="العربية" data-language-local-name="árabe" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-as mw-list-item"><a href="https://as.wikisource.org/wiki/Module:Yesno" title="Module:Yesno — assamês" lang="as" hreflang="as" data-title="Module:Yesno" data-language-autonym="অসমীয়া" data-language-local-name="assamês" class="interlanguage-link-target"><span>অসমীয়া</span></a></li><li class="interlanguage-link interwiki-az mw-list-item"><a href="https://az.wikisource.org/wiki/Modul:Yesno" title="Modul:Yesno — azerbaijano" lang="az" hreflang="az" data-title="Modul:Yesno" data-language-autonym="Azərbaycanca" data-language-local-name="azerbaijano" class="interlanguage-link-target"><span>Azərbaycanca</span></a></li><li class="interlanguage-link interwiki-ban mw-list-item"><a href="https://ban.wikisource.org/wiki/Modul:Yesno" title="Modul:Yesno — balinês" lang="ban" hreflang="ban" data-title="Modul:Yesno" data-language-autonym="Basa Bali" data-language-local-name="balinês" class="interlanguage-link-target"><span>Basa Bali</span></a></li><li class="interlanguage-link interwiki-bcl mw-list-item"><a href="https://bcl.wikisource.org/wiki/Module:Yesno" title="Module:Yesno — Central Bikol" lang="bcl" hreflang="bcl" data-title="Module:Yesno" data-language-autonym="Bikol Central" data-language-local-name="Central Bikol" class="interlanguage-link-target"><span>Bikol Central</span></a></li><li class="interlanguage-link interwiki-be mw-list-item"><a href="https://be.wikisource.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:%D0%A2%D0%B0%D0%BA%D0%9D%D0%B5" title="Модуль:ТакНе — bielorrusso" lang="be" hreflang="be" data-title="Модуль:ТакНе" data-language-autonym="Беларуская" data-language-local-name="bielorrusso" class="interlanguage-link-target"><span>Беларуская</span></a></li><li class="interlanguage-link interwiki-bg mw-list-item"><a href="https://bg.wikisource.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB:Yesno" title="Модул:Yesno — búlgaro" lang="bg" hreflang="bg" data-title="Модул:Yesno" data-language-autonym="Български" data-language-local-name="búlgaro" class="interlanguage-link-target"><span>Български</span></a></li><li class="interlanguage-link interwiki-bn mw-list-item"><a href="https://bn.wikisource.org/wiki/%E0%A6%AE%E0%A6%A1%E0%A6%BF%E0%A6%89%E0%A6%B2:Yesno" title="মডিউল:Yesno — bengalês" lang="bn" hreflang="bn" data-title="মডিউল:Yesno" data-language-autonym="বাংলা" data-language-local-name="bengalês" class="interlanguage-link-target"><span>বাংলা</span></a></li><li class="interlanguage-link interwiki-bs mw-list-item"><a href="https://bs.wikisource.org/wiki/Modul:Yesno" title="Modul:Yesno — bósnio" lang="bs" hreflang="bs" data-title="Modul:Yesno" data-language-autonym="Bosanski" data-language-local-name="bósnio" class="interlanguage-link-target"><span>Bosanski</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikisource.org/wiki/M%C3%B2dul:Yesno" title="Mòdul:Yesno — catalão" lang="ca" hreflang="ca" data-title="Mòdul:Yesno" data-language-autonym="Català" data-language-local-name="catalão" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikisource.org/wiki/Modul:Yesno" title="Modul:Yesno — checo" lang="cs" hreflang="cs" data-title="Modul:Yesno" data-language-autonym="Čeština" data-language-local-name="checo" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikisource.org/wiki/Modul:Yesno" title="Modul:Yesno — alemão" lang="de" hreflang="de" data-title="Modul:Yesno" data-language-autonym="Deutsch" data-language-local-name="alemão" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-el mw-list-item"><a href="https://el.wikisource.org/wiki/Module:Yesno" title="Module:Yesno — grego" lang="el" hreflang="el" data-title="Module:Yesno" data-language-autonym="Ελληνικά" data-language-local-name="grego" class="interlanguage-link-target"><span>Ελληνικά</span></a></li><li class="interlanguage-link interwiki-en mw-list-item"><a href="https://en.wikisource.org/wiki/Module:Yesno" title="Module:Yesno — inglês" lang="en" hreflang="en" data-title="Module:Yesno" data-language-autonym="English" data-language-local-name="inglês" class="interlanguage-link-target"><span>English</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikisource.org/wiki/M%C3%B3dulo:Yesno" title="Módulo:Yesno — espanhol" lang="es" hreflang="es" data-title="Módulo:Yesno" data-language-autonym="Español" data-language-local-name="espanhol" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikisource.org/wiki/%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:Yesno" title="پودمان:Yesno — persa" lang="fa" hreflang="fa" data-title="پودمان:Yesno" data-language-autonym="فارسی" data-language-local-name="persa" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-gl mw-list-item"><a href="https://gl.wikisource.org/wiki/M%C3%B3dulo:Yesno" title="Módulo:Yesno — galego" lang="gl" hreflang="gl" data-title="Módulo:Yesno" data-language-autonym="Galego" data-language-local-name="galego" class="interlanguage-link-target"><span>Galego</span></a></li><li class="interlanguage-link interwiki-gu mw-list-item"><a href="https://gu.wikisource.org/wiki/%E0%AA%B5%E0%AA%BF%E0%AA%AD%E0%AA%BE%E0%AA%97:Yesno" title="વિભાગ:Yesno — guzerate" lang="gu" hreflang="gu" data-title="વિભાગ:Yesno" data-language-autonym="ગુજરાતી" data-language-local-name="guzerate" class="interlanguage-link-target"><span>ગુજરાતી</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikisource.org/wiki/%D7%99%D7%97%D7%99%D7%93%D7%94:Yesno" title="יחידה:Yesno — hebraico" lang="he" hreflang="he" data-title="יחידה:Yesno" data-language-autonym="עברית" data-language-local-name="hebraico" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-hi mw-list-item"><a href="https://hi.wikisource.org/wiki/%E0%A4%AE%E0%A5%89%E0%A4%A1%E0%A5%8D%E0%A4%AF%E0%A5%82%E0%A4%B2:Yesno" title="मॉड्यूल:Yesno — hindi" lang="hi" hreflang="hi" data-title="मॉड्यूल:Yesno" data-language-autonym="हिन्दी" data-language-local-name="hindi" class="interlanguage-link-target"><span>हिन्दी</span></a></li><li class="interlanguage-link interwiki-hr mw-list-item"><a href="https://hr.wikisource.org/wiki/Modul:Yesno" title="Modul:Yesno — croata" lang="hr" hreflang="hr" data-title="Modul:Yesno" data-language-autonym="Hrvatski" data-language-local-name="croata" class="interlanguage-link-target"><span>Hrvatski</span></a></li><li class="interlanguage-link interwiki-hu mw-list-item"><a href="https://hu.wikisource.org/wiki/Modul:Yesno" title="Modul:Yesno — húngaro" lang="hu" hreflang="hu" data-title="Modul:Yesno" data-language-autonym="Magyar" data-language-local-name="húngaro" class="interlanguage-link-target"><span>Magyar</span></a></li><li class="interlanguage-link interwiki-hy mw-list-item"><a href="https://hy.wikisource.org/wiki/%D5%84%D5%B8%D5%A4%D5%B8%D6%82%D5%AC:Yesno" title="Մոդուլ:Yesno — arménio" lang="hy" hreflang="hy" data-title="Մոդուլ:Yesno" data-language-autonym="Հայերեն" data-language-local-name="arménio" class="interlanguage-link-target"><span>Հայերեն</span></a></li><li class="interlanguage-link interwiki-id mw-list-item"><a href="https://id.wikisource.org/wiki/Modul:Yesno" title="Modul:Yesno — indonésio" lang="id" hreflang="id" data-title="Modul:Yesno" data-language-autonym="Bahasa Indonesia" data-language-local-name="indonésio" class="interlanguage-link-target"><span>Bahasa Indonesia</span></a></li><li class="interlanguage-link interwiki-is mw-list-item"><a href="https://is.wikisource.org/wiki/Module:Yesno" title="Module:Yesno — islandês" lang="is" hreflang="is" data-title="Module:Yesno" data-language-autonym="Íslenska" data-language-local-name="islandês" class="interlanguage-link-target"><span>Íslenska</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikisource.org/wiki/%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Yesno" title="モジュール:Yesno — japonês" lang="ja" hreflang="ja" data-title="モジュール:Yesno" data-language-autonym="日本語" data-language-local-name="japonês" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-jv mw-list-item"><a href="https://jv.wikisource.org/wiki/Modhul:Yesno" title="Modhul:Yesno — javanês" lang="jv" hreflang="jv" data-title="Modhul:Yesno" data-language-autonym="Jawa" data-language-local-name="javanês" class="interlanguage-link-target"><span>Jawa</span></a></li><li class="interlanguage-link interwiki-kn mw-list-item"><a href="https://kn.wikisource.org/wiki/%E0%B2%AE%E0%B2%BE%E0%B2%A1%E0%B3%8D%E0%B2%AF%E0%B3%82%E0%B2%B2%E0%B3%8D:Yesno" title="ಮಾಡ್ಯೂಲ್:Yesno — canarim" lang="kn" hreflang="kn" data-title="ಮಾಡ್ಯೂಲ್:Yesno" data-language-autonym="ಕನ್ನಡ" data-language-local-name="canarim" class="interlanguage-link-target"><span>ಕನ್ನಡ</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikisource.org/wiki/%EB%AA%A8%EB%93%88:Yesno" title="모듈:Yesno — coreano" lang="ko" hreflang="ko" data-title="모듈:Yesno" data-language-autonym="한국어" data-language-local-name="coreano" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-la mw-list-item"><a href="https://la.wikisource.org/wiki/Modulus:Yesno" title="Modulus:Yesno — latim" lang="la" hreflang="la" data-title="Modulus:Yesno" data-language-autonym="Latina" data-language-local-name="latim" class="interlanguage-link-target"><span>Latina</span></a></li><li class="interlanguage-link interwiki-lij mw-list-item"><a href="https://lij.wikisource.org/wiki/Modulo:Yesno" title="Modulo:Yesno — Ligurian" lang="lij" hreflang="lij" data-title="Modulo:Yesno" data-language-autonym="Ligure" data-language-local-name="Ligurian" class="interlanguage-link-target"><span>Ligure</span></a></li><li class="interlanguage-link interwiki-lt mw-list-item"><a href="https://lt.wikisource.org/wiki/Module:Yesno" title="Module:Yesno — lituano" lang="lt" hreflang="lt" data-title="Module:Yesno" data-language-autonym="Lietuvių" data-language-local-name="lituano" class="interlanguage-link-target"><span>Lietuvių</span></a></li><li class="interlanguage-link interwiki-mk mw-list-item"><a href="https://mk.wikisource.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB:Yesno" title="Модул:Yesno — macedónio" lang="mk" hreflang="mk" data-title="Модул:Yesno" data-language-autonym="Македонски" data-language-local-name="macedónio" class="interlanguage-link-target"><span>Македонски</span></a></li><li class="interlanguage-link interwiki-ml mw-list-item"><a href="https://ml.wikisource.org/wiki/%E0%B4%98%E0%B4%9F%E0%B4%95%E0%B4%82:Yesno" title="ഘടകം:Yesno — malaiala" lang="ml" hreflang="ml" data-title="ഘടകം:Yesno" data-language-autonym="മലയാളം" data-language-local-name="malaiala" class="interlanguage-link-target"><span>മലയാളം</span></a></li><li class="interlanguage-link interwiki-mr mw-list-item"><a href="https://mr.wikisource.org/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%AD%E0%A4%BE%E0%A4%97:Yesno" title="विभाग:Yesno — marata" lang="mr" hreflang="mr" data-title="विभाग:Yesno" data-language-autonym="मराठी" data-language-local-name="marata" class="interlanguage-link-target"><span>मराठी</span></a></li><li class="interlanguage-link interwiki-ms mw-list-item"><a href="https://ms.wikisource.org/wiki/Modul:Yesno" title="Modul:Yesno — malaio" lang="ms" hreflang="ms" data-title="Modul:Yesno" data-language-autonym="Bahasa Melayu" data-language-local-name="malaio" class="interlanguage-link-target"><span>Bahasa Melayu</span></a></li><li class="interlanguage-link interwiki-my mw-list-item"><a href="https://my.wikisource.org/wiki/%E1%80%99%E1%80%B1%E1%80%AC%E1%80%BA%E1%80%82%E1%80%BB%E1%80%B0%E1%80%B8:Yesno" title="မော်ဂျူး:Yesno — birmanês" lang="my" hreflang="my" data-title="မော်ဂျူး:Yesno" data-language-autonym="မြန်မာဘာသာ" data-language-local-name="birmanês" class="interlanguage-link-target"><span>မြန်မာဘာသာ</span></a></li><li class="interlanguage-link interwiki-nap mw-list-item"><a href="https://nap.wikisource.org/wiki/Modulo:Yesno" title="Modulo:Yesno — napolitano" lang="nap" hreflang="nap" data-title="Modulo:Yesno" data-language-autonym="Napulitano" data-language-local-name="napolitano" class="interlanguage-link-target"><span>Napulitano</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikisource.org/wiki/Module:Yesno" title="Module:Yesno — neerlandês" lang="nl" hreflang="nl" data-title="Module:Yesno" data-language-autonym="Nederlands" data-language-local-name="neerlandês" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-no mw-list-item"><a href="https://no.wikisource.org/wiki/Modul:Yesno" title="Modul:Yesno — norueguês" lang="no" hreflang="no" data-title="Modul:Yesno" data-language-autonym="Norsk" data-language-local-name="norueguês" class="interlanguage-link-target"><span>Norsk</span></a></li><li class="interlanguage-link interwiki-or mw-list-item"><a href="https://or.wikisource.org/wiki/%E0%AC%AE%E0%AC%A1%E0%AD%8D%E0%AD%9F%E0%AD%81%E0%AC%B2:Yesno" title="ମଡ୍ୟୁଲ:Yesno — oriá" lang="or" hreflang="or" data-title="ମଡ୍ୟୁଲ:Yesno" data-language-autonym="ଓଡ଼ିଆ" data-language-local-name="oriá" class="interlanguage-link-target"><span>ଓଡ଼ିଆ</span></a></li><li class="interlanguage-link interwiki-pa mw-list-item"><a href="https://pa.wikisource.org/wiki/%E0%A8%AE%E0%A9%8C%E0%A8%A1%E0%A8%BF%E0%A8%8A%E0%A8%B2:Yesno" title="ਮੌਡਿਊਲ:Yesno — panjabi" lang="pa" hreflang="pa" data-title="ਮੌਡਿਊਲ:Yesno" data-language-autonym="ਪੰਜਾਬੀ" data-language-local-name="panjabi" class="interlanguage-link-target"><span>ਪੰਜਾਬੀ</span></a></li><li class="interlanguage-link interwiki-ro mw-list-item"><a href="https://ro.wikisource.org/wiki/Modul:Yesno" title="Modul:Yesno — romeno" lang="ro" hreflang="ro" data-title="Modul:Yesno" data-language-autonym="Română" data-language-local-name="romeno" class="interlanguage-link-target"><span>Română</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikisource.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Yesno" title="Модуль:Yesno — russo" lang="ru" hreflang="ru" data-title="Модуль:Yesno" data-language-autonym="Русский" data-language-local-name="russo" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-sa mw-list-item"><a href="https://sa.wikisource.org/wiki/%E0%A4%AA%E0%A4%9F%E0%A4%B2%E0%A4%AE%E0%A5%8D:Yesno" title="पटलम्:Yesno — sânscrito" lang="sa" hreflang="sa" data-title="पटलम्:Yesno" data-language-autonym="संस्कृतम्" data-language-local-name="sânscrito" class="interlanguage-link-target"><span>संस्कृतम्</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wikisource.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB:Yesno" title="Модул:Yesno — sérvio" lang="sr" hreflang="sr" data-title="Модул:Yesno" data-language-autonym="Српски / srpski" data-language-local-name="sérvio" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-su mw-list-item"><a href="https://su.wikisource.org/wiki/Modul:Yesno" title="Modul:Yesno — sundanês" lang="su" hreflang="su" data-title="Modul:Yesno" data-language-autonym="Sunda" data-language-local-name="sundanês" class="interlanguage-link-target"><span>Sunda</span></a></li><li class="interlanguage-link interwiki-ta mw-list-item"><a href="https://ta.wikisource.org/wiki/Module:Yesno" title="Module:Yesno — tâmil" lang="ta" hreflang="ta" data-title="Module:Yesno" data-language-autonym="தமிழ்" data-language-local-name="tâmil" class="interlanguage-link-target"><span>தமிழ்</span></a></li><li class="interlanguage-link interwiki-te mw-list-item"><a href="https://te.wikisource.org/wiki/%E0%B0%AE%E0%B0%BE%E0%B0%A1%E0%B1%8D%E0%B0%AF%E0%B1%82%E0%B0%B2%E0%B1%8D:Yesno" title="మాడ్యూల్:Yesno — telugu" lang="te" hreflang="te" data-title="మాడ్యూల్:Yesno" data-language-autonym="తెలుగు" data-language-local-name="telugu" class="interlanguage-link-target"><span>తెలుగు</span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wikisource.org/wiki/%E0%B8%A1%E0%B8%AD%E0%B8%94%E0%B8%B9%E0%B8%A5:Yesno" title="มอดูล:Yesno — tailandês" lang="th" hreflang="th" data-title="มอดูล:Yesno" data-language-autonym="ไทย" data-language-local-name="tailandês" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikisource.org/wiki/Mod%C3%BCl:Yesno" title="Modül:Yesno — turco" lang="tr" hreflang="tr" data-title="Modül:Yesno" data-language-autonym="Türkçe" data-language-local-name="turco" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikisource.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Yesno" title="Модуль:Yesno — ucraniano" lang="uk" hreflang="uk" data-title="Модуль:Yesno" data-language-autonym="Українська" data-language-local-name="ucraniano" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikisource.org/wiki/M%C3%B4_%C4%91un:Yesno" title="Mô đun:Yesno — vietnamita" lang="vi" hreflang="vi" data-title="Mô đun:Yesno" data-language-autonym="Tiếng Việt" data-language-local-name="vietnamita" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikisource.org/wiki/Module:Yesno" title="Module:Yesno — chinês" lang="zh" hreflang="zh" data-title="Module:Yesno" data-language-autonym="中文" data-language-local-name="chinês" class="interlanguage-link-target"><span>中文</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q15098140#sitelinks-wikisource" title="Editar hiperligações interlínguas" class="wbc-editpage">Editar hiperligações</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Espaços nominais"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-module" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/M%C3%B3dulo:Yesno" title="Ver a página do módulo [c]" accesskey="c"><span>Módulo</span></a></li><li id="ca-talk" class="new vector-tab-noicon mw-list-item"><a href="/w/index.php?title=M%C3%B3dulo_Discuss%C3%A3o:Yesno&action=edit&redlink=1" rel="discussion" class="new" title="Discussão sobre o conteúdo da página (página não existe) [t]" accesskey="t"><span>Discussão</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Mudar a variante da língua" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Vistas"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/M%C3%B3dulo:Yesno"><span>Ler</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=M%C3%B3dulo:Yesno&action=edit" title="Editar esta página [e]" accesskey="e"><span>Editar</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=M%C3%B3dulo:Yesno&action=history" title="Edições anteriores desta página. [h]" accesskey="h"><span>Ver histórico</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Ferramentas de página"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Ferramentas" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Ferramentas</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Ferramentas</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">mover para a barra lateral</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">ocultar</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="Mais opções" > <div class="vector-menu-heading"> Operações </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/M%C3%B3dulo:Yesno"><span>Ler</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=M%C3%B3dulo:Yesno&action=edit" title="Editar esta página [e]" accesskey="e"><span>Editar</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=M%C3%B3dulo:Yesno&action=history"><span>Ver histórico</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> Geral </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Especial:P%C3%A1ginas_afluentes/M%C3%B3dulo:Yesno" title="Lista de todas as páginas que contêm hiperligações para esta [j]" accesskey="j"><span>Páginas afluentes</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Especial:Altera%C3%A7%C3%B5es_relacionadas/M%C3%B3dulo:Yesno" rel="nofollow" title="Mudanças recentes nas páginas para as quais esta contém hiperligações [k]" accesskey="k"><span>Alterações relacionadas</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Especial:P%C3%A1ginas_especiais" title="Lista de páginas especiais [q]" accesskey="q"><span>Páginas especiais</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=M%C3%B3dulo:Yesno&oldid=400037" title="Hiperligação permanente para esta revisão desta página"><span>Hiperligação permanente</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=M%C3%B3dulo:Yesno&action=info" title="Mais informações sobre esta página"><span>Informações da página</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Especial:UrlShortener&url=https%3A%2F%2Fpt.wikisource.org%2Fwiki%2FM%25C3%25B3dulo%3AYesno"><span>Obter URL encurtado</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Especial:QrCode&url=https%3A%2F%2Fpt.wikisource.org%2Fwiki%2FM%25C3%25B3dulo%3AYesno"><span>Descarregar código QR</span></a></li> </ul> </div> </div> <div id="p-electronpdfservice-sidebar-portlet-heading" class="vector-menu mw-portlet mw-portlet-electronpdfservice-sidebar-portlet-heading" > <div class="vector-menu-heading"> Imprimir/exportar </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="electron-print_pdf" class="mw-list-item"><a href="/w/index.php?title=Especial:DownloadAsPdf&page=M%C3%B3dulo%3AYesno&action=show-download-screen"><span>Descarregar como PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="javascript:print();" rel="alternate" title="Versão para impressão desta página [p]" accesskey="p"><span>Versão para impressão</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> Noutros projetos </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="wb-otherproject-link wb-otherproject-commons mw-list-item"><a href="https://commons.wikimedia.org/wiki/Module:Yesno" hreflang="en"><span>Wikimedia Commons</span></a></li><li class="wb-otherproject-link wb-otherproject-foundation mw-list-item"><a href="https://foundation.wikimedia.org/wiki/Module:Yesno" hreflang="en"><span>Fundação Wikimedia</span></a></li><li class="wb-otherproject-link wb-otherproject-mediawiki mw-list-item"><a href="https://www.mediawiki.org/wiki/Module:Yesno" hreflang="en"><span>MediaWiki</span></a></li><li class="wb-otherproject-link wb-otherproject-meta mw-list-item"><a href="https://meta.wikimedia.org/wiki/Module:Yesno" hreflang="en"><span>Meta-Wiki</span></a></li><li class="wb-otherproject-link wb-otherproject-outreach mw-list-item"><a href="https://outreach.wikimedia.org/wiki/Module:Yesno" hreflang="en"><span>Divulgação da Wikimedia</span></a></li><li class="wb-otherproject-link wb-otherproject-sources mw-list-item"><a href="https://wikisource.org/wiki/Module:Yesno" hreflang="en"><span>Wikisource multilingue</span></a></li><li class="wb-otherproject-link wb-otherproject-species mw-list-item"><a href="https://species.wikimedia.org/wiki/Module:Yesno" hreflang="en"><span>Wikispecies</span></a></li><li class="wb-otherproject-link wb-otherproject-wikibooks mw-list-item"><a href="https://pt.wikibooks.org/wiki/M%C3%B3dulo:Yesno" hreflang="pt"><span>Wikilivros</span></a></li><li class="wb-otherproject-link wb-otherproject-wikidata mw-list-item"><a href="https://www.wikidata.org/wiki/Module:Yesno" hreflang="en"><span>Wikidata</span></a></li><li class="wb-otherproject-link wb-otherproject-wikifunctions mw-list-item"><a href="https://www.wikifunctions.org/wiki/Module:Yesno" hreflang="en"><span>Wikifunctions</span></a></li><li class="wb-otherproject-link wb-otherproject-wikimania mw-list-item"><a href="https://wikimania.wikimedia.org/wiki/Module:Yesno" hreflang="en"><span>Wikimania</span></a></li><li class="wb-otherproject-link wb-otherproject-wikinews mw-list-item"><a href="https://pt.wikinews.org/wiki/M%C3%B3dulo:Yesno" hreflang="pt"><span>Wikinotícias</span></a></li><li class="wb-otherproject-link wb-otherproject-wikipedia mw-list-item"><a href="https://pt.wikipedia.org/wiki/M%C3%B3dulo:Yesno" hreflang="pt"><span>Wikipédia</span></a></li><li class="wb-otherproject-link wb-otherproject-wikiquote mw-list-item"><a href="https://pt.wikiquote.org/wiki/M%C3%B3dulo:Yesno" hreflang="pt"><span>Wikiquote</span></a></li><li class="wb-otherproject-link wb-otherproject-wikiversity mw-list-item"><a href="https://pt.wikiversity.org/wiki/M%C3%B3dulo:Yesno" hreflang="pt"><span>Wikiversidade</span></a></li><li class="wb-otherproject-link wb-otherproject-wikivoyage mw-list-item"><a href="https://pt.wikivoyage.org/wiki/M%C3%B3dulo:Yesno" hreflang="pt"><span>Wikivoyage</span></a></li><li class="wb-otherproject-link wb-otherproject-wiktionary mw-list-item"><a href="https://pt.wiktionary.org/wiki/M%C3%B3dulo:yesno" hreflang="pt"><span>Wikcionário</span></a></li><li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q15098140" title="Hiperligação para o elemento do repositório de dados [g]" accesskey="g"><span>Elemento Wikidata</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Ferramentas de página"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Aspeto"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Aspeto</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">mover para a barra lateral</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">ocultar</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">Wikisource, a biblioteca livre</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="pt" dir="ltr"><div id="template-documentation" class="template-documentation iezoomfix"> <div style="padding-bottom:3px;border-bottom:1px solid #aaa;margin-bottom:1ex"> <span style="font-size:150%"><span typeof="mw:File"><span><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/4/43/Test_Template_Info-Icon_-_Version_%282%29.svg/50px-Test_Template_Info-Icon_-_Version_%282%29.svg.png" decoding="async" width="50" height="22" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/4/43/Test_Template_Info-Icon_-_Version_%282%29.svg/75px-Test_Template_Info-Icon_-_Version_%282%29.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/4/43/Test_Template_Info-Icon_-_Version_%282%29.svg/100px-Test_Template_Info-Icon_-_Version_%282%29.svg.png 2x" data-file-width="1792" data-file-height="800" /></span></span> Documentação do módulo</span><span class="mw-editsection-like plainlinks" id="doc_editlinks">[<a href="/wiki/M%C3%B3dulo:Yesno/doc" title="Módulo:Yesno/doc">ver</a>] [<a class="external text" href="https://pt.wikisource.org/w/index.php?title=M%C3%B3dulo:Yesno/doc&action=edit">editar</a>] [<a class="external text" href="https://pt.wikisource.org/w/index.php?title=M%C3%B3dulo:Yesno/doc&action=history">histórico</a>] [<a class="external text" href="https://pt.wikisource.org/w/index.php?title=M%C3%B3dulo:Yesno&action=purge">purgar</a>]</span></div> <p>Este módulo fornece uma interface consistente para o processamento de strings de entrada booleanas ou de tipo booleano. É um módulo para ser usado por outros módulos, não independentemente. Enquanto Lua permite os valores booleanos <code>true</code> e <code>false</code>, predefinições em código wiki só podem expressar valores booleanos através de strings tais como "sim", "não", etc. Este módulo processa esse tipo de strings e converte-as em entradas booleanas para que Lua possa processá-las. Ele também retorna valores <code>nil</code> como <code>nil</code>, para permitir que haja distinção entre <code>nil</code> e <code>false</code>. O módulo também aceita outras estruturas em Lua como entrada, por exemplo booleanos, números, tabelas, e funções. É possível especificar um valor <code>padrão</code> a ser retornado em todos os casos. </p> <div class="mw-heading mw-heading2"><h2 id="Sintaxe">Sintaxe</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=M%C3%B3dulo:Yesno/doc&action=edit&section=T-1" title="Editar secção: Sintaxe"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="n">yesno</span><span class="p">(</span><span class="n">valor</span><span class="p">,</span> <span class="n">padrão</span><span class="p">)</span> </pre></div> <p><code>valor</code> é o valor a ser testado. Entradas booleanas ou de tipo booleano (ver abaixo) são sempre avaliadas como <code>true</code> ou <code>false</code>, e valores <code>nil</code> sempre são avaliados como <code>nil</code>. Outros valores são avaliados como <code>padrão</code>. </p> <div class="mw-heading mw-heading2"><h2 id="Uso">Uso</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=M%C3%B3dulo:Yesno/doc&action=edit&section=T-2" title="Editar secção: Uso"><span>editar</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Primeiro, carrega-se o módulo. Note que só pode ser carregado a partir de outros módulos feitos em Lua, não de páginas wiki em outros domínios, como predefinições, domínio principal e/ou páginas de usuário; Para essas, a predefinição {{<a href="/wiki/Predefini%C3%A7%C3%A3o:Yesno" title="Predefinição:Yesno">yesno</a>}} pode servir como substitutivo. Para carregar o módulo, utiliza-se a seguinte linha de comando: </p> <div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kd">local</span> <span class="n">yesno</span> <span class="o">=</span> <span class="nb">require</span><span class="p">(</span><span class="s1">'Module:Yesno'</span><span class="p">)</span> </pre></div> <p>Alguns valores de entrada sempre retornam <code>true</code>, e alguns sempre retornam <code>false</code>. Valores <code>nil</code> sempre retornam <code>nil</code>. </p> <div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">-- Estes sempre retornam true:</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'sim'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'verdadeiro'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'yes'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'y'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'true'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'1'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="kc">true</span><span class="p">)</span> <span class="c1">-- Estes sempre retornam false:</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'não'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'falso'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'no'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'n'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'false'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'0'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="kc">false</span><span class="p">)</span> <span class="c1">-- Valores nil sempre retornam nil:</span> <span class="n">yesno</span><span class="p">(</span><span class="kc">nil</span><span class="p">)</span> </pre></div> <p>Valores string são convertidos para letras minúsculas antes de serem testados: </p> <div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">-- Estes sempre retornam true:</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'Sim'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'SIM'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'sIm'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'vErDaDeIrO'</span><span class="p">)</span> <span class="c1">-- Estes sempre retornam false:</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'Não'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'NÃO'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'nÃO'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'fALsO'</span><span class="p">)</span> </pre></div> <p>É possível especificar um valor padrão para o caso de yesno receber como entrada algo que não esteja listado acima. Se não for fornecido um valor padrão, o módulo retornará <code>nil</code> para tais entradas. </p> <div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">-- Estes retornam nil:</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'teste'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">({})</span> <span class="n">yesno</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="kr">function</span><span class="p">()</span> <span class="kr">return</span> <span class="s1">'Esta é uma função.'</span> <span class="kr">end</span><span class="p">)</span> <span class="c1">-- Estes retornam true:</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'teste'</span><span class="p">,</span> <span class="kc">true</span><span class="p">)</span> <span class="n">yesno</span><span class="p">({},</span> <span class="kc">true</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="kc">true</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="kr">function</span><span class="p">()</span> <span class="kr">return</span> <span class="s1">'Esta é uma função.'</span> <span class="kr">end</span><span class="p">,</span> <span class="kc">true</span><span class="p">)</span> <span class="c1">-- Estes retornam "padrão":</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">'teste'</span><span class="p">,</span> <span class="s1">'padrão'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">({},</span> <span class="s1">'padrão'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="s1">'padrão'</span><span class="p">)</span> <span class="n">yesno</span><span class="p">(</span><span class="kr">function</span><span class="p">()</span> <span class="kr">return</span> <span class="s1">'Esta é uma função.'</span> <span class="kr">end</span><span class="p">,</span> <span class="s1">'padrão'</span><span class="p">)</span> </pre></div> <p>Note que a string vazia também funciona deste modo: </p> <div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="n">yesno</span><span class="p">(</span><span class="s1">''</span><span class="p">)</span> <span class="c1">-- Retorna nil.</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">''</span><span class="p">,</span> <span class="kc">true</span><span class="p">)</span> <span class="c1">-- Retorna true.</span> <span class="n">yesno</span><span class="p">(</span><span class="s1">''</span><span class="p">,</span> <span class="s1">'padrão'</span><span class="p">)</span> <span class="c1">-- Retorna "padrão".</span> </pre></div> <p>Embora a string vazia geralmente seja avaliada como false em código wiki, ela é avaliada como true em Lua. Este módulo prefere o comportamento em Lua em vez do comportamento em código wiki. Se para o seu módulo for importante tratar strings vazias como false, você precisará remover os argumentos vazios em um estágio anterior do processamento. </p> <div style="clear:both"> </div></div><table id="documentation-meta-data" class="plainlinks fmbox fmbox-system" role="presentation" style="background-color: #ecfcf4; margin: 0.2em 0px; width: 100%; border: 1px solid #AAA;"><tbody><tr><td class="mbox-text" style="font-style: italic">A <a href="https://pt.wikipedia.org/wiki/Wikip%C3%A9dia:Documenta%C3%A7%C3%A3o_da_predefini%C3%A7%C3%A3o" class="extiw" title="w:Wikipédia:Documentação da predefinição">documentação</a> acima é <a href="https://pt.wikipedia.org/wiki/Wikipedia:Transclus%C3%A3o" class="extiw" title="w:Wikipedia:Transclusão">transcluída</a> de <a href="/wiki/M%C3%B3dulo:Yesno/doc" title="Módulo:Yesno/doc">Módulo:Yesno/doc</a>. <small style="font-style: normal;">(<a class="external text" href="https://pt.wikisource.org/w/index.php?title=M%C3%B3dulo:Yesno/doc&action=edit">editar</a> | <a class="external text" href="https://pt.wikisource.org/w/index.php?title=M%C3%B3dulo:Yesno/doc&action=history">histórico</a>)</small><br />Editores podem experimentar nas páginas de teste <small style="font-style: normal;">(<a class="external text" href="https://pt.wikisource.org/w/index.php?title=M%C3%B3dulo:Yesno/Testes&action=edit&preload=Predefini%C3%A7%C3%A3o%3ADocumenta%C3%A7%C3%A3o%2Fpreload-module-sandbox">criar</a> | <a class="external text" href="https://pt.wikisource.org/w/index.php?title=M%C3%B3dulo:Yesno/Testes&preload=M%C3%B3dulo%3AYesno&action=edit&summary=Cria%C3%A7%C3%A3o+de+uma+vers%C3%A3o+de+teste+de+%5B%5BM%C3%B3dulo%3AYesno%5D%5D">espelhar</a>)</small> e de exemplos para testes <small style="font-style: normal;">(<a class="external text" href="https://pt.wikisource.org/w/index.php?title=M%C3%B3dulo:Yesno/Exemplos_para_testes&action=edit&preload=Predefini%C3%A7%C3%A3o%3ADocumenta%C3%A7%C3%A3o%2Fpreload-module-testcases">criar</a>)</small> deste módulo.<br /> <a href="/wiki/Especial:%C3%8Dndice_por_prefixo/M%C3%B3dulo:Yesno/" title="Especial:Índice por prefixo/Módulo:Yesno/">Subpáginas deste módulo</a>.</td></tr></tbody></table> <p><span id="code"></span> </p><div class="mw-highlight mw-highlight-lang-lua mw-content-ltr mw-highlight-lines" dir="ltr"><pre><span></span><span id="L-1"><a href="#L-1"><span class="linenos" data-line="1"></span></a><span class="c1">-- Function allowing for consistent treatment of boolean-like wikitext input.</span> </span><span id="L-2"><a href="#L-2"><span class="linenos" data-line="2"></span></a><span class="c1">-- It works similarly to the template {{yesno}}.</span> </span><span id="L-3"><a href="#L-3"><span class="linenos" data-line="3"></span></a> </span><span id="L-4"><a href="#L-4"><span class="linenos" data-line="4"></span></a><span class="kr">return</span> <span class="kr">function</span> <span class="p">(</span><span class="n">val</span><span class="p">,</span> <span class="n">default</span><span class="p">)</span> </span><span id="L-5"><a href="#L-5"><span class="linenos" data-line="5"></span></a> <span class="c1">-- If your wiki uses non-ascii characters for any of "yes", "no", etc., you</span> </span><span id="L-6"><a href="#L-6"><span class="linenos" data-line="6"></span></a> <span class="c1">-- should replace "val:lower()" with "mw.ustring.lower(val)" in the</span> </span><span id="L-7"><a href="#L-7"><span class="linenos" data-line="7"></span></a> <span class="c1">-- following line.</span> </span><span id="L-8"><a href="#L-8"><span class="linenos" data-line="8"></span></a> <span class="n">val</span> <span class="o">=</span> <span class="nb">type</span><span class="p">(</span><span class="n">val</span><span class="p">)</span> <span class="o">==</span> <span class="s1">'string'</span> <span class="ow">and</span> <span class="n">mw</span><span class="p">.</span><span class="n">ustring</span><span class="p">.</span><span class="n">lower</span><span class="p">(</span><span class="n">val</span><span class="p">)</span> <span class="ow">or</span> <span class="n">val</span> </span><span id="L-9"><a href="#L-9"><span class="linenos" data-line="9"></span></a> <span class="kr">if</span> <span class="n">val</span> <span class="o">==</span> <span class="kc">nil</span> <span class="kr">then</span> </span><span id="L-10"><a href="#L-10"><span class="linenos" data-line="10"></span></a> <span class="kr">return</span> <span class="kc">nil</span> </span><span id="L-11"><a href="#L-11"><span class="linenos" data-line="11"></span></a> <span class="kr">elseif</span> <span class="n">val</span> <span class="o">==</span> <span class="kc">true</span> </span><span id="L-12"><a href="#L-12"><span class="linenos" data-line="12"></span></a> <span class="ow">or</span> <span class="n">val</span> <span class="o">==</span> <span class="s1">'sim'</span> </span><span id="L-13"><a href="#L-13"><span class="linenos" data-line="13"></span></a> <span class="ow">or</span> <span class="n">val</span> <span class="o">==</span> <span class="s1">'s'</span> </span><span id="L-14"><a href="#L-14"><span class="linenos" data-line="14"></span></a> <span class="ow">or</span> <span class="n">val</span> <span class="o">==</span> <span class="s1">'verdadeiro'</span> </span><span id="L-15"><a href="#L-15"><span class="linenos" data-line="15"></span></a> <span class="ow">or</span> <span class="n">val</span> <span class="o">==</span> <span class="s1">'yes'</span> </span><span id="L-16"><a href="#L-16"><span class="linenos" data-line="16"></span></a> <span class="ow">or</span> <span class="n">val</span> <span class="o">==</span> <span class="s1">'y'</span> </span><span id="L-17"><a href="#L-17"><span class="linenos" data-line="17"></span></a> <span class="ow">or</span> <span class="n">val</span> <span class="o">==</span> <span class="s1">'true'</span> </span><span id="L-18"><a href="#L-18"><span class="linenos" data-line="18"></span></a> <span class="ow">or</span> <span class="n">val</span> <span class="o">==</span> <span class="s1">'t'</span> </span><span id="L-19"><a href="#L-19"><span class="linenos" data-line="19"></span></a> <span class="ow">or</span> <span class="nb">tonumber</span><span class="p">(</span><span class="n">val</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span> </span><span id="L-20"><a href="#L-20"><span class="linenos" data-line="20"></span></a> <span class="kr">then</span> </span><span id="L-21"><a href="#L-21"><span class="linenos" data-line="21"></span></a> <span class="kr">return</span> <span class="kc">true</span> </span><span id="L-22"><a href="#L-22"><span class="linenos" data-line="22"></span></a> <span class="kr">elseif</span> <span class="n">val</span> <span class="o">==</span> <span class="kc">false</span> </span><span id="L-23"><a href="#L-23"><span class="linenos" data-line="23"></span></a> <span class="ow">or</span> <span class="n">val</span> <span class="o">==</span> <span class="s1">'não'</span> </span><span id="L-24"><a href="#L-24"><span class="linenos" data-line="24"></span></a> <span class="ow">or</span> <span class="n">val</span> <span class="o">==</span> <span class="s1">'nao'</span> </span><span id="L-25"><a href="#L-25"><span class="linenos" data-line="25"></span></a> <span class="ow">or</span> <span class="n">val</span> <span class="o">==</span> <span class="s1">'falso'</span> </span><span id="L-26"><a href="#L-26"><span class="linenos" data-line="26"></span></a> <span class="ow">or</span> <span class="n">val</span> <span class="o">==</span> <span class="s1">'no'</span> </span><span id="L-27"><a href="#L-27"><span class="linenos" data-line="27"></span></a> <span class="ow">or</span> <span class="n">val</span> <span class="o">==</span> <span class="s1">'n'</span> </span><span id="L-28"><a href="#L-28"><span class="linenos" data-line="28"></span></a> <span class="ow">or</span> <span class="n">val</span> <span class="o">==</span> <span class="s1">'false'</span> </span><span id="L-29"><a href="#L-29"><span class="linenos" data-line="29"></span></a> <span class="ow">or</span> <span class="n">val</span> <span class="o">==</span> <span class="s1">'f'</span> </span><span id="L-30"><a href="#L-30"><span class="linenos" data-line="30"></span></a> <span class="ow">or</span> <span class="nb">tonumber</span><span class="p">(</span><span class="n">val</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span> </span><span id="L-31"><a href="#L-31"><span class="linenos" data-line="31"></span></a> <span class="kr">then</span> </span><span id="L-32"><a href="#L-32"><span class="linenos" data-line="32"></span></a> <span class="kr">return</span> <span class="kc">false</span> </span><span id="L-33"><a href="#L-33"><span class="linenos" data-line="33"></span></a> <span class="kr">else</span> </span><span id="L-34"><a href="#L-34"><span class="linenos" data-line="34"></span></a> <span class="kr">return</span> <span class="n">default</span> </span><span id="L-35"><a href="#L-35"><span class="linenos" data-line="35"></span></a> <span class="kr">end</span> </span><span id="L-36"><a href="#L-36"><span class="linenos" data-line="36"></span></a><span class="kr">end</span> </span></pre></div> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐5c59558b9d‐hmgbj Cached time: 20241201092635 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1] CPU time usage: 0.053 seconds Real time usage: 0.369 seconds Preprocessor visited node count: 81/1000000 Post‐expand include size: 12842/2097152 bytes Template argument size: 44/2097152 bytes Highest expansion depth: 8/100 Expensive parser function count: 11/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 7178/5000000 bytes Lua time usage: 0.012/10.000 seconds Lua memory usage: 923868/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 351.943 1 Predefinição:Documentação 100.00% 351.943 1 -total 89.16% 313.796 1 Módulo:Yesno/doc 3.34% 11.740 1 Predefinição:Tl 1.01% 3.563 1 Predefinição:Subpágina_para_documentação --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1&useformat=desktop" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Obtida de "<a dir="ltr" href="https://pt.wikisource.org/w/index.php?title=Módulo:Yesno&oldid=400037">https://pt.wikisource.org/w/index.php?title=Módulo:Yesno&oldid=400037</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Especial:Categorias" title="Especial:Categorias">Categoria</a>: <ul><li><a href="/wiki/Categoria:!M%C3%B3dulos" title="Categoria:!Módulos">!Módulos</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> Esta página foi editada pela última vez às 22h41min de 6 de abril de 2020.</li> <li id="footer-info-copyright">Este texto é disponibilizado nos termos da licença <a rel="nofollow" class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.pt">Atribuição-CompartilhaIgual 4.0 (CC BY-SA 4.0) da Creative Commons</a>; pode estar sujeito a condições adicionais. Para mais detalhes, consulte as <a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">condições de utilização</a>.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy/pt-br">Política de privacidade</a></li> <li id="footer-places-about"><a href="/wiki/Wikisource:Sobre">Sobre a Wikisource</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikisource:Aviso_geral">Exoneração de responsabilidade</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Código de conduta</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Programadores</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/pt.wikisource.org">Estatísticas</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Declaração sobre ''cookies''</a></li> <li id="footer-places-mobileview"><a href="//pt.m.wikisource.org/w/index.php?title=M%C3%B3dulo:Yesno&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Versão móvel</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-5c59558b9d-hmgbj","wgBackendResponseTime":623,"wgPageParseReport":{"limitreport":{"cputime":"0.053","walltime":"0.369","ppvisitednodes":{"value":81,"limit":1000000},"postexpandincludesize":{"value":12842,"limit":2097152},"templateargumentsize":{"value":44,"limit":2097152},"expansiondepth":{"value":8,"limit":100},"expensivefunctioncount":{"value":11,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":7178,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 351.943 1 Predefinição:Documentação","100.00% 351.943 1 -total"," 89.16% 313.796 1 Módulo:Yesno/doc"," 3.34% 11.740 1 Predefinição:Tl"," 1.01% 3.563 1 Predefinição:Subpágina_para_documentação"]},"scribunto":{"limitreport-timeusage":{"value":"0.012","limit":"10.000"},"limitreport-memusage":{"value":923868,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-5c59558b9d-hmgbj","timestamp":"20241201092635","ttl":2592000,"transientcontent":false}}});});</script> </body> </html>