Templat:Documentation/doc: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
MerlIwBot (bicara | kontrib)
HsfBot (bicara | kontrib)
 
(17 revisi perantara oleh 12 pengguna tidak ditampilkan)
Baris 4:
Ini adalah templat {{tl|dokumentasi}}.
 
ForUntuk mostinstruksi oflebih thelanjut instructionsmengenai aboutbagaimana howdan andkapan whenharus tomenggunakan usetemplate this templateini, seelihat [[Wikipedia:Dokumentasi templat]].
 
Templat ini menampilkan kotak doc berwarna hijau seperti yang Anda lihat sekarang, dan secara otomatis memuat isi dari subhalaman /doc. Dapat juga memuat konten dari tempat lain jika diminta.
This template displays a green doc box like you are seeing now, and automatically loads the content from a /doc subpage. It can also load the content from other places if instructed to.
 
ThisTemplat templateini isdimaksudkan intendeduntuk formendokumentasikan documentingtemplat templatesdan andhalaman otherlain pages which areyang [[Wikipedia:Transklusi|transcludedditransklusikan]] ontoke otherhalaman pageslain. ItDapat canjuga bedigunakan useddalam in[[Wikipedia:Templat templateruang spacenama|templat andruang mostnama]] otherdan [[Wikipedia:Ruang nama|namespacesruang nama]] lainnya.
 
UsePenggunaan oftemplat thisini templatememungkinkan allowstemplat templates to beuntuk [[Wikipedia:Kebijakan perlindungan|protecteddilindungi]] wherejika necessarydiperlukan, whilesambil allowingmembiarkan anyonesiapa tosaja edituntuk themengedit documentationdokumen, categorieskategori, anddan interwikitautan linksinterwiki.
 
=== Penggunaan ===
Biasanya templat ini digunakan tanpa parameter, ditempatkan di bagian bawah templat atau halaman yang didokumentasikan, dalam format {{tag|noinclude}}:
 
<syntaxhighlight lang="xml+smarty">
Normally this template is used without any parameters, placed at the bottom of the template or page being documented, within <code>&lt;noinclude></code>:
 
<pre>
<!--Ini adalah baris terakhir dari kode templat Anda--><noinclude>
 
{{dokumentasi}}
<!-- Tambahkan kategori dan interwiki pada sub-halaman /doc, bukan di sini! -->
</noinclude>
</syntaxhighlight>
</pre>
 
Maka templat ini secara otomatis memuat isi dari subhalaman /doc dari templat yang digunakan.
Then this template automatically loads the content from the /doc subpage of the template it is used on.
 
Template ini juga dapat memuat konten dari halaman lain. Seperti ini:
This template can also load the content from any other page. Like this:
 
<syntaxhighlight lang="xml+smarty">
<pre>
<!--Ini adalah baris terakhir dari kode templat Anda--><noinclude>
 
{{dokumentasi|Templat:Halaman lain/doc}}
</noinclude>
</syntaxhighlight>
</pre>
 
Note that when loading the documentation from another page than the local /doc page it becomes tricky to handle the categories and interwiki links.
 
Konten juga dapat diberi input langsung sebagai teks. Seperti ini:
The content can also be fed directly as text. Like this:
 
<syntaxhighlight lang="xml+smarty">
<pre>
<!--Ini adalah baris terakhir dari kode templat Anda--><noinclude>
 
{{dokumentasi
| content = Teks dokumentasi.
}}
</noinclude>
</syntaxhighlight>
</pre>
 
When the '''content''' parameter is used the doc box normally doesn't show the [edit] [purge] links in the top right corner. Note that if the /doc page exists a link to it is still shown in the link box below the doc box. <!--and no link to a /doc page is shown in the link box below the doc box.-->
Baris 52 ⟶ 48:
But parameter 1 and the '''content''' parameter can also be combined, like this:
 
<syntaxhighlight lang="xml+smarty">
<pre>
<!--Ini adalah baris terakhir dari kode templat Anda--><noinclude>
 
{{dokumentasi
| 1 = Templat:Halaman apapun/doc
Baris 60 ⟶ 55:
}}
</noinclude>
</syntaxhighlight>
</pre>
 
Then the pagename fed as parameter 1 is used for the [edit] [purge] links and for the /doc link in the link box below the doc box. But the '''content''' parameter is used for the content shown in the doc box. The above code means that the content is transcluded as "<code><nowiki>{{Template:Any page/doc|parameters}}</nowiki></code>". In this example a parameter is also fed to the /doc page being loaded.
 
=== PraktekPraktik yang disarankan ===
 
