Template:CatTxt: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(added arguments in the examples)
(Pages_in_<language>)
Line 24: Line 24:
|texts        = {{TextsByLangCatTxt|{{#explode:{{PAGENAME}}|texts|0}} }}
|texts        = {{TextsByLangCatTxt|{{#explode:{{PAGENAME}}|texts|0}} }}
|translations = {{TranslationsCatTxt|{{#explode:{{PAGENAME}}|translations|0}} }}
|translations = {{TranslationsCatTxt|{{#explode:{{PAGENAME}}|translations|0}} }}
|#default    = {{#ifeq: {{#sub:{{PAGENAME}}|0|8}}|Works in
|#default    = {{#switch: {{#sub:{{PAGENAME}}|0|8}}
  |             {{WksLangTxt|{{#explode:{{PAGENAME}}|Works in|1}} }}
    |Works in = {{WksLangTxt|{{#explode:{{PAGENAME}}|Works in|1}} }}
  |<font color=red>ERROR: The template {{tl|CatTxt}} was not designed for this category!</font>
    |Pages in = List of all Documentation and Help pages that have been partially or totally translated into {{#explode:{{PAGENAME}}|Pages in|1}}.
 
===See also===
*{{CiteCat|Works in {{#explode:{{PAGENAME}}|Pages in|1}}}}
*{{CiteCat|{{#explode:{{PAGENAME}}|Pages in|1}} texts}}
*{{CiteCat|{{#explode:{{PAGENAME}}|Pages in|1}} translations}}
[[Category:Translated pages|{{#explode:{{PAGENAME}}|Pages in|1}}]]
 
    |#default = <font color=red>ERROR: The template {{tl|CatTxt}} was not designed for this category!</font>
}} }}</includeonly><!--
}} }}</includeonly><!--


Line 40: Line 48:
:<tt>Category:<language>_translations</tt>
:<tt>Category:<language>_translations</tt>
:<tt>Category:<nationality>_composers</tt>
:<tt>Category:<nationality>_composers</tt>
:<tt>Category:Pages_in_<language></tt>
:<tt>Category:Works_in_<language></tt>
:<tt>Category:Works_in_<language></tt>
{{middle}}
{{middle}}
:&nbsp;
:original template
:replaces {{tl|EdCatTxt}}
:replaces {{tl|EdCatTxt}}
:replaces {{tl|CompCatTxt}}
:replaces {{tl|CompCatTxt}}
Line 49: Line 58:
:alias for {{tl|TranslationsCatTxt|<language>}}
:alias for {{tl|TranslationsCatTxt|<language>}}
:alias for {{tl|ComposerNationality|<nationality>}}
:alias for {{tl|ComposerNationality|<nationality>}}
:original template
:alias for {{tl|WksLangTxt|<language>}}
:alias for {{tl|WksLangTxt|<language>}}
{{bottom}}
{{bottom}}

Revision as of 14:38, 20 May 2013

Documentation

A simple template that adds the proper text for each of the following category types:

Category:<language>_translation_requests
Category:<editor>_editions
Category:<composer>_compositions
Category:<lyricist>_settings
Category:<language>_texts
Category:<language>_translations
Category:<nationality>_composers
Category:Pages_in_<language>
Category:Works_in_<language>
original template
replaces {{EdCatTxt}}
replaces {{CompCatTxt}}
replaces {{LyricistSettingsCat}}
alias for {{TextsByLangCatTxt|<language>}}
alias for {{TranslationsCatTxt|<language>}}
alias for {{ComposerNationality|<nationality>}}
original template
alias for {{WksLangTxt|<language>}}
Usage
Just add {{CatTxt}} to the new category. If it is added by mistake to a different category than the ones listed above, a warning message is displayed:
ERROR: The template {{CatTxt}} was not designed for this category!