Wikipedia suwiki https://su.wikipedia.org/wiki/Tepas MediaWiki 1.47.0-wmf.17 first-letter Média Husus Obrolan Pamaké Obrolan pamaké Wikipedia Obrolan Wikipedia Gambar Obrolan gambar MédiaWiki Obrolan MédiaWiki Citakan Obrolan citakan Pitulung Obrolan pitulung Kategori Obrolan kategori Portal Obrolan portal TimedText TimedText talk Modul Pembicaraan Modul Acara Pembicaraan Acara Beurit 0 3450 712450 661247 2026-08-30T01:09:14Z InternetArchiveBot 25926 Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5 712450 wikitext text/x-wiki {{Taxobox_begin | color = pink | ngaran = Beurit}}<br /><small>Fosil: [[Miosin]] Ahir - Kiwari</small> {{Taxobox_image | image = [[Gambar:house_mouse.jpg|250px|Mus musculus]] | caption = Beurit imah, ''[[Mus musculus]]''}} {{Taxobox_begin_placement | color = pink}} {{Taxobox_regnum_entry | taxon = [[Sato|Animalia]]}} {{Taxobox_phylum_entry | taxon = [[Chordata]]}} {{Taxobox_classis_entry | taxon = [[Mamalia]]}} {{Taxobox_ordo_entry | taxon = [[Rodentia]]}} {{Taxobox_superfamilia_entry | taxon = [[Muroidea]]}} {{Taxobox_familia_entry | taxon = [[Muridae]]}} {{Taxobox_subfamilia_entry | taxon = [[Murinae]]}} {{Taxobox_genus_entry | taxon = '''''Mus'''''}}<br />{{Taxobox authority | author = [[Carolus Linnaeus|Linnaeus]] | date = 1758}} {{Taxobox_end_placement}} {{Taxobox_end}} '''Beurit''' ([[Basa Indonésia]]:''Tikus'') téh nyaéta [[mamalia]] nu kaasup salah sahiji [[spésiés]] [[rodénsia]] dina [[genus]] ''Mus'' sarta turunan lianna nu kaasup [[kulawarga (biologi)|kulawarga]] [[Muridæ]] (Beurit Dunya Buhun, ''Old World Mice''). == Biologi == Spésiés beurit nu paling dipikawanoh mah nyaéta [[mus musculus|beurit imah biasa]] (''Mus musculus''), nu ilahar kapanggih di sabudeureun urang di sakuliah dunya, ogé beurit nu sok dipaké di laboratorium, salaku [[modél organisme]] na biologi; sarta beurit [[ingon-ingon|kukutan]] (pikeun jalma awam mah, istilah beurit téh disaruakeun jeung "''Mus musculus''"). Beurit suku-bodas Amérika (''Peromyscus leucopus'') jeung beurit uncal (''deer mouse'', ''Peromyscus maniculatus'') ogé kadang hirup di paimahan. Spésiés beurit ieu hirup sacara [[komensalisme]] jeung manusa.<ref name=”Lut”>{{Cite book| url =https://play.google.com/store/books/details?id=uTKyDgAAQBAJ| title =Kamus Genggam Bahasa SundaLuthfiyani| last =Luthfiyani| first =Lulu | publisher =FRASA LINGUA| location =Yogyakarta| year =2017|ISBN=9786026475275|pages =14}} Disungsi12 Januari 2023</ref> Beurit téh mangrupa sato percobaan nu ilahar dipaké dina [[biologi]] jeung [[psikologi]] utamana ku sabab beurit téh mamalia, antukna loba [[homologi]]na jeung manusa, nu bisa dimanipulasi sakumaha perluna. Kauntungan séjénna nyaéta kanyataan yén beurit téh leutik, kaitung murah, sarta umurna nu pondok antukna gampang katengetkeun. Génom beurit runtuyanana geus ditalungtik, némbongkeun lobana homologi jeung manusa. Taun [[2006]], dina proyék ''[[Biosatellite]]'', beurit rék dikirim ka orbit [[Bumi]] dina pesawat nu muter pikeun nangtukeun balukar gravitasi [[Mars]] (orbitna dipilih nu kira-kira sarua jeung gravitasi Mars). [http://www.nasa.gov/vision/earth/livingthings/20jan_marsmice.html] {{Webarchive|url=https://web.archive.org/web/20051031211155/http://www.nasa.gov/vision/earth/livingthings/20jan_marsmice.html |date=2005-10-31 }} Di sagigireun kauntungan-kauntungan di luhur, beurit bisa bahya salaku hama nu ngaruksak pepelakan sarta nyebarkeun kasakit ngaliwatan [[parasit]] jeung [[tai]]na. Pikeun nyegah mahabuna gangguan beurit (ngontrol [[populasi]]na), nya di antarana ku cara ngukut [[ucing]], ngadatangkeun [[bueuk]], atawa masang [[sentég]]. Beurit sok digolongkeun [[hérbivora]], padahal sabenerna mah [[omnivora]]: dahar daging, kaasup bangké beurit séjénna, sarta geus kapanggih [[kanibalisme|nganibal]] buntutna sorangan nalika kalaparan. Di [[London]], kira aya satengah juta beurit, nu lolobana hirup di solokan-solokan. Beurit teu bisa maca warna, tapi ari ngabédakeun mah bisa dina rupa gradasi antara [[hideung]] jeung [[bodas]]. Najan bisa hirup nepi ka dua taun di lab, rata-rata umurna di luar mah ukur 3 bulanan, utamana alatan dimangsa. === Taksonomi genus ''Mus'' === [[Gambar:Mouse vermin02.jpg|thumb|250px|Beurit liar]] Genus ''Mus'' ngawengku 38 spésiés. *Genus ''Mus'' **Subgenus ''Pyromys'' ***''Mus platythrix'' ***''Mus saxicola'' ***''Mus philipsi'' ***''Mus shortridgei'' ***''Mus fernandoni'' **Subgenus ''Coelomys'' ***''Mus mayori'' ***''Mus pahari'' ***''Mus crociduroides'' ***''Mus vulcani'' ***''Mus famulus'' **Subgenus ''Mus'' ***''Mus caroli'' ***''Mus cervicolor'' ***''Mus cookii'' ***''Mus booduga'' ***''Mus terricolor'' ***''[[Mus musculus]]'' ***''Mus spretus'' ***''Mus macedonicus'' ***''Mus spicelegus'' **Subgenus ''Nannomys'' ***''Mus callewaerti'' ***''Mus setulosus'' ***''Mus triton'' ***''Mus bufo'' ***''Mus tenellus'' ***''Mus haussa'' ***''Mus mattheyi'' ***''Mus indutus'' ***''Mus setzeri'' ***''Mus musculoides'' ***''[[Mus minutoides]]'' ***''Mus orangiae'' ***''Mus mahomet'' ***''Mus sorella'' ***''Mus kasaicus'' ***''Mus neavei'' ***''Mus oubanguii'' ***''Mus goundae'' ***''Mus baoulei'' == Beurit dina alam fiksi == Beurit mangrupa salah sahiji sato nu populér dina alam [[fiksi]] (dina wujud kawas manusa, nu sipatna pikalucueun). Misalna [[Mickey Mouse]] nu kawentar di sakulian dunya. Lucuna téh, ongkoh dianggap hama ogé nu bisa mawa panyakit, tapi dedegan beurit dina alam fiksi mah malahan némbongkeun watek anu ''simpatik'' & ''protagonis''. == Baca ogé == {{Wiktionary}} {{Commons|Mus}} * [[sentég]] * ''[[Mickey Mouse]]'' * [[ucing]] == Sumber rujukan == * ''[[:en:Mouse|Mouse]]'', Wikipédia édisi basa Inggris per 26 Oktober 2005 == Tumbu kaluar == * [http://www.nature.com/news/2005/050718/full/050718-2.html Impact of Mice on endangered species] * [http://www.fancymice.info Fancy Mice 'A complete resource for pet owners and show breeders'] {{Webarchive|url=https://web.archive.org/web/20190916103033/http://www.fancymice.info/ |date=2019-09-16 }} * [https://web.archive.org/web/19990202084442/http://www.horns.freeserve.co.uk/mouse.htm Mouse@Horns 'The Pet Mouse FAQ'] * [http://members.madasafish.com/~cj_whitehound/Rats_Nest/Ship_Rats/Deshnok_text.htm Rat@Genesh 'Ganesh rides a Mouse'] [[Kategori:Muridae]] [[Kategori:Hama]] [[Kategori:Sato ingon]] 03qqpofq3p4y2l7wimjyfrisb6k0stu Gubernur 0 6458 712451 544526 2026-08-30T02:03:36Z InternetArchiveBot 25926 Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5 712451 wikitext text/x-wiki Kecap "Gubernur" asalna bisa ti [[basa Portugis]] "''governador''", [[basa Spanyol]] "''gobernador''" atawa [[basa Walanda]] "''gouverneur''". Kecap basa Walanda ieu méh sarua jeung [[basa Perancis]] nu harti harfiahna nyaéta "pamingpin", "pangawasa", atawa "maréntah". =Nagara-nagara Asia modern= ==Indonesia== '''Gubernur''', dina kontéks Otonomi Daérah di Indonésia, nyaéta Kapala Daérah keur daérah [[Propinsi]]. Gubernur boga tugas jeung wewenang mingpin penyelenggaraan daérah dumasar kana kawijakan nu ditetepkeun babarengan jeung [[DPRD]]. Gubernur dipilih papasanngan sacara langsung ku rahayat di Propinsina; ku sabab éta Gubernur tanggung jawab ka rakyat. Lian ti minangka Kapala Daérah, gubernur ogé boga kadudukan minangka wakil pamaréntah di wilayah propinsina; antukna dina hal ieu Gubernur tanggung jawab ka Présidén. Gubernur lain atasan Bupati atawa Walikota, tapi ukur wates ngabina, ngawas, jeung ngoordinasi penyelenggaraan pamaréntahan daérah [[kabupatén]]/[[kota]] Gubernur lain kapanjangan leungeun Pamaréntah Pusat, tapi mangrupa pamingpin indepénden di Propinsi nu dipilih langsung ku rahayat Propinsi ngaliwatan Pamilihan Kapala Daérah atawa PILKADA. Gubernur tanggung jawab langsung ka Déwan Perwakilan Daérah Propinsi. ==Jepang== Di [[Jepang]],<ref>http://law.e-gov.go.jp/htmldata/S22/S22HO067.html {{Webarchive|url=https://web.archive.org/web/20180209183605/http://law.e-gov.go.jp/htmldata/S22/S22HO067.html |date=2018-02-09 }}</ref> kalungguhan {{nihongo|"Gubernur"|知事|chiji}} nujul kana kalungguhan pangluhurna di Pamaréntahan [[Préféktur#Japanese sense of prefecture|Préféktur]]. Gubernur dipilih sacara langsung ku rakyat tur marentah salila opat taun. Gubernur bisa dieureunkeun dumasar kana hasil referendum. Upama ngantunkeun, teu mampuh, atawa eureun, pamaréntahan resmi dicepeng ku Wakil Gubernur nu tugasna atawa kalungguhanna sarua jeung Gubernur. Tempo [[Runtuyan gubernur Jepang]] keur runtuyan guberner nu kiwari marentah. =Tempo ogé= *[[Propinsi]] *[[Préféktur di Jepang]] =Rujukan= {{reflist}} [[Kategori:Kapala wilayah administratif di Indonésia]] sjlfr8uff83nhvl36ncgqrokkydngot Wikipedia:Lua 4 41001 712446 712306 2026-08-29T12:20:07Z Nimmzo 37272 /* Debugging */ +[[Husus:NumbuKaDieu/Citakan:Cikedung, Indramayu]] 712446 wikitext text/x-wiki {{tarjamahkeun|Inggris}} {{WikiProject Lua/header}} {{Information page|WP:Lua}} {{Namespaces}} Lua mangrupakeun basa pamrograman nu ayeuna geus sadia di Wikipedia Sunda ngaliwatan ekstensi MediaWiki [[mw:Extension:Scribunto|Scribunto]].<br /> Kode Lua ayeuna bisa diasupkeun kana témplat wiki ku maké fungsi parser <syntaxhighlight lang="lua" inline>{{#invoke:}}</syntaxhighlight> dina kaca pamaké anjeun. == Halo, dunya! dina Lua == The Lua source code is stored in a wiki page with the prefix <syntaxhighlight lang="lua" inline>Modul:</syntaxhighlight> (e.g., [[Modul:Bananas]]). These individual modules are then invoked (by code <syntaxhighlight lang="lua" inline>{{#invoke:}}</syntaxhighlight>) on another wiki page (e.g., [[Modul:Bananas/doc]] uses the code <syntaxhighlight lang="lua" inline>{{#invoke:Bananas|hello}}</syntaxhighlight> to print the text <syntaxhighlight lang="lua" inline>"Hello, world!"</syntaxhighlight>). Modules are run on normal wiki pages using the <code>#invoke</code> parser function. The syntax of <code>#invoke</code> is similar to template syntax, but with some differences. The most important difference is that you need to specify a ''function name''. A function is a set of Lua instructions that takes input values, processes them, and returns an output value.<ref>You can also have multiple output values, but functions that do this are not normally meant to be accessed from wiki pages.</ref> This is much like what a template does: you give it arguments, it processes them, and you get a result.<br /> However, you can define many functions in one Lua module, whereas you can only define one template on one page. Furthermore, you can't just run a Lua module directly - you can only run one of the module's functions. The module is just a container for the functions, and doesn't do anything by itself. So there are two reasons that we need to input a function name: # We can't run a module by itself. # Without specifying a function name, Lua will not know which function it is we want to run. Run a module from your user page like this: <blockquote><syntaxhighlight lang="lua" line> {{#invoke:NgaranModul|ngaranFungsi}} </syntaxhighlight></blockquote> For example, [[Modul:Bananas]] is the simplest possible script, providing a single function with no arguments.<br /> The function is named <code>hello</code> in lowercase. We can run this module in this way. Anjeun teu kudu masang atawa nyimpen nanaon. # Édit kaca pamaké anjeun. # Témpélkeun panggilan di handap ieu dina awal hiji baris anyar dina kaca pamaké anjeun: <blockquote><syntaxhighlight lang="wikitext" line highlight=1 copy> {{#invoke:Bananas|hello}} </syntaxhighlight></blockquote> <ol start="3"> <li>Klik <code>Témbongkeun sawangan</code>. Panggilan fungsi <syntaxhighlight lang="lua" inline>hello</syntaxhighlight> dina [[Modul:Bananas]] diganti ku ieu di handap: Halo, dunya!</li> </ol> <blockquote><syntaxhighlight lang="text" line> Hello, world! </syntaxhighlight></blockquote> <ol start="4"> <li>Klik <code style="color:#bf3c2c;>Bolay</code>. Lamun dipenta, klik <code>Tinggalkeun</code>.</li> <li>Kaca pamaké anjeun tetep '''teu''' dirobah.</li> </ol> === Using arguments === Arguments are passed to modules in the same way that they are passed to templates. Note, however, that the text after the first pipe character <code>|</code> is always the function name; the first positional argument is the text after the ''second'' pipe. <blockquote><syntaxhighlight lang="lua" line> {{#invoke:NgaranModul|ngaranFungsi|arguménPosisional1}} </syntaxhighlight></blockquote> For example, another [[Modul:BananasArgs]] demonstrates how to access and use parameters.<br /> The <code>hello</code> function greets different people depending on the first positional argument. It works like this: Dina kaca pamaké anjeun: <blockquote><syntaxhighlight lang="wikitext" line highlight=1 copy> # {{#invoke:BananasArgs|hello|Mariam}} # {{#invoke:BananasArgs|hello|Mohamed}} </syntaxhighlight></blockquote> <blockquote> # {{#invoke:BananasArgs|hello|Mariam}} # {{#invoke:BananasArgs|hello|Mohamed}} </blockquote> ;Named arguments key=value <blockquote><syntaxhighlight lang="lua" line> {{#invoke:NgaranModul|ngaranFungsi|argNgaran1=nilai1|argNgaran2=nilai2}} </syntaxhighlight></blockquote> The <syntaxhighlight lang="lua" inline>Modul:</syntaxhighlight>BananasArgs also has a function named <code>count_fruit</code> which uses the named arguments <code>bananas</code> and <code>apples</code> to count the number of bananas and apples we have. It can be run switching the order of the parameters: Dina kaca pamaké anjeun: <blockquote><syntaxhighlight lang="wikitext" line highlight=1 copy> # {{#invoke:BananasArgs|count_fruit|apples=3|bananas=4}} # {{#invoke:BananasArgs|count_fruit|bananas=5|apples=2}} </syntaxhighlight></blockquote> <blockquote> # {{#invoke:BananasArgs|count_fruit|apples=3|bananas=4}} # {{#invoke:BananasArgs|count_fruit|bananas=5|apples=2}} </blockquote> Most modules have a documentation page explaining what arguments can be used and what their effects will be. == Konsol debug: Mimiti diajar Lua == <code>Debug Console</code> dina Lua Scribunto nyaéta alat anu aman tur interaktif pikeun diajar Lua dina Wikipedia. # Klik <code>Témbongkeun sumber</code> dina kaca [[Modul:Yesno]]. # Gulung ka handap kaca nepi ka bagian <code>Debug console</code>. # Témpélkeun komentar jeung panggilan kana kotak asup <span style="color:#86888c;">kulawu</span> (di luhur tombol <code>Kosongkan</code>). <blockquote><syntaxhighlight lang="lua" line highlight=2 copy> --[[Program Lua munggaran anjeun nu mirip Hello World]]-- print("Wilujeng sumping di " .. _VERSION .. "!") -- Ngarangkep vérsi Lua ku `..` </syntaxhighlight></blockquote> <ol start="4"> <li>Pencét {{key press|Enter}} sakali pikeun ngalaksanakeun dua paréntah Lua éta.</li> <li>Hasilna bakal muncul di handap garis paréntah Lua <syntaxhighlight lang="lua" inline>print</syntaxhighlight>:</li> </ol> <blockquote><syntaxhighlight lang="text" line start=3> Wilujeng sumping di Lua 5.1! </syntaxhighlight></blockquote> <ol start="6"> <li>Pencét {{key press|Up}} <code>Panah ka luhur</code> pikeun ngurilingan paréntah Lua saméméhna.</li> <li>Opsional, klik <code>Kosongkan</code> pikeun ngaberesihan ''ngan'' <code>Debug Console</code>; éditor Lua di luhur moal '''teu''' robah.</li> </ol> ; Generator HTML dina Debug console Panggil pungsi <syntaxhighlight lang="lua" inline>hello</syntaxhighlight> dina <code>Modul:</code>Bananas: <blockquote><syntaxhighlight lang="lua" line highlight=2 copy> local modCau = require('Modul:Bananas') -- muat modul dina Debug console print(modCau.hello()) -- tampilkeun "Hello, world!" </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="text" line start=3> Hello, world! </syntaxhighlight></blockquote> ; Argumén <blockquote><syntaxhighlight lang="lua" line highlight=3,5 copy> local modCau = require('Modul:BananasArgs') local frame = mw.getCurrentFrame() frame.args = {"Mariam"}; print(modCau.hello(frame)) -- "Hello, Mariam!" frame.args = {"Mohamed"}; print(modCau.hello(frame)) frame.args = {apples="3", bananas="4"}; print(modCau.count_fruit(frame)) frame.args = {bananas="5", apples="2"}; print(modCau.count_fruit(frame)) </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="lua" line start=7> Hello, Mariam! Hello, Mohamed! I have 4 bananas and 3 apples I have 5 bananas and 2 apples </syntaxhighlight></blockquote> ; Fungsi idéntitas <code>callParserFunction</code> [[mw:Help:Extension:ParserFunctions##if|#if]] <blockquote><syntaxhighlight lang="lua" line highlight=3 copy> local yesno = require('Modul:Yesno') -- #if yesno teras mulangkeun parameter asupanna local frame = mw.getCurrentFrame() print(frame:callParserFunction("#if", yesno("Yes"), "Yes", 'henteu')) print(frame:callParserFunction("#if", yesno('teu'), "Leres", 'teu')) </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="text" line start=5> Yes teu </syntaxhighlight></blockquote> # Tutup <code>Modul:</code>Yesno anu dijaga anu tetep '''teu''' robah. == Request a script == Visit [[:en:Wikipedia talk:Lua]] to request help in writing a Lua script to perform a specific task on Wikipedia or another Wikimedia Foundation project. == History == [[mw:Manual:MediaWiki architecture#Magic words and templates|Sordid history]]. [[mw:Help:Extension:ParserFunctions|ParserFunctions]], [[mw:Extension:Lua|Lua extension]], wiki scripting language debated (JavaScript v. Lua), [[mw:Extension:WikiScripts]], Tim writes [[mw:Extension:Scribunto|Scribunto]] with initial support for Lua. Discussed for years, Lua was installed in 2012 for testing on [[test2wiki:|test2.wikipedia.org]], with open invitation to all editors to experiment with developing Lua modules. Lua was installed on the English Wikipedia in February 2013, after testing on mediawiki.org and Wikimedia test wikis. == About Lua == :''See also [[:File:WMF Tech Talk 2013-02-28 slides - Scribunto presentation.pdf|Brad Jorsch's short presentation for a basic example of how to convert a wikitext template into a Lua module.]]'' Lua is a scripting language which can be used to analyze data, calculate expressions, and format results using functions or object-oriented programming. Although some Lua scripts can be kept simple, for easy understanding, Lua allows complex structures including tables, dynamic functions, and associative arrays where index subscripts can be words as well as index numbers. Lua also supports recursion of re-nested functions, so care should be taken to avoid excessive complexity where other users would not understand how to maintain a Lua module. The following is an example of Lua source code for the <code>hello</code> function contained in [[Modul:Bananas]]: <syntaxhighlight lang="lua" line highlight=3> --[[Modul:Bananas]]-- local p = {} -- tabel modul nu diperlukeun, diinisialisasi minangka tabel kosong function p.hello() -- Nangtukeun fungsi hello. return "Hello, world!" -- Mulangkeun hasil fungsi dina wangun string. end -- Ahir fungsi. return p -- Mulangkeun tabel modul. </syntaxhighlight> A sample of Lua is highlighted by tag <code><nowiki><syntaxhighlight lang="lua" line highlight=1 copy> ... </syntaxhighlight></nowiki></code> placed around the Lua source code. For instructions on how to use Lua within MediaWiki (and hence Wikipedia), see [[mw:Extension:Scribunto/Lua reference manual]]. == Unit testing == A unit testing framework for Lua scripts on Wikipedia is available at [[Modul:ScribuntoUnit]].<br /> It allows you to execute your script on a given set of inputs and verify that the expected outputs are produced.<br /> Unit tests are especially useful for rapidly detecting regressions, where modifications to a script introduce new problems. By convention, unit tests for a module like [[Modul:Bananas]] are placed in <syntaxhighlight lang="lua" inline>Modul:</syntaxhighlight> <code>Bananas</code>'''<code>/testcases</code>'''.<br /> They are executed on [[Pembicaraan Modul:Bananas/testcases]] with <syntaxhighlight lang="lua" inline>{{#invoke:Bananas/testcases|</syntaxhighlight>'''<code>run</code>'''<syntaxhighlight lang="lua" inline>}}</syntaxhighlight>. Dina kaca pamaké anjeun: <blockquote><syntaxhighlight lang="wikitext" line highlight=1 copy> {{#invoke:Bananas/testcases|run}} </syntaxhighlight></blockquote> <blockquote> {{#invoke:Bananas/testcases|run}} </blockquote> Each test method must begin with <syntaxhighlight lang="lua" inline>p:</syntaxhighlight>'''<code>test_</code>'''. An example from [[Modul:Bananas/testcases]] is below. <syntaxhighlight lang="lua" line highlight=4 copy> --[[Modul:Bananas/testcases]]-- local p = require('Modul:ScribuntoUnit').new() local modCau = require('Modul:Bananas') -- Didatangan kaca obrolan pikeun ngajalankeun tés. function p:test_halo() -- Tés unit pikeun [[Modul:Bananas]]. self:assertEquals('Hello, world!', modCau.hello()) end return p </syntaxhighlight> {{collapse top|title=Prinsip uji hijian}} Di konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=10 copy> local self = { assertEquals = function(_, wikitext, expected) local got = mw.getCurrentFrame():preprocess(wikitext) print('"' .. expected .. '": Diarepkeun') print('"' .. got .. '": Saleresna') return got == expected end } -- Pamisah `:` tanpa `self` print(self:assertEquals( '{{#invoke:Bananas|hello}}', 'Hello, world!')) -- Pamisah `.` jeung `self` print(self.assertEquals(self, '{{#invoke:Bananas|hello}}', 'Hello, world!')) </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="lua" line start=13> "Hello, world!": Diarepkeun "Hello, world!": Sakuduna true "Hello, world!": Diarepkeun "Hello, world!": Sakuduna true </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="lua" line highlight=2 copy> local modTest = require('Modul:Bananas/testcases') print(modTest.run(mw.getCurrentFrame())) </syntaxhighlight></blockquote> Lamun tésna hasil, nilai anu diarepkeun jeung nilai sabenerna teu dipintonkeun supaya tabel hasil jadi leuwih basajan: <blockquote><syntaxhighlight lang="lua" line start=3> [[File:Yes check.svg|20px|alt=Ya|link=]]<span style="display:none">Y</span> Sakabéh tés lulus. {| class="wikitable scribunto-test-table" ! ! Ngaran ! Diarepkeun ! Saleresna |- | [[File:Yes check.svg|20px|alt=Ya|link=]]<span style="display:none">Y</span> | test_halo | | |} </syntaxhighlight></blockquote> Ngajalankeun [[Modul:ScribuntoUnit]] langsung dina [[Modul:Bananas]] tanpa nyimpen [[Modul:Bananas/testcases]]: <blockquote><syntaxhighlight lang="lua" line highlight=1,3 copy> local modTest = require('Modul:ScribuntoUnit').new() local modCau = require('Modul:Bananas') function modTest:test_halo() self:assertEquals('Hello, world!', modCau.hello()) end print(modTest.run(mw.getCurrentFrame())) </syntaxhighlight></blockquote> HTML anu dihasilkeun sarua. {{collapse bottom}} [[Modul:ScribuntoUnit]] originates from Hungarian Wikipedia.<br /> It throws real errors that are trapped using protected calls. It also has a method to compare floats within a given precision. Pikeun daptar sakabéh modul nu ngagunakeun tés unit, tingali [[Husus:NumbuKaDieu/Modul:ScribuntoUnit|nu dipaké]]. == Wikipedia-specific features == Overall: Lua can only get input as text strings passed to the <code><nowiki>{{#invoke:}}</nowiki></code> and what can be fetched via <code>[[mw:Extension:Scribunto/Lua reference manual#mw.title.new|mw.title.new(...)]]:getContent()</code> and <code>[[mw:Extension:Scribunto/Lua reference manual#frame:expandTemplate|frame:expandTemplate()]]</code>. Lua output will not be preprocessed unless <code>frame:</code>'''<code>[[mw:Extension:Scribunto/Lua reference manual#frame:preprocess|preprocess()]]</code>''' is explicitly called, meaning that template calls and parser functions in the output will not work correctly. Langkung hade ngagunakeun fungsi '''<code>[[mw:Extension:Scribunto/Lua reference manual#mw.ustring.len|mw.ustring.len]]</code>''' tibatan <code>[[mw:Extension:Scribunto/Lua reference manual#string.len|string.len]]</code>: Di konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=2,8 copy> --[[Alfabét Latin]]-- local content_lang = mw.getContentLanguage().code -- su local lang = mw.getCurrentFrame():callParserFunction("#language", content_lang) local lenUnicode, lenByte, lenSharp = mw.ustring.len(lang), string.len(lang), #lang print(("lang: \"%s\". Mw.ustring.len = %d String.len = %d Sharp = %d"):format(lang, lenUnicode, lenByte, lenSharp)) --[[Unicode]]-- lang = "اَكسارا ڤَيڮَون" -- Aksara Pégon lenUnicode, lenByte, lenSharp = mw.ustring.len(lang), string.len(lang), #lang print(("lang: \"%s\". Mw.ustring.len = %d String.len = %d Sharp = %d"):format(lang, lenUnicode, lenByte, lenSharp)) </syntaxhighlight></blockquote> <code>Konsol debug</code> ngarojong Unicode, tapi henteu ngarojong téks katuhu-ka-kenca: <blockquote><syntaxhighlight lang="text" line start=11> lang: "Sunda". Mw.ustring.len = 5 String.len = 5 Sharp = 5 lang: "اَكسارا ڤَيڮَون". Mw.ustring.len = 15 String.len = 29 Sharp = 29 </syntaxhighlight></blockquote> {| class="wikitable" ![[Alfabét Latin]] !Aksara !Arah !Jumlah karakter !Panjang dina bait |- |'''Sunda''' |[[Basa Sunda]]. |→ kenca ka katuhu. |5 |5 |- |[[Hurup Pégon]] |style="direction:rtl; text-align:right;" |'''اَكسارا ڤَيڮَون'''. |← '''Katuhu''' ka kenca |'''15''' ('''[[Unicode]]''') + 1 titik |<span style="color:red;">29</span> + 1 |} {{#invoke:Utf8debug|ek|اَكسارا ڤَيڮَون.}} Lua code in a wiki page is limited to '''10 s'''econds CPU time (you can look in the source code of a rendered page to see how long a template or module took to parse). Relative to standard Lua, Scribunto offers safe functions (see the [[mw:Extension:Scribunto/Lua reference manual#Differences from standard Lua|differences]] from standard Lua). === Lua input limitations === Lua code in Scribunto is only run when the page is being parsed. Therefore, the only user input that Lua can receive is by ''page editing'' - it cannot create an input box that allows you to type a Fahrenheit temperature and get back the corresponding Celsius temperature when you press a button, or recalculate a piece of the Mandelbrot set depending on which part of the parent set you click on. Dina konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=1 copy> local function toCelsius(tempFahrenheit) return (tempFahrenheit - 32) * 5 / 9 end print(("toCelsius(32°F) = %s°C. toCelsius(68°F) = %d°C"):format(toCelsius(32), toCelsius(68))) </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="text" line start=3> toCelsius(32°F) = 0°C. toCelsius(68°F) = 20°C </syntaxhighlight></blockquote> The Lua input can be any Wikipedia text page that can be transcluded (included on another page). This does ''not'' include graphics files (not even .SVG files, although they are actually text, unless you cut and paste it onto a Wiki text page), the list of pages listed in a [[:Kategori:Lua-based templates|category]], nor the contents of [[Wikipedia:Transclusion#Special pages|non-transcludeable]] [[Husus:IndeksAwalan/Modul:|special pages]]. === Wikitext === Transcluded Wikipedia headers frequently contain a hidden code such as <syntaxhighlight lang="lua" inline>"UNIQ5ae8f2aa414ff233-h-3--QINU"</syntaxhighlight> which may need to be stripped out in order for them to be parsed effectively. <blockquote><syntaxhighlight lang="lua" line highlight=1 copy> print(string.reverse("UNIQ")) -- Urutan sabalikna tina "UNIQ" nyaéta "QINU" </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="lua" line start=2> QINU </syntaxhighlight></blockquote> Wikilinks of the type <code><nowiki>[[Wikipedia:Pitulung</nowiki></code>'''<code><nowiki>|</nowiki></code>'''<code><nowiki>]]</nowiki></code> won't work if returned as output - they need to be written explicitly as <syntaxhighlight lang="lua" inline>[[Wikipedia:Pitulung|</syntaxhighlight>'''<code><nowiki>Pitulung</nowiki></code>'''<syntaxhighlight lang="lua" inline>]]</syntaxhighlight>. Other pre-save transforms, such as replacing <code>~~<nowiki/>~~</code> with signatures, will also fail to be processed. Template transclusions, parser function calls, and variable substitutions (i.e. anything with a <code><nowiki>{{...}}</nowiki></code>) will not be processed, nor will tags such as {{tag|ref|o}} or {{tag|nowiki|o}}. === Debugging === ; Galat nu katingali dina kaca Kaca wiki [[Jatisura, Cikedung, Indramayu]] ngahasilkeun dua galat: <blockquote>{{:Jatisura, Cikedung, Indramayu}}</blockquote> {{collapse top|title=Modul:Navbar Judul teu valid}} # [[Citakan:Kotakinfo Kalurahan]] nyaur [[Citakan:Infobox settlement]] ku parameter nu teu dipikawanoh <code>|coordinates_display=</code> jeung <code>|other_code_type=</code>. # Galat Lua dina Modul:Navbar di baris 58: Judul teu valid , {{{kota}}}. ; Ngurangan masalah Pikeun misahkeun galat Lua, uji [[Citakan:Cikedung, Indramayu]]: <blockquote>{{Cikedung, Indramayu}}</blockquote> Daptar 17 kaca nu kapangaruhan ku ieu masalah: [[Husus:NumbuKaDieu/Citakan:Cikedung, Indramayu]] ; Ngaréka ulang dina <code>Modul:</code>Yesno Dina konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=1 copy> local wikitext="{{Cikedung, Indramayu}}" print(mw.getCurrentFrame():preprocess(wikitext)) </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="lua" line start=3> <strong class="error"><span class="scribunto-error mw-scribunto-error-e20d3541">Lua error in Modul:Navbar at line 58: Invalid title , {{{kota}}}.</span></strong> </syntaxhighlight></blockquote> ; Mariksa <code>Modul:</code>Navbar Kode patali dina [[Modul:Navbar#L-58]] nyaéta: <blockquote><syntaxhighlight lang="lua" line start=54 highlight=5> local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end </syntaxhighlight></blockquote> Nambahkeun tanda petik dina <code>title_text</code> mah ''opsional'' pikeun ngagampangkeun pesen galat. # Pasang <code>title_text</code> dina tanda petik. # PANGJAOAN: '''<span style="color:red;">ULAH</span>''' ngaklik "<s><code>Pedalkeun parobahan</code></s>" ("<s><code>Publish changes</code></s>"). <blockquote><syntaxhighlight lang="lua" line start=54 highlight=4> local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. "\"" .. title_text .. "\"") error(cfg.invalid_title .. title_text) end </syntaxhighlight></blockquote> ; Uji dina preview Dina kaca preview, pake template ieu: # Témpélkeun <code>Pratayang halaman dengan templat ini</code> (caller template): <blockquote><syntaxhighlight lang="lua" line highlight=1 copy>Jatisura, Cikedung, Indramayu</syntaxhighlight></blockquote> # Klik <code>Lihat pratayang</code> (Show preview) Pesen galat jadi: <blockquote><syntaxhighlight lang="lua" line start=2> Lua error in Modul:Navbar at line 57: Invalid title ", {{{kota}}}". </syntaxhighlight></blockquote> Ieu nuduhkeun yén koma <syntaxhighlight lang="lua" inline>", "</syntaxhighlight> aya dina judul nu salah, nyaéta <code>, {{{kota}}}</code>. ; Ngalenyepan caller Pikeun nyaho template nu nelepon, lebetkeun: <blockquote><syntaxhighlight lang="lua" line start=54 highlight=4> local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error("Caller: \"" .. mw.getCurrentFrame():getParent():getTitle() .. "\"") error(cfg.invalid_title .. title_text) end </syntaxhighlight></blockquote> Sanggeus <code>then</code>, témpélkeun: <blockquote><syntaxhighlight lang="lua" line start=57 highlight=1 copy> error("Caller: \"" .. mw.getCurrentFrame():getParent():getTitle() .. "\"") </syntaxhighlight></blockquote> Pesen galat jadi: <blockquote><syntaxhighlight lang="lua" line start=2> Lua error in Modul:Navbar at line 57: Caller: "Citakan:Navbox". </syntaxhighlight></blockquote> ; Akar masalah [[Citakan:kac-2]] dialihkeun ka [[Citakan:Navigasi ID Desa]], jadi bugna lain dina modul Lua, tapi dina parameter nu dipake ku caller. Dina konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=1 copy> local wikitext="{{kac-2 |propinsi=Jawa Barat |dati2=Kabupatén |nami dati2=Indramayu}}" print(mw.getCurrentFrame():preprocess(wikitext)) </syntaxhighlight></blockquote> Parameter Sunda <code>|nami dati2=</code> teu dipaliré sabab modul Lua ngarepkeun ngaran parameter dina basa Indonésia: <blockquote><syntaxhighlight lang="lua" line start=2> <strong class="error"><span class="scribunto-error mw-scribunto-error-e20d3541">Lua error in Modul:Navbar at line 58: Invalid title , {{{kota}}}.</span></strong> </syntaxhighlight></blockquote> Perhatikeun koma <syntaxhighlight lang="lua" inline>", "</syntaxhighlight> dituturkeun ku <code>{{{kota}}}</code>. [[Citakan:Navigasi ID Desa]] dimimitian ku: <blockquote><syntaxhighlight lang="lua" line highlight=3> <noinclude>{{gabungdari|Navigasi kampung}}</noinclude> {{Navbox |name = {{{name<includeonly>|{{{nama kecamatan|{{{kecamatan|{{{distrik|{{{kapanewon|{{{kemantren|}}}}}}}}}}}}}}}, {{{nama dati2|{{{kabupaten|{{{kota}}}}}}}}}</includeonly><noinclude>|Navigasi ID Desa</noinclude>}}} </syntaxhighlight></blockquote> Jadi nilai standar <code>|name=</code> jadi runtah nu teu disangka, nyaéta <code>, {{{kota}}}</code>. # Upami argumén <code>kemantren</code> ditetepkeun, mulangkeun nilaina; upami henteu, mulangkeun runtuyan kosong. # Ngahasilkeun koma tuluy spasi. # Upami argumén <code>nama dati2</code> ditetepkeun, mulangkeun nilaina; # upami henteu, upami <code>kabupaten</code> ditetepkeun, mulangkeun nilaina; upami henteu, mulangkeun <code>{{{kota}}}</code> Dina konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=1 copy> local wikitext="{{{kemantren|}}}, {{{nama dati2|{{{kabupaten|{{{kota}}}}}}}}}" print(mw.getCurrentFrame():preprocess(wikitext)) </syntaxhighlight></blockquote> Henteu aya argumén anu ditetepkeun. <blockquote><syntaxhighlight lang="lua" line start=3> , {{{kota}}} </syntaxhighlight></blockquote> ; Pemetaan parameter Sintésis {| class="wikitable" ! Sunda ! Indonésia ! Inggris |- | nami | nama | name |- | nami kacamatan | nama kecamatan | name of the district |- | [[Citakan:Kotakinfo_Kalurahan#:~:text=nami|Citakan:Kotakinfo Kalurahan]] | [[Citakan:Navigasi ID Desa]] | [[Citakan:Navbox#:~:text=name|Citakan:Navbox]] |} ; Solusi Pake ngaran parameter basa Indonésia dina caller supaya teu kudu ngarobah modul Lua: <blockquote><syntaxhighlight lang="lua" line highlight=1 copy> local wikitext="{{kac-2 |propinsi=Jawa Barat |dati2=Kabupatén |kabupaten=Indramayu |nama kecamatan=Cikedung}}" print(mw.getCurrentFrame():preprocess(wikitext)) </syntaxhighlight></blockquote> HTML navbox hasilna hasil dibangkitkeun kalawan suksés: <blockquote><syntaxhighlight lang="lua" line start=3> <div class="navbox-styles"><DEL>'"`UNIQ--templatestyles-00000006-QINU`"'<DEL><DEL>'"`UNIQ--templatestyles-00000000-QINU`"'<DEL></div><div role="navigation" class="navbox" aria-labelledby="Kecamatan_Cikedung,_Kabupatén_Indramayu,_&amp;#123;&amp;#123;&amp;#123;provinsi&amp;#125;&amp;#125;&amp;#125;" style="padding:3px"><table class="nowraplinks mw-collapsible manualcollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tr><th scope="col" class="navbox-title" colspan="2"><DEL>'"`UNIQ--templatestyles-00000002-QINU`"'<DEL><DEL>'"`UNIQ--templatestyles-00000004-QINU`"'<DEL><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-lihat">[[Citakan:Cikedung, Indramayu|<abbr title="Lihat templat ini">l</abbr>]]</li><li class="nv-bicara">[[Obrolan citakan:Cikedung, Indramayu|<abbr title="Diskusikan templat ini">b</abbr>]]</li><li class="nv-sunting">[//su.wikipedia.org/w/index.php?title=Citakan:Cikedung,_Indramayu&action=edit<abbr title="Sunting templat ini">s</abbr>]</li></ul></div><div id="Kecamatan_Cikedung,_Kabupatén_Indramayu,_&amp;#123;&amp;#123;&amp;#123;provinsi&amp;#125;&amp;#125;&amp;#125;" style="font-size:114%;margin:0 4em">[[Cikedung, Indramayu|Kecamatan Cikedung]], [[Kabupatén Indramayu]], [[{{{provinsi}}}]]</div></th></tr></table></div> </syntaxhighlight></blockquote> [[Citakan:Cikedung, Indramayu]] dimimitian ku: <blockquote><syntaxhighlight lang="lua" line highlight=3> {{kac-2 |propinsi=Jawa Barat |dati2=Kabupatén |nami dati2=Indramayu |nami kacamatan=Cikedung}} </syntaxhighlight></blockquote> Dina konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=2,4 copy> local frame = mw.getCurrentFrame() local argSundanese = {propinsi='Jawa Barat', dati2='Kabupatén', ["nami dati2"]='Indramayu', ["nami kacamatan"]='Cikedung'} print("1. Ko: " .. frame:expandTemplate{title="kac-2", args=argSundanese}) -- fails local argIndonesian = {propinsi='Jawa Barat', dati2='Kabupatén', kabupaten ='Indramayu', ["nama kecamatan"]='Cikedung'} print("2. OK: " .. frame:expandTemplate{title="kac-2", args=argIndonesian}) -- works </syntaxhighlight></blockquote> {{collapse bottom}} == Labeling converted templates == {{lua|Module:Bananas}} Please place the {{tl|lua}} template on the documentation subpage of all templates that use Lua. It will help to better communicate Lua usage and template conversions. {{clear}} == See also == * [[Husus:IndeksAwalan/Modul:]] daptar modul Lua * [[:Kategori:Lua-based templates]] &ndash; l-groups ta templates based kan Lua ; English Wikipedia-specific resources * [[:mw:Manual:Coding conventions/Lua]] &ndash; standards to improve the readability of code through consistency * [[:en:Help:Lua debugging]] &ndash; a how-to guide about debugging Lua modules * [[:en:Module:Sandbox]] provides a pseudo-namespace for experimenting with Lua modules * [[:en:Wikipedia talk:Lua]] &ndash; requests for Lua-based templates or tasks == Notes == {{reflist}} {{WikiProject Lua/header}} [[Category:Wikipedia modules]] og12amqwj7wp1lan44c1txfvjmtqfpl 712447 712446 2026-08-29T12:30:12Z Nimmzo 37272 /* Debugging */ Sunda |propinsi= in [[Citakan:Kotakinfo_Kalurahan#:~:text=propinsi]] → Indonesian |provinsi= in [[Citakan:Navigasi ID Desa#:~:text=provinsi]]. This fixes [ [{{{provinsi}}}] ] → [[Jawa Barat]] 712447 wikitext text/x-wiki {{tarjamahkeun|Inggris}} {{WikiProject Lua/header}} {{Information page|WP:Lua}} {{Namespaces}} Lua mangrupakeun basa pamrograman nu ayeuna geus sadia di Wikipedia Sunda ngaliwatan ekstensi MediaWiki [[mw:Extension:Scribunto|Scribunto]].<br /> Kode Lua ayeuna bisa diasupkeun kana témplat wiki ku maké fungsi parser <syntaxhighlight lang="lua" inline>{{#invoke:}}</syntaxhighlight> dina kaca pamaké anjeun. == Halo, dunya! dina Lua == The Lua source code is stored in a wiki page with the prefix <syntaxhighlight lang="lua" inline>Modul:</syntaxhighlight> (e.g., [[Modul:Bananas]]). These individual modules are then invoked (by code <syntaxhighlight lang="lua" inline>{{#invoke:}}</syntaxhighlight>) on another wiki page (e.g., [[Modul:Bananas/doc]] uses the code <syntaxhighlight lang="lua" inline>{{#invoke:Bananas|hello}}</syntaxhighlight> to print the text <syntaxhighlight lang="lua" inline>"Hello, world!"</syntaxhighlight>). Modules are run on normal wiki pages using the <code>#invoke</code> parser function. The syntax of <code>#invoke</code> is similar to template syntax, but with some differences. The most important difference is that you need to specify a ''function name''. A function is a set of Lua instructions that takes input values, processes them, and returns an output value.<ref>You can also have multiple output values, but functions that do this are not normally meant to be accessed from wiki pages.</ref> This is much like what a template does: you give it arguments, it processes them, and you get a result.<br /> However, you can define many functions in one Lua module, whereas you can only define one template on one page. Furthermore, you can't just run a Lua module directly - you can only run one of the module's functions. The module is just a container for the functions, and doesn't do anything by itself. So there are two reasons that we need to input a function name: # We can't run a module by itself. # Without specifying a function name, Lua will not know which function it is we want to run. Run a module from your user page like this: <blockquote><syntaxhighlight lang="lua" line> {{#invoke:NgaranModul|ngaranFungsi}} </syntaxhighlight></blockquote> For example, [[Modul:Bananas]] is the simplest possible script, providing a single function with no arguments.<br /> The function is named <code>hello</code> in lowercase. We can run this module in this way. Anjeun teu kudu masang atawa nyimpen nanaon. # Édit kaca pamaké anjeun. # Témpélkeun panggilan di handap ieu dina awal hiji baris anyar dina kaca pamaké anjeun: <blockquote><syntaxhighlight lang="wikitext" line highlight=1 copy> {{#invoke:Bananas|hello}} </syntaxhighlight></blockquote> <ol start="3"> <li>Klik <code>Témbongkeun sawangan</code>. Panggilan fungsi <syntaxhighlight lang="lua" inline>hello</syntaxhighlight> dina [[Modul:Bananas]] diganti ku ieu di handap: Halo, dunya!</li> </ol> <blockquote><syntaxhighlight lang="text" line> Hello, world! </syntaxhighlight></blockquote> <ol start="4"> <li>Klik <code style="color:#bf3c2c;>Bolay</code>. Lamun dipenta, klik <code>Tinggalkeun</code>.</li> <li>Kaca pamaké anjeun tetep '''teu''' dirobah.</li> </ol> === Using arguments === Arguments are passed to modules in the same way that they are passed to templates. Note, however, that the text after the first pipe character <code>|</code> is always the function name; the first positional argument is the text after the ''second'' pipe. <blockquote><syntaxhighlight lang="lua" line> {{#invoke:NgaranModul|ngaranFungsi|arguménPosisional1}} </syntaxhighlight></blockquote> For example, another [[Modul:BananasArgs]] demonstrates how to access and use parameters.<br /> The <code>hello</code> function greets different people depending on the first positional argument. It works like this: Dina kaca pamaké anjeun: <blockquote><syntaxhighlight lang="wikitext" line highlight=1 copy> # {{#invoke:BananasArgs|hello|Mariam}} # {{#invoke:BananasArgs|hello|Mohamed}} </syntaxhighlight></blockquote> <blockquote> # {{#invoke:BananasArgs|hello|Mariam}} # {{#invoke:BananasArgs|hello|Mohamed}} </blockquote> ;Named arguments key=value <blockquote><syntaxhighlight lang="lua" line> {{#invoke:NgaranModul|ngaranFungsi|argNgaran1=nilai1|argNgaran2=nilai2}} </syntaxhighlight></blockquote> The <syntaxhighlight lang="lua" inline>Modul:</syntaxhighlight>BananasArgs also has a function named <code>count_fruit</code> which uses the named arguments <code>bananas</code> and <code>apples</code> to count the number of bananas and apples we have. It can be run switching the order of the parameters: Dina kaca pamaké anjeun: <blockquote><syntaxhighlight lang="wikitext" line highlight=1 copy> # {{#invoke:BananasArgs|count_fruit|apples=3|bananas=4}} # {{#invoke:BananasArgs|count_fruit|bananas=5|apples=2}} </syntaxhighlight></blockquote> <blockquote> # {{#invoke:BananasArgs|count_fruit|apples=3|bananas=4}} # {{#invoke:BananasArgs|count_fruit|bananas=5|apples=2}} </blockquote> Most modules have a documentation page explaining what arguments can be used and what their effects will be. == Konsol debug: Mimiti diajar Lua == <code>Debug Console</code> dina Lua Scribunto nyaéta alat anu aman tur interaktif pikeun diajar Lua dina Wikipedia. # Klik <code>Témbongkeun sumber</code> dina kaca [[Modul:Yesno]]. # Gulung ka handap kaca nepi ka bagian <code>Debug console</code>. # Témpélkeun komentar jeung panggilan kana kotak asup <span style="color:#86888c;">kulawu</span> (di luhur tombol <code>Kosongkan</code>). <blockquote><syntaxhighlight lang="lua" line highlight=2 copy> --[[Program Lua munggaran anjeun nu mirip Hello World]]-- print("Wilujeng sumping di " .. _VERSION .. "!") -- Ngarangkep vérsi Lua ku `..` </syntaxhighlight></blockquote> <ol start="4"> <li>Pencét {{key press|Enter}} sakali pikeun ngalaksanakeun dua paréntah Lua éta.</li> <li>Hasilna bakal muncul di handap garis paréntah Lua <syntaxhighlight lang="lua" inline>print</syntaxhighlight>:</li> </ol> <blockquote><syntaxhighlight lang="text" line start=3> Wilujeng sumping di Lua 5.1! </syntaxhighlight></blockquote> <ol start="6"> <li>Pencét {{key press|Up}} <code>Panah ka luhur</code> pikeun ngurilingan paréntah Lua saméméhna.</li> <li>Opsional, klik <code>Kosongkan</code> pikeun ngaberesihan ''ngan'' <code>Debug Console</code>; éditor Lua di luhur moal '''teu''' robah.</li> </ol> ; Generator HTML dina Debug console Panggil pungsi <syntaxhighlight lang="lua" inline>hello</syntaxhighlight> dina <code>Modul:</code>Bananas: <blockquote><syntaxhighlight lang="lua" line highlight=2 copy> local modCau = require('Modul:Bananas') -- muat modul dina Debug console print(modCau.hello()) -- tampilkeun "Hello, world!" </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="text" line start=3> Hello, world! </syntaxhighlight></blockquote> ; Argumén <blockquote><syntaxhighlight lang="lua" line highlight=3,5 copy> local modCau = require('Modul:BananasArgs') local frame = mw.getCurrentFrame() frame.args = {"Mariam"}; print(modCau.hello(frame)) -- "Hello, Mariam!" frame.args = {"Mohamed"}; print(modCau.hello(frame)) frame.args = {apples="3", bananas="4"}; print(modCau.count_fruit(frame)) frame.args = {bananas="5", apples="2"}; print(modCau.count_fruit(frame)) </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="lua" line start=7> Hello, Mariam! Hello, Mohamed! I have 4 bananas and 3 apples I have 5 bananas and 2 apples </syntaxhighlight></blockquote> ; Fungsi idéntitas <code>callParserFunction</code> [[mw:Help:Extension:ParserFunctions##if|#if]] <blockquote><syntaxhighlight lang="lua" line highlight=3 copy> local yesno = require('Modul:Yesno') -- #if yesno teras mulangkeun parameter asupanna local frame = mw.getCurrentFrame() print(frame:callParserFunction("#if", yesno("Yes"), "Yes", 'henteu')) print(frame:callParserFunction("#if", yesno('teu'), "Leres", 'teu')) </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="text" line start=5> Yes teu </syntaxhighlight></blockquote> # Tutup <code>Modul:</code>Yesno anu dijaga anu tetep '''teu''' robah. == Request a script == Visit [[:en:Wikipedia talk:Lua]] to request help in writing a Lua script to perform a specific task on Wikipedia or another Wikimedia Foundation project. == History == [[mw:Manual:MediaWiki architecture#Magic words and templates|Sordid history]]. [[mw:Help:Extension:ParserFunctions|ParserFunctions]], [[mw:Extension:Lua|Lua extension]], wiki scripting language debated (JavaScript v. Lua), [[mw:Extension:WikiScripts]], Tim writes [[mw:Extension:Scribunto|Scribunto]] with initial support for Lua. Discussed for years, Lua was installed in 2012 for testing on [[test2wiki:|test2.wikipedia.org]], with open invitation to all editors to experiment with developing Lua modules. Lua was installed on the English Wikipedia in February 2013, after testing on mediawiki.org and Wikimedia test wikis. == About Lua == :''See also [[:File:WMF Tech Talk 2013-02-28 slides - Scribunto presentation.pdf|Brad Jorsch's short presentation for a basic example of how to convert a wikitext template into a Lua module.]]'' Lua is a scripting language which can be used to analyze data, calculate expressions, and format results using functions or object-oriented programming. Although some Lua scripts can be kept simple, for easy understanding, Lua allows complex structures including tables, dynamic functions, and associative arrays where index subscripts can be words as well as index numbers. Lua also supports recursion of re-nested functions, so care should be taken to avoid excessive complexity where other users would not understand how to maintain a Lua module. The following is an example of Lua source code for the <code>hello</code> function contained in [[Modul:Bananas]]: <syntaxhighlight lang="lua" line highlight=3> --[[Modul:Bananas]]-- local p = {} -- tabel modul nu diperlukeun, diinisialisasi minangka tabel kosong function p.hello() -- Nangtukeun fungsi hello. return "Hello, world!" -- Mulangkeun hasil fungsi dina wangun string. end -- Ahir fungsi. return p -- Mulangkeun tabel modul. </syntaxhighlight> A sample of Lua is highlighted by tag <code><nowiki><syntaxhighlight lang="lua" line highlight=1 copy> ... </syntaxhighlight></nowiki></code> placed around the Lua source code. For instructions on how to use Lua within MediaWiki (and hence Wikipedia), see [[mw:Extension:Scribunto/Lua reference manual]]. == Unit testing == A unit testing framework for Lua scripts on Wikipedia is available at [[Modul:ScribuntoUnit]].<br /> It allows you to execute your script on a given set of inputs and verify that the expected outputs are produced.<br /> Unit tests are especially useful for rapidly detecting regressions, where modifications to a script introduce new problems. By convention, unit tests for a module like [[Modul:Bananas]] are placed in <syntaxhighlight lang="lua" inline>Modul:</syntaxhighlight> <code>Bananas</code>'''<code>/testcases</code>'''.<br /> They are executed on [[Pembicaraan Modul:Bananas/testcases]] with <syntaxhighlight lang="lua" inline>{{#invoke:Bananas/testcases|</syntaxhighlight>'''<code>run</code>'''<syntaxhighlight lang="lua" inline>}}</syntaxhighlight>. Dina kaca pamaké anjeun: <blockquote><syntaxhighlight lang="wikitext" line highlight=1 copy> {{#invoke:Bananas/testcases|run}} </syntaxhighlight></blockquote> <blockquote> {{#invoke:Bananas/testcases|run}} </blockquote> Each test method must begin with <syntaxhighlight lang="lua" inline>p:</syntaxhighlight>'''<code>test_</code>'''. An example from [[Modul:Bananas/testcases]] is below. <syntaxhighlight lang="lua" line highlight=4 copy> --[[Modul:Bananas/testcases]]-- local p = require('Modul:ScribuntoUnit').new() local modCau = require('Modul:Bananas') -- Didatangan kaca obrolan pikeun ngajalankeun tés. function p:test_halo() -- Tés unit pikeun [[Modul:Bananas]]. self:assertEquals('Hello, world!', modCau.hello()) end return p </syntaxhighlight> {{collapse top|title=Prinsip uji hijian}} Di konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=10 copy> local self = { assertEquals = function(_, wikitext, expected) local got = mw.getCurrentFrame():preprocess(wikitext) print('"' .. expected .. '": Diarepkeun') print('"' .. got .. '": Saleresna') return got == expected end } -- Pamisah `:` tanpa `self` print(self:assertEquals( '{{#invoke:Bananas|hello}}', 'Hello, world!')) -- Pamisah `.` jeung `self` print(self.assertEquals(self, '{{#invoke:Bananas|hello}}', 'Hello, world!')) </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="lua" line start=13> "Hello, world!": Diarepkeun "Hello, world!": Sakuduna true "Hello, world!": Diarepkeun "Hello, world!": Sakuduna true </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="lua" line highlight=2 copy> local modTest = require('Modul:Bananas/testcases') print(modTest.run(mw.getCurrentFrame())) </syntaxhighlight></blockquote> Lamun tésna hasil, nilai anu diarepkeun jeung nilai sabenerna teu dipintonkeun supaya tabel hasil jadi leuwih basajan: <blockquote><syntaxhighlight lang="lua" line start=3> [[File:Yes check.svg|20px|alt=Ya|link=]]<span style="display:none">Y</span> Sakabéh tés lulus. {| class="wikitable scribunto-test-table" ! ! Ngaran ! Diarepkeun ! Saleresna |- | [[File:Yes check.svg|20px|alt=Ya|link=]]<span style="display:none">Y</span> | test_halo | | |} </syntaxhighlight></blockquote> Ngajalankeun [[Modul:ScribuntoUnit]] langsung dina [[Modul:Bananas]] tanpa nyimpen [[Modul:Bananas/testcases]]: <blockquote><syntaxhighlight lang="lua" line highlight=1,3 copy> local modTest = require('Modul:ScribuntoUnit').new() local modCau = require('Modul:Bananas') function modTest:test_halo() self:assertEquals('Hello, world!', modCau.hello()) end print(modTest.run(mw.getCurrentFrame())) </syntaxhighlight></blockquote> HTML anu dihasilkeun sarua. {{collapse bottom}} [[Modul:ScribuntoUnit]] originates from Hungarian Wikipedia.<br /> It throws real errors that are trapped using protected calls. It also has a method to compare floats within a given precision. Pikeun daptar sakabéh modul nu ngagunakeun tés unit, tingali [[Husus:NumbuKaDieu/Modul:ScribuntoUnit|nu dipaké]]. == Wikipedia-specific features == Overall: Lua can only get input as text strings passed to the <code><nowiki>{{#invoke:}}</nowiki></code> and what can be fetched via <code>[[mw:Extension:Scribunto/Lua reference manual#mw.title.new|mw.title.new(...)]]:getContent()</code> and <code>[[mw:Extension:Scribunto/Lua reference manual#frame:expandTemplate|frame:expandTemplate()]]</code>. Lua output will not be preprocessed unless <code>frame:</code>'''<code>[[mw:Extension:Scribunto/Lua reference manual#frame:preprocess|preprocess()]]</code>''' is explicitly called, meaning that template calls and parser functions in the output will not work correctly. Langkung hade ngagunakeun fungsi '''<code>[[mw:Extension:Scribunto/Lua reference manual#mw.ustring.len|mw.ustring.len]]</code>''' tibatan <code>[[mw:Extension:Scribunto/Lua reference manual#string.len|string.len]]</code>: Di konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=2,8 copy> --[[Alfabét Latin]]-- local content_lang = mw.getContentLanguage().code -- su local lang = mw.getCurrentFrame():callParserFunction("#language", content_lang) local lenUnicode, lenByte, lenSharp = mw.ustring.len(lang), string.len(lang), #lang print(("lang: \"%s\". Mw.ustring.len = %d String.len = %d Sharp = %d"):format(lang, lenUnicode, lenByte, lenSharp)) --[[Unicode]]-- lang = "اَكسارا ڤَيڮَون" -- Aksara Pégon lenUnicode, lenByte, lenSharp = mw.ustring.len(lang), string.len(lang), #lang print(("lang: \"%s\". Mw.ustring.len = %d String.len = %d Sharp = %d"):format(lang, lenUnicode, lenByte, lenSharp)) </syntaxhighlight></blockquote> <code>Konsol debug</code> ngarojong Unicode, tapi henteu ngarojong téks katuhu-ka-kenca: <blockquote><syntaxhighlight lang="text" line start=11> lang: "Sunda". Mw.ustring.len = 5 String.len = 5 Sharp = 5 lang: "اَكسارا ڤَيڮَون". Mw.ustring.len = 15 String.len = 29 Sharp = 29 </syntaxhighlight></blockquote> {| class="wikitable" ![[Alfabét Latin]] !Aksara !Arah !Jumlah karakter !Panjang dina bait |- |'''Sunda''' |[[Basa Sunda]]. |→ kenca ka katuhu. |5 |5 |- |[[Hurup Pégon]] |style="direction:rtl; text-align:right;" |'''اَكسارا ڤَيڮَون'''. |← '''Katuhu''' ka kenca |'''15''' ('''[[Unicode]]''') + 1 titik |<span style="color:red;">29</span> + 1 |} {{#invoke:Utf8debug|ek|اَكسارا ڤَيڮَون.}} Lua code in a wiki page is limited to '''10 s'''econds CPU time (you can look in the source code of a rendered page to see how long a template or module took to parse). Relative to standard Lua, Scribunto offers safe functions (see the [[mw:Extension:Scribunto/Lua reference manual#Differences from standard Lua|differences]] from standard Lua). === Lua input limitations === Lua code in Scribunto is only run when the page is being parsed. Therefore, the only user input that Lua can receive is by ''page editing'' - it cannot create an input box that allows you to type a Fahrenheit temperature and get back the corresponding Celsius temperature when you press a button, or recalculate a piece of the Mandelbrot set depending on which part of the parent set you click on. Dina konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=1 copy> local function toCelsius(tempFahrenheit) return (tempFahrenheit - 32) * 5 / 9 end print(("toCelsius(32°F) = %s°C. toCelsius(68°F) = %d°C"):format(toCelsius(32), toCelsius(68))) </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="text" line start=3> toCelsius(32°F) = 0°C. toCelsius(68°F) = 20°C </syntaxhighlight></blockquote> The Lua input can be any Wikipedia text page that can be transcluded (included on another page). This does ''not'' include graphics files (not even .SVG files, although they are actually text, unless you cut and paste it onto a Wiki text page), the list of pages listed in a [[:Kategori:Lua-based templates|category]], nor the contents of [[Wikipedia:Transclusion#Special pages|non-transcludeable]] [[Husus:IndeksAwalan/Modul:|special pages]]. === Wikitext === Transcluded Wikipedia headers frequently contain a hidden code such as <syntaxhighlight lang="lua" inline>"UNIQ5ae8f2aa414ff233-h-3--QINU"</syntaxhighlight> which may need to be stripped out in order for them to be parsed effectively. <blockquote><syntaxhighlight lang="lua" line highlight=1 copy> print(string.reverse("UNIQ")) -- Urutan sabalikna tina "UNIQ" nyaéta "QINU" </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="lua" line start=2> QINU </syntaxhighlight></blockquote> Wikilinks of the type <code><nowiki>[[Wikipedia:Pitulung</nowiki></code>'''<code><nowiki>|</nowiki></code>'''<code><nowiki>]]</nowiki></code> won't work if returned as output - they need to be written explicitly as <syntaxhighlight lang="lua" inline>[[Wikipedia:Pitulung|</syntaxhighlight>'''<code><nowiki>Pitulung</nowiki></code>'''<syntaxhighlight lang="lua" inline>]]</syntaxhighlight>. Other pre-save transforms, such as replacing <code>~~<nowiki/>~~</code> with signatures, will also fail to be processed. Template transclusions, parser function calls, and variable substitutions (i.e. anything with a <code><nowiki>{{...}}</nowiki></code>) will not be processed, nor will tags such as {{tag|ref|o}} or {{tag|nowiki|o}}. === Debugging === ; Galat nu katingali dina kaca Kaca wiki [[Jatisura, Cikedung, Indramayu]] ngahasilkeun dua galat: <blockquote>{{:Jatisura, Cikedung, Indramayu}}</blockquote> {{collapse top|title=Modul:Navbar Judul teu valid}} # [[Citakan:Kotakinfo Kalurahan]] nyaur [[Citakan:Infobox settlement]] ku parameter nu teu dipikawanoh <code>|coordinates_display=</code> jeung <code>|other_code_type=</code>. # Galat Lua dina Modul:Navbar di baris 58: Judul teu valid , {{{kota}}}. ; Ngurangan masalah Pikeun misahkeun galat Lua, uji [[Citakan:Cikedung, Indramayu]]: <blockquote>{{Cikedung, Indramayu}}</blockquote> Daptar 17 kaca nu kapangaruhan ku ieu masalah: [[Husus:NumbuKaDieu/Citakan:Cikedung, Indramayu]] ; Ngaréka ulang dina <code>Modul:</code>Yesno Dina konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=1 copy> local wikitext="{{Cikedung, Indramayu}}" print(mw.getCurrentFrame():preprocess(wikitext)) </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="lua" line start=3> <strong class="error"><span class="scribunto-error mw-scribunto-error-e20d3541">Lua error in Modul:Navbar at line 58: Invalid title , {{{kota}}}.</span></strong> </syntaxhighlight></blockquote> ; Mariksa <code>Modul:</code>Navbar Kode patali dina [[Modul:Navbar#L-58]] nyaéta: <blockquote><syntaxhighlight lang="lua" line start=54 highlight=5> local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end </syntaxhighlight></blockquote> Nambahkeun tanda petik dina <code>title_text</code> mah ''opsional'' pikeun ngagampangkeun pesen galat. # Pasang <code>title_text</code> dina tanda petik. # PANGJAOAN: '''<span style="color:red;">ULAH</span>''' ngaklik "<s><code>Pedalkeun parobahan</code></s>" ("<s><code>Publish changes</code></s>"). <blockquote><syntaxhighlight lang="lua" line start=54 highlight=4> local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. "\"" .. title_text .. "\"") error(cfg.invalid_title .. title_text) end </syntaxhighlight></blockquote> ; Uji dina preview Dina kaca preview, pake template ieu: # Témpélkeun <code>Pratayang halaman dengan templat ini</code> (caller template): <blockquote><syntaxhighlight lang="lua" line highlight=1 copy>Jatisura, Cikedung, Indramayu</syntaxhighlight></blockquote> # Klik <code>Lihat pratayang</code> (Show preview) Pesen galat jadi: <blockquote><syntaxhighlight lang="lua" line start=2> Lua error in Modul:Navbar at line 57: Invalid title ", {{{kota}}}". </syntaxhighlight></blockquote> Ieu nuduhkeun yén koma <syntaxhighlight lang="lua" inline>", "</syntaxhighlight> aya dina judul nu salah, nyaéta <code>, {{{kota}}}</code>. ; Ngalenyepan caller Pikeun nyaho template nu nelepon, lebetkeun: <blockquote><syntaxhighlight lang="lua" line start=54 highlight=4> local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error("Caller: \"" .. mw.getCurrentFrame():getParent():getTitle() .. "\"") error(cfg.invalid_title .. title_text) end </syntaxhighlight></blockquote> Sanggeus <code>then</code>, témpélkeun: <blockquote><syntaxhighlight lang="lua" line start=57 highlight=1 copy> error("Caller: \"" .. mw.getCurrentFrame():getParent():getTitle() .. "\"") </syntaxhighlight></blockquote> Pesen galat jadi: <blockquote><syntaxhighlight lang="lua" line start=2> Lua error in Modul:Navbar at line 57: Caller: "Citakan:Navbox". </syntaxhighlight></blockquote> ; Akar masalah [[Citakan:kac-2]] dialihkeun ka [[Citakan:Navigasi ID Desa]], jadi bugna lain dina modul Lua, tapi dina parameter nu dipake ku caller. Dina konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=1 copy> local wikitext="{{kac-2 |propinsi=Jawa Barat |dati2=Kabupatén |nami dati2=Indramayu}}" print(mw.getCurrentFrame():preprocess(wikitext)) </syntaxhighlight></blockquote> Parameter Sunda <code>|nami dati2=</code> teu dipaliré sabab modul Lua ngarepkeun ngaran parameter dina basa Indonésia: <blockquote><syntaxhighlight lang="lua" line start=2> <strong class="error"><span class="scribunto-error mw-scribunto-error-e20d3541">Lua error in Modul:Navbar at line 58: Invalid title , {{{kota}}}.</span></strong> </syntaxhighlight></blockquote> Perhatikeun koma <syntaxhighlight lang="lua" inline>", "</syntaxhighlight> dituturkeun ku <code>{{{kota}}}</code>. [[Citakan:Navigasi ID Desa]] dimimitian ku: <blockquote><syntaxhighlight lang="lua" line highlight=3> <noinclude>{{gabungdari|Navigasi kampung}}</noinclude> {{Navbox |name = {{{name<includeonly>|{{{nama kecamatan|{{{kecamatan|{{{distrik|{{{kapanewon|{{{kemantren|}}}}}}}}}}}}}}}, {{{nama dati2|{{{kabupaten|{{{kota}}}}}}}}}</includeonly><noinclude>|Navigasi ID Desa</noinclude>}}} </syntaxhighlight></blockquote> Jadi nilai standar <code>|name=</code> jadi runtah nu teu disangka, nyaéta <code>, {{{kota}}}</code>. # Upami argumén <code>kemantren</code> ditetepkeun, mulangkeun nilaina; upami henteu, mulangkeun runtuyan kosong. # Ngahasilkeun koma tuluy spasi. # Upami argumén <code>nama dati2</code> ditetepkeun, mulangkeun nilaina; # upami henteu, upami <code>kabupaten</code> ditetepkeun, mulangkeun nilaina; upami henteu, mulangkeun <code>{{{kota}}}</code> Dina konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=1 copy> local wikitext="{{{kemantren|}}}, {{{nama dati2|{{{kabupaten|{{{kota}}}}}}}}}" print(mw.getCurrentFrame():preprocess(wikitext)) </syntaxhighlight></blockquote> Henteu aya argumén anu ditetepkeun. <blockquote><syntaxhighlight lang="lua" line start=3> , {{{kota}}} </syntaxhighlight></blockquote> ; Pemetaan parameter Sintésis {| class="wikitable" ! Sunda ! Indonésia ! Inggris |- | nami | nama | name |- | propinsi | provinsi | province |- | nami kacamatan | nama kecamatan | name of the district |- | [[Citakan:Kotakinfo_Kalurahan#:~:text=nami|Citakan:Kotakinfo Kalurahan]] | [[Citakan:Navigasi ID Desa]] | [[Citakan:Navbox#:~:text=name|Citakan:Navbox]] |} ; Solusi Pake ngaran parameter basa Indonésia dina caller supaya teu kudu ngarobah modul Lua: <blockquote><syntaxhighlight lang="lua" line highlight=1 copy> local wikitext="{{kac-2 |provinsi=Jawa Barat |dati2=Kabupatén |kabupaten=Indramayu |nama kecamatan=Cikedung}}" print(mw.getCurrentFrame():preprocess(wikitext)) </syntaxhighlight></blockquote> HTML navbox hasilna hasil dibangkitkeun kalawan suksés: <blockquote><syntaxhighlight lang="lua" line start=3> <div class="navbox-styles"><DEL>'"`UNIQ--templatestyles-00000006-QINU`"'<DEL><DEL>'"`UNIQ--templatestyles-00000000-QINU`"'<DEL></div><div role="navigation" class="navbox" aria-labelledby="Kecamatan_Cikedung,_Kabupatén_Indramayu,_Jawa_Barat" style="padding:3px"><table class="nowraplinks mw-collapsible manualcollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tr><th scope="col" class="navbox-title" colspan="2"><DEL>'"`UNIQ--templatestyles-00000002-QINU`"'<DEL><DEL>'"`UNIQ--templatestyles-00000004-QINU`"'<DEL><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-lihat">[[Citakan:Cikedung, Indramayu|<abbr title="Lihat templat ini">l</abbr>]]</li><li class="nv-bicara">[[Obrolan citakan:Cikedung, Indramayu|<abbr title="Diskusikan templat ini">b</abbr>]]</li><li class="nv-sunting">[//su.wikipedia.org/w/index.php?title=Citakan:Cikedung,_Indramayu&action=edit<abbr title="Sunting templat ini">s</abbr>]</li></ul></div><div id="Kecamatan_Cikedung,_Kabupatén_Indramayu,_Jawa_Barat" style="font-size:114%;margin:0 4em">[[Cikedung, Indramayu|Kecamatan Cikedung]], [[Kabupatén Indramayu]], [[Jawa Barat]]</div></th></tr></table></div> </syntaxhighlight></blockquote> [[Citakan:Cikedung, Indramayu]] dimimitian ku: <blockquote><syntaxhighlight lang="lua" line highlight=3> {{kac-2 |propinsi=Jawa Barat |dati2=Kabupatén |nami dati2=Indramayu |nami kacamatan=Cikedung}} </syntaxhighlight></blockquote> Dina konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=2,4 copy> local frame = mw.getCurrentFrame() local argSundanese = {propinsi='Jawa Barat', dati2='Kabupatén', ["nami dati2"]='Indramayu', ["nami kacamatan"]='Cikedung'} print("1. Ko: " .. frame:expandTemplate{title="kac-2", args=argSundanese}) -- fails local argIndonesian = {provinsi='Jawa Barat', dati2='Kabupatén', kabupaten ='Indramayu', ["nama kecamatan"]='Cikedung'} print("2. OK: " .. frame:expandTemplate{title="kac-2", args=argIndonesian}) -- works </syntaxhighlight></blockquote> {{collapse bottom}} == Labeling converted templates == {{lua|Module:Bananas}} Please place the {{tl|lua}} template on the documentation subpage of all templates that use Lua. It will help to better communicate Lua usage and template conversions. {{clear}} == See also == * [[Husus:IndeksAwalan/Modul:]] daptar modul Lua * [[:Kategori:Lua-based templates]] &ndash; l-groups ta templates based kan Lua ; English Wikipedia-specific resources * [[:mw:Manual:Coding conventions/Lua]] &ndash; standards to improve the readability of code through consistency * [[:en:Help:Lua debugging]] &ndash; a how-to guide about debugging Lua modules * [[:en:Module:Sandbox]] provides a pseudo-namespace for experimenting with Lua modules * [[:en:Wikipedia talk:Lua]] &ndash; requests for Lua-based templates or tasks == Notes == {{reflist}} {{WikiProject Lua/header}} [[Category:Wikipedia modules]] ll6phxardpwrgiwku08hpt0sq585ffx 712448 712447 2026-08-29T13:00:25Z Nimmzo 37272 /* Debugging */ [[:en:wikt:provinsi|Provinsi]] is the Indonesian form; [[:map-bms:propinsi]] or [[:ban:propinsi]] is a variant. In Sunda, you'll also see the borrowed form "propinsi", but the same standard spelling could be "Provinsi". 712448 wikitext text/x-wiki {{tarjamahkeun|Inggris}} {{WikiProject Lua/header}} {{Information page|WP:Lua}} {{Namespaces}} Lua mangrupakeun basa pamrograman nu ayeuna geus sadia di Wikipedia Sunda ngaliwatan ekstensi MediaWiki [[mw:Extension:Scribunto|Scribunto]].<br /> Kode Lua ayeuna bisa diasupkeun kana témplat wiki ku maké fungsi parser <syntaxhighlight lang="lua" inline>{{#invoke:}}</syntaxhighlight> dina kaca pamaké anjeun. == Halo, dunya! dina Lua == The Lua source code is stored in a wiki page with the prefix <syntaxhighlight lang="lua" inline>Modul:</syntaxhighlight> (e.g., [[Modul:Bananas]]). These individual modules are then invoked (by code <syntaxhighlight lang="lua" inline>{{#invoke:}}</syntaxhighlight>) on another wiki page (e.g., [[Modul:Bananas/doc]] uses the code <syntaxhighlight lang="lua" inline>{{#invoke:Bananas|hello}}</syntaxhighlight> to print the text <syntaxhighlight lang="lua" inline>"Hello, world!"</syntaxhighlight>). Modules are run on normal wiki pages using the <code>#invoke</code> parser function. The syntax of <code>#invoke</code> is similar to template syntax, but with some differences. The most important difference is that you need to specify a ''function name''. A function is a set of Lua instructions that takes input values, processes them, and returns an output value.<ref>You can also have multiple output values, but functions that do this are not normally meant to be accessed from wiki pages.</ref> This is much like what a template does: you give it arguments, it processes them, and you get a result.<br /> However, you can define many functions in one Lua module, whereas you can only define one template on one page. Furthermore, you can't just run a Lua module directly - you can only run one of the module's functions. The module is just a container for the functions, and doesn't do anything by itself. So there are two reasons that we need to input a function name: # We can't run a module by itself. # Without specifying a function name, Lua will not know which function it is we want to run. Run a module from your user page like this: <blockquote><syntaxhighlight lang="lua" line> {{#invoke:NgaranModul|ngaranFungsi}} </syntaxhighlight></blockquote> For example, [[Modul:Bananas]] is the simplest possible script, providing a single function with no arguments.<br /> The function is named <code>hello</code> in lowercase. We can run this module in this way. Anjeun teu kudu masang atawa nyimpen nanaon. # Édit kaca pamaké anjeun. # Témpélkeun panggilan di handap ieu dina awal hiji baris anyar dina kaca pamaké anjeun: <blockquote><syntaxhighlight lang="wikitext" line highlight=1 copy> {{#invoke:Bananas|hello}} </syntaxhighlight></blockquote> <ol start="3"> <li>Klik <code>Témbongkeun sawangan</code>. Panggilan fungsi <syntaxhighlight lang="lua" inline>hello</syntaxhighlight> dina [[Modul:Bananas]] diganti ku ieu di handap: Halo, dunya!</li> </ol> <blockquote><syntaxhighlight lang="text" line> Hello, world! </syntaxhighlight></blockquote> <ol start="4"> <li>Klik <code style="color:#bf3c2c;>Bolay</code>. Lamun dipenta, klik <code>Tinggalkeun</code>.</li> <li>Kaca pamaké anjeun tetep '''teu''' dirobah.</li> </ol> === Using arguments === Arguments are passed to modules in the same way that they are passed to templates. Note, however, that the text after the first pipe character <code>|</code> is always the function name; the first positional argument is the text after the ''second'' pipe. <blockquote><syntaxhighlight lang="lua" line> {{#invoke:NgaranModul|ngaranFungsi|arguménPosisional1}} </syntaxhighlight></blockquote> For example, another [[Modul:BananasArgs]] demonstrates how to access and use parameters.<br /> The <code>hello</code> function greets different people depending on the first positional argument. It works like this: Dina kaca pamaké anjeun: <blockquote><syntaxhighlight lang="wikitext" line highlight=1 copy> # {{#invoke:BananasArgs|hello|Mariam}} # {{#invoke:BananasArgs|hello|Mohamed}} </syntaxhighlight></blockquote> <blockquote> # {{#invoke:BananasArgs|hello|Mariam}} # {{#invoke:BananasArgs|hello|Mohamed}} </blockquote> ;Named arguments key=value <blockquote><syntaxhighlight lang="lua" line> {{#invoke:NgaranModul|ngaranFungsi|argNgaran1=nilai1|argNgaran2=nilai2}} </syntaxhighlight></blockquote> The <syntaxhighlight lang="lua" inline>Modul:</syntaxhighlight>BananasArgs also has a function named <code>count_fruit</code> which uses the named arguments <code>bananas</code> and <code>apples</code> to count the number of bananas and apples we have. It can be run switching the order of the parameters: Dina kaca pamaké anjeun: <blockquote><syntaxhighlight lang="wikitext" line highlight=1 copy> # {{#invoke:BananasArgs|count_fruit|apples=3|bananas=4}} # {{#invoke:BananasArgs|count_fruit|bananas=5|apples=2}} </syntaxhighlight></blockquote> <blockquote> # {{#invoke:BananasArgs|count_fruit|apples=3|bananas=4}} # {{#invoke:BananasArgs|count_fruit|bananas=5|apples=2}} </blockquote> Most modules have a documentation page explaining what arguments can be used and what their effects will be. == Konsol debug: Mimiti diajar Lua == <code>Debug Console</code> dina Lua Scribunto nyaéta alat anu aman tur interaktif pikeun diajar Lua dina Wikipedia. # Klik <code>Témbongkeun sumber</code> dina kaca [[Modul:Yesno]]. # Gulung ka handap kaca nepi ka bagian <code>Debug console</code>. # Témpélkeun komentar jeung panggilan kana kotak asup <span style="color:#86888c;">kulawu</span> (di luhur tombol <code>Kosongkan</code>). <blockquote><syntaxhighlight lang="lua" line highlight=2 copy> --[[Program Lua munggaran anjeun nu mirip Hello World]]-- print("Wilujeng sumping di " .. _VERSION .. "!") -- Ngarangkep vérsi Lua ku `..` </syntaxhighlight></blockquote> <ol start="4"> <li>Pencét {{key press|Enter}} sakali pikeun ngalaksanakeun dua paréntah Lua éta.</li> <li>Hasilna bakal muncul di handap garis paréntah Lua <syntaxhighlight lang="lua" inline>print</syntaxhighlight>:</li> </ol> <blockquote><syntaxhighlight lang="text" line start=3> Wilujeng sumping di Lua 5.1! </syntaxhighlight></blockquote> <ol start="6"> <li>Pencét {{key press|Up}} <code>Panah ka luhur</code> pikeun ngurilingan paréntah Lua saméméhna.</li> <li>Opsional, klik <code>Kosongkan</code> pikeun ngaberesihan ''ngan'' <code>Debug Console</code>; éditor Lua di luhur moal '''teu''' robah.</li> </ol> ; Generator HTML dina Debug console Panggil pungsi <syntaxhighlight lang="lua" inline>hello</syntaxhighlight> dina <code>Modul:</code>Bananas: <blockquote><syntaxhighlight lang="lua" line highlight=2 copy> local modCau = require('Modul:Bananas') -- muat modul dina Debug console print(modCau.hello()) -- tampilkeun "Hello, world!" </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="text" line start=3> Hello, world! </syntaxhighlight></blockquote> ; Argumén <blockquote><syntaxhighlight lang="lua" line highlight=3,5 copy> local modCau = require('Modul:BananasArgs') local frame = mw.getCurrentFrame() frame.args = {"Mariam"}; print(modCau.hello(frame)) -- "Hello, Mariam!" frame.args = {"Mohamed"}; print(modCau.hello(frame)) frame.args = {apples="3", bananas="4"}; print(modCau.count_fruit(frame)) frame.args = {bananas="5", apples="2"}; print(modCau.count_fruit(frame)) </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="lua" line start=7> Hello, Mariam! Hello, Mohamed! I have 4 bananas and 3 apples I have 5 bananas and 2 apples </syntaxhighlight></blockquote> ; Fungsi idéntitas <code>callParserFunction</code> [[mw:Help:Extension:ParserFunctions##if|#if]] <blockquote><syntaxhighlight lang="lua" line highlight=3 copy> local yesno = require('Modul:Yesno') -- #if yesno teras mulangkeun parameter asupanna local frame = mw.getCurrentFrame() print(frame:callParserFunction("#if", yesno("Yes"), "Yes", 'henteu')) print(frame:callParserFunction("#if", yesno('teu'), "Leres", 'teu')) </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="text" line start=5> Yes teu </syntaxhighlight></blockquote> # Tutup <code>Modul:</code>Yesno anu dijaga anu tetep '''teu''' robah. == Request a script == Visit [[:en:Wikipedia talk:Lua]] to request help in writing a Lua script to perform a specific task on Wikipedia or another Wikimedia Foundation project. == History == [[mw:Manual:MediaWiki architecture#Magic words and templates|Sordid history]]. [[mw:Help:Extension:ParserFunctions|ParserFunctions]], [[mw:Extension:Lua|Lua extension]], wiki scripting language debated (JavaScript v. Lua), [[mw:Extension:WikiScripts]], Tim writes [[mw:Extension:Scribunto|Scribunto]] with initial support for Lua. Discussed for years, Lua was installed in 2012 for testing on [[test2wiki:|test2.wikipedia.org]], with open invitation to all editors to experiment with developing Lua modules. Lua was installed on the English Wikipedia in February 2013, after testing on mediawiki.org and Wikimedia test wikis. == About Lua == :''See also [[:File:WMF Tech Talk 2013-02-28 slides - Scribunto presentation.pdf|Brad Jorsch's short presentation for a basic example of how to convert a wikitext template into a Lua module.]]'' Lua is a scripting language which can be used to analyze data, calculate expressions, and format results using functions or object-oriented programming. Although some Lua scripts can be kept simple, for easy understanding, Lua allows complex structures including tables, dynamic functions, and associative arrays where index subscripts can be words as well as index numbers. Lua also supports recursion of re-nested functions, so care should be taken to avoid excessive complexity where other users would not understand how to maintain a Lua module. The following is an example of Lua source code for the <code>hello</code> function contained in [[Modul:Bananas]]: <syntaxhighlight lang="lua" line highlight=3> --[[Modul:Bananas]]-- local p = {} -- tabel modul nu diperlukeun, diinisialisasi minangka tabel kosong function p.hello() -- Nangtukeun fungsi hello. return "Hello, world!" -- Mulangkeun hasil fungsi dina wangun string. end -- Ahir fungsi. return p -- Mulangkeun tabel modul. </syntaxhighlight> A sample of Lua is highlighted by tag <code><nowiki><syntaxhighlight lang="lua" line highlight=1 copy> ... </syntaxhighlight></nowiki></code> placed around the Lua source code. For instructions on how to use Lua within MediaWiki (and hence Wikipedia), see [[mw:Extension:Scribunto/Lua reference manual]]. == Unit testing == A unit testing framework for Lua scripts on Wikipedia is available at [[Modul:ScribuntoUnit]].<br /> It allows you to execute your script on a given set of inputs and verify that the expected outputs are produced.<br /> Unit tests are especially useful for rapidly detecting regressions, where modifications to a script introduce new problems. By convention, unit tests for a module like [[Modul:Bananas]] are placed in <syntaxhighlight lang="lua" inline>Modul:</syntaxhighlight> <code>Bananas</code>'''<code>/testcases</code>'''.<br /> They are executed on [[Pembicaraan Modul:Bananas/testcases]] with <syntaxhighlight lang="lua" inline>{{#invoke:Bananas/testcases|</syntaxhighlight>'''<code>run</code>'''<syntaxhighlight lang="lua" inline>}}</syntaxhighlight>. Dina kaca pamaké anjeun: <blockquote><syntaxhighlight lang="wikitext" line highlight=1 copy> {{#invoke:Bananas/testcases|run}} </syntaxhighlight></blockquote> <blockquote> {{#invoke:Bananas/testcases|run}} </blockquote> Each test method must begin with <syntaxhighlight lang="lua" inline>p:</syntaxhighlight>'''<code>test_</code>'''. An example from [[Modul:Bananas/testcases]] is below. <syntaxhighlight lang="lua" line highlight=4 copy> --[[Modul:Bananas/testcases]]-- local p = require('Modul:ScribuntoUnit').new() local modCau = require('Modul:Bananas') -- Didatangan kaca obrolan pikeun ngajalankeun tés. function p:test_halo() -- Tés unit pikeun [[Modul:Bananas]]. self:assertEquals('Hello, world!', modCau.hello()) end return p </syntaxhighlight> {{collapse top|title=Prinsip uji hijian}} Di konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=10 copy> local self = { assertEquals = function(_, wikitext, expected) local got = mw.getCurrentFrame():preprocess(wikitext) print('"' .. expected .. '": Diarepkeun') print('"' .. got .. '": Saleresna') return got == expected end } -- Pamisah `:` tanpa `self` print(self:assertEquals( '{{#invoke:Bananas|hello}}', 'Hello, world!')) -- Pamisah `.` jeung `self` print(self.assertEquals(self, '{{#invoke:Bananas|hello}}', 'Hello, world!')) </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="lua" line start=13> "Hello, world!": Diarepkeun "Hello, world!": Sakuduna true "Hello, world!": Diarepkeun "Hello, world!": Sakuduna true </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="lua" line highlight=2 copy> local modTest = require('Modul:Bananas/testcases') print(modTest.run(mw.getCurrentFrame())) </syntaxhighlight></blockquote> Lamun tésna hasil, nilai anu diarepkeun jeung nilai sabenerna teu dipintonkeun supaya tabel hasil jadi leuwih basajan: <blockquote><syntaxhighlight lang="lua" line start=3> [[File:Yes check.svg|20px|alt=Ya|link=]]<span style="display:none">Y</span> Sakabéh tés lulus. {| class="wikitable scribunto-test-table" ! ! Ngaran ! Diarepkeun ! Saleresna |- | [[File:Yes check.svg|20px|alt=Ya|link=]]<span style="display:none">Y</span> | test_halo | | |} </syntaxhighlight></blockquote> Ngajalankeun [[Modul:ScribuntoUnit]] langsung dina [[Modul:Bananas]] tanpa nyimpen [[Modul:Bananas/testcases]]: <blockquote><syntaxhighlight lang="lua" line highlight=1,3 copy> local modTest = require('Modul:ScribuntoUnit').new() local modCau = require('Modul:Bananas') function modTest:test_halo() self:assertEquals('Hello, world!', modCau.hello()) end print(modTest.run(mw.getCurrentFrame())) </syntaxhighlight></blockquote> HTML anu dihasilkeun sarua. {{collapse bottom}} [[Modul:ScribuntoUnit]] originates from Hungarian Wikipedia.<br /> It throws real errors that are trapped using protected calls. It also has a method to compare floats within a given precision. Pikeun daptar sakabéh modul nu ngagunakeun tés unit, tingali [[Husus:NumbuKaDieu/Modul:ScribuntoUnit|nu dipaké]]. == Wikipedia-specific features == Overall: Lua can only get input as text strings passed to the <code><nowiki>{{#invoke:}}</nowiki></code> and what can be fetched via <code>[[mw:Extension:Scribunto/Lua reference manual#mw.title.new|mw.title.new(...)]]:getContent()</code> and <code>[[mw:Extension:Scribunto/Lua reference manual#frame:expandTemplate|frame:expandTemplate()]]</code>. Lua output will not be preprocessed unless <code>frame:</code>'''<code>[[mw:Extension:Scribunto/Lua reference manual#frame:preprocess|preprocess()]]</code>''' is explicitly called, meaning that template calls and parser functions in the output will not work correctly. Langkung hade ngagunakeun fungsi '''<code>[[mw:Extension:Scribunto/Lua reference manual#mw.ustring.len|mw.ustring.len]]</code>''' tibatan <code>[[mw:Extension:Scribunto/Lua reference manual#string.len|string.len]]</code>: Di konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=2,8 copy> --[[Alfabét Latin]]-- local content_lang = mw.getContentLanguage().code -- su local lang = mw.getCurrentFrame():callParserFunction("#language", content_lang) local lenUnicode, lenByte, lenSharp = mw.ustring.len(lang), string.len(lang), #lang print(("lang: \"%s\". Mw.ustring.len = %d String.len = %d Sharp = %d"):format(lang, lenUnicode, lenByte, lenSharp)) --[[Unicode]]-- lang = "اَكسارا ڤَيڮَون" -- Aksara Pégon lenUnicode, lenByte, lenSharp = mw.ustring.len(lang), string.len(lang), #lang print(("lang: \"%s\". Mw.ustring.len = %d String.len = %d Sharp = %d"):format(lang, lenUnicode, lenByte, lenSharp)) </syntaxhighlight></blockquote> <code>Konsol debug</code> ngarojong Unicode, tapi henteu ngarojong téks katuhu-ka-kenca: <blockquote><syntaxhighlight lang="text" line start=11> lang: "Sunda". Mw.ustring.len = 5 String.len = 5 Sharp = 5 lang: "اَكسارا ڤَيڮَون". Mw.ustring.len = 15 String.len = 29 Sharp = 29 </syntaxhighlight></blockquote> {| class="wikitable" ![[Alfabét Latin]] !Aksara !Arah !Jumlah karakter !Panjang dina bait |- |'''Sunda''' |[[Basa Sunda]]. |→ kenca ka katuhu. |5 |5 |- |[[Hurup Pégon]] |style="direction:rtl; text-align:right;" |'''اَكسارا ڤَيڮَون'''. |← '''Katuhu''' ka kenca |'''15''' ('''[[Unicode]]''') + 1 titik |<span style="color:red;">29</span> + 1 |} {{#invoke:Utf8debug|ek|اَكسارا ڤَيڮَون.}} Lua code in a wiki page is limited to '''10 s'''econds CPU time (you can look in the source code of a rendered page to see how long a template or module took to parse). Relative to standard Lua, Scribunto offers safe functions (see the [[mw:Extension:Scribunto/Lua reference manual#Differences from standard Lua|differences]] from standard Lua). === Lua input limitations === Lua code in Scribunto is only run when the page is being parsed. Therefore, the only user input that Lua can receive is by ''page editing'' - it cannot create an input box that allows you to type a Fahrenheit temperature and get back the corresponding Celsius temperature when you press a button, or recalculate a piece of the Mandelbrot set depending on which part of the parent set you click on. Dina konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=1 copy> local function toCelsius(tempFahrenheit) return (tempFahrenheit - 32) * 5 / 9 end print(("toCelsius(32°F) = %s°C. toCelsius(68°F) = %d°C"):format(toCelsius(32), toCelsius(68))) </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="text" line start=3> toCelsius(32°F) = 0°C. toCelsius(68°F) = 20°C </syntaxhighlight></blockquote> The Lua input can be any Wikipedia text page that can be transcluded (included on another page). This does ''not'' include graphics files (not even .SVG files, although they are actually text, unless you cut and paste it onto a Wiki text page), the list of pages listed in a [[:Kategori:Lua-based templates|category]], nor the contents of [[Wikipedia:Transclusion#Special pages|non-transcludeable]] [[Husus:IndeksAwalan/Modul:|special pages]]. === Wikitext === Transcluded Wikipedia headers frequently contain a hidden code such as <syntaxhighlight lang="lua" inline>"UNIQ5ae8f2aa414ff233-h-3--QINU"</syntaxhighlight> which may need to be stripped out in order for them to be parsed effectively. <blockquote><syntaxhighlight lang="lua" line highlight=1 copy> print(string.reverse("UNIQ")) -- Urutan sabalikna tina "UNIQ" nyaéta "QINU" </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="lua" line start=2> QINU </syntaxhighlight></blockquote> Wikilinks of the type <code><nowiki>[[Wikipedia:Pitulung</nowiki></code>'''<code><nowiki>|</nowiki></code>'''<code><nowiki>]]</nowiki></code> won't work if returned as output - they need to be written explicitly as <syntaxhighlight lang="lua" inline>[[Wikipedia:Pitulung|</syntaxhighlight>'''<code><nowiki>Pitulung</nowiki></code>'''<syntaxhighlight lang="lua" inline>]]</syntaxhighlight>. Other pre-save transforms, such as replacing <code>~~<nowiki/>~~</code> with signatures, will also fail to be processed. Template transclusions, parser function calls, and variable substitutions (i.e. anything with a <code><nowiki>{{...}}</nowiki></code>) will not be processed, nor will tags such as {{tag|ref|o}} or {{tag|nowiki|o}}. === Debugging === ; Galat nu katingali dina kaca Kaca wiki [[Jatisura, Cikedung, Indramayu]] ngahasilkeun dua galat: {{collapse top|title=Modul:Navbar Judul teu valid}} <blockquote>{{:Jatisura, Cikedung, Indramayu}}</blockquote> # [[Citakan:Kotakinfo Kalurahan]] nyaur [[Citakan:Infobox settlement]] ku parameter nu teu dipikawanoh <code>|coordinates_display=</code> jeung <code>|other_code_type=</code> (pratayang). # Galat Lua dina Modul:Navbar di baris 58: Judul teu valid , {{{kota}}}. ; Ngurangan masalah Pikeun misahkeun galat Lua, uji [[Citakan:Cikedung, Indramayu]]: <blockquote>{{Cikedung, Indramayu}}</blockquote> Daptar 17 kaca nu kapangaruhan ku ieu masalah: [[Husus:NumbuKaDieu/Citakan:Cikedung, Indramayu]] ; Ngaréka ulang dina <code>Modul:</code>Yesno Dina konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=1 copy> local wikitext="{{Cikedung, Indramayu}}" print(mw.getCurrentFrame():preprocess(wikitext)) </syntaxhighlight></blockquote> <blockquote><syntaxhighlight lang="lua" line start=3> <strong class="error"><span class="scribunto-error mw-scribunto-error-e20d3541">Lua error in Modul:Navbar at line 58: Invalid title , {{{kota}}}.</span></strong> </syntaxhighlight></blockquote> ; Mariksa <code>Modul:</code>Navbar Kode patali dina [[Modul:Navbar#L-58]] nyaéta: <blockquote><syntaxhighlight lang="lua" line start=54 highlight=5> local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end </syntaxhighlight></blockquote> Nambahkeun tanda petik dina <code>title_text</code> mah ''opsional'' pikeun ngagampangkeun pesen galat. # Pasang <code>title_text</code> dina tanda petik. # PANGJAOAN: '''<span style="color:red;">ULAH</span>''' ngaklik "<s><code>Pedalkeun parobahan</code></s>" ("<s><code>Publish changes</code></s>"). <blockquote><syntaxhighlight lang="lua" line start=54 highlight=4> local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. "\"" .. title_text .. "\"") error(cfg.invalid_title .. title_text) end </syntaxhighlight></blockquote> ; Uji dina preview Dina kaca preview, pake template ieu: # Témpélkeun <code>Pratayang halaman dengan templat ini</code> (caller template): <blockquote><syntaxhighlight lang="lua" line highlight=1 copy>Jatisura, Cikedung, Indramayu</syntaxhighlight></blockquote> # Klik <code>Lihat pratayang</code> (Show preview) Pesen galat jadi: <blockquote><syntaxhighlight lang="lua" line start=2> Lua error in Modul:Navbar at line 57: Invalid title ", {{{kota}}}". </syntaxhighlight></blockquote> Ieu nuduhkeun yén koma <syntaxhighlight lang="lua" inline>", "</syntaxhighlight> aya dina judul nu salah, nyaéta <code>, {{{kota}}}</code>. ; Ngalenyepan caller Pikeun nyaho template nu nelepon, lebetkeun: <blockquote><syntaxhighlight lang="lua" line start=54 highlight=4> local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error("Caller: \"" .. mw.getCurrentFrame():getParent():getTitle() .. "\"") error(cfg.invalid_title .. title_text) end </syntaxhighlight></blockquote> Sanggeus <code>then</code>, témpélkeun: <blockquote><syntaxhighlight lang="lua" line start=57 highlight=1 copy> error("Caller: \"" .. mw.getCurrentFrame():getParent():getTitle() .. "\"") </syntaxhighlight></blockquote> Pesen galat jadi: <blockquote><syntaxhighlight lang="lua" line start=2> Lua error in Modul:Navbar at line 57: Caller: "Citakan:Navbox". </syntaxhighlight></blockquote> ; Akar masalah [[Citakan:kac-2]] dialihkeun ka [[Citakan:Navigasi ID Desa]], jadi bugna lain dina modul Lua, tapi dina parameter nu dipake ku caller. Dina konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=1 copy> local wikitext="{{kac-2 |propinsi=Jawa Barat |dati2=Kabupatén |nami dati2=Indramayu}}" print(mw.getCurrentFrame():preprocess(wikitext)) </syntaxhighlight></blockquote> Parameter Sunda <code>|nami dati2=</code> teu dipaliré sabab modul Lua ngarepkeun ngaran parameter dina basa Indonésia: <blockquote><syntaxhighlight lang="lua" line start=2> <strong class="error"><span class="scribunto-error mw-scribunto-error-e20d3541">Lua error in Modul:Navbar at line 58: Invalid title , {{{kota}}}.</span></strong> </syntaxhighlight></blockquote> Perhatikeun koma <syntaxhighlight lang="lua" inline>", "</syntaxhighlight> dituturkeun ku <code>{{{kota}}}</code>. [[Citakan:Navigasi ID Desa]] dimimitian ku: <blockquote><syntaxhighlight lang="lua" line highlight=3> <noinclude>{{gabungdari|Navigasi kampung}}</noinclude> {{Navbox |name = {{{name<includeonly>|{{{nama kecamatan|{{{kecamatan|{{{distrik|{{{kapanewon|{{{kemantren|}}}}}}}}}}}}}}}, {{{nama dati2|{{{kabupaten|{{{kota}}}}}}}}}</includeonly><noinclude>|Navigasi ID Desa</noinclude>}}} </syntaxhighlight></blockquote> Jadi nilai standar <code>|name=</code> jadi runtah nu teu disangka, nyaéta <code>, {{{kota}}}</code>. # Upami argumén <code>kemantren</code> ditetepkeun, mulangkeun nilaina; upami henteu, mulangkeun runtuyan kosong. # Ngahasilkeun koma tuluy spasi. # Upami argumén <code>nama dati2</code> ditetepkeun, mulangkeun nilaina; # upami henteu, upami <code>kabupaten</code> ditetepkeun, mulangkeun nilaina; upami henteu, mulangkeun <code>{{{kota}}}</code> Dina konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=1 copy> local wikitext="{{{kemantren|}}}, {{{nama dati2|{{{kabupaten|{{{kota}}}}}}}}}" print(mw.getCurrentFrame():preprocess(wikitext)) </syntaxhighlight></blockquote> Henteu aya argumén anu ditetepkeun. <blockquote><syntaxhighlight lang="lua" line start=3> , {{{kota}}} </syntaxhighlight></blockquote> ; Pemetaan parameter Sintésis {| class="wikitable" ! Sunda ! Indonésia ! Inggris |- | nami | nama | name |- | propinsi | provinsi | province |- | nami kacamatan | nama kecamatan | name of the district |- | [[Citakan:Kotakinfo_Kalurahan#:~:text=nami|Citakan:Kotakinfo Kalurahan]] | [[Citakan:Navigasi ID Desa]] | [[Citakan:Navbox#:~:text=name|Citakan:Navbox]] |} ; Solusi Pake ngaran parameter basa Indonésia dina caller supaya teu kudu ngarobah modul Lua: <blockquote><syntaxhighlight lang="lua" line highlight=1 copy> local wikitext="{{kac-2 |provinsi=Jawa Kulon |dati2=Kabupatén |kabupaten=Indramayu |nama kecamatan=Cikedung}}" print(mw.getCurrentFrame():preprocess(wikitext)) </syntaxhighlight></blockquote> HTML navbox hasilna hasil dibangkitkeun kalawan suksés: <blockquote><syntaxhighlight lang="lua" line start=3> <div class="navbox-styles"><DEL>'"`UNIQ--templatestyles-00000006-QINU`"'<DEL><DEL>'"`UNIQ--templatestyles-00000000-QINU`"'<DEL></div><div role="navigation" class="navbox" aria-labelledby="Kecamatan_Cikedung,_Kabupatén_Indramayu,_Jawa_Kulon" style="padding:3px"><table class="nowraplinks mw-collapsible manualcollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tr><th scope="col" class="navbox-title" colspan="2"><DEL>'"`UNIQ--templatestyles-00000002-QINU`"'<DEL><DEL>'"`UNIQ--templatestyles-00000004-QINU`"'<DEL><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-lihat">[[Citakan:Cikedung, Indramayu|<abbr title="Lihat templat ini">l</abbr>]]</li><li class="nv-bicara">[[Obrolan citakan:Cikedung, Indramayu|<abbr title="Diskusikan templat ini">b</abbr>]]</li><li class="nv-sunting">[//su.wikipedia.org/w/index.php?title=Citakan:Cikedung,_Indramayu&action=edit<abbr title="Sunting templat ini">s</abbr>]</li></ul></div><div id="Kecamatan_Cikedung,_Kabupatén_Indramayu,_Jawa_Kulon" style="font-size:114%;margin:0 4em">[[Cikedung, Indramayu|Kecamatan Cikedung]], [[Kabupatén Indramayu]], [[Jawa Kulon]]</div></th></tr></table></div> </syntaxhighlight></blockquote> [[Citakan:Cikedung, Indramayu]] dimimitian ku: <blockquote><syntaxhighlight lang="lua" line highlight=3> {{kac-2 |propinsi=Jawa Barat |dati2=Kabupatén |nami dati2=Indramayu |nami kacamatan=Cikedung}} </syntaxhighlight></blockquote> Dina konsol debug [[modul:Yesno]]: <blockquote><syntaxhighlight lang="lua" line highlight=2,4 copy> local frame = mw.getCurrentFrame() local argSundanese = {propinsi='Jawa Barat', dati2='Kabupatén', ["nami dati2"]='Indramayu', ["nami kacamatan"]='Cikedung'} print("1. KO: " .. frame:expandTemplate{title="kac-2", args=argSundanese}) -- fails local argIndonesian = {provinsi='Jawa Kulon', dati2='Kabupatén', kabupaten ='Indramayu', ["nama kecamatan"]='Cikedung'} print("2. OK: " .. frame:expandTemplate{title="kac-2", args=argIndonesian}) -- works </syntaxhighlight></blockquote> {{collapse bottom}} Dina kaca pamaké anjeun: <blockquote><syntaxhighlight lang="wikitext" line highlight=2 copy> 1. {{cross}}: {{kac-2 |propinsi=Jawa Barat |dati2=Kabupatén |nami dati2=Indramayu |nami kacamatan=Cikedung}}<br /> 2. {{tick}}: {{kac-2 |provinsi=Jawa Kulon |dati2=Kabupatén |kabupaten=Indramayu |nama kecamatan=Cikedung}} </syntaxhighlight></blockquote> <blockquote> 1. {{cross}}: {{kac-2 |propinsi=Jawa Barat |dati2=Kabupatén |nami dati2=Indramayu |nami kacamatan=Cikedung}}<br /> 2. {{tick}}: {{kac-2 |provinsi=Jawa Kulon |dati2=Kabupatén |kabupaten=Indramayu |nama kecamatan=Cikedung}} </blockquote> == Labeling converted templates == {{lua|Module:Bananas}} Please place the {{tl|lua}} template on the documentation subpage of all templates that use Lua. It will help to better communicate Lua usage and template conversions. {{clear}} == See also == * [[Husus:IndeksAwalan/Modul:]] daptar modul Lua * [[:Kategori:Lua-based templates]] &ndash; l-groups ta templates based kan Lua ; English Wikipedia-specific resources * [[:mw:Manual:Coding conventions/Lua]] &ndash; standards to improve the readability of code through consistency * [[:en:Help:Lua debugging]] &ndash; a how-to guide about debugging Lua modules * [[:en:Module:Sandbox]] provides a pseudo-namespace for experimenting with Lua modules * [[:en:Wikipedia talk:Lua]] &ndash; requests for Lua-based templates or tasks == Notes == {{reflist}} {{WikiProject Lua/header}} [[Category:Wikipedia modules]] 845bqo8pe4d5fkkmhw1qegxrn5uznlo Kategori:WikiRempah Makassar 14 108833 712449 2026-08-29T15:09:20Z Oceanmuse 22609 Nyieun kaca anyar WikiRempah Makassar nyaéta inisiatip nu didukung oleh Wikimedia Foundation, dina prakna ngajakan kontributor ku cara kolaborasi kaasup jeung Komunitas Wikimedia Makassar, ngan pokus eusina kabéh dijieun ku Basa Sunda. 712449 wikitext text/x-wiki WikiRempah Makassar nyaéta inisiatip nu didukung oleh Wikimedia Foundation, dina prakna ngajakan kontributor ku cara kolaborasi kaasup jeung Komunitas Wikimedia Makassar, ngan pokus eusina kabéh dijieun ku Basa Sunda. dp6zb1uht10cwwjm8b5jsw324foydfs Masjid 99 Kubah 0 108834 712452 2026-08-30T04:11:42Z Oceanmuse 22609 Nyieun kaca anyar Masjid 99 Kubah, atawa anu leuwih dipikawanoh ku ngaran Masjid 99 Asmaulhusna, nyaéta salah sahiji masjid anu miboga wangunan kacida artistikna sarta geus jadi ikon di Kota Makassar, Provinsi Sulawesi Selatan, Indonesia. Ieu masjid mimiti diwangun taun 2017, tuluy diresmikeun taun 2023. Perenahna aya di wewengkon Center Point of Indonesia (CPI), Tanjung Bunga.<ref>{{Cite web|url=https://dandapala.com/photo|title=Melihat Keindahan Masjid 99 Kubah, Ikon Baru di Makassar|web... 712452 wikitext text/x-wiki Masjid 99 Kubah, atawa anu leuwih dipikawanoh ku ngaran Masjid 99 Asmaulhusna, nyaéta salah sahiji masjid anu miboga wangunan kacida artistikna sarta geus jadi ikon di Kota Makassar, Provinsi Sulawesi Selatan, Indonesia. Ieu masjid mimiti diwangun taun 2017, tuluy diresmikeun taun 2023. Perenahna aya di wewengkon Center Point of Indonesia (CPI), Tanjung Bunga.<ref>{{Cite web|url=https://dandapala.com/photo|title=Melihat Keindahan Masjid 99 Kubah, Ikon Baru di Makassar|website=www.dandapala.com|accessdate=2026-08-30}}</ref> Masjid 99 Kubah kaasup salah sahiji masjid panggedéna di Sulawesi sarta wangunanna diwangun dua tingkat. Dina prosés pangwangunanana gé waragad anu diperlukeun henteu saeutik. Tina sababaraha sumber disebutkeun yén masjid anu pinuh ku rupa-rupa warna ieu méakkeun waragad leuwih ti 160 miliar rupiah.<ref>{{Cite web|url=https://immim.id/masjid/259|title=SISTEM INFORMASI MASJID dan MUBALLIGH/MUBALLIGHAT|website=immim.id|accessdate=2026-08-30}}</ref> Lian ti waragadna anu gedé, waktu anu diperlukeun pikeun ngawangunna gé cukup lila, lantaran wangunan jeung ornaménna kacida jéntré tur rumitna. Rarancang arsitéktur ieu masjid dijieun ku Ridwan Kamil, anu harita dipikawanoh minangka Gubernur Jawa Barat. Konsep wangunanna ngahijikeun gaya klasik modéren jeung futuristik, ditambahan ku wangunna anu matak narik panon. Téma anu diusung nyaéta Asmaulhusna, anu tuluy diwujudkeun dina jumlah kubahna anu aya 99. Dina prosés ngarancangna, Ridwan Kamil gawé bareng jeung arsiték lokal anu ngaranna Muhammad Mursif. Saméméh pangwangunan dimimitian, arsiték satempat ogé kungsi patepung langsung jeung Ridwan Kamil pikeun nyaluyukeun rarancang anu rék dipaké. Tina hasil éta rundingan, ahirna dipilih desain masjid anu maké 99 kubah. Ieu nu ngajadikeun Masjid 99 Kubah béda pisan jeung masjid-masjid séjén anu ilahar kapanggih. lkhdz00870v0nbtjn08n8vomcy4fv9t 712453 712452 2026-08-30T04:11:56Z Oceanmuse 22609 712453 wikitext text/x-wiki Masjid 99 Kubah, atawa anu leuwih dipikawanoh ku ngaran Masjid 99 Asmaulhusna, nyaéta salah sahiji masjid anu miboga wangunan kacida artistikna sarta geus jadi ikon di Kota Makassar, Provinsi Sulawesi Selatan, Indonesia. Ieu masjid mimiti diwangun taun 2017, tuluy diresmikeun taun 2023. Perenahna aya di wewengkon Center Point of Indonesia (CPI), Tanjung Bunga.<ref>{{Cite web|url=https://dandapala.com/photo|title=Melihat Keindahan Masjid 99 Kubah, Ikon Baru di Makassar|website=www.dandapala.com|accessdate=2026-08-30}}</ref> Masjid 99 Kubah kaasup salah sahiji masjid panggedéna di Sulawesi sarta wangunanna diwangun dua tingkat. Dina prosés pangwangunanana gé waragad anu diperlukeun henteu saeutik. Tina sababaraha sumber disebutkeun yén masjid anu pinuh ku rupa-rupa warna ieu méakkeun waragad leuwih ti 160 miliar rupiah.<ref>{{Cite web|url=https://immim.id/masjid/259|title=SISTEM INFORMASI MASJID dan MUBALLIGH/MUBALLIGHAT|website=immim.id|accessdate=2026-08-30}}</ref> Lian ti waragadna anu gedé, waktu anu diperlukeun pikeun ngawangunna gé cukup lila, lantaran wangunan jeung ornaménna kacida jéntré tur rumitna. Rarancang arsitéktur ieu masjid dijieun ku Ridwan Kamil, anu harita dipikawanoh minangka Gubernur Jawa Barat. Konsep wangunanna ngahijikeun gaya klasik modéren jeung futuristik, ditambahan ku wangunna anu matak narik panon. Téma anu diusung nyaéta Asmaulhusna, anu tuluy diwujudkeun dina jumlah kubahna anu aya 99. Dina prosés ngarancangna, Ridwan Kamil gawé bareng jeung arsiték lokal anu ngaranna Muhammad Mursif. Saméméh pangwangunan dimimitian, arsiték satempat ogé kungsi patepung langsung jeung Ridwan Kamil pikeun nyaluyukeun rarancang anu rék dipaké. Tina hasil éta rundingan, ahirna dipilih desain masjid anu maké 99 kubah. Ieu nu ngajadikeun Masjid 99 Kubah béda pisan jeung masjid-masjid séjén anu ilahar kapanggih. [[Category:WikiRempah]] [[Category:WikiRempah Makassar]] 8nquz1gy8xzt80lpsoc4lbyfm6zytup 712454 712453 2026-08-30T04:12:56Z Oceanmuse 22609 712454 wikitext text/x-wiki Masjid 99 Kubah, atawa anu leuwih dipikawanoh ku ngaran Masjid 99 Asmaulhusna, nyaéta salah sahiji masjid anu miboga wangunan kacida artistikna sarta geus jadi ikon di Kota Makassar, Provinsi Sulawesi Selatan, Indonesia. Ieu masjid mimiti diwangun taun 2017, tuluy diresmikeun taun 2023. Perenahna aya di wewengkon Center Point of Indonesia (CPI), Tanjung Bunga.<ref>{{Cite web|url=https://dandapala.com/photo|title=Melihat Keindahan Masjid 99 Kubah, Ikon Baru di Makassar|website=www.dandapala.com|accessdate=2026-08-30}}</ref> Masjid 99 Kubah kaasup salah sahiji masjid panggedéna di Sulawesi sarta wangunanna diwangun dua tingkat. Dina prosés pangwangunanana gé waragad anu diperlukeun henteu saeutik. Tina sababaraha sumber disebutkeun yén masjid anu pinuh ku rupa-rupa warna ieu méakkeun waragad leuwih ti 160 miliar rupiah.<ref>{{Cite web|url=https://immim.id/masjid/259|title=SISTEM INFORMASI MASJID dan MUBALLIGH/MUBALLIGHAT|website=immim.id|accessdate=2026-08-30}}</ref> Lian ti waragadna anu gedé, waktu anu diperlukeun pikeun ngawangunna gé cukup lila, lantaran wangunan jeung ornaménna kacida jéntré tur rumitna. Rarancang arsitéktur ieu masjid dijieun ku Ridwan Kamil, anu harita dipikawanoh minangka Gubernur Jawa Barat.<ref name=":0">{{Cite web|url=https://www.masjidnusantara.org/8-fakta-menarik-dari-masjid-99-kubah-di-makassar/|title=8 Fakta Menarik dari Masjid 99 Kubah di Makassar|last=Kiki|website=Masjid Nusantara|language=en-US|accessdate=2026-08-30}}</ref> Konsep wangunanna ngahijikeun gaya klasik modéren jeung futuristik, ditambahan ku wangunna anu matak narik panon. Téma anu diusung nyaéta Asmaulhusna, anu tuluy diwujudkeun dina jumlah kubahna anu aya 99.<ref name=":0" /> Dina prosés ngarancangna, Ridwan Kamil gawé bareng jeung arsiték lokal anu ngaranna Muhammad Mursif. Saméméh pangwangunan dimimitian, arsiték satempat ogé kungsi patepung langsung jeung Ridwan Kamil pikeun nyaluyukeun rarancang anu rék dipaké. Tina hasil éta rundingan, ahirna dipilih desain masjid anu maké 99 kubah. Ieu nu ngajadikeun Masjid 99 Kubah béda pisan jeung masjid-masjid séjén anu ilahar kapanggih. == Rujukan == [[Category:WikiRempah]] [[Category:WikiRempah Makassar]] r1nuq5k2nw2sv2jkye62k4ysmnvxydx 712455 712454 2026-08-30T04:15:03Z Oceanmuse 22609 712455 wikitext text/x-wiki Masjid 99 Kubah, atawa anu leuwih dipikawanoh ku ngaran Masjid 99 Asmaulhusna, nyaéta salah sahiji masjid anu miboga wangunan kacida artistikna sarta geus jadi ikon di Kota Makassar, Provinsi Sulawesi Selatan, Indonesia. Ieu masjid mimiti diwangun taun 2017, tuluy diresmikeun taun 2023. Perenahna aya di wewengkon Center Point of Indonesia (CPI), Tanjung Bunga.<ref>{{Cite web|url=https://dandapala.com/photo|title=Melihat Keindahan Masjid 99 Kubah, Ikon Baru di Makassar|website=www.dandapala.com|accessdate=2026-08-30}}</ref> Masjid 99 Kubah kaasup salah sahiji masjid panggedéna di Sulawesi sarta wangunanna diwangun dua tingkat. Dina prosés pangwangunanana gé waragad anu diperlukeun henteu saeutik. Tina sababaraha sumber disebutkeun yén masjid anu pinuh ku rupa-rupa warna ieu méakkeun waragad leuwih ti 160 miliar rupiah.<ref>{{Cite web|url=https://immim.id/masjid/259|title=SISTEM INFORMASI MASJID dan MUBALLIGH/MUBALLIGHAT|website=immim.id|accessdate=2026-08-30}}</ref> Lian ti waragadna anu gedé, waktu anu diperlukeun pikeun ngawangunna gé cukup lila, lantaran wangunan jeung ornaménna kacida jéntré tur rumitna. Rarancang arsitéktur ieu masjid dijieun ku Ridwan Kamil, anu harita dipikawanoh minangka Gubernur Jawa Barat.<ref name=":0">{{Cite web|url=https://www.masjidnusantara.org/8-fakta-menarik-dari-masjid-99-kubah-di-makassar/|title=8 Fakta Menarik dari Masjid 99 Kubah di Makassar|last=Kiki|website=Masjid Nusantara|language=en-US|accessdate=2026-08-30}}</ref> Konsep wangunanna ngahijikeun gaya klasik modéren jeung futuristik, ditambahan ku wangunna anu matak narik panon. Téma anu diusung nyaéta Asmaulhusna, anu tuluy diwujudkeun dina jumlah kubahna anu aya 99.<ref name=":0" /> Dina prosés ngarancangna, Ridwan Kamil gawé bareng jeung arsiték lokal anu ngaranna Muhammad Mursif. Saméméh pangwangunan dimimitian, arsiték satempat ogé kungsi patepung langsung jeung Ridwan Kamil pikeun nyaluyukeun rarancang anu rék dipaké. Tina hasil éta rundingan, ahirna dipilih desain masjid anu maké 99 kubah. Ieu nu ngajadikeun Masjid 99 Kubah béda pisan jeung masjid-masjid séjén anu ilahar kapanggih. == Pakta unik == Susunan kubahna ngawengku hiji kubah utama sarta sababaraha kubah séjén anu ukuranana leuwih leutik. Kubah-kubah kasebut ngagunakeun sababaraha warna, di antarana konéng, jingga, coklat, bodas, jeung beureum. Wangunan masjid dirarancang kalayan konsép rohangan kabuka sarta sirkulasi hawa alami. Sistem ieu dimaksudkeun pikeun ngurangan kabutuhan kana alat pangatur hawa di jero wangunan.<ref name=":1">{{Cite web|url=https://www.masjidnusantara.org/8-fakta-menarik-dari-masjid-99-kubah-di-makassar/|title=8 Fakta Menarik dari Masjid 99 Kubah di Makassar|last=Kiki|website=Masjid Nusantara|language=en-US|accessdate=2026-08-30}}</ref> Dina widang arsitéktur masjid, Ridwan Kamil ogé kungsi ngarancang sababaraha masjid séjén di Indonésia, di antarana Masjid Al-Irsyad di Padalarang, Masjid Al-Safar di ruas Tol Cipularang, sarta Masjid Al-Jabbar di Bandung. Masjid 99 Kubah diwangun di wewengkon hasil réklamasi basisir di Makassar sarta kaasup kana kawasan Center Point of Indonesia. Lokasina aya di wewengkon basisir anu padeukeut jeung Pantai Losari. Dumasar kana rarancang kapasitasna, bagian jero masjid direncanakeun bisa nampung kira-kira 5.000 jamaah. Ari bagian palataranna dirarancang pikeun nampung nepi ka kira-kira 10.000 jamaah. Pangwangunan Masjid 99 Kubah ngagunakeun waragad tina Anggaran Pendapatan jeung Belanja Daérah Sulawesi Selatan. Dumasar kana katerangan Kepala Dinas Cipta Karya jeung Tata Ruang Sulawesi Selatan waktu éta, Andi Darmawan, total waragad pangwangunan kungsi diperkirakeun ngahontal Rp185 miliar.<ref name=":1" /> Di palataran Masjid 99 Kubah ogé aya fasilitas cai mancur. Fasilitas ieu diresmikeun ku Gubernur Sulawesi Selatan dina April 2018. Cai mancurna dirarancang bisa nyemprotkeun cai nepi ka jangkungna kira-kira 17 méter sarta dilengkepan ku tujuh rupa warna cahaya anu bisa robah saluyu jeung musik anu diputer.<ref name=":1" /> == Rujukan == [[Category:WikiRempah]] [[Category:WikiRempah Makassar]] bq6kw4xdi0dp6dnlyh0zqpjdzx934ad 712456 712455 2026-08-30T04:15:46Z Oceanmuse 22609 712456 wikitext text/x-wiki Masjid 99 Kubah, atawa anu leuwih dipikawanoh ku ngaran Masjid 99 Asmaulhusna, nyaéta salah sahiji masjid anu miboga wangunan kacida artistikna sarta geus jadi ikon di Kota Makassar, Provinsi Sulawesi Selatan, Indonesia. Ieu masjid mimiti diwangun taun 2017, tuluy diresmikeun taun 2023. Perenahna aya di wewengkon Center Point of Indonesia (CPI), Tanjung Bunga.<ref>{{Cite web|url=https://dandapala.com/photo|title=Melihat Keindahan Masjid 99 Kubah, Ikon Baru di Makassar|website=www.dandapala.com|accessdate=2026-08-30}}</ref> Masjid 99 Kubah kaasup salah sahiji masjid panggedéna di Sulawesi sarta wangunanna diwangun dua tingkat. Dina prosés pangwangunanana gé waragad anu diperlukeun henteu saeutik. Tina sababaraha sumber disebutkeun yén masjid anu pinuh ku rupa-rupa warna ieu méakkeun waragad leuwih ti 160 miliar rupiah.<ref>{{Cite web|url=https://immim.id/masjid/259|title=SISTEM INFORMASI MASJID dan MUBALLIGH/MUBALLIGHAT|website=immim.id|accessdate=2026-08-30}}</ref> Lian ti waragadna anu gedé, waktu anu diperlukeun pikeun ngawangunna gé cukup lila, lantaran wangunan jeung ornaménna kacida jéntré tur rumitna. Rarancang arsitéktur ieu masjid dijieun ku Ridwan Kamil, anu harita dipikawanoh minangka Gubernur Jawa Barat.<ref name=":0">{{Cite web|url=https://www.masjidnusantara.org/8-fakta-menarik-dari-masjid-99-kubah-di-makassar/|title=8 Fakta Menarik dari Masjid 99 Kubah di Makassar|last=Kiki|website=Masjid Nusantara|language=en-US|accessdate=2026-08-30}}</ref> Konsep wangunanna ngahijikeun gaya klasik modéren jeung futuristik, ditambahan ku wangunna anu matak narik panon. Téma anu diusung nyaéta Asmaulhusna, anu tuluy diwujudkeun dina jumlah kubahna anu aya 99.<ref name=":0" /> Dina prosés ngarancangna, Ridwan Kamil gawé bareng jeung arsiték lokal anu ngaranna Muhammad Mursif. Saméméh pangwangunan dimimitian, arsiték satempat ogé kungsi patepung langsung jeung Ridwan Kamil pikeun nyaluyukeun rarancang anu rék dipaké. Tina hasil éta rundingan, ahirna dipilih desain masjid anu maké 99 kubah. Ieu nu ngajadikeun Masjid 99 Kubah béda pisan jeung masjid-masjid séjén anu ilahar kapanggih. == Pakta unik == Susunan kubahna ngawengku hiji kubah utama sarta sababaraha kubah séjén anu ukuranana leuwih leutik. Kubah-kubah kasebut ngagunakeun sababaraha warna, di antarana konéng, jingga, coklat, bodas, jeung beureum. Wangunan masjid dirarancang kalayan konsép rohangan kabuka sarta sirkulasi hawa alami. Sistem ieu dimaksudkeun pikeun ngurangan kabutuhan kana alat pangatur hawa di jero wangunan.<ref name=":1">{{Cite web|url=https://www.liputan6.com/lifestyle/read/5259715/6-fakta-menarik-masjid-99-kubah-makassar-yang-didesain-ramah-lingkungan-tetap-sejuk-tanpa-pendingin-ruangan|title=6 Fakta Menarik Masjid 99 Kubah Makassar yang Didesain Ramah Lingkungan, Tetap Sejuk Tanpa Pendingin Ruangan|last=Liputan6.com|website=liputan6.com|language=id|accessdate=2026-08-30}}</ref> Dina widang arsitéktur masjid, Ridwan Kamil ogé kungsi ngarancang sababaraha masjid séjén di Indonésia, di antarana Masjid Al-Irsyad di Padalarang, Masjid Al-Safar di ruas Tol Cipularang, sarta Masjid Al-Jabbar di Bandung. Masjid 99 Kubah diwangun di wewengkon hasil réklamasi basisir di Makassar sarta kaasup kana kawasan Center Point of Indonesia. Lokasina aya di wewengkon basisir anu padeukeut jeung Pantai Losari. Dumasar kana rarancang kapasitasna, bagian jero masjid direncanakeun bisa nampung kira-kira 5.000 jamaah. Ari bagian palataranna dirarancang pikeun nampung nepi ka kira-kira 10.000 jamaah. Pangwangunan Masjid 99 Kubah ngagunakeun waragad tina Anggaran Pendapatan jeung Belanja Daérah Sulawesi Selatan. Dumasar kana katerangan Kepala Dinas Cipta Karya jeung Tata Ruang Sulawesi Selatan waktu éta, Andi Darmawan, total waragad pangwangunan kungsi diperkirakeun ngahontal Rp185 miliar.<ref name=":1" /> Di palataran Masjid 99 Kubah ogé aya fasilitas cai mancur. Fasilitas ieu diresmikeun ku Gubernur Sulawesi Selatan dina April 2018. Cai mancurna dirarancang bisa nyemprotkeun cai nepi ka jangkungna kira-kira 17 méter sarta dilengkepan ku tujuh rupa warna cahaya anu bisa robah saluyu jeung musik anu diputer.<ref name=":1" /> == Rujukan == [[Category:WikiRempah]] [[Category:WikiRempah Makassar]] tgjezavwo1jixo6n3g8nh8xwj5zguy5 712457 712456 2026-08-30T04:16:24Z Oceanmuse 22609 712457 wikitext text/x-wiki [[Gambar:Masjid 99 Kubah (2025).jpg|jmpl|Masjid 99 Kubah, Makassar]] Masjid 99 Kubah, atawa anu leuwih dipikawanoh ku ngaran Masjid 99 Asmaulhusna, nyaéta salah sahiji masjid anu miboga wangunan kacida artistikna sarta geus jadi ikon di Kota Makassar, Provinsi Sulawesi Selatan, Indonesia. Ieu masjid mimiti diwangun taun 2017, tuluy diresmikeun taun 2023. Perenahna aya di wewengkon Center Point of Indonesia (CPI), Tanjung Bunga.<ref>{{Cite web|url=https://dandapala.com/photo|title=Melihat Keindahan Masjid 99 Kubah, Ikon Baru di Makassar|website=www.dandapala.com|accessdate=2026-08-30}}</ref> Masjid 99 Kubah kaasup salah sahiji masjid panggedéna di Sulawesi sarta wangunanna diwangun dua tingkat. Dina prosés pangwangunanana gé waragad anu diperlukeun henteu saeutik. Tina sababaraha sumber disebutkeun yén masjid anu pinuh ku rupa-rupa warna ieu méakkeun waragad leuwih ti 160 miliar rupiah.<ref>{{Cite web|url=https://immim.id/masjid/259|title=SISTEM INFORMASI MASJID dan MUBALLIGH/MUBALLIGHAT|website=immim.id|accessdate=2026-08-30}}</ref> Lian ti waragadna anu gedé, waktu anu diperlukeun pikeun ngawangunna gé cukup lila, lantaran wangunan jeung ornaménna kacida jéntré tur rumitna. Rarancang arsitéktur ieu masjid dijieun ku Ridwan Kamil, anu harita dipikawanoh minangka Gubernur Jawa Barat.<ref name=":0">{{Cite web|url=https://www.masjidnusantara.org/8-fakta-menarik-dari-masjid-99-kubah-di-makassar/|title=8 Fakta Menarik dari Masjid 99 Kubah di Makassar|last=Kiki|website=Masjid Nusantara|language=en-US|accessdate=2026-08-30}}</ref> Konsep wangunanna ngahijikeun gaya klasik modéren jeung futuristik, ditambahan ku wangunna anu matak narik panon. Téma anu diusung nyaéta Asmaulhusna, anu tuluy diwujudkeun dina jumlah kubahna anu aya 99.<ref name=":0" /> Dina prosés ngarancangna, Ridwan Kamil gawé bareng jeung arsiték lokal anu ngaranna Muhammad Mursif. Saméméh pangwangunan dimimitian, arsiték satempat ogé kungsi patepung langsung jeung Ridwan Kamil pikeun nyaluyukeun rarancang anu rék dipaké. Tina hasil éta rundingan, ahirna dipilih desain masjid anu maké 99 kubah. Ieu nu ngajadikeun Masjid 99 Kubah béda pisan jeung masjid-masjid séjén anu ilahar kapanggih. == Pakta unik == Susunan kubahna ngawengku hiji kubah utama sarta sababaraha kubah séjén anu ukuranana leuwih leutik. Kubah-kubah kasebut ngagunakeun sababaraha warna, di antarana konéng, jingga, coklat, bodas, jeung beureum. Wangunan masjid dirarancang kalayan konsép rohangan kabuka sarta sirkulasi hawa alami. Sistem ieu dimaksudkeun pikeun ngurangan kabutuhan kana alat pangatur hawa di jero wangunan.<ref name=":1">{{Cite web|url=https://www.liputan6.com/lifestyle/read/5259715/6-fakta-menarik-masjid-99-kubah-makassar-yang-didesain-ramah-lingkungan-tetap-sejuk-tanpa-pendingin-ruangan|title=6 Fakta Menarik Masjid 99 Kubah Makassar yang Didesain Ramah Lingkungan, Tetap Sejuk Tanpa Pendingin Ruangan|last=Liputan6.com|website=liputan6.com|language=id|accessdate=2026-08-30}}</ref> Dina widang arsitéktur masjid, Ridwan Kamil ogé kungsi ngarancang sababaraha masjid séjén di Indonésia, di antarana Masjid Al-Irsyad di Padalarang, Masjid Al-Safar di ruas Tol Cipularang, sarta Masjid Al-Jabbar di Bandung. Masjid 99 Kubah diwangun di wewengkon hasil réklamasi basisir di Makassar sarta kaasup kana kawasan Center Point of Indonesia. Lokasina aya di wewengkon basisir anu padeukeut jeung Pantai Losari. Dumasar kana rarancang kapasitasna, bagian jero masjid direncanakeun bisa nampung kira-kira 5.000 jamaah. Ari bagian palataranna dirarancang pikeun nampung nepi ka kira-kira 10.000 jamaah. Pangwangunan Masjid 99 Kubah ngagunakeun waragad tina Anggaran Pendapatan jeung Belanja Daérah Sulawesi Selatan. Dumasar kana katerangan Kepala Dinas Cipta Karya jeung Tata Ruang Sulawesi Selatan waktu éta, Andi Darmawan, total waragad pangwangunan kungsi diperkirakeun ngahontal Rp185 miliar.<ref name=":1" /> Di palataran Masjid 99 Kubah ogé aya fasilitas cai mancur. Fasilitas ieu diresmikeun ku Gubernur Sulawesi Selatan dina April 2018. Cai mancurna dirarancang bisa nyemprotkeun cai nepi ka jangkungna kira-kira 17 méter sarta dilengkepan ku tujuh rupa warna cahaya anu bisa robah saluyu jeung musik anu diputer.<ref name=":1" /> == Rujukan == [[Category:WikiRempah]] [[Category:WikiRempah Makassar]] o4tf90n1b11snfvfvdonve2jhjwv0tj