Difference between revisions of "Template:Warning2"

From Free Pascal wiki
Jump to navigationJump to search
m (Tweak)
m (Trev moved page Template:Warning3 to Template:Warning2: Replace old Warning2)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<onlyinclude>{{#if: {{{msg|{{{1|}}}}}}|<table class="warning-message" cellspacing="0" cellpadding="0" border="0" style="box-sizing:border-box; border:1px #d33 solid; background: transparent; margin:0.5em 0;padding:0.5em;background-color: #fee7e6"><tr><td nowrap="nowrap" valign="top">}}<span style="position: relative; top: -2px;">[[File:OOjs_UI_icon_notice-destructive.svg|18px|alt=<translate><!--T:1--> Warning</translate>|link=]]</span> '''Warning: ''' {{#if: {{{msg|{{{1|}}}}}}|</td><td valign="top" style="padding-{{dir|{{pagelang}}|right|left}}:0.5em;">{{{msg|{{{1|}}}}}}</td></tr></table>}}</onlyinclude>
+
<onlyinclude>{{#if: {{{msg|{{{1|}}}}}}|<table class="warning-message" cellspacing="0" cellpadding="0" border="0" style="box-sizing:border-box; border:1px #d33 solid; background: transparent; margin:0.5em 0;padding:0.5em;background-color: #fee7e6"><tr><td nowrap="nowrap" valign="top">}}<span style="position: relative; top: -2px;">[[File:OOjs_UI_icon_notice-destructive.svg|18px|alt=<translate><!--T:1--> Warning: </translate>|link=]]</span>  
 +
'''{{ #switch:{{#titleparts:{{PAGENAME}}| | -1}}
 +
| de= Warnung
 +
| en= Warning&nbsp;
 +
| cs= Varování
 +
| fr= Avertissement
 +
| hu= Figyelem
 +
| pl= Ostrzeżenie
 +
| ru= Предупреждение
 +
| Warning&nbsp;
 +
}}'''{{#if:{{{msg|{{{1|}}}}}}|</td><td valign="top">{{{msg|{{{1|}}}}}}</td></tr></table>}}</onlyinclude>
 +
</onlyinclude>
 +
<noinclude>
 +
== Usage ==
 +
 
 +
This template has two possible usages:
 +
 
 +
=== Usage 1 ===
 +
 
 +
The following displays the warning icon and the word "Warning".
 +
 
 +
<nowiki>{{Warning3}}</nowiki> Don't do that!
 +
 
 +
 
 +
 
 +
{{Warning3}} Don't do that!
 +
 
 +
 
 +
 
 +
=== Usage 2 ===
 +
 
 +
Uses a table to indent the text. The following includes the text passed to the template, and uses a table to stop the text flowing around the icon.
 +
 
 +
<nowiki>{{Warning3|</nowiki>Here is a long warning, which is sufficiently wordy to run onto a second line (unless you have a really large screen!), which would normally cause it to wrap round the icon, but because we passed it as a parameter it keeps its left alignment straight.<nowiki>}}</nowiki>
 +
 
 +
 
 +
{{Warning3|Here is a long warning, which is sufficiently wordy to run onto a second line (unless you have a really large screen!), which would normally cause it to wrap round the icon, but because we passed it as a parameter it keeps its left alignment straight.}}
 +
 
 +
 
 +
=== Template is language aware ===
 +
 
 +
The template is language aware: this means the text "Warning" will be translated to the language of the page which includes the template. If it isn't translated, please add the translation.
 +
 
 +
[[Category:Language aware Templates]]
 +
[[Category:Information boxes]]
 +
</noinclude>

Latest revision as of 02:11, 28 March 2022

<translate> Warning: </translate> Warning 


Usage

This template has two possible usages:

Usage 1

The following displays the warning icon and the word "Warning".

{{Warning3}} Don't do that!


Template:Warning3 Don't do that!


Usage 2

Uses a table to indent the text. The following includes the text passed to the template, and uses a table to stop the text flowing around the icon.

{{Warning3|Here is a long warning, which is sufficiently wordy to run onto a second line (unless you have a really large screen!), which would normally cause it to wrap round the icon, but because we passed it as a parameter it keeps its left alignment straight.}}


Template:Warning3


Template is language aware

The template is language aware: this means the text "Warning" will be translated to the language of the page which includes the template. If it isn't translated, please add the translation.