Plé teimpléid:comhthéacs

Latest comment: 16 bliain ó shin by Moilleadóir

Just copied from en:wikt context template. Have started translating it, but not sure I fully understand it yet and have tested it.
Moilleadóir 11:29, 29 Eanáir 2008 (UTC)Reply

Original (Revision 05:27, 21 April 2008 Robert Ullmann)

cuir in eagar
<noinclude>For documentation, please see the [[{{TALKPAGENAME}}|talk page]].
</noinclude><includeonly><!--
 if not in a sub call, open paren, content span
-->{{#if:{{{sub|}}}||<span class="ib-brac"><span class="qualifier-brac">(</span></span><span class="ib-content"><span class="qualifier-content">}}<!--
 if label, generate it
-->{{#if:{{{label|}}}|{{{label}}}}}<!--
 if special follows, generate it
-->{{#switch:{{{1|x}}}|,=<span class="ib-comma"><span class="qualifier-comma">,</span></span> |or= or |and= and |_= }}<!--
 if something follows that is a special, recall on next parameter (ignore case of special on the end)
-->{{#if:{{{1|}}}| {{{{#switch:{{{1}}}|,|or|and|_=context {{#expr:{{{sub|0}}}+1}}|ns:0}}|sub={{#expr:{{{sub|0}}}+1}}|lang={{{lang|}}}|skey={{{skey|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}} }}<!--
 default case(s) from switch, we have a template or string, generate comma if we had a label
-->{{#switch:{{{1}}}|,|or|and|_=|#default={{#if:{{{label|}}}|<span class="ib-comma"><span class="qualifier-comma">,</span></span> }}<!--
 if template exists and is a context template, else call it, else call ourselves, avoid extra expansion by conditional on name
-->{{ {{#if:{{{1|}}}|{{#if:{{#ifexist:Template:{{{1}}}|{{#ifeq:{{{{{1}}}|sub=}}|{{{{{1}}}|sub=1}}||+}}}}|{{{1}}}|context {{#expr:{{{sub|0}}}+1}}}}|ns:0}} |label={{{1}}}
|sub={{#expr:{{{sub|0}}}+1}}|lang={{{lang|}}}|skey={{{skey|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}} }}<!--
-->}}}}<!-- end switch, if {1}
 if not in sub, close content span, paren
-->{{#if:{{{sub||}}}||</span></span><span class="ib-brac"><span class="qualifier-brac">)</span></span>}}<!--
 if in namespace 0, if topic category
-->{{#if:{{NAMESPACE}}||{{#if:{{{topcat|}}}|{{#if:{{{skey|}}}|
[[Category:{{#if:{{{lang|}}}|{{#ifeq:{{{lang}}}|en||{{{lang}}}:}}}}{{{topcat|}}}|{{{skey}}} {{PAGENAME}}]]|
[[Category:{{#if:{{{lang|}}}|{{#ifeq:{{{lang}}}|en||{{{lang}}}:}}}}{{{topcat|}}}]]}}}}<!--
 if pos or pos-like cat
-->{{#if:{{{poscat|}}}|{{#if:{{{skey|}}}|
[[Category:{{{{#if:{{{poscat|}}}|language|ns:0}}|{{#if:{{{lang|}}}|{{{lang}}}|en}}}} {{{poscat|}}}|{{{skey}}} {{PAGENAME}}]]|
[[Category:{{{{#if:{{{poscat|}}}|language|ns:0}}|{{#if:{{{lang|}}}|{{{lang}}}|en}}}} {{{poscat|}}}]]}}}}<!--
 regional templates
-->{{#if:{{{regcat|}}}|{{#if:{{{skey|}}}|
[[Category:{{{regcat}}} {{{{#if:{{{regcat|}}}|language|ns:0}}|{{#if:{{{lang|}}}|{{{lang}}}|en}}}}]]|
[[Category:{{{regcat}}} {{{{#if:{{{regcat|}}}|language|ns:0}}|{{#if:{{{lang|}}}|{{{lang}}}|en}}}}]]}}}} }}<!--
 cat templates themselves
-->{{#ifeq:{{NAMESPACE}}|{{ns:template}}|
{{#if:{{{topcat|}}}|[[Category:{{{topcat}}}| ]]}}<!--
-->{{#if:{{{poscat|}}}|[[Category:English {{{poscat}}}| ]]}}<!--
-->{{#if:{{{regcat|}}}|[[Category:{{{regcat}}} {{{{#if:{{{regcat|}}}|language|ns:0}}|{{#if:{{{lang|}}}|{{{lang}}}|en}}}}| ]]}}<!--
-->[[Category:Context labels|{{PAGENAME}}]]}}</includeonly>
  • poscat: "part of speech category"
  • regcat: "regional category"
  • topcat: "topical category"
Return to "comhthéacs" page.