Template:Text: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(rem extra ">")
(Version 3)
(39 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Text|French}}
<includeonly>{{#ifeq:{{{2|}}}|put text here|{{#if:{{{1|}}}|{{NoText|{{{1|}}}}}|{{NoText}}}}|{{#switch:{{{1|}}}| ={{NoText|{{{text|{{{2|}}}}}}}}|Unknown={{#if:{{{text|{{{2|}}}}}}|<b><big>Unknown language</big></b>{{#tag:poem|{{{text|{{{2}}}}}} }}{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:Unknown language texts]]}}|{{NoText}}}}|Unavailable={{TextUnavailable}}|2=<b><big>{{flag|{{{2}}}|show}} and {{flag|{{{3}}}|show}}  text</big></b>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:{{{2}}} texts]][[Category:{{{3}}} texts]][[Category:Macaronic texts|2 {{PAGENAME}}]]}}{{#if:{{{text|{{{4|}}}}}}|{{#tag:poem|{{{text|{{{4}}}}}} }}}}|3=<b><big>{{flag|{{{2}}}|show}}, {{flag|{{{3}}}|show}} and {{flag|{{{4}}}|show}} text</big></b>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:{{{2}}} texts]][[Category:{{{3}}} texts]][[Category:{{{4}}} texts]][[Category:Macaronic texts|3 {{PAGENAME}}]]}}{{#if:{{{text|{{{5|}}}}}}|{{#tag:poem|{{{text|{{{5}}}}}} }}}}|Simple=<big>&nbsp;</big>{{#if:{{{2|}}}|{{#tag:poem|{{{2}}} }}}}|#default=<b><big>{{flag|{{{1}}}}} {{{pre|}}} {{{1}}} {{{post|}}} text</big></b>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:{{{1}}} texts]]}}{{#if:{{{text|{{{2|}}}}}}|{{#tag:poem|{{{text|{{{2}}}}}} }}}}}}}}</includeonly><noinclude>{{prot-temp}}<br>
{{switch|{{{1}}}
{{Doc|text=
|case: 2=<b><big>{{flag|{{{2}}}|show}} and {{flag|{{{3}}}|show}}  text</big></b><br><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no|[[Category:{{{2}}} texts]][[Category:{{{3}}} texts]]|}}</includeonly>
'''Accepted syntaxes for this template:'''
|case: 3=<b><big>{{flag|{{{2}}}|show}}, {{flag|{{{3}}}|show}} and {{flag|{{{4}}}|show}} text</big></b><br><includeonly>>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no|[[Category:{{{2}}} texts]][[Category:{{{3}}} texts]][[Cateory:{{{4}}} texts]]|}}</includeonly>
*{{tl|Text}} and {{tl|Text|&nbsp;}} and {{tl|Text||put text here}} default to {{tl|NoText}}
|default=<b><big>{{flag|{{{1}}}}} {{{2|}}} {{{1}}} {{{3|}}} text</big></b><br><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no|[[Category:{{{1}}} texts]]|}}</includeonly>
 
}}<includeonly>[[Category:Texts]]</includeonly><noinclude>
*{{tl|Text|<language>|put text here}} defaults to {{tl|NoText|<language>}} (AddWork form uses this)
{{prot-temp}}<br>
 
<div style="margin: 0; margin-right: 30px; margin-left: 30px; border: 1px solid #3399ff; padding: 1em 1em 1em 1em; background-color:#ddffdd">
*{{tl|Text|Unknown}} and {{tl|Text|Unknown|&nbsp;}} default to {{tl|NoText}}
<center><big>'''Documentation'''</big></center>
 
*{{tl|Text|&nbsp;|''Language''}} defaults to {{tl|NoText|''Language''}}
 
*{{tl|Text|Unknown|''some text''}} displays the language as unknown and displays "some text" with ''Poem'' formatting.
 
*{{tl|Text|''Language''}} displays the language of the text
 
*{{tl|Text|''2''|''Language1''|''Language2''}} displays the two languages of the text


'''Accepted syntaxes for this template:'''
*{{tl|Text|''3''|''Language1''|''Language2''|''Language3''}} displays the three languages of the text
 
In these last three cases the text may be entered as final (unnamed) parameter and will be displayed with ''Poem'' formatting.
 
Also, in these three cases where a language is specified, the template also inserts the page in the corresponding "''Language'' texts" category for each language, as well as in {{CiteCat|Macaronic texts}}, except when the following syntax is used:


*<tt><nowiki>{{Text|</nowiki>''Language''}}</tt>
*{{tl|Text|''Language''|cat{{=}}no}}


*<tt><nowiki>{{Text|</nowiki>''2''|''Language1''|''Language2''}}</tt>
*{{tl|Text|''2''|''Language1''|''Language2''|cat{{=}}no}}


*<tt><nowiki>{{Text|</nowiki>''3''|''Language1''|''Language2''|''Language3''}}</tt>
*{{tl|Text|''3''|''Language1''|''Language2''|''Language3''|cat{{=}}no}}


*<tt><nowiki>{{Text|</nowiki>''Language''|cat=no}}</tt>
The page is not categorized in any of the Language texts categories (one may also use {{para|Cat|no}} with the same effect).  The default value {{para|cat|yes}} (or {{para|Cat|yes}}) need not be entered).


*<tt><nowiki>{{Text|</nowiki>''2''|''Language1''|''Language2''|cat=no}}</tt>
<b><u>Examples:</u></b>


*<tt><nowiki>{{Text|</nowiki>''3''|''Language1''|''Language2''|''Language3''|cat=no}}</tt>
*{{tl|Text|Unknown}}
displays as:
:{{Text2|Unknown}}


In the first three cases the template also inserts the page in the corresponding [[:Category:Language texts|Language texts]] category for each language.  In the second three case, the page is not categorized any any of the Language texts categories (one may also use <nowiki>Cat=no</nowiki> with the same effect).  The default value <nowiki>cat=yes</nowiki> (or <nowiki>Cat=yes</nowiki>) need not be entered).
*{{tl|Text|&nbsp;|French}}
displays as:
:{{Text2||French}}


'''Examples:'''
*{{tl|Text|2|Latin|German}}
*<tt><nowiki>{{Text|2|Latin|German}}</nowiki></tt>
displays as:
displays as:
: <big>'''{{flag|Latin|show}} and {{flag|German|show}} text'''</big>
:{{Text2|2|Latin|German|cat=no}}
 
*{{tl|Text2|Quenya}} (for which there is no corresponding language flag) displays as:
:{{Text2|Quenya|cat=no}}
 
 
<b><u>Formatting text</u></b> (See [[Help:How can I add a text or translation?]] for more details)
<pre>{{Text|Latin|
Ave Maria, gratia plena, Dominus tecum.
Benedicta tu in mulieribus,
et benedictus fructus ventris tui, Jesus.
}}</pre>
}}


*<tt><nowiki>{{Text|Quenya}}</nowiki></tt>
[[Category:Templates]]
(for which there is no corresponding language flag) displays as:
[[Category:Text formatting templates]]</noinclude>
: <big>'''{{flag|Quenya|show}} text'''</big>
</div>[[Category:Templates|{{PAGENAME}}]]</noinclude>

Revision as of 16:05, 25 March 2021


Documentation

Accepted syntaxes for this template:

  • {{Text|<language>|put text here}} defaults to {{NoText|<language>}} (AddWork form uses this)
  • {{Text| |Language}} defaults to {{NoText|Language}}
  • {{Text|Unknown|some text}} displays the language as unknown and displays "some text" with Poem formatting.
  • {{Text|Language}} displays the language of the text
  • {{Text|2|Language1|Language2}} displays the two languages of the text
  • {{Text|3|Language1|Language2|Language3}} displays the three languages of the text

In these last three cases the text may be entered as final (unnamed) parameter and will be displayed with Poem formatting.

Also, in these three cases where a language is specified, the template also inserts the page in the corresponding "Language texts" category for each language, as well as in Macaronic texts, except when the following syntax is used:

  • {{Text|Language|cat=no}}
  • {{Text|2|Language1|Language2|cat=no}}
  • {{Text|3|Language1|Language2|Language3|cat=no}}

The page is not categorized in any of the Language texts categories (one may also use |Cat=no with the same effect). The default value |cat=yes (or |Cat=yes) need not be entered).

Examples:

displays as:

Text (or link to a text page) needs to be added.   Question.gif

displays as:

French text (or link to a text page) needs to be added.   Question.gif
  • {{Text|2|Latin|German}}

displays as:

Latin.png Latin and German.png German text
  • {{Text2|Quenya}} (for which there is no corresponding language flag) displays as:
Quenya text


Formatting text (See Help:How can I add a text or translation? for more details)

{{Text|Latin|
Ave Maria, gratia plena, Dominus tecum.
Benedicta tu in mulieribus,
et benedictus fructus ventris tui, Jesus. 
}}