Template:Commons category: Difference between revisions

From TestWiki
Content added Content deleted
m (ugh, fix overlap with {{clear}})
m (150 revisions imported from wikipedia:Template:Commons_category)
 
(59 intermediate revisions by 24 users not shown)
Line 1: Line 1:
{{Sister project
{| class="infobox sisterproject"
| position = {{{position|}}}
| style="width:50px; height:67px;" | [[Image:Commons-logo.svg|50px|none|]]
| project = commons
| style="padding-left:5px;" | [[Wikimedia Commons]] has media related to:
| text = Wikimedia Commons has {{{alt-term|media related to}}} <span style="font-weight: bold; {{#ifeq:{{{nowrap|no}}}|yes|white-space:nowrap;}} {{#ifeq:{{{italic|yes}}}|yes|font-style: italic;}}">[[commons:{{#if:{{{1|}}}|Category:{{{1|}}}|{{if then show|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|Category:{{PAGENAME}}}}}}|{{#ifeq:{{{lcf|{{{lcfirst|no}}}}}}|yes|{{lcfirst:{{{2|{{#if:{{{1|}}} | {{{1|}}} <!--
<div style="margin-left: 10px;"> '''''[[Commons:Category:{{{1|{{PAGENAME}}}}}|{{{1|{{PAGENAME}}}}}]]'''''</div>
-->|{{if then show|{{#invoke:String|replace|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|Category:|}}<!--
|}<noinclude>{{clear}}
--> |{{PAGENAME}} }} }} }}} }}<!--
{{protected template}}
-->|{{{2|{{#if:{{{1|}}} | {{{1|}}} <!--
[[Category:Interwiki link templates|Commonscat]]
-->|{{if then show|{{#invoke:String|replace|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|Category:|}}|{{PAGENAME}} }}<!--
[[Category:Interwiki category linking templates|Commonscat]]
-->}}}}}}}]]</span>.<!--
End of the template code, now add relevant tracking categories


--><includeonly>{{#switch:{{NAMESPACE}}||{{ns:14}}=<!--
[[ca:Template:Commonscat]]
Only add tracking categories to articles and categories.
[[cs:Template:Commonscat]]
-->{{#if:{{{1|}}}|{{#ifeq:Category:{{replace|{{{1|}}}|_|&#32;}}|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|<!--
[[da:Skabelon:Commonscat]]
-->[[Category:Commons category link is on Wikidata]]<!--
[[de:Vorlage:Commonscat]]

[[eo:Template:Commonscat]]
-->|{{#ifeq:{{replace|{{{1|}}}|_|&#32;}}|{{PAGENAME}}|<!--
[[es:Plantilla:Commonscat]]
... the local parameter is the same as the local pagename
[[fr:Modèle:CommonsCat]]
-->[[Category:Commons category link is defined as the pagename]]{{preview warning|Commons category does not match the Commons sitelink on Wikidata – [[Template:Commons_category#Resolving_discrepancies|please check]]}}<!--
[[hr:Template:Commonscat]]

[[hu:Template:Commonscat]]
... the local parameter is not the pagename
[[id:Template:Commonscat]]
-->|[[Category:Commons category link is locally defined]]{{preview warning|Commons category does not match the Commons sitelink on Wikidata – [[Template:Commons_category#Resolving_discrepancies|please check]]}}}} }}<!--
[[io:Template:Commonscat]]

[[is:Template:Commonscat]]
We don't have a locally-defined link
[[lt:Template:Commonscat]]
-->|{{#if:{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|<!--
[[lv:Template:Commonscat]]

[[ms:Template:Commonscat]]
... so we're using Wikidata
[[nl:Sjabloon:Commonscat]]
-->[[Category:Commons category link from Wikidata]]<!--
[[no:Mal:Commonscat]]

[[ja:Template:Commonscat]]
<!-- ... or we're using the pagename
[[oc:Template:Commonscat]]
-->|[[Category:Commons category link is the pagename]]{{preview warning|Commons category does not match the Commons sitelink on Wikidata – [[Template:Commons_category#Resolving_discrepancies|please check]]}}
[[os:Шаблон:Commonscat]]
}}
[[pl:Template:Commonscat]]
}}
[[pt:Predefinição:Commonscat]]
}}</includeonly>
[[ro:Template:Commonscat]]
}}<noinclude>
[[ru:Template:Commonscat]]
{{Documentation}}
[[fi:Malline:Commonscat]]
<!-- Add categories to the /doc subpage, not here! -->
[[simple:Template:Commonscat]]
[[sl:Template:Commonscat]]
[[sr:Шаблон:Commonscat]]
[[su:Template:Commonscat]]
[[sv:Mall:Commonscat]]
[[th:Template:Commonscat]]
[[tr:Şablon:CommonsKat]]
[[uk:Шаблон:Commonscat]]
[[vi:Tiêu bản:Commonscat]]
[[zh:Template:Commonscat]]
</noinclude>
</noinclude>

Latest revision as of 03:27, 26 September 2021