The code should be added at the bottom of the template code, with no space before "<code>&lt;noinclude></code>" (which would cause extra space on pages where the template is used).
 
Baris 117 ⟶ 111:
This template is usually placed in subject space, within &lt;noinclude> tags. But in some cases this template needs to be on the talkpage:
 
* For preload pages (usually in Template or Wikipedia space), since they can't use &lt;noinclude>. See for instance [[TemplatePembicaraan talkTemplat:AfC preload]] and [[TemplatePembicaraan talkTemplat:RfD subpage starter]]. Such talkpages can be marked with {{tl|talkdoc}}.
 
* In MediaWiki space, since &lt;noinclude> often doesn't work in system messages and since MediaWiki space needs to be kept clean for performance reasons.
Baris 138 ⟶ 132:
 
<!-- {{dokumentasi/lihat pula}} -->
* {{tl|dokumentasi}} – PlacedDitempatkan onpada templatesbagian andtemplat otherdan pageshalaman tolain documentuntuk themmendokumentasinya.
* {{tl|subhalaman dokumentasi}} – Used at the top of /doc subpages to explain what they are and to link back to the page they document.
* [[Wikipedia:Dokumentasi templat]] – The how-to guide about template documentation.
Baris 146 ⟶ 140:
[[Kategori:Dokumentasi templat| ]]
[[Kategori:Templat fungsi dan format Wikipedia|{{PAGENAME}}]]
[[als:Vorlage:Dokumentation]]
[[ar:قالب:توثيق]]
[[as:Template:Documentation]]
[[ba:Ҡалып:Doc]]
[[bar:Vorlage:Dokumentation]]
[[bg:Шаблон:Документация]]
[[br:Patrom:Implijout patromoù]]
[[bs:Šablon:Dokumentacija]]
[[ca:Plantilla:Ús de la plantilla]]
[[ckb:داڕێژە:Documentation]]
[[cs:Šablona:Dokumentace]]
[[cy:Nodyn:Doc]]
[[da:Skabelon:Dokumentation]]
[[de:Vorlage:Dokumentation]]
[[diq:Şablon:Documentation]]
[[dsb:Pśedłoga:Dokumentacija]]
[[en:Template:Documentation]]
[[et:Mall:Dokumentatsioon]]
[[es:Plantilla:Documentación]]
[[el:Πρότυπο:Τεκμηρίωση προτύπου]]
[[eo:Ŝablono:Dok]]
[[eu:Txantiloi:Txantiloi dokumentazioa]]
[[fa:الگو:توضیحات]]
[[fr:Modèle:Documentation]]
[[gl:Modelo:Uso de marcador]]
[[he:תבנית:תיעוד]]
[[hsb:Předłoha:Dokumentacija]]
[[la:Formula:Documentation]]
[[lad:Xablón:Uso de Templates]]
[[lez:Шаблон:Doc]]
[[ltg:Taiss:Dokumentaceja]]
[[hu:Sablon:Sablondokumentáció]]
[[hy:Կաղապար:Փաստաթղթեր]]
[[ia:Patrono:Documentation]]
[[it:Template:Man]]
[[ja:Template:Documentation]]
[[ko:틀:틀 설명문서]]
[[ku:Şablon:Belgekirin]]
[[lv:Veidne:Dokumentācija]]
[[map-bms:Cithakan:Dokumentasi]]
[[ml:ഫലകം:വിവരണം]]
[[ms:Templat:Dokumentasi]]
[[no:mal:Dokumentasjon]]
[[nds-nl:Mal:Dokumentatie]]
[[nl:Sjabloon:Sjabdoc]]
[[nso:Template:Documentation]]
[[pl:Szablon:Dokumentacja]]
[[pt:Predefinição:Documentação]]
[[ro:Format:Documentație]]
[[ru:Шаблон:Doc]]
[[se:Málle:Documentation]]
[[simple:Template:Documentation]]
[[sk:Šablóna:Dokumentácia]]
[[sl:Predloga:Dokumentacija]]
[[sr:Шаблон:Документација]]
[[sq:Stampa:Dokumentacion]]
[[stq:Foarloage:Dokumentation]]
[[sv:Mall:Dokumentation]]
[[sw:Kigezo:Documentation]]
[[tr:Şablon:Belgeleme]]
[[tt:Үрнәк:Doc]]
[[tl:Suleras:Documentation]]
[[tpi:Template:Template doc]]
[[uk:Шаблон:Документація]]
[[ur:سانچہ:Documentation]]
[[war:Template:Documentation]]
[[yo:Àdàkọ:Aṣàlàyé]]
[[zh:Template:Documentation]]
[[te:మూస:Documentation]]
</includeonly>