Templat:Commons category: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
k Bagas Chrisara memindahkan halaman Templat:Commonscat ke Templat:Commons category menimpa pengalihan lama: Standardisasi per WP:EN agar tidak terjadi kesalahan sistem.
k Hasil uji coba: Templat:Commons category/sb
Baris 1:
{{Sister project
{{Commons
| position = {{{position|}}}
| project = commons
<!-- {{#if:x|}} strips whitespace from parameter 1,
| text = Wikimedia Commons memiliki {{{alt-term|media mengenai}}} '''''[[commons:{{#if:{{{1|}}}|Kategori:{{{1|}}}|{{if then show|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|Kategori:{{PAGENAME}}}}}}|<span style="{{#ifeq:{{{nowrap|no}}}|yes|white-space:nowrap;}} {{#ifeq:{{{italic|no}}}|yes|font-style: italic; }}">{{#ifeq:{{{lcf|{{{lcfirst|no}}}}}}|yes|{{lcfirst:{{{2|{{#if:{{{1|}}} | {{{1|}}} <!--
in case it is fed like this: {{Commons category| Some cat }}. -->
-->|{{if then show|{{#invoke:String|replace|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|Kategori:|}}<!--
|1=Category:{{#if:{{{1|}}}
|2={{{2|{{{1 --> |{{PAGENAME}} }} }} }}} }}<!--
|{{{1|}}}
-->|{{{2|{{#if:{{#property:P373{1|}}} | {{{1|}}} <!--
-->|{{if then show|{{#invoke:String|replace|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|Kategori:|}}<!--
|{{#property:P373}}
--> |{{PAGENAME}} }} }} }}}
}}</span>]]'''''.<!--
}}
End of the template code, now add relevant tracking categories
}}
 
|2={{{2|{{{1|{{PAGENAME}}}}}}}}<!--
--><includeonly>{{#switch:{{NAMESPACE}}||{{ns:14}}=<!-- Only articles and categories.
-->}}<noinclude>
Only add tracking categories to articles and categories.
-->{{#if:{{{1|}}}|{{#ifeq:Kategori:{{replace|{{{1|}}}|_|&#32;}}|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|<!--
--><!--[[Kategori:Commons category link is on Wikidata]]--><!--
 
| -->|{{#ifeq:{{replace|{{{1|}}}|_|&#property:P37332;}}|{{PAGENAME}}|<!--
... the local parameter is the same as the local pagename
-->[[Kategori:Kategori Commons yang pranala lokalnya berbeda dengan Wikidata]]{{#invoke:Preview warning|main|Commons category does not match the Commons sitelink on Wikidata – [[Template:Commons_category#Resolving_discrepancies|please check]]}}<!--
 
... the local parameter is not the pagename
-->|[[Kategori:Kategori Commons yang pranala lokalnya berbeda dengan Wikidata]]{{#invoke:Preview warning|main|Commons category does not match the Commons sitelink on Wikidata – [[Template:Commons_category#Resolving_discrepancies|please check]]}}}} }}<!--
 
We don't have a locally-defined link
-->|{{#if:{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|<!--
 
... so we're using Wikidata
--><!--[[Kategori:Commons category link from Wikidata]]--><!--
 
<!-- ... or we're using the pagename
-->|[[Kategori:Kategori Commons yang judul halamannya berbeda dengan Wikidata]]{{#invoke:Preview warning|main|Commons category does not match the Commons sitelink on Wikidata – [[Template:Commons_category#Resolving_discrepancies|please check]]}}
}}
}}
}}</includeonly>
-->}}<noinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage, not here! -->
</noinclude>
</noinclude><includeonly>{{#if:{{{1|}}}||{{#if:{{#property:P373}}||{{#switch:{{NAMESPACE}}
|User|User talk=
|#default=[[Category:Templat kategori Commons tanpa kategori|{{#ifeq:{{NAMESPACE}}|||{{Namespace Greek}}}}{{BASEPAGENAME}}]]<!--
-->}}}}}}<!-- Some tracking categories to see if we're ready to switch to Wikidata
-->{{#switch:{{NAMESPACE}}||{{ns:14}}=<!-- Only articles and categories.
-->{{#if:{{#property:P373}}
| {{#if:{{{1|}}}
| {{#ifeq:{{#property:P373}}|{{#invoke:StringReplace|encode wiki page name|{{{1|}}}}}
| <!-- [[Category:Commons category with local link same as on Wikidata]] – deleted per [[Wikipedia:Categories for discussion/Log/2017 January 25]] -->
| [[Category:Kategori Commons yang pranala lokalnya berbeda dengan Wikidata]] <!-- Figure out the best link -->
}}
| {{#ifeq:{{#property:P373}}|{{PAGENAME}}
| <!-- [[Category:Commons category with page title same as on Wikidata]] – deleted per [[Wikipedia:Categories for discussion/Log/2017 January 25]] -->
| [[Category:Kategori Commons yang judul halamannya berbeda dengan Wikidata]] <!-- Figure out the best link here too -->
}}
}}
| [[Category:Kategori Commons tanpa pranala di Wikidata]] <!-- These we still need to import -->
}}
}}</includeonly>