CINXE.COM
Vizualizare sursă pentru „Modul:InfoboxSettlement” - Wikipedia
<!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-disabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-not-available" lang="ro" dir="ltr"> <head> <meta charset="UTF-8"> <title>Vizualizare sursă pentru „Modul:InfoboxSettlement” - Wikipedia</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-disabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-not-available";var cookie=document.cookie.match(/(?:^|; )rowikimwclientpreferences=([^;]+)/);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":true,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat": "dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"979d4183-8789-4d46-ba80-20fa79ba0be5","wgCanonicalNamespace":"Module","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":828,"wgPageName":"Modul:InfoboxSettlement","wgTitle":"InfoboxSettlement","wgCurRevisionId":16513784,"wgRevisionId":0,"wgArticleId":1651751,"wgIsArticle":false,"wgIsRedirect":false,"wgAction":"edit","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"Scribunto","wgRelevantPageName":"Modul:InfoboxSettlement","wgRelevantArticleId":1651751,"wgTempUserName":null,"wgIsProbablyEditable":false,"wgRelevantPageIsProbablyEditable":false,"wgRestrictionEdit":["templateeditor"],"wgRestrictionMove":["templateeditor"],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true, "wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":70000,"wgCodeEditorCurrentLanguage":"lua","wgRelatedArticlesCompat":[],"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false,"wgSiteNoticeId":"2.2"};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready", "user.options":"loading","ext.codeEditor.styles":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.charinsert.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","ext.wikimediaBadges":"ready","ext.dismissableSiteNotice.styles":"ready"};RLPAGEMODULES=["ext.codeEditor","ext.scribunto.edit","mediawiki.action.edit.collapsibleFooter","site","mediawiki.page.ready","skins.vector.js","ext.centralNotice.geoIP","ext.charinsert","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.checkUser.clientHints","wikibase.sidebar.tracking","ext.dismissableSiteNotice"];</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=ro&modules=ext.charinsert.styles%7Cext.codeEditor.styles%7Cext.dismissableSiteNotice.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=ro&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=ro&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="noindex,nofollow,max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Vizualizare sursă pentru „Modul:InfoboxSettlement” - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//ro.m.wikipedia.org/wiki/Modul:InfoboxSettlement"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (ro)"> <link rel="EditURI" type="application/rsd+xml" href="//ro.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://ro.wikipedia.org/wiki/Modul:InfoboxSettlement"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.ro"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Abonare Atom" href="/w/index.php?title=Special:Schimb%C4%83ri_recente&feed=atom"> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="codeeditor-loading skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-828 ns-subject page-Modul_InfoboxSettlement rootpage-Modul_InfoboxSettlement skin-vector-2022 action-edit"><a class="mw-jump-link" href="#bodyContent">Sari la conținut</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="Meniul 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">Meniul 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">Meniul principal</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">mută în bara laterală</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">ascunde</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigare </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage" class="mw-list-item"><a href="/wiki/Pagina_principal%C4%83" title="Vedeți pagina principală [z]" accesskey="z"><span>Pagina principală</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:Schimb%C4%83ri_recente" title="Lista ultimelor schimbări realizate în acest wiki [r]" accesskey="r"><span>Schimbări recente</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Wikipedia:Cafenea" title="Informații despre evenimentele curente"><span>Cafenea</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Aleatoriu" title="Afișează o pagină aleatoare [x]" accesskey="x"><span>Articol aleatoriu</span></a></li><li id="n-Facebook" class="mw-list-item"><a href="https://www.facebook.com/WikipediaRomana" rel="nofollow"><span>Facebook</span></a></li> </ul> </div> </div> <div id="p-Participare" class="vector-menu mw-portlet mw-portlet-Participare" > <div class="vector-menu-heading"> Participare </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-Cum-încep-pe-Wikipedia" class="mw-list-item"><a href="/wiki/Ajutor:Bun_venit"><span>Cum încep pe Wikipedia</span></a></li><li id="n-help" class="mw-list-item"><a href="/wiki/Ajutor:Cuprins" title="Locul în care găsiți ajutor"><span>Ajutor</span></a></li><li id="n-Portals" class="mw-list-item"><a href="/wiki/Portal:R%C4%83sfoire"><span>Portaluri tematice</span></a></li><li id="n-Articole-cerute" class="mw-list-item"><a href="/wiki/Wikipedia:Articole_cerute"><span>Articole cerute</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Pagina_principal%C4%83" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="enciclopedia liberă" src="/static/images/mobile/copyright/wikipedia-tagline-ro.svg" width="120" height="13" style="width: 7.5em; height: 0.8125em;"> </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/Special:C%C4%83utare" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Căutare în Wikipedia [c]" accesskey="c"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Căutare</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="Căutare în Wikipedia" aria-label="Căutare în Wikipedia" autocapitalize="sentences" title="Căutare în Wikipedia [c]" accesskey="c" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Căutare"> </div> <button class="cdx-button cdx-search-input__end-button">Căutare</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Unelte personale"> <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="Aspect"> <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="Aspect" > <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">Aspect</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_ro.wikipedia.org&uselang=ro" class=""><span>Donații</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=Special:%C3%8Enregistrare&returnto=Modul%3AInfoboxSettlement&returntoquery=action%3Dedit" title="Vă încurajăm să vă creați un cont și să vă autentificați; totuși, nu este obligatoriu" class=""><span>Creare cont</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=Special:Autentificare&returnto=Modul%3AInfoboxSettlement&returntoquery=action%3Dedit" title="Sunteți încurajat să vă autentificați, deși acest lucru nu este obligatoriu. [o]" accesskey="o" class=""><span>Autentificare</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 user-links-collapsible-item" title="Mai multe opțiuni" > <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="Unelte personale" > <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">Unelte personale</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="Meniul de utilizator" > <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_ro.wikipedia.org&uselang=ro"><span>Donații</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:%C3%8Enregistrare&returnto=Modul%3AInfoboxSettlement&returntoquery=action%3Dedit" title="Vă încurajăm să vă creați un cont și să vă autentificați; totuși, nu este obligatoriu"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Creare cont</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:Autentificare&returnto=Modul%3AInfoboxSettlement&returntoquery=action%3Dedit" title="Sunteți încurajat să vă autentificați, deși acest lucru nu este obligatoriu. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Autentificare</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"><div id="mw-dismissablenotice-anonplace"></div><script>(function(){var node=document.getElementById("mw-dismissablenotice-anonplace");if(node){node.outerHTML="\u003Cdiv class=\"mw-dismissable-notice\"\u003E\u003Cdiv class=\"mw-dismissable-notice-close\"\u003E[\u003Ca tabindex=\"0\" role=\"button\"\u003Eascunde\u003C/a\u003E]\u003C/div\u003E\u003Cdiv class=\"mw-dismissable-notice-body\"\u003E\u003C!-- CentralNotice --\u003E\u003Cdiv id=\"localNotice\" data-nosnippet=\"\"\u003E\u003Cdiv class=\"anonnotice\" lang=\"ro\" dir=\"ltr\"\u003E\u003Cdiv class=\"plainlinks\" style=\"border: 1px solid #ddd; margin: 0 0 3px;\"\u003E\n\u003Cdiv class=\"nomobile\" style=\"float:right\"\u003E\n\u003Cspan typeof=\"mw:File\"\u003E\u003Ca href=\"/wiki/Wikipedia:Concurs_de_scriere\" title=\"Wikipedia:Concurs de scriere\"\u003E\u003Cimg src=\"//upload.wikimedia.org/wikipedia/commons/thumb/5/55/Concurs_de_scriere.png/126px-Concurs_de_scriere.png\" decoding=\"async\" width=\"126\" height=\"95\" class=\"mw-file-element\" srcset=\"//upload.wikimedia.org/wikipedia/commons/thumb/5/55/Concurs_de_scriere.png/189px-Concurs_de_scriere.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/5/55/Concurs_de_scriere.png/251px-Concurs_de_scriere.png 2x\" data-file-width=\"506\" data-file-height=\"383\" /\u003E\u003C/a\u003E\u003C/span\u003E\u003C/div\u003E\n\u003Cdiv style=\"color: grey; max-width:1280px; margin: 12px auto; font-family: Tahoma, \u0026#39;DejaVu Sans Condensed\u0026#39;, sans-serif; text-align: center; font-size: 12pt; position: relative;\"\u003EA început o nouă ediție a concursului de scriere! Sunteți cu drag invitați să participați la ediția cu numărul 22, cu articole scrise sau dezvoltate considerabil între 1 aprilie și 30 noiembrie 2024. Pentru înscriere de articole la concurs (nominalizări), condiții de eligibilitate, punctare și alte detalii, vă rugăm să accesați \u003Cb\u003E\u003Ca href=\"/wiki/Wikipedia:Concurs_de_scriere\" title=\"Wikipedia:Concurs de scriere\"\u003Epagina\u0026#160;concursului\u003C/a\u003E\u003C/b\u003E.\u003C/div\u003E\n\u003Cdiv style=\"clear: both;\"\u003E\u003C/div\u003E\n\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E";}}());</script></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> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <h1 id="firstHeading" class="firstHeading mw-first-heading">Vizualizare sursă pentru „Modul:InfoboxSettlement”</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="This article exist only in this language. Add the article for other languages" > <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-0" 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">Adăugare limbi</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> <div class="after-portlet after-portlet-lang"><span class="uls-after-portlet-link"></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Spații de nume"> <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/Modul:InfoboxSettlement" title="Vezi modulul [c]" accesskey="c"><span>Modul</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Discu%C8%9Bie_Modul:InfoboxSettlement" rel="discussion" title="Discuții despre această pagină [t]" accesskey="t"><span>Discuție</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="Change language variant" > <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="Vizualizări"> <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="vector-tab-noicon mw-list-item"><a href="/wiki/Modul:InfoboxSettlement"><span>Lectură</span></a></li><li id="ca-viewsource" class="selected vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Modul:InfoboxSettlement&action=edit" title="Această pagină este protejată. Puteți vizualiza doar codul sursă [e]" accesskey="e"><span>Vedeți sursa</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Modul:InfoboxSettlement&action=history" title="Versiunile anterioare ale paginii și autorii lor. [h]" accesskey="h"><span>Istoric</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <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="Unelte" > <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">Unelte</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">Unelte</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">mută în bara laterală</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">ascunde</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="Mai multe opțiuni" > <div class="vector-menu-heading"> Acțiuni </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="vector-more-collapsible-item mw-list-item"><a href="/wiki/Modul:InfoboxSettlement"><span>Lectură</span></a></li><li id="ca-more-viewsource" class="selected vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Modul:InfoboxSettlement&action=edit"><span>Vedeți sursa</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Modul:InfoboxSettlement&action=history"><span>Istoric</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:Ce_se_leag%C4%83_aici/Modul:InfoboxSettlement" title="Lista tuturor paginilor wiki care conduc spre această pagină [j]" accesskey="j"><span>Ce trimite aici</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:Modific%C4%83ri_corelate/Modul:InfoboxSettlement" rel="nofollow" title="Schimbări recente în legătură cu această pagină [k]" accesskey="k"><span>Schimbări corelate</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Wikipedia:Trimite_fi%C8%99ier" title="Încărcare fișiere [u]" accesskey="u"><span>Trimite fișier</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:Pagini_speciale" title="Lista tuturor paginilor speciale [q]" accesskey="q"><span>Pagini speciale</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Modul:InfoboxSettlement&action=info" title="Mai multe informații despre această pagină"><span>Informații despre pagină</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fro.wikipedia.org%2Fw%2Findex.php%3Ftitle%3DModul%3AInfoboxSettlement%26action%3Dedit"><span>Obține URL scurtat</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fro.wikipedia.org%2Fw%2Findex.php%3Ftitle%3DModul%3AInfoboxSettlement%26action%3Dedit"><span>Descărcați codul QR</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"> În alte proiecte </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q15177196" title="Legătură către elementul asociat din depozitul de date [g]" accesskey="g"><span>Element 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="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Aspect"> <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">Aspect</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">mută în bara laterală</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">ascunde</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> <div id="contentSub"><div id="mw-content-subtitle">← <a href="/wiki/Modul:InfoboxSettlement" title="Modul:InfoboxSettlement">Modul:InfoboxSettlement</a></div></div> <div id="mw-content-text" class="mw-body-content"><p>Nu aveți permisiunea de a modifica această pagină, din următoarele motive: </p> <ul class="permissions-errors"><li class="mw-permissionerror-protectedpagetext"><style data-mw-deduplicate="TemplateStyles:r16572585">@media screen{html.skin-theme-clientpref-night .mw-parser-output .mw-warning-with-logexcerpt,html.skin-theme-clientpref-night .mw-parser-output .mw-lag-warn-high,html.skin-theme-clientpref-night .mw-parser-output .mw-cascadeprotectedwarning,html.skin-theme-clientpref-night .mw-parser-output #mw-protect-cascadeon{background:#300!important}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .mw-warning-with-logexcerpt,html.skin-theme-clientpref-os .mw-parser-output .mw-lag-warn-high,html.skin-theme-clientpref-os .mw-parser-output .mw-cascadeprotectedwarning,html.skin-theme-clientpref-os .mw-parser-output #mw-protect-cascadeon{background:#300!important}}</style><table id="mw-protectedpagetext" class="plainlinks fmbox fmbox-editnotice" style="background:var(--background-color-interactive-subtle, #f9f9f9); color:var(--color-base, #000);"> <tbody><tr> <td class="mbox-image"> <span class="mw-default-size" typeof="mw:File"><a href="/wiki/Fi%C8%99ier:Padlock-pink.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/7/70/Padlock-pink.svg/128px-Padlock-pink.svg.png" decoding="async" width="128" height="128" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/7/70/Padlock-pink.svg/192px-Padlock-pink.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/7/70/Padlock-pink.svg/256px-Padlock-pink.svg.png 2x" data-file-width="128" data-file-height="128" /></a></span></td> <td class="mbox-text" style=""> <strong style="font-size:130%">Această pagină este <a href="/wiki/Wikipedia:Pagin%C4%83_protejat%C4%83#Protejarea_formatelor" title="Wikipedia:Pagină protejată">protejată</a>.</strong> <p>Ea poate fi modificată doar de <a href="/wiki/Wikipedia:EF" class="mw-redirect" title="Wikipedia:EF">editori de formate</a>. </p><p>Dacă doriți să propuneți o modificare vă rugăm să lăsați un mesaj în <a href="/wiki/Discu%C8%9Bie_Modul:InfoboxSettlement" title="Discuție Modul:InfoboxSettlement">pagina de discuții</a>. </p> Pentru a cere deprotejarea paginii urmați instrucțiunile de la pagina <a href="/wiki/Wikipedia:Cereri_pentru_protejarea_paginilor" title="Wikipedia:Cereri pentru protejarea paginilor">Cereri protejare/deprotejare</a>. </td> </tr> </tbody></table></li><li class="mw-permissionerror-globalblocking-blockedtext-range"><b>Your IP address is in a range that has been <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/Global_blocks" class="extiw" title="m:Special:MyLanguage/Global blocks">blocked on all Wikimedia Foundation wikis</a>.</b> <p>The block was made by <a href="/wiki/Utilizator:Jon_Kolbert" title="Utilizator:Jon Kolbert">Jon Kolbert</a>. The reason given is <i><a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/NOP" class="extiw" title="m:Special:MyLanguage/NOP">Open proxy/Webhost</a>: See the <a href="https://meta.wikimedia.org/wiki/WM:OP/H" class="extiw" title="m:WM:OP/H">help page</a> if you are affected </i>. </p> <ul><li>Start of block: 27 august 2023 17:12</li> <li>Expiry of block: 27 august 2028 17:12</li></ul> <p>Your current IP address is 8.222.208.146. The blocked range is 8.222.128.0/17. </p><p>Vă rugăm să includeți toate detaliile de mai sus în orice mesaje. If you believe you were blocked by mistake, you can find additional information and instructions in the <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/No_open_proxies" class="extiw" title="m:Special:MyLanguage/No open proxies">No open proxies</a> global policy. </p> Otherwise, to discuss the block please <a href="https://meta.wikimedia.org/wiki/Steward_requests/Global" class="extiw" title="m:Steward requests/Global">post a request for review on Meta-Wiki</a>. You could also send an email to the <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/Stewards" class="extiw" title="m:Special:MyLanguage/Stewards">stewards</a> <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/VRT" class="extiw" title="m:Special:MyLanguage/VRT">VRT</a> queue at <kbd>stewards@wikimedia.org</kbd> including all above details.</li></ul><hr /> <p>Puteți vedea și copia codul sursă al paginii: </p><textarea readonly="" accesskey="," id="wpTextbox1" cols="80" rows="25" style="" class="mw-editfont-monospace" lang="en" dir="ltr" name="wpTextbox1">local p = {} local args = {} local root local wikidata = require('Modul:Wikidata') local editWD = require('Modul:EditAtWikidata') local collapsibleList = require('Modul:Collapsible_list') local getArgs = require('Modul:Arguments').getArgs local NameAndImage = require('Modul:NameAndImage') local StringUtils = require('Modul:StringUtils') local infoboxImage = require('Modul:InfoboxImage').InfoboxImage local DateUtils = require('Modul:DateUtils') local TableTools = require('Modul:TableTools') local round = require('Modul:Matematică')._round local join = require('Modul:Separated entries')._main local formatnum = require('Modul:Formatnum')._formatNum local wrapInLangSpan = function(langCode, text) if text then return require('Modul:Lang').fromArgs(langCode, nil, text, true) end return nil end local existCache = {} local lang = mw.getContentLanguage() local _br_ = tostring(mw.html.create('br')) local function ifexist(pageName) if existCache[pageName] == nil then local page = mw.title.new(pageName) if page then existCache[pageName] = page.exists else existCache[pageName] = false end end return existCache[pageName] end local function returnIfPageExists(pageName) if pageName == nil then return nil end if ifexist(pageName) then return pageName end return nil end local function isNilOrEmpty(argument) return argument == nil or argument == {} or mw.text.trim(argument) == '' end local function convertSqMiToKm2(argument) local sqmi = argument if type(argument) == 'string' then sqmi = tonumber(argument) end return 2.58998811 * sqmi end local function convertFtToM(argument) local ft = argument if type(argument) == 'string' then ft = tonumber(argument) end return .3048 * ft end local function removeDiacritics(argument) local ret = tostring(argument) ret = mw.ustring.gsub(ret, 'ă', 'a') ret = mw.ustring.gsub(ret, 'â', 'a') ret = mw.ustring.gsub(ret, 'î', 'i') ret = mw.ustring.gsub(ret, 'ș', 's') ret = mw.ustring.gsub(ret, 'ț', 't') ret = mw.ustring.gsub(ret, 'ș', 's') ret = mw.ustring.gsub(ret, 'ț', 't') return ret end local function keepFirstNumber(argument) --TODO make it work for negative numbers with all possible prefixes and move to Modul:Matematică if isNilOrEmpty(argument) then return argument end local ret = string.match(argument, '^%d[%d.,]*') if ret then return ret end return argument end local function keepAnyNumber(argument) --TODO make it work for negative numbers with all possible prefixes and move to Modul:Matematică if isNilOrEmpty(argument) then return argument end local ret = string.match(argument, '%d[%d.,]+') if ret then return ret end return argument end local function extractPopulationFromWikidata(args, entityId) local wikidataPopClaims = wikidata.findBestClaimsForProperty(entityId, 'P1082') local preferredWikidataPopClaim = nil if wikidataPopClaims and #wikidataPopClaims > 0 then for _,eachPopClaim in ipairs(wikidataPopClaims) do if eachPopClaim.qualifiers and eachPopClaim.qualifiers['P459'] then for __,eachDeterminationMethodQualifier in ipairs(eachPopClaim.qualifiers['P459']) do if wikidata.isValueSnak(eachDeterminationMethodQualifier) and eachDeterminationMethodQualifier.datavalue.value['numeric-id'] == 39825 then preferredWikidataPopClaim = eachPopClaim end end end end if not preferredWikidataPopClaim then preferredWikidataPopClaim = wikidataPopClaims[#wikidataPopClaims] end end if preferredWikidataPopClaim then if preferredWikidataPopClaim.qualifiers and preferredWikidataPopClaim.qualifiers['P585'] then for _,eachTimeQual in ipairs(preferredWikidataPopClaim.qualifiers['P585']) do if wikidata.isValueSnak(eachTimeQual) then args['recensamant'] = tostring(wikidata.extractDateFromClaim(eachTimeQual).year) break end end end if wikidata.hasValueSnak(preferredWikidataPopClaim) then args['populatie'] = tonumber(preferredWikidataPopClaim.mainsnak.datavalue.value.amount) end end end local function _generate() root = mw.html.create('table') root:addClass('infocaseta') :css('border-spacing', '0') :css('font-size', '88%') :css('padding', '0') :css('line-height', '1.5em') local categories = {} local headerTd = root:tag('tr'):tag('td') :attr('colspan', '2') :css('height', '41px') :addClass('antet harta') :wikitext(StringUtils._capitalize({args['nume']})) local alteNume = {} if not isNilOrEmpty(args['nume_nativ']) then table.insert(alteNume, mw.text.trim(args['nume_nativ'])) end if not isNilOrEmpty(args['alt_nume']) then table.insert(alteNume, mw.text.trim(args['alt_nume'])) end if #alteNume > 0 then root:tag('tr') :addClass('mergedrow') :tag('td') :attr('align', 'center') :attr('colspan', '2') :css('font-size', '150%') :css('margin-bottom', '2') :css('line-height', '1.2em') :css('background', 'linear-gradient( to right, rgba(45, 41, 46, 0), rgba(45, 41, 46, 0), rgba(45, 41, 46, 0), rgba(16, 23, 33, 0.25)) repeat-y right') :css('padding-top', '0') :addClass('porecla') :wikitext(table.concat(alteNume, _br_)) end if args['nume'] and args['tip_asezare'] then root:tag('tr') :addClass('mergedtoprow') :addClass('infocaseta_subheader') :tag('td') :attr('colspan', '2') :css('text-align', 'center') :css('color', 'var(--color-base, #000)') :wikitext(StringUtils._encloseString({StringUtils._emptyToNil({mw.text.listToText(args['tip_asezare'], ', ')}), "&mdash;&nbsp;&nbsp;'''", "'''&nbsp;&nbsp;&mdash;"})) end if args['nume'] and args['nume_oficial'] and args['nume'] ~= args['nume_oficial'] then root:tag('tr') :addClass('mergedtoprow') :tag('td') :attr('colspan', '2') :css('text-align', 'center') :wikitext("'''" .. args['nume_oficial'] .. "'''") end local nume_limba = args['nume_limba'] for langIndex = 1,table.maxn(nume_limba) do if nume_limba[langIndex] and nume_limba[langIndex]['nume_limba'] and nume_limba[langIndex]['nume_limba'] ~= "" then root:tag('tr') :addClass('mergedtoprow') :tag('td') :attr('colspan', '2') :css('text-align', 'center') :wikitext("'''" .. nume_limba[langIndex]['nume_limba'] .. "&nbsp;'''") local nume_limba_tip = nume_limba[langIndex]['tip'] local nume_limba_info = nume_limba[langIndex]['info'] if nume_limba_tip and nume_limba_info then for tipIndex = 1,table.maxn(nume_limba_tip) do if nume_limba_tip[tipIndex] then local langTr = root:tag('tr') if tipIndex == table.maxn(nume_limba_tip) then langTr:addClass('mergedbottomrow') else langTr:addClass('mergedrow') end langTr:tag('th') :wikitext("&nbsp;-&nbsp;" .. nume_limba_tip[tipIndex]) langTr:tag('td') :wikitext(nume_limba_info[tipIndex] or "") end end end end end if args['imagine'] and args['imagine'] ~= "" then local imageText = infoboxImage{image=args['imagine'], size=args['imagine_dimensiune'], sizedefault='frameless', upright='1', suppressplaceholder='yes', alt=args['imagine_descriere'] or ''} local imageCaption = args['imagine_descriere'] local fullImageText = join({imageText, imageCaption, ['separator'] = tostring(mw.html.create('br'))}) root:tag('tr') :tag('td') :attr('colspan', '2') :css('text-align', 'center') :css('padding', '0.7em 0.8em 0.7em 0.8em') :wikitext(fullImageText) end if args['image_seal'] or args['drapel'] or args['stemă'] or args['emblemă_imagine'] then local symbolsTable = root:tag('tr') :addClass('mergedtoprow') :tag('td') :addClass('maptable') :attr('colspan', '2') :attr('align', 'center') :css('padding', '0.4em 0 0.4em 0') :tag('table') :css('width', '100%') :css('background', 'none') :css('display', 'table') :attr('align', 'center') local numberOfSymbols = 0 local sealText, drapelText, stemaText, emblemaText = "","","","" if not isNilOrEmpty(args['image_seal']) then sealText = sealText .. "[[Fișier:" .. args['image_seal'] .. '|' .. args['seal_size'] .. '|' sealText = sealText .. "Sigiliul autorităților din " .. args['nume'] .. ']]' sealText = sealText .. "<br/><small>" if args['seal_link'] and args['seal_link'] ~= "" then sealText = sealText .. '[[' .. args['seal_link'] .. '|Sigiliu]]' else sealText = sealText .. "'''Sigiliu'''" end sealText = sealText .. "</small>" end if not isNilOrEmpty(args['emblemă_imagine']) then emblemaText = emblemaText .. "[[Fișier:" .. args['emblemă_imagine'] .. '|' .. args['emblemă_dimensiune'] .. '|Logo oficial]]' emblemaText = emblemaText .. "<br/><small>" if not isNilOrEmpty(args['emblemă_link']) then emblemaText = emblemaText .. '[[' .. args['emblemă_link'] .. '|' .. args['emblemă_tip'] ..']]' else emblemaText = emblemaText .. args['emblemă_tip'] end emblemaText = emblemaText .. "</small>" end if not isNilOrEmpty(args['stemă']) then stemaText = stemaText .. "[[Fișier:" .. args['stemă'] .. '|' .. args['stemă_dimensiune'] .. '|Stemă]]' stemaText = stemaText .. "<br/><small>" if not isNilOrEmpty(args['link_stemă']) then stemaText = stemaText .. '[[' .. args['link_stemă'] .. '|Stemă]]' else stemaText = stemaText .. "'''Stemă'''" end stemaText = stemaText .. "</small>" end if not isNilOrEmpty(args['drapel']) then drapelText = drapelText .. "[[Fișier:" .. args['drapel'] .. '|' .. args['drapel_dimensiune'] .. '|border|Drapel]]' drapelText = drapelText .. "<br/><small>" if not isNilOrEmpty(args['link_drapel']) then drapelText = drapelText .. '[[' .. args['link_drapel'] .. '|Drapel]]' else drapelText = drapelText .. "'''Drapel'''" end drapelText = drapelText .. "</small>" end for symbolIndex, symbolKey in pairs({ 'image_seal', 'drapel', 'stemă', 'emblemă_imagine' }) do if not isNilOrEmpty(args[symbolKey]) then numberOfSymbols = numberOfSymbols + 1 end end if numberOfSymbols == 2 then local twoSymbolsTr = symbolsTable:tag('tr') local firstSymbolsTd = twoSymbolsTr:tag('td') :css('vertical-align', 'middle') :attr('align', 'center') if not isNilOrEmpty(args['drapel']) then firstSymbolsTd:wikitext(drapelText) elseif not isNilOrEmpty(args['image_seal']) then firstSymbolsTd:wikitext(sealText) elseif not isNilOrEmpty(args['stemă']) then firstSymbolsTd:wikitext(stemaText) elseif not isNilOrEmpty(args['emblemă_imagine']) then firstSymbolsTd:wikitext(emblemaText) end local secondSymbolsTd = twoSymbolsTr:tag('td') :css('vertical-align', 'middle') :attr('align', 'center') if not isNilOrEmpty(args['emblemă_imagine']) then secondSymbolsTd:wikitext(emblemaText) elseif not isNilOrEmpty(args['stemă']) then secondSymbolsTd:wikitext(stemaText) elseif not isNilOrEmpty(args['image_seal']) then secondSymbolsTd:wikitext(sealText) elseif not isNilOrEmpty(args['drapel']) then secondSymbolsTd:wikitext(drapelText) end else if not isNilOrEmpty(args['drapel']) or not isNilOrEmpty(args['image_seal']) then local flagAndSealRow = symbolsTable:tag('tr') if not isNilOrEmpty(args['drapel']) then local drapelTd = flagAndSealRow:tag('td'):css('vertical-align', 'middle'):attr('align', 'center') if isNilOrEmpty(args['image_seal']) then drapelTd:attr('colspan', '2') else drapelTd:attr('width', '50%') end drapelTd:wikitext(drapelText) end if not isNilOrEmpty(args['image_seal']) then local sealTd = flagAndSealRow:tag('td'):css('vertical-align', 'middle'):attr('align', 'center') if isNilOrEmpty(args['drapel']) then sealTd:attr('colspan', '2') else sealTd:attr('width', '50%') end sealTd:wikitext(sealText) end end if not isNilOrEmpty(args['stemă']) or not isNilOrEmpty(args['emblemă_imagine']) then local armsAndLogoRow = symbolsTable:tag('tr') if not isNilOrEmpty(args['stemă']) then local armsTd = armsAndLogoRow:tag('td'):css('vertical-align', 'middle'):attr('align', 'center') if isNilOrEmpty(args['emblemă_imagine']) then armsTd:attr('colspan', '2') else armsTd:attr('width', '50%') end armsTd:wikitext(stemaText) end if not isNilOrEmpty(args['emblemă_imagine']) then local logoTd = armsAndLogoRow:tag('td'):css('vertical-align', 'middle'):attr('align', 'center') if isNilOrEmpty(args['stemă']) then logoTd:attr('colspan', '2') else logoTd:attr('width', '50%') end logoTd:wikitext(emblemaText) end end end end if args['poreclă'] ~= "" then root:tag('tr'):addClass('mergedrow') :tag('td'):attr('colspan', '2') :attr('align', 'center') :wikitext('[[Poreclă]]: ' .. tostring(mw.html.create('span'):addClass('porecla'):wikitext(args['poreclă']))) end if args['motto'] ~= "" then root:tag('tr'):addClass('mergedrow') :tag('td'):attr('colspan', '2') :attr('align', 'center') :wikitext('[[Motto]]: ' .. args['motto']) end local hartaPunct = args['hartă_punct'] if hartaPunct then local hartaPunctText = mw.getCurrentFrame():expandTemplate{ title = 'superimpose', args = { base = hartaPunct.imagine, base_width = hartaPunct.dimensiune, base_caption = args['nume'], float = 'Red pog.svg', float_width = '9px', float_caption = hartaPunct.descriere, x = hartaPunct.x, y = hartaPunct.y } } .. (hartaPunct.descriere ~= nil and tostring(mw.html.create('small').wikitext(hartaPunct.descriere)) or '') root:tag('tr'):addClass('mergedrow'):attr('align', 'center') :tag('td'):attr('colspan', '2') :css('text-align', 'center') :css('padding', '0.7em 0.8em 0.7em 0.8em') :wikitext(hartaPunctText) end local pushpins = args['pushpin'] for mapIndex = 1,table.maxn(args['pushpin']) do if pushpins[mapIndex] and not isNilOrEmpty(pushpins[mapIndex]['map']) and not isNilOrEmpty(args['longd']) and not isNilOrEmpty(args['latd']) and ifexist('Format:Harta de localizare ' .. pushpins[mapIndex]['map']) then local mapArgs = { pushpins[mapIndex]['map'], float = 'none', background = args['background'], border = 'none', position = pushpins[mapIndex]['label_position'], width = pushpins[mapIndex]['size'], mapframe = pushpins[mapIndex]['mapframe'] or false } if pushpins[mapIndex]['label_position'] ~= none then mapArgs.label = args['nume'] end if isNilOrEmpty(args['longm']) and isNilOrEmpty(args['longEV']) then mapArgs.long = args['longd'] else mapArgs.lon_deg = args['longd'] mapArgs.lon_min = args['longm'] mapArgs.lon_sec = args['longs'] mapArgs.lon_dir = args['longEV'] end if isNilOrEmpty(args['latm']) and isNilOrEmpty(args['latNS']) then mapArgs.lat = args['latd'] else mapArgs.lat_deg = args['latd'] mapArgs.lat_min = args['latm'] mapArgs.lat_sec = args['lats'] mapArgs.lat_dir = args['latNS'] end local altMap = mw.getCurrentFrame():expandTemplate{title = 'Harta de localizare ' .. pushpins[mapIndex]['map'], args = { 'alt_image' } } if not isNilOrEmpty(altMap) then mapArgs.AlternativeMap = altMap end local mapText = mw.getCurrentFrame():expandTemplate{title = 'Location map ', args = mapArgs } root:tag('tr'):addClass('mergedrow') :tag('td'):attr('colspan', '2'):attr('align', 'center') :wikitext(mapText .. pushpins[mapIndex]['caption']) end end if not isNilOrEmpty(args['latd']) or not isNilOrEmpty(args['coordonate']) then local coordsTh = root:tag('tr'):addClass('mergedbottomrow') :tag('th'):attr('colspan', '2') :css('text-align', 'center') :css('font-size', 'small') :css('padding-bottom', '0.7em') if not isNilOrEmpty(args['latd']) then local coordsText = 'Coordonate' if not isNilOrEmpty(args['tip_coordonate']) then coordsText = coordsText .. '&nbsp;(' .. args['tip_coordonate'] .. ')' end coordsText = coordsText .. ': ' .. mw.getCurrentFrame():expandTemplate{ title = 'Geobox coor', args = { args['latd'], args['latm'], args['lats'], args['latNS'], args['longd'], args['longm'], args['longs'], args['longEV'], args['coordinates_type'], title=args['coords_in_title'], format='dms' } } coordsTh:wikitext(coordsText) elseif not isNilOrEmpty(args['coordonate']) then coordsTh:wikitext(args['coordonate']) end end if #(args['subdiviziuni']) > 0 then root:tag('tr'):tag('td'):attr('colspan', '2'):tag('hr') for subdivIndex = 1, table.maxn(args['subdiviziuni']) do if args['subdiviziuni'][subdivIndex] ~= nil and not isNilOrEmpty(args['subdiviziuni'][subdivIndex]['tip']) then local subdivTh = root:tag('tr'):addClass('merged' .. (subdivIndex == 1 and 'top' or '') .. 'row'):tag('th'):wikitext(args['subdiviziuni'][subdivIndex]['tip']):done() :tag('th'):addClass('adr') if subdivIndex == 1 then subdivTh:tag('span'):addClass('country-name'):wikitext(args['subdiviziuni'][subdivIndex]['nume']) elseif subdivIndex == 2 then subdivTh:tag('span'):addClass('region'):wikitext(args['subdiviziuni'][subdivIndex]['nume']) else subdivTh:wikitext(args['subdiviziuni'][subdivIndex]['nume']) end end end end if #(args['clasificari']) > 0 then root:tag('tr'):tag('td'):attr('colspan', '2'):tag('hr') for clasifIndex = 1, table.maxn(args['clasificari']) do if args['clasificari'][clasifIndex] ~= nil and not isNilOrEmpty(args['clasificari'][clasifIndex]['tip']) then root:tag('tr'):addClass('merged' .. (clasifIndex == 1 and 'top' or '') .. 'row'):tag('th'):wikitext(args['clasificari'][clasifIndex]['tip']):done() :tag('td'):wikitext(args['clasificari'][clasifIndex]['cod']) end end end for atestIndex = 1, table.maxn(args['atestari']) do if args['atestari'][atestIndex] ~= nil and not isNilOrEmpty(args['atestari'][atestIndex]['an']) and not isNilOrEmpty(args['atestari'][atestIndex]['titlu']) then root:tag('tr'):addClass('mergedrow') :tag('th'):wikitext(args['atestari'][atestIndex]['titlu']):done() :tag('td'):wikitext(args['atestari'][atestIndex]['an']) end end if not isNilOrEmpty(args['fondator']) then root:tag('tr'):addClass('mergedrow') :tag('th'):wikitext('Fondator'):done() :tag('td'):wikitext(args['fondator']) end if not isNilOrEmpty(args['numit_dupa']) then root:tag('tr'):addClass('mergedrow') :tag('th'):wikitext('Numit după'):done() :tag('td'):wikitext(args['numit_dupa']) end local ip = args['p'] if table.maxn(ip) == 0 and isNilOrEmpty(args['componenta']) then ip = wikidata.getValueList(nil, 'P1383') or {} end if table.maxn(ip) < 3 and args['stil_componenta'] == '' then args['stil_componenta'] = 'para' end if not isNilOrEmpty(args['resedinta']) or table.maxn(ip) > 0 or not isNilOrEmpty(args['componenta']) then root:tag('tr'):tag('td'):attr('colspan', '2'):tag('hr') local nextRowClass = 'mergedtoprow' if not isNilOrEmpty(args['resedinta']) then root:tag('tr'):addClass(nextRowClass) :tag('th'):wikitext(args['tip_resedinta']):done() :tag('td'):wikitext(args['resedinta']) nextRowClass = 'mergedrow' end if table.maxn(ip) > 0 or not isNilOrEmpty(args['componenta']) then local tipComp = isNilOrEmpty(args['tip_componenta']) and 'Componență' or args['tip_componenta'] local pTableRow = root:tag('tr'):addClass(nextRowClass) :tag('th'):wikitext(tipComp):done():tag('td') if args['stil_componenta'] == 'para' then pTableRow:wikitext(args['componenta']) if table.maxn(ip) > 0 and not isNilOrEmpty(args['componenta']) then pTableRow:wikitext('&#58;&nbsp;') end pTableRow:wikitext(table.concat(ip, ', ')) elseif table.maxn(ip) > 0 then local displayStyle = '' if args['stil_componenta'] == 'coll' or (args['stil_componenta'] ~= 'list' and table.maxn(ip) > 6) then displayStyle = 'none' else displayStyle = 'on' end pTableRow:wikitext(collapsibleList.display(nil, 'border:none;padding:0;', nil, args['componenta'], 'text-align:left;display:' .. displayStyle, ip)) else pTableRow:wikitext(args['componenta']) end end end local lideri = args['lideri'] if not isNilOrEmpty(args['tip_guvernare']) or table.maxn(lideri) > 0 then root:tag('tr'):tag('td'):attr('colspan', '2'):tag('hr') local governmentHeadTd = root:tag('tr'):addClass('mergedtoprow'):tag('td'):attr('colspan', '2'):wikitext("'''Guvernare''' ") if not isNilOrEmpty(args['guvernare_note_subsol']) then governmentHeadTd:wikitext(args['guvernare_note_subsol']) end if not isNilOrEmpty(args['tip_guvernare']) then root:tag('tr'):addClass('mergedrow') :tag('th'):wikitext('&nbsp;-&nbsp;Tip'):done() :tag('td'):wikitext(args['tip_guvernare']) end for liderIndex = 1,table.maxn(lideri) do if lideri[liderIndex] ~= nil then local leaderTd = root:tag('tr'):addClass('mergedrow') :tag('th'):wikitext('&nbsp;-&nbsp;', mw.text.trim(lideri[liderIndex]['titlu'] or '')):done() :tag('td') if not isNilOrEmpty(lideri[liderIndex]['nume']) then if not isNilOrEmpty(lideri[liderIndex]['link']) then leaderTd:wikitext('[[', lideri[liderIndex]['link'], '|', lideri[liderIndex]['nume'], ']]') else leaderTd:wikitext(lideri[liderIndex]['nume']) end end local leaderDataInBrackets = {} if not isNilOrEmpty(lideri[liderIndex]['partid']) then local tara = args['subdiviziuni'][1] and args['subdiviziuni'][1]['nume'] or '' table.insert(leaderDataInBrackets, mw.getCurrentFrame():expandTemplate{title='Polparty', args={tara, lideri[liderIndex]['partid'] } }) end if not isNilOrEmpty(lideri[liderIndex]['ales']) then table.insert(leaderDataInBrackets, lideri[liderIndex]['ales']) end if #leaderDataInBrackets > 0 then leaderTd:wikitext(' (', table.concat(leaderDataInBrackets, ', '), ')') end end end end local suprIndex, suprV = next(args['suprafata'], nil) if suprIndex or not isNilOrEmpty(args['altitudine']) then root:tag('tr'):tag('td'):attr('colspan', '2'):tag('hr') if suprIndex then root:tag('tr'):addClass('mergedtoprow') :tag('td'):attr('colspan', '2'):wikitext("'''[[Suprafață]]'''", args['note_subsol_suprafata']) if args['suprafata']['totala'] then local suprafTotalTh = root:tag('tr'):addClass('mergedrow'):tag('th'):wikitext(' &nbsp;-&nbsp;') if not isNilOrEmpty(args['tip_total']) then suprafTotalTh:wikitext(args['tip_total']) elseif args['suprafata']['metropolitana'] or args['suprafata']['urbana'] then if args['tip_asezare'] and table.maxn(args['tip_asezare']) > 0 then suprafTotalTh:wikitext(args['tip_asezare'][1]) else suprafTotalTh:wikitext('Oraș') end else suprafTotalTh:wikitext('Total') end suprafTotalTh:done():tag('td'):wikitext(formatnum(args['suprafata']['totala']['km2']), '&nbsp;[[km²]]') end if args['suprafata']['pamant'] then root:tag('tr'):addClass('mergedrow') :tag('th'):wikitext('&nbsp;-&nbsp;Pământ'):done() :tag('td'):wikitext(args['suprafata']['pamant']['km2'], '&nbsp;[[km²]]') end if args['suprafata']['apa'] then local waterAreaTd = root:tag('tr'):addClass('mergedrow') :tag('th'):wikitext('&nbsp;-&nbsp;Apă'):done() :tag('td'):wikitext(args['suprafata']['apa']['km2'], '&nbsp;[[km²]]') if args['suprafata']['apa']['procent'] then waterAreaTd:wikitext(' &nbsp;', args['suprafata']['apa']['procent'], '%') end end if args['suprafata']['urbana'] then root:tag('tr'):addClass('mergedrow') :tag('th'):wikitext('&nbsp;-&nbsp;[[Arie urbană|Urbană]]'):done() :tag('td'):wikitext(args['suprafata']['urbana']['km2'], '&nbsp;[[km²]]') end if args['suprafata']['metropolitana'] then root:tag('tr'):addClass('mergedrow') :tag('th'):wikitext('&nbsp;-&nbsp;[[Zonă metropolitană|Metropolitană]]'):done() :tag('td'):wikitext(args['suprafata']['metropolitana']['km2'], '&nbsp;[[km²]]') end for blankIndex = 1, table.maxn(args['suprafata']['blank'] or {}) do local crtBlank = args['suprafata']['blank'][blankIndex] if crtBlank and crtBlank['title'] and crtBlank['km2'] then root:tag('tr'):addClass('mergedrow') :tag('th'):wikitext('&nbsp;-&nbsp;', crtBlank['title']):done() :tag('td'):wikitext(crtBlank['km2'], '&nbsp;[[km²]]') end end end if not isNilOrEmpty(args['altitudine']) then root:tag('tr'):addClass('mergedtoprow') :tag('td'):wikitext("'''[[Altitudine]]'''", args['note_subsol_altitudine']):done() :tag('td'):wikitext(args['altitudine'], '&nbsp;[[Nivelul mării|m.d.m.]]') end if not isNilOrEmpty(args['altitudine_max_m']) then root:tag('tr'):addClass('mergedtoprow') :tag('td'):wikitext("[[Altitudine]]&nbsp;maximă"):done() :tag('td'):wikitext(args['altitudine_max_m'], '&nbsp;[[Nivelul mării|m.d.m.]]') end if not isNilOrEmpty(args['altitudine_min_m']) then root:tag('tr'):addClass('mergedbottomrow') :tag('td'):wikitext("Altitudine&nbsp;minimă"):done() :tag('td'):wikitext(args['altitudine_min_m'], '&nbsp;[[Nivelul mării|m.d.m.]]') end end if not isNilOrEmpty(args['populatie']) or not isNilOrEmpty(args['populatie_urbana']) or not isNilOrEmpty(args['populatie_metropolitana']) or next(args['population_blank'], nil) then root:tag('tr'):tag('td'):attr('colspan', '2'):tag('hr') local popTitleTd = root:tag('tr'):addClass('mergedtoprow'):tag('td') if args['tip_total'] ~= '&nbsp;' then popTitleTd:attr('colspan', '2') end popTitleTd:wikitext("'''Populație''' ") if args['recensamant'] then popTitleTd:wikitext('(', args['recensamant'], ')') end popTitleTd:wikitext(args['note_subsol_populatie']) local popTextTd if args['tip_total'] ~= '&nbsp;' then local totalheader = root:tag('tr'):addClass('mergedrow') :tag('th'):wikitext('&nbsp;-&nbsp;') if not isNilOrEmpty(args['tip_total']) then totalheader:wikitext(args['tip_total']) elseif not isNilOrEmpty(args['populatie_metropolitana']) or not isNilOrEmpty(args['populatie_urbana']) then if args['tip_asezare'] and table.maxn(args['tip_asezare']) > 0 then totalheader:wikitext(args['tip_asezare'][1]) else totalheader:wikitext('Oraș') end else totalheader:wikitext('Total') end popTextTd = totalheader:done():tag('td') else popTextTd = popTitleTd:done():tag('td') end args['populatie'] = keepFirstNumber(args['populatie']) popTextTd:wikitext(formatnum(args['populatie']), ' locuitori') if args['densitate'] == 'auto' then mw.logObject(args['suprafata']) -- cannot compute, so do not display if isNilOrEmpty(args['populatie']) or args['suprafata']['totala'] == nil or isNilOrEmpty(args['suprafata']['totala']['km2']) then args['densitate'] = nil else up = formatnum(keepAnyNumber(args['populatie']), 'en', '', true) mw.logObject(up, 'up') down = formatnum(keepAnyNumber(args['suprafata']['totala']['km2']), 'en', '', true) mw.logObject(down, 'down') args['densitate'] = round(up / down, 1) end end if not isNilOrEmpty(args['densitate']) then args['densitate'] = keepFirstNumber(args['densitate']) root:tag('tr'):addClass('mergedrow') :tag('th'):wikitext('&nbsp;-&nbsp;[[Densitatea populației|Densitate]]'):done() :tag('td'):wikitext(formatnum(args['densitate']), ' loc./km²') end if args['populatie_urbana'] then args['populatie_urbana'] = keepFirstNumber(args['populatie_urbana']) root:tag('tr'):addClass('mergedrow') :tag('th'):wikitext('&nbsp;- [[Zonă urbană|Urbană]]'):done() :tag('td'):wikitext(formatnum(args['populatie_urbana']), ' locuitori') end if args['densitate_pop_urbana'] then args['densitate_pop_urbana'] = keepFirstNumber(args['densitate_pop_urbana']) root:tag('tr'):addClass('mergedrow') :tag('th'):wikitext('&nbsp;- Densitate urbană'):done() :tag('td'):wikitext(formatnum(args['densitate_pop_urbana']), ' loc./km²') end if args['populatie_metropolitana'] then args['populatie_metropolitana'] = keepFirstNumber(args['populatie_metropolitana']) root:tag('tr'):addClass('mergedrow') :tag('th'):wikitext('&nbsp;- [[Zonă metropolitană|Metropolitană]]'):done() :tag('td'):wikitext(formatnum(args['populatie_metropolitana']), ' locuitori') end if args['densitate_pop_metro'] then args['densitate_pop_metro'] = keepFirstNumber(args['densitate_pop_metro']) root:tag('tr'):addClass('mergedrow') :tag('th'):wikitext('&nbsp;- Densitate metropolitană'):done() :tag('td'):wikitext(formatnum(args['densitate_pop_metro']), ' loc./km²') end for popIdx=1,table.maxn(args['population_blank']) do if args['population_blank'][popIdx] then if args['population_blank'][popIdx]['value'] then args['population_blank'][popIdx]['value'] = keepFirstNumber(args['population_blank'][popIdx]['value']) root:tag('tr'):addClass('mergedrow') :tag('th'):wikitext('&nbsp;- ', args['population_blank'][popIdx]['title']):done() :tag('td'):wikitext(formatnum(args['population_blank'][popIdx]['value']), ' locuitori') end if args['population_blank'][popIdx]['densitate'] then args['population_blank'][popIdx]['densitate'] = keepFirstNumber(args['population_blank'][popIdx]['densitate']) root:tag('tr'):addClass('mergedrow') :tag('th'):wikitext('&nbsp;- ', 'Densitate ', args['population_blank'][popIdx]['title']):done() :tag('td'):wikitext(formatnum(args['population_blank'][popIdx]['densitate']), ' loc./km²') end end end if args['populatie_note'] then root:tag('tr'):addClass('mergedbottomrow') :tag('td'):wikitext('&nbsp;'):done() :tag('td'):tag('small'):wikitext(args['populatie_note']) end end if not isNilOrEmpty(args['fus_orar']) or not isNilOrEmpty(args['cod_postal']) or not isNilOrEmpty(args['prefix_tel']) or not isNilOrEmpty(args['cod']) then root:tag('tr'):tag('td'):attr('colspan', '2'):tag('hr') if not isNilOrEmpty(args['fus_orar']) then root:tag('tr'):addClass('mergedtoprow') :tag('th'):wikitext('[[Fus orar]]'):done() :tag('td'):wikitext(args['fus_orar'], (not isNilOrEmpty(args['utc_offset']) and ('&nbsp;(' .. args['utc_offset'] .. ')') or '')) if not isNilOrEmpty(args['fus_orar_DST']) then root:tag('tr'):addClass('mergedtoprow') :tag('th'):css('white-space', 'nowrap'):wikitext('&nbsp;-&nbsp;Ora de vară&nbsp;([[Ora de vară|DST]])'):done() :tag('td'):wikitext(args['fus_orar_DST'], (not isNilOrEmpty(args['utc_offset_DST']) and ('&nbsp;(' .. args['utc_offset_DST'] .. ')') or '')) end end if not isNilOrEmpty(args['cod_postal']) then root:tag('tr'):addClass('mergedtoprow') :tag('th'):wikitext(args['tip_cod_postal']):done() :tag('td'):addClass('adr'):tag('span'):addClass('postal-code'):wikitext(args['cod_postal']) end local postCodeTrClass = 'mergedrow' for postCodeIdx=1,table.maxn(args['postal_codes']) do if args['postal_codes'][postCodeIdx] and args['postal_codes'][postCodeIdx]['code_type'] and args['postal_codes'][postCodeIdx]['code'] then if postCodeIdx == table.maxn(args['postal_codes']) then postCodeTrClass = 'mergedbottomrow' end root:tag('tr'):addClass(postCodeTrClass) :tag('th'):wikitext(args['postal_codes'][postCodeIdx]['code_type']):done() :tag('td'):addClass('adr'):tag('span'):addClass('postal-code'):wikitext(args['postal_codes'][postCodeIdx]['code_type']) end end if not isNilOrEmpty(args['prefix_tel']) then root:tag('tr'):addClass('mergedbottomrow') :tag('th'):wikitext('Prefix telefonic'):done() :tag('td'):wikitext(args['prefix_tel']) end if not isNilOrEmpty(args['cod']) then root:tag('tr'):addClass('mergedtoprow') :tag('th'):wikitext(args['tip_cod']):done() :tag('td'):addClass('adr'):tag('span'):addClass('postal-code'):wikitext(args['cod']) end end if next(args['infratiri'], nil) then root:tag('tr'):tag('td'):attr('colspan', '2'):tag('hr') local first = true for infrIdx = 1, table.maxn(args['infratiri']) do if args['infratiri'][infrIdx] then if first then root:tag('tr'):addClass('mergedtoprow') :tag('td'):attr('colspan', '2'):wikitext("'''Localități înfrățite'''") first = false end root:tag('tr'):addClass('mergedrow') :tag('td'):wikitext('&nbsp;-&nbsp;', args['infratiri'][infrIdx]['oras']):done() :tag('td'):wikitext(args['infratiri'][infrIdx]['tara'] or '') end end end local trClass = 'mergedtoprow' for campGolIdx = 1, table.maxn(args['campuri_goale']) do if args['campuri_goale'][campGolIdx] and args['campuri_goale'][campGolIdx]['gol_nume'] and args['campuri_goale'][campGolIdx]['gol_info'] then root:tag('tr'):addClass(trClass) :tag('th'):wikitext(args['campuri_goale'][campGolIdx]['gol_nume']):done() :tag('td'):wikitext(args['campuri_goale'][campGolIdx]['gol_info']) trClass = 'mergedrow' end end if args['note'] then root:tag('tr'):addClass('mergedtoprow') :tag('td'):attr('colspan', '2'):attr('align', 'left') :tag('small'):wikitext(args['note']) end local externalAddresses = {} local externalAddressesWdIds = {'P1566', 'P402', 'P1997'} if not isNilOrEmpty(args['website']) then table.insert(externalAddresses, args['website']) else table.insert(externalAddressesWdIds, 1, 'P856') end for _,eachAddressId in ipairs(externalAddressesWdIds) do local eachAddressLink = wikidata.findOnlineLinks({eachAddressId}) if eachAddressLink and eachAddressLink[1] then table.insert(externalAddresses, eachAddressLink[1] .. ' ' .. editWD.displayMessage(eachAddressId)) end end local sites = table.concat(externalAddresses, tostring(mw.html.create('br'))) root:tag('tr'):tag('td'):attr('colspan', '2'):tag('hr') root:tag('tr'):tag('td'):attr('colspan', '2'):addClass('mergedtoprow'):css('text-align', 'center'):wikitext("'''Prezență online''' ") root:tag('tr'):tag('td'):attr('colspan', '2'):css('text-align', 'center'):wikitext(sites) if args['harti'][1] then root:tag('tr'):tag('td'):attr('colspan', '2'):tag('hr') for mapIdx = 1, table.maxn(args['harti']) do if args['harti'][mapIdx] then root:tag('tr'):addClass('mergedrow') :tag('td'):attr('colspan', '2'):css('text-align', 'center'):css('padding', '0.7em 0.8em 0.7em 0.8em'):css('align', 'center'):css('margin', '0 auto') :wikitext('[[Fișier:' .. args['harti'][mapIdx]['harta'] .. '|' .. args['harti'][mapIdx]['size'] .. '|none|' .. (args['harti'][mapIdx]['descriere'] or ('Hartă de poziționare pentru ' .. args['nume'])) .. ']]', args['harti'][mapIdx]['descriere']) end end else if table.maxn(args['pushpin']) == 0 then table.insert(categories, 'Articole fără hărți') end end if #(args['embedded']) > 0 then for embeddedIdx,eachEmbedded in ipairs(args['embedded']) do root:tag('tr'):tag('td'):attr('colspan', '2'):tag('hr') root:tag('tr'):tag('td'):attr('colspan', '2'):wikitext(eachEmbedded) end end root:wikitext(mw.getCurrentFrame():expandTemplate{title='infodoc', args = {colspan='2', culoare='dddddd', link = args['infodoc'], wikidata = 'da'}}) local catlinks = {} for _,eachCat in ipairs(categories) do table.insert(catlinks, '[[Categorie:' .. eachCat .. ']]') end return tostring(root) .. table.concat(catlinks) end p.infobox = function(frame) origArgs = getArgs(frame, { wrappers = { 'Format:Infocaseta Așezare' } }) args['nume'] = origArgs['nume'] or origArgs['nume_oficial'] or wikidata.findRoLabel() or wikidata.findNativeOrEnglishLabel(nil, true) or mw.title.getCurrentTitle().text args['nume_oficial'] = origArgs['nume_oficial'] args['nume_nativ'] = origArgs['nume_nativ'] args['alt_nume'] = origArgs['alt_nume'] args['tip_asezare'] = {} if origArgs['tip_asezare'] or origArgs['tip_așezare'] then table.insert(args['tip_asezare'], origArgs['tip_asezare'] or origArgs['tip_așezare']) end if table.maxn(args['tip_asezare']) == 0 then local settlementTypes = wikidata.findBestValues('P31') if settlementTypes and #settlementTypes > 0 then args['tip_asezare'] = settlementTypes end end args['tip_asezare_genitiv'] = origArgs['tip_asezare_genitiv'] or origArgs['tip_așezare_genitiv'] or 'localității' args['nume_limba'] = {} args['pushpin'] = {} args['subdiviziuni'] = {} args['clasificari'] = {} args['atestari'] = {} args['p'] = {} args['lideri'] = {} args['suprafata'] = {} args['population_blank'] = {} args['postal_codes'] = {} args['infratiri'] = {} args['campuri_goale'] = {} args['harti'] = {} args['embedded'] = {} local nlStart, nlEnd for argN, argV in pairs(origArgs) do if argV ~= nil and mw.text.trim(argV) == '' then origArgs[argN] = nil end argV = mw.text.trim(argV) origArgs[argN] = mw.text.trim(argV) nlStart, nlEnd = mw.ustring.find(argN, 'nume_limba') if nlStart == 1 then local nlIndex = tonumber(mw.ustring.sub(argN, 1 + nlEnd, mw.ustring.len(argN))) if nlIndex ~= nil then if args['nume_limba'][nlIndex] == nil then args['nume_limba'][nlIndex] = {} end args['nume_limba'][nlIndex]['nume_limba'] = mw.text.trim(argV) end end nlStart, nlEnd = mw.ustring.find(argN, 'pushpin_map') if nlStart == 1 then local varNameWithIndex = mw.ustring.sub(argN, 1 + nlEnd, mw.ustring.len(argN)) local indexLocation = mw.ustring.find(varNameWithIndex, "%d+") or (1 + #varNameWithIndex) local variableName = mw.ustring.sub(varNameWithIndex, 1, indexLocation - 1) local variableIndexStr = mw.ustring.sub(varNameWithIndex, indexLocation, #varNameWithIndex) or "" local variableIndex if variableIndexStr == "" then variableIndex = 1 else variableIndex = 1 + tonumber(variableIndexStr) end if args['pushpin'][variableIndex] == nil then args['pushpin'][variableIndex] = {} end args['pushpin'][variableIndex]['map'] = mw.text.trim(argV) if origArgs['pushpin_osm' .. variableIndexStr] then args['pushpin'][variableIndex]['mapframe'] = "1" end args['pushpin'][variableIndex]['size'] = mw.text.trim(origArgs['pushpin_dimensiune_harta' .. variableIndexStr] or origArgs['pushpin_dimensiune_hartă' .. variableIndexStr] or '290') args['pushpin'][variableIndex]['caption'] = mw.text.trim(origArgs['pushpin_descriere_harta' .. variableIndexStr] or origArgs['pushpin_descriere_hartă' .. variableIndexStr] or 'Poziția geografică') args['pushpin'][variableIndex]['label_position'] = mw.text.trim(origArgs['pushpin_label_position' .. variableIndexStr] or 'right') end nlStart, nlEnd = mw.ustring.find(argN, 'tip_subdiviziune') if nlStart == 1 then local varNameWithIndex = mw.ustring.sub(argN, 1 + nlEnd, mw.ustring.len(argN)) local indexLocation = mw.ustring.find(varNameWithIndex, "%d+") or (1 + #varNameWithIndex) local variableName = mw.ustring.sub(varNameWithIndex, 1, indexLocation - 1) local variableIndexStr = mw.ustring.sub(varNameWithIndex, indexLocation, #varNameWithIndex) or "" local variableIndex if variableIndexStr == "" then variableIndex = 1 else variableIndex = 1 + tonumber(variableIndexStr) end if args['subdiviziuni'][variableIndex] == nil then args['subdiviziuni'][variableIndex] = {} end args['subdiviziuni'][variableIndex]['tip'] = mw.text.trim(argV) args['subdiviziuni'][variableIndex]['nume'] = mw.text.trim(origArgs['nume_subdiviziune' .. variableIndexStr] or '') end nlStart, nlEnd = mw.ustring.find(argN, 'tip_cod_clasificare') if nlStart == 1 then local varNameWithIndex = mw.ustring.sub(argN, 1 + nlEnd, mw.ustring.len(argN)) local indexLocation = mw.ustring.find(varNameWithIndex, "%d+") or (1 + #varNameWithIndex) local variableName = mw.ustring.sub(varNameWithIndex, 1, indexLocation - 1) local variableIndexStr = mw.ustring.sub(varNameWithIndex, indexLocation, #varNameWithIndex) or "" local variableIndex if varNameWithIndex == "" then variableIndex = 1 elseif varNameWithIndex == "_superioară" then variableIndex = 2 else variableIndex = 2 + tonumber(variableIndexStr) end if args['clasificari'][variableIndex] == nil then args['clasificari'][variableIndex] = {} end args['clasificari'][variableIndex]['tip'] = mw.text.trim(argV) args['clasificari'][variableIndex]['cod'] = mw.text.trim(origArgs['cod_clasificare' .. variableIndexStr] or '') end nlStart, nlEnd = mw.ustring.find(argN, 'atestare') if nlStart == 1 then local varNameWithIndex = mw.ustring.sub(argN, 1 + nlEnd, mw.ustring.len(argN)) local indexLocation = mw.ustring.find(varNameWithIndex, "%d+") or (1 + #varNameWithIndex) local variableName = mw.ustring.sub(varNameWithIndex, 1, indexLocation - 1) local variableIndexStr = mw.ustring.sub(varNameWithIndex, indexLocation, #varNameWithIndex) or "" local variableIndex if variableIndexStr == "" then variableIndex = 1 else variableIndex = 1 + tonumber(variableIndexStr) end if args['atestari'][variableIndex] == nil then args['atestari'][variableIndex] = {} end args['atestari'][variableIndex]['an'] = mw.text.trim(argV) args['atestari'][variableIndex]['titlu'] = mw.text.trim(origArgs['titlu_atestare' .. variableIndexStr] or 'Atestare') end nlStart, nlEnd = mw.ustring.find(argN, 'p') if nlStart == 1 then local pIndex = mw.ustring.find(argN, "%d+$") if pIndex == 2 then local variableIndexStr = mw.ustring.sub(argN, 2, #argN) local variableIndex = tonumber(variableIndexStr) if mw.text.trim(argV) ~= '' then args['p'][variableIndex] = mw.text.trim(argV) end end end nlStart, nlEnd = mw.ustring.find(argN, 'lider_') if nlStart == 1 then local varNameWithIndex = mw.ustring.sub(argN, 1 + nlEnd, mw.ustring.len(argN)) local indexLocation = mw.ustring.find(varNameWithIndex, "%d+") or (1 + #varNameWithIndex) local variableName = mw.ustring.sub(varNameWithIndex, 1, indexLocation - 1) local variableIndexStr = mw.ustring.sub(varNameWithIndex, indexLocation, #varNameWithIndex) or "" local variableIndex if variableIndexStr == "" then variableIndex = 1 else variableIndex = 1 + tonumber(variableIndexStr) end if args['lideri'][variableIndex] == nil then args['lideri'][variableIndex] = {} end args['lideri'][variableIndex][variableName] = mw.text.trim(argV) end nlStart, nlEnd = mw.ustring.find(argN, 'area_blank') if nlStart == 1 then if args['suprafata']['blank'] == nil then args['suprafata']['blank'] = {} end local varNameWithIndex = mw.ustring.sub(argN, 1 + nlEnd, mw.ustring.len(argN)) local varNameLocation = mw.ustring.find(varNameWithIndex, "[^%d]") or (1 + #varNameWithIndex) local variableIndexStr = mw.ustring.sub(varNameWithIndex, 1, varNameLocation - 1) local variableName = mw.ustring.sub(varNameWithIndex, mw.ustring.find(varNameWithIndex, '%a[%w_]+') or (1 + #varNameWithIndex), #varNameWithIndex) local variableIndex = tonumber(variableIndexStr) if args['suprafata']['blank'][variableIndex] == nil then args['suprafata']['blank'][variableIndex] = {} end args['suprafata']['blank'][variableIndex][variableName] = mw.text.trim(argV) end nlStart, nlEnd = mw.ustring.find(argN, 'population_blank') if nlStart == 1 then local varNameWithIndex = mw.ustring.sub(argN, 1 + nlEnd, mw.ustring.len(argN)) local varNameLocation = mw.ustring.find(varNameWithIndex, "[^%d]") or (1 + #varNameWithIndex) local variableIndexStr = mw.ustring.sub(varNameWithIndex, 1, varNameLocation - 1) local variableName = mw.ustring.sub(varNameWithIndex, mw.ustring.find(varNameWithIndex, "%a[%w_]+") or (1 + #varNameWithIndex), #varNameWithIndex) local variableIndex = tonumber(variableIndexStr) if args['population_blank'][variableIndex] == nil then args['population_blank'][variableIndex] = {} end if isNilOrEmpty(variableName) then args['population_blank'][variableIndex]['value'] = mw.text.trim(argV) else args['population_blank'][variableIndex][variableName] = mw.text.trim(argV) end end nlStart, nlEnd = mw.ustring.find(argN, 'densitate_populație_blank') if nlStart == 1 then local varNameWithIndex = mw.ustring.sub(argN, 1 + nlEnd, mw.ustring.len(argN)) local varNameLocation = mw.ustring.find(varNameWithIndex, "[^%d]") or (1 + #varNameWithIndex) local variableIndexStr = mw.ustring.sub(varNameWithIndex, 1, varNameLocation - 1) local variablePostIndexStr = mw.ustring.find(varNameWithIndex, "%a[%w_]+") or (1 + #varNameWithIndex) local variableName = mw.ustring.sub(varNameWithIndex, variablePostIndexStr, #varNameWithIndex) local variableIndex = tonumber(variableIndexStr) if args['population_blank'][variableIndex] == nil then args['population_blank'][variableIndex] = {} end if isNilOrEmpty(variableName) or variableName == 'km2' then args['population_blank'][variableIndex]['densitate'] = mw.text.trim(argV) else if variableName == 'sqmi' or variableName == 'sq_mi' then args['population_blank'][variableIndex]['densitate'] = tostring(round(tonumber(argV) / 2.58998811)) end end end nlStart, nlEnd = mw.ustring.find(argN, 'postal') if nlStart == 1 then local varNameWithIndex = mw.ustring.sub(argN, 1 + nlEnd, mw.ustring.len(argN)) local varNameLocation = mw.ustring.find(varNameWithIndex, "[^%d]") or (1 + #varNameWithIndex) local variableIndexStr = mw.ustring.sub(varNameWithIndex, 1, varNameLocation - 1) local variableName = mw.ustring.sub(varNameWithIndex, mw.ustring.find(varNameWithIndex, "%a[%w_]+") or (1 + #varNameWithIndex), #varNameWithIndex) if not isNilOrEmpty(variableIndexStr) then local variableIndex = tonumber(variableIndexStr) if args['postal_codes'][variableIndex] == nil then args['postal_codes'][variableIndex] = {} end args['postal_codes'][variableName] = mw.text.trim(argV) end end nlStart, nlEnd = mw.ustring.find(argN, 'infratit') if nlStart == 1 then local varNameWithIndex = mw.ustring.sub(argN, 1 + nlEnd, mw.ustring.len(argN)) local varNameLocation = mw.ustring.find(varNameWithIndex, "[^%d]") or (1 + #varNameWithIndex) local variableIndexStr = mw.ustring.sub(varNameWithIndex, 1, varNameLocation - 1) local varNamePostIndex = mw.ustring.find(varNameWithIndex, "%a[%w_]+") or (1 + #varNameWithIndex) local variableName = mw.ustring.sub(varNameWithIndex, varNamePostIndex, #varNameWithIndex) local variableIndex = tonumber(variableIndexStr) if args['infratiri'][variableIndex] == nil then args['infratiri'][variableIndex] = {} end if isNilOrEmpty(variableName) then args['infratiri'][variableIndex]['oras'] = mw.text.trim(argV) else args['infratiri'][variableIndex][variableName] = mw.text.trim(argV) end end nlStart, nlEnd = mw.ustring.find(argN, 'camp') if nlStart == 1 then local varNameWithIndex = mw.ustring.sub(argN, 1 + nlEnd, mw.ustring.len(argN)) local varNameLocation = mw.ustring.find(varNameWithIndex, "[^%d]") or (1 + #varNameWithIndex) local variableIndexStr = mw.ustring.sub(varNameWithIndex, 1, varNameLocation - 1) if isNilOrEmpty(variableIndexStr) then variableIndexStr = 1 end local variableName = mw.ustring.sub(varNameWithIndex, mw.ustring.find(varNameWithIndex, '%a[%w_]+') or (1 + #varNameWithIndex), #varNameWithIndex) local variableIndex = 1 + tonumber(variableIndexStr) if args['campuri_goale'][variableIndex] == nil then args['campuri_goale'][variableIndex] = {} end if not isNilOrEmpty(mw.text.trim(argV)) then args['campuri_goale'][variableIndex][variableName] = mw.text.trim(argV) end end nlStart, nlEnd = mw.ustring.find(argN, 'hartă%d*') if nlStart == 1 then local variableIndex, variableIndexStr if argN == 'hartă' then variableIndex = 1 variableIndexStr = '' else local indexLocation = mw.ustring.find(argN, "%d+") variableIndexStr = mw.ustring.sub(argN, indexLocation, mw.ustring.len(argN)) if tonumber(variableIndexStr) ~= nil then variableIndex = 1 + tonumber(variableIndexStr) else variableIndex = -1 end end if variableIndex > 0 then --append unit if implicit if (tonumber(origArgs['dimensiune_hartă' .. variableIndexStr]) or 0) > 0 then origArgs['dimensiune_hartă' .. variableIndexStr] = StringUtils._appendToString({origArgs['dimensiune_hartă' .. variableIndexStr], 'px'}) end if args['harti'][variableIndex] == nil then args['harti'][variableIndex] = {} end args['harti'][variableIndex]['harta'] = argV args['harti'][variableIndex]['descriere'] = origArgs['descriere_hartă' .. variableIndexStr] args['harti'][variableIndex]['size'] = origArgs['dimensiune_hartă' .. variableIndexStr] or '290x290px' end end local embedMatcher, embedIdxStr = mw.ustring.match(argN, '(embedded(%d+))') if embedMatcher == argN then embedIdx = tonumber(embedIdxStr) args['embedded'][embedIdx] = argV end end args['harti'] = TableTools.compressSparseArray(args['harti']) args['embedded'] = TableTools.compressSparseArray(args['embedded']) --- populate from Wikidata if isNilOrEmpty(args['nume_nativ']) then local nativeNamesClaims = wikidata.findBestClaimsForProperty(nil, 'P1705') if nativeNamesClaims then local nativeNamesList = {} for _,eachNativeNamesClaims in ipairs(nativeNamesClaims) do if eachNativeNamesClaims.type == 'statement' and eachNativeNamesClaims.mainsnak.snaktype == 'value' and args['nume'] ~= eachNativeNamesClaims.mainsnak.datavalue.value.text then local nativeNameText = eachNativeNamesClaims.mainsnak.datavalue.value.language == 'ro' and eachNativeNamesClaims.mainsnak.datavalue.value.text or wrapInLangSpan(eachNativeNamesClaims.mainsnak.datavalue.value.language, eachNativeNamesClaims.mainsnak.datavalue.value.text) table.insert(nativeNamesList, nativeNameText) end end args['nume_nativ'] = table.concat(nativeNamesList, _br_) end end if not isNilOrEmpty(origArgs['an']) then if args['atestari'][1] == nil then args['atestari'][1] = {} end args['atestari'][1]['an'] = origArgs['an'] args['atestari'][1]['titlu'] = origArgs['titlu_atestare'] or 'Atestare' end if table.maxn(args['atestari']) == 0 then local inception = {} inception['titlu'] = origArgs['titlu_atestare'] or 'Atestare' local inceptionDate = wikidata.findDateValues('P571') if inceptionDate and #inceptionDate > 0 then inception['an'] = StringUtils._appendToString({DateUtils.formatDate(inceptionDate[1]), editWD.displayMessage('P571')}) table.insert(args['atestari'], inception) end local disestablishment = {} disestablishment['titlu'] = 'Dispariție' local disestablishmentDate = wikidata.findDateValues('P576') if disestablishmentDate and 0 < #disestablishmentDate then disestablishment['an'] = StringUtils._appendToString({DateUtils.formatDate(disestablishmentDate[1]), editWD.displayMessage('P576')}) table.insert(args['atestari'], disestablishment) end end --lideri local wikidataMayorClaims = wikidata.findBestClaimsForProperty(nil, 'P6') if wikidataMayorClaims and wikidataMayorClaims[1] then local firstWikidataMayorClaimIndex = 1 while firstWikidataMayorClaimIndex <= #wikidataMayorClaims and wikidataMayorClaims[firstWikidataMayorClaimIndex].mainsnak.snaktype ~= 'value' do firstWikidataMayorClaimIndex = firstWikidataMayorClaimIndex + 1 end if firstWikidataMayorClaimIndex <= #wikidataMayorClaims and wikidataMayorClaims[firstWikidataMayorClaimIndex].mainsnak.snaktype == 'value' and wikidataMayorClaims[firstWikidataMayorClaimIndex].mainsnak.datavalue.type == 'wikibase-entityid' then local wikidataMayorId = wikidataMayorClaims[firstWikidataMayorClaimIndex].mainsnak.datavalue.value['numeric-id'] local wikidataMayorName = wikidata.findLinkToItem(StringUtils._prependIfMissing({tostring(wikidataMayorId), 'Q'})) if not isNilOrEmpty(wikidataMayorName) then if args['lideri'][1] == nil then args['lideri'][1] = {} end args['lideri'][1]['nume'] = wikidataMayorName .. wikidata.outputReferences(wikidataMayorClaims[1]) args['lideri'][1]['ales'] = wikidata.findLatestQualifierDateValueForOneProperty('P6', 'P580') local mayorParty = wikidata.getBestEntityIdsList(StringUtils._prependIfMissing({tostring(wikidataMayorId), 'Q'}), 'P102') if mayorParty and mayorParty[1] then local mayorPartyIdStr = StringUtils._prependIfMissing({tostring(mayorParty[1]), 'Q'}) args['lideri'][1]['partid'] = wikidata.findLinkToItemWithCallback(mayorPartyIdStr, true, function(object) local partyNameClaim = wikidata.findClaimForTimestamp(mayorPartyIdStr, 'P1813', nil) if not partyNameClaim then partyNameClaim = wikidata.findClaimForTimestamp(mayorPartyIdStr, 'P1448', nil) end if partyNameClaim then return partyNameClaim.mainsnak.datavalue.value.text end return nil end) end end end end if args['lideri'][1] ~= nil and isNilOrEmpty(args['lideri'][1]['titlu']) then local wikidataMayorTitle = wikidata.findOneValue('P1313') if not isNilOrEmpty(wikidataMayorTitle) then args['lideri'][1]['titlu'] = wikidataMayorTitle else args['lideri'][1]['titlu'] = 'Primar' end end for i = 1,table.maxn(args['nume_limba']) do if args['nume_limba'][i] then for argN, argV in pairs(origArgs) do nlStart, nlEnd = mw.ustring.find(argN, 'nume_limba' .. tostring(i) .. "_") if nlStart == 1 then local varNameWithIndex = mw.ustring.sub(argN, 1 + nlEnd, mw.ustring.len(argN)) local indexLocation = mw.ustring.find(varNameWithIndex, "%d+") or (1 + #varNameWithIndex) local variableName = mw.ustring.sub(varNameWithIndex, 1, indexLocation - 1) local variableIndexStr = mw.ustring.sub(varNameWithIndex, indexLocation, #varNameWithIndex) local variableIndex if variableIndexStr == nil or variableIndexStr == "" then variableIndex = 1 else variableIndex = 1 + tonumber(variableIndexStr) end if args['nume_limba'][i][variableName] == nil then args['nume_limba'][i][variableName] = {} end args['nume_limba'][i][variableName][variableIndex] = mw.text.trim(argV) end end end end if table.maxn(args['infratiri']) == 0 then local infratiri = wikidata.getEntityIdsList(nil, 'P190') if infratiri then if #infratiri > 12 then args['infratiri'][1] = {} args['infratiri'][1]['oras'] = tostring(#infratiri) .. ' orașe înfrățite' args['infratiri'][1]['tara'] = '[[:d:' .. wikidata.getEntityId() .. '#P190|listă]]' else for infrIdx = 1,#infratiri do args['infratiri'][infrIdx] = {} args['infratiri'][infrIdx]['oras'] = wikidata.findLinkToItem(infratiri[infrIdx]) local sisterCityCountry = wikidata.loadOneValueInChain({'Q' .. infratiri[infrIdx], 'P17'}) if not isNilOrEmpty(sisterCityCountry) then args['infratiri'][infrIdx]['tara'] = sisterCityCountry end end end end end if table.maxn(args['pushpin']) == 0 then local countryName = wikidata.loadOneValueInChain({'P17', 'label'}) if countryName then local defaultPushpin = {} defaultPushpin.map = countryName defaultPushpin.size = 290 defaultPushpin.caption = 'Poziția geografică în ' .. countryName defaultPushpin.label_position = args['pushpin_label_position'] or 'left' defaultPushpin.mapframe = true table.insert(args['pushpin'], defaultPushpin) end end if args['suprafata']['totala'] == nil then local areaClaims = wikidata.findBestClaimsForProperty(nil, 'P2046') -- area if areaClaims then for _,eachAreaClaim in pairs(areaClaims) do if eachAreaClaim.type == 'statement' and eachAreaClaim.mainsnak.snaktype == 'value' and eachAreaClaim.mainsnak.datavalue.value.unit ~= '1' then local areaQty = eachAreaClaim.mainsnak.datavalue.value.amount local areaUnitURL = eachAreaClaim.mainsnak.datavalue.value.unit local areaUnitId = StringUtils._removeStart({areaUnitURL, 'http://www.wikidata.org/entity/'}) -- TODO maybe other units should be supported here? if areaQty ~= nil and areaUnitId == 'Q712226' then if args['suprafata']['totala'] == nil then args['suprafata']['totala'] = {} end args['suprafata']['totala']['km2'] = lang:formatNum(tonumber(areaQty)) args['note_subsol_suprafata'] = wikidata.outputReferences(eachAreaClaim) end end end end end local wikidataImage, wikidataImageCaption = wikidata.findImageAndCaption() if origArgs['imagine'] then args['imagine'] = origArgs['imagine'] args['imagine_descriere'] = origArgs['imagine_descriere'] or '' elseif wikidataImage then args['imagine'] = wikidataImage args['imagine_descriere'] = wikidataImageCaption end if not isNilOrEmpty(origArgs['imagine_dimensiune']) then args['imagine_dimensiune'] = origArgs['imagine_dimensiune'] else args['imagine_dimensiune'] = "290x290px" end args['drapel'] = origArgs['drapel'] or origArgs['steag'] or origArgs['steag_imagine'] or wikidata.findOneValueNoRef('P41', nil) args['image_seal'] = origArgs['image_seal'] or wikidata.findOneValueNoRef('P158', nil) args['emblemă_imagine'] = origArgs['emblemă_imagine'] or origArgs['emblema_imagine'] args['stemă'] = origArgs['stemă'] or origArgs['stema'] or wikidata.findOneValueNoRef('P94', nil) args['drapel_dimensiune'] = origArgs['drapel_dimensiune'] or origArgs['steag_dimensiune'] or '100x100px' args['link_drapel'] = origArgs['link_drapel'] or origArgs['steag_link'] or returnIfPageExists('Drapelul orașului ' .. mw.title.getCurrentTitle().text) or wikidata.findOneValueNoRef('P162', nil) args['seal_size'] = origArgs['seal_size'] or '100px' args['seal_link'] = origArgs['seal_link'] or returnIfPageExists('Sigiliul orașului ' .. mw.title.getCurrentTitle().text) or ((not isNilOrEmpty(args['nume_oficial']) and returnIfPageExists('Sigiliul orașului ' .. args['nume_oficial']) or '')) args['link_stemă'] = origArgs['link_stemă'] or origArgs['stemă_link'] or returnIfPageExists('Stema ' .. mw.title.getCurrentTitle().text) or ((not isNilOrEmpty(args['nume_oficial']) and returnIfPageExists('Stema ' .. args['nume_oficial']) or '')) args['stemă_dimensiune'] = origArgs['stemă_dimensiune'] or '100x100px' args['emblemă_link'] = origArgs['emblemă_link'] or origArgs['emblema_link'] or returnIfPageExists('Logo-ul ' .. mw.title.getCurrentTitle().text) or ((not isNilOrEmpty(args['nume_oficial']) and returnIfPageExists('Logo-ul ' .. args['nume_oficial']) or '')) args['emblemă_dimensiune'] = origArgs['emblemă_dimensiune'] or origArgs['emblema_dimensiune'] or '100x100px' args['emblemă_tip'] = origArgs['emblemă_tip'] or origArgs['emblema_tip'] or 'Logo' args['poreclă'] = origArgs['porecla'] or origArgs['poreclă'] or "" args['motto'] = origArgs['motto'] or "" if not isNilOrEmpty(origArgs['hartă_punct_imagine']) then args['hartă_punct'] = {} args['hartă_punct'].imagine = origArgs['hartă_punct_imagine'] args['hartă_punct'].dimensiune = origArgs['hartă_punct_dimensiune'] or '180px' args['hartă_punct'].descriere = origArgs['hartă_punct_descriere'] or '' args['hartă_punct'].x = origArgs['dot_x'] or '' args['hartă_punct'].y = origArgs['dot_y'] or '' end args['latd'] = origArgs['latd'] or origArgs['lat_d'] or '' args['latm'] = origArgs['latm'] or origArgs['lat_m'] or '' args['lats'] = origArgs['lats'] or origArgs['lat_s'] or '' args['latNS'] = origArgs['lat_NS'] or origArgs['latNS'] args['longd'] = origArgs['longd'] or origArgs['long_d'] or '' args['longm'] = origArgs['longm'] or origArgs['long_m'] or '' args['longs'] = origArgs['longs'] or origArgs['long_s'] or '' args['longEV'] = origArgs['longEV'] or origArgs['long_EV'] or origArgs['longEW'] or origArgs['long_EW'] args['coords_in_title'] = 'yes' if isNilOrEmpty(args['latd']) then local wikidataCoords = wikidata.findDataValueObjects(nil, 'P625') if wikidataCoords[1] then args['latd'] = tostring(math.abs(wikidataCoords[1].latitude)) if wikidataCoords[1].latitude < 0 then args['latNS'] = 'S' else args['latNS'] = 'N' end args['longd'] = tostring(math.abs(wikidataCoords[1].longitude)) if wikidataCoords[1].longitude < 0 then args['longEV'] = 'V' else args['longEV'] = 'E' end args['coords_in_title'] = '' end end args['background'] = origArgs['background'] or '' args['tip_coordonate'] = origArgs['tip_coordonate'] or '' args['coordinates_type'] = origArgs['coordinates_type'] or 'type:city' args['coordonate'] = origArgs['coordonate'] or '' args['fondator'] = origArgs['fondator'] or '' args['numit_dupa'] = origArgs['numit_dupa'] or origArgs['numit_după'] or wikidata.findOneValue('P138', nil) args['resedinta'] = origArgs['reședință'] or origArgs['resedinta'] or origArgs['reședința'] or wikidata.findOneValue('P36', nil) args['tip_resedinta'] = origArgs['tip_resedinta'] or origArgs['tip_reședință'] or 'Reședință' args['componenta'] = origArgs['componenta'] or '' args['tip_componenta'] = mw.text.trim(origArgs['componenta_tip'] or origArgs['tip_componenta'] or origArgs['tip_componență'] or origArgs['componență_tip'] or 'Componență') args['stil_componenta'] = mw.text.trim(origArgs['componenta_stil'] or '') args['tip_guvernare'] = mw.text.trim(origArgs['guvernare_tip'] or origArgs['tip_guvernare'] or '') args['guvernare_note_subsol'] = mw.text.trim(origArgs['guvernare_note_subsol'] or '') local tipuriSuprafata = { 'totală', 'metropolitană', 'urbană', 'apă', 'pământ' } local unitatiSuprafata = { 'km2', 'dunam', 'sqmi', 'ha', 'procent' } for tipK, tipV in pairs(tipuriSuprafata) do for unitK, unitV in pairs(unitatiSuprafata) do local argument = 'suprafață_' .. tipV .. '_' .. unitV if not isNilOrEmpty(origArgs[argument] or origArgs[removeDiacritics(argument)]) then if args['suprafata'][removeDiacritics(tipV)] == nil then args['suprafata'][removeDiacritics(tipV)] = {} end local crtArg = origArgs[argument] or origArgs[removeDiacritics(argument)] args['suprafata'][removeDiacritics(tipV)][unitV] = crtArg if args['suprafata'][removeDiacritics(tipV)]['km2'] == nil then if unitV == 'dunam' then args['suprafata'][removeDiacritics(tipV)]['km2'] = tostring(round(.001 * tonumber(crtArg), 2)) elseif unitV == 'sqmi' then args['suprafata'][removeDiacritics(tipV)]['km2'] = tostring(round(convertSqMiToKm2(tonumber(crtArg)), 2)) elseif unitV == 'ha' then args['suprafata'][removeDiacritics(tipV)]['km2'] = tostring(round(.01 * tonumber(crtArg), 2)) end end end end end args['note_subsol_suprafata'] = mw.text.trim(origArgs['suprafață_note_subsol'] or args['note_subsol_suprafata'] or origArgs['note_subsol_suprafata'] or origArgs['suprafata_note_subsol'] or '') args['tip_total'] = mw.text.trim(origArgs['tip_total'] or '') args['note_subsol_altitudine'] = mw.text.trim(args['note_subsol_altitudine'] or origArgs['note_subsol_altitudine'] or origArgs['altitudine_note_subsol'] or '') local unitatiAltitudine = { 'm', 'ft' } local tipuriAltitudine = { '', 'max', 'min' } for tipK, tipV in pairs(tipuriAltitudine) do for unitK, unitV in pairs(unitatiAltitudine) do local crtArg = 'altitudine' .. (tipV ~= '' and '_' or '') .. tipV .. '_' .. unitV local translatedArg = 'altitudine' .. (tipV ~= '' and '_' or '') .. tipV .. (unitV ~= '' and ('_' .. unitV) or '') local translatedArgM = 'altitudine' .. (tipV ~= '' and '_' or '') .. tipV .. (tipV ~= '' and '_m' or '') if not isNilOrEmpty(origArgs[crtArg]) or not isNilOrEmpty(origArgs[translatedArg]) then args[translatedArg] = mw.text.trim(origArgs[crtArg] or origArgs[translatedArg]) if unitV == 'ft' and args[translatedArgM] == nil and tonumber(args[translatedArg]) then args[translatedArgM] = tostring(round(convertFtToM(tonumber(mw.text.trim(args[translatedArg]))), 0)) end end end end args['populatie_urbana'] = origArgs['populatie_urbana'] or origArgs['populație_urbană'] or origArgs['populație_urbana'] args['densitate_pop_urbana'] = origArgs['densitate_populație_urbana_km2'] args['populatie_metropolitana'] = origArgs['populatie_metropolitana'] or origArgs['populație_metropolitană'] or origArgs['populație_metropolitana'] args['densitate_pop_metro'] = origArgs['densitate_populație_metro_km2'] args['recensamant'] = origArgs['recensamant'] or origArgs['recensământ'] args['populatie'] = origArgs['populatie'] or origArgs['populație'] if args['populatie'] == nil or mw.text.trim(args['populatie']) == '' then extractPopulationFromWikidata(args) end args['note_subsol_populatie'] = origArgs['note_subsol_populatie'] or origArgs['populatie_note_subsol'] or origArgs['populație_note_subsol'] or '' args['densitate'] = origArgs['densitate'] args['populatie_note'] = origArgs['populatie_note'] or origArgs['populație_note'] args['fus_orar'] = origArgs['fus_orar'] or origArgs['timezone'] or wikidata.findOneValue('P421', nil) args['utc_offset'] = origArgs['utc_offset'] args['fus_orar_DST'] = origArgs['fus_orar_DST'] or origArgs['timezone_DST'] args['utc_offset_DST'] = origArgs['utc_offset_DST'] args['cod_postal'] = origArgs['codpoștal'] or origArgs['codpostal'] or origArgs['cod_poștal'] or origArgs['cod_postal'] or origArgs['postal_code'] or wikidata.findOneValue('P281', nil) args['tip_cod_postal'] = mw.text.trim(origArgs['tip_cod_postal'] or '[[Cod poștal]]') args['prefix_tel'] = origArgs['prefix_telefonic'] or origArgs['area_code'] or wikidata.findOneValue('P473', nil) args['cod'] = origArgs['cod'] args['tip_cod'] = mw.text.trim(origArgs['tip_cod'] or '[[Cod]]') args['note'] = origArgs['note'] args['webaddr'] = origArgs['sit-adresă'] or origArgs['website'] or origArgs['web'] args['webname'] = origArgs['sit-nume'] if args['webaddr'] and args['webname'] then args['website'] = '[' .. args['webaddr'] .. ' ' .. args['webname'] .. ']' elseif args['webaddr'] then args['website'] = args['webaddr'] else args['website'] = origArgs['website'] end args['infodoc'] = origArgs['infodoc'] or 'Infocaseta Așezare' if args['harti'][1] == nil then local wikidataMap = wikidata.findOneValueNoRef('P242', nil) if not isNilOrEmpty(wikidataMap) then args['harti'][1] = {} args['harti'][1]['harta'] = wikidataMap args['harti'][1]['descriere'] = wikidata.loadOneValueInChain({'P242', '_P2096'}) end end if args['harti'][1] ~= nil and isNilOrEmpty(args['harti'][1]['descriere']) then args['harti'][1]['descriere'] = 'Poziția ' .. args['tip_asezare_genitiv'] .. ' ' .. args['nume'] end if args['harti'][1] ~= nil and isNilOrEmpty(args['harti'][1]['size']) then args['harti'][1]['size'] = '290x290px' end if args['subdiviziuni'][1] == nil or isNilOrEmpty(args['subdiviziuni'][1]['nume']) then local wikidataCountryIds = wikidata.getBestEntityIdsList(nil, 'P17') if wikidataCountryIds and wikidataCountryIds[1] then local wikidataCountry = NameAndImage._nameAndImage(StringUtils._prependIfMissing({tostring(wikidataCountryIds[1]), 'Q'}), 'P41') if not isNilOrEmpty(wikidataCountry) then if args['subdiviziuni'][1] == nil then args['subdiviziuni'][1] = {} end args['subdiviziuni'][1]['nume'] = wikidataCountry args['subdiviziuni'][1]['tip'] = '[[Țările lumii|Țară]]' end end end if args['subdiviziuni'][2] == nil or isNilOrEmpty(args['subdiviziuni'][2]['nume']) then local claims = wikidata.findSortedClaimsForProperty(nil, 'P131') if claims and #claims > 0 then local subdivs = {} while table.maxn(claims) > 0 do local eachSubdivClaim = table.remove(claims, 1) if wikidata.hasBetterRank(eachSubdivClaim, 'preferred') or eachSubdivClaim.qualifiers == nil or eachSubdivClaim.qualifiers['P582'] == nil then local eachSubdiv = nil if wikidata.hasValueSnak(eachSubdivClaim) and wikidata.isClaimTrue(eachSubdivClaim) then eachSubdiv = eachSubdivClaim.mainsnak.datavalue.value['numeric-id'] end if not isNilOrEmpty(eachSubdiv) then if not wikidata.isA('Q' .. eachSubdiv, { 'Q6256' }) then -- is country local subdivAlreadyPresent = false for subdivIdx,eachExistingSubdiv in pairs(subdivs) do if eachExistingSubdiv == eachSubdiv then subdivAlreadyPresent = true end end if not subdivAlreadyPresent then table.insert(subdivs, 1, eachSubdiv) local recurrentClaims = wikidata.findSortedClaimsForProperty('Q' .. eachSubdiv, 'P131') while table.maxn(recurrentClaims) > 0 do table.insert(claims, 1, table.remove(recurrentClaims, 1)) end end --if not subdivAlreadyPresent end --if not isCountry end --if not isNilOrEmpty(eachSubdiv) end --if isNilOrEmpty(eachSubdivClaim['qualifiers']['P582']) end --while table.maxn(claims) for subdivIdx = 1,#subdivs do if args['subdiviziuni'][1 + subdivIdx] == nil then args['subdiviziuni'][1 + subdivIdx] = {} end args['subdiviziuni'][1 + subdivIdx]['nume'] = NameAndImage._nameAndImageFromOneOfProps('Q' .. tostring(subdivs[subdivIdx]), { 'P41', 'P94' }) local divisionTypes = wikidata.getEntityIdsList('Q' .. subdivs[subdivIdx], 'P31') if divisionTypes and divisionTypes[1] then args['subdiviziuni'][1 + subdivIdx]['tip'] = wikidata.findLinkToItem(divisionTypes[1], true) else args['subdiviziuni'][1 + subdivIdx]['tip'] = '&nbsp;' end end end end if #(args['clasificari']) == 0 then local classificationPs = {'P843', 'P3990', 'P1077', 'P374', 'P2586', 'P2585', 'P3423', 'P635'} local idx = 1 for _,eachClassificationP in ipairs(classificationPs) do local classificationValue = wikidata.findOneValueNoRef(eachClassificationP) if classificationValue then local crtClassificationFormatter = wikidata.findOneValueNoRef('P1630', eachClassificationP) local classificationLink = nil if crtClassificationFormatter then local classificationValueForLinkFormatting = mw.ustring.gsub(classificationValue, '%%', '%%%%') classificationLink = mw.ustring.gsub(crtClassificationFormatter, '$1', classificationValueForLinkFormatting) end local crtClassification = {} crtClassification.cod = classificationLink and ('[' .. classificationLink .. ' ' .. classificationValue .. ']') or classificationValue crtClassification.tip = wikidata.findOneValueNoRef('P1629', eachClassificationP) table.insert(args['clasificari'], idx, crtClassification) idx = idx + 1 end end end if isNilOrEmpty(args['altitudine']) and isNilOrEmpty(args['altitudine_m']) then args['altitudine'] = nil local altClaims = wikidata.findBestClaimsForProperty(nil, 'P2044') -- elevation above sea level if altClaims then for _,eachAltClaim in pairs(altClaims) do if eachAltClaim.type == 'statement' and eachAltClaim.mainsnak.snaktype == 'value' and eachAltClaim.mainsnak.datavalue.value.unit ~= '1' then local altQty = eachAltClaim.mainsnak.datavalue.value.amount if altQty ~= nil then local altUnitURL = eachAltClaim.mainsnak.datavalue.value.unit local altUnitId = StringUtils._removeStart({altUnitURL, 'http://www.wikidata.org/entity/'}) local maxAlt = eachAltClaim.mainsnak.datavalue.value.upperBound or altQty local minAlt = eachAltClaim.mainsnak.datavalue.value.lowerBound or altQty if altUnitId == 'Q3710' then -- if unit is ft if altQty then altQty = round(convertFtToM(altQty), 0) end if maxAlt then maxAlt = round(convertFtToM(maxAlt), 0) end if minAlt then minAlt = round(convertFtToM(minAlt), 0) end end if maxAlt - altQty > 1 or altQty - minAlt > 1 then args['altitudine_min_m'] = lang:formatNum(tonumber(minAlt)) args['altitudine_max_m'] = lang:formatNum(tonumber(maxAlt)) else args['altitudine'] = lang:formatNum(tonumber(altQty)) end args['note_subsol_altitudine'] = wikidata.outputReferences(eachAltClaim) end end end end end return _generate() .. mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Modul:InfoboxSettlement/styles.css'} } end return p </textarea><div id="mw-scribunto-console"></div><div class="templatesUsed"><div class="mw-templatesUsedExplanation"><p>Formate folosite în această pagină: </p></div><ul> <li><a href="/w/index.php?title=Modul:InfoboxSettlement/doc&action=edit&redlink=1" class="new" title="Modul:InfoboxSettlement/doc — pagină inexistentă">Modul:InfoboxSettlement/doc</a> (<a href="/w/index.php?title=Modul:InfoboxSettlement/doc&action=edit" class="new" title="Modul:InfoboxSettlement/doc — pagină inexistentă">modificare</a>) </li></ul></div><p id="mw-returnto">Înapoi la <a href="/wiki/Modul:InfoboxSettlement" title="Modul:InfoboxSettlement">Modul:InfoboxSettlement</a>.</p> <!--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="">Adus de la <a dir="ltr" href="https://ro.wikipedia.org/wiki/Modul:InfoboxSettlement">https://ro.wikipedia.org/wiki/Modul:InfoboxSettlement</a></div></div> <div id="catlinks" class="catlinks catlinks-allhidden" data-mw="interface"></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Politica de confidențialitate</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:Despre">Despre Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:Termeni">Termeni</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Cod de conduită</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Dezvoltatori</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/ro.wikipedia.org">Statistici</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Declarație cookie</a></li> <li id="footer-places-mobileview"><a href="//ro.m.wikipedia.org/w/index.php?title=Modul:InfoboxSettlement&action=edit&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Versiune mobilă</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-6d94db5ff4-7hmpg","wgBackendResponseTime":203,"wgPageParseReport":{"limitreport":{"cputime":"0.026","walltime":"0.035","ppvisitednodes":{"value":89,"limit":1000000},"postexpandincludesize":{"value":1811,"limit":2097152},"templateargumentsize":{"value":626,"limit":2097152},"expansiondepth":{"value":5,"limit":100},"expensivefunctioncount":{"value":0,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":806,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 19.075 1 Format:Fmbox","100.00% 19.075 1 -total"]},"cachereport":{"origin":"mw-web.codfw.main-6d94db5ff4-7hmpg","timestamp":"20241128205941","ttl":2592000,"transientcontent":false}}});});</script> </body> </html>