« Modèle:Warning » : différence entre les versions
translation tweaks |
add missing bottom margin to avoid clash with e.g. a table below it |
||
Ligne 2 : | Ligne 2 : | ||
<onlyinclude>{{#switch:<translate></translate> | <onlyinclude>{{#switch:<translate></translate> | ||
| = | | = | ||
{{#if: {{{msg|{{{1|}}}}}}|<table cellspacing="0" cellpadding="0" border="0" style="box-sizing:border-box; border:1px #d33 solid; background: transparent; margin | {{#if: {{{msg|{{{1|}}}}}}|<table 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|<translate><!--T:1--> Warning</translate>|link=]]</span> '''<translate><!--T:2--> Warning:</translate>''' {{#if: {{{msg|{{{1|}}}}}}|</td><td valign="top" style="padding-{{dir|{{pagelang}}|right|left}}:0.5em;">{{{msg|{{{1|}}}}}}</td></tr></table>}} | ||
| #default= | | #default= | ||
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:Warning|noshift=1}} | {{#invoke:Template translation|renderTranslatedTemplate|template=Template:Warning|noshift=1}} |
Version du 26 novembre 2020 à 20:50
<languages/> {{#switch:<translate></translate> | =
{{#if: |
}}<translate> Warning</translate> <translate> Warning:</translate> {{#if: | |
}}
| #default=
{{#if: |
}}
}}
<translate>
Usage
This template has two possible usages:
- Will have the text flow below when the warning text is too long</translate>
<translate>
- Uses a table to indent the text.
Method 1
</translate> <translate> The following displays the warning icon and the word "Warning:".</translate> <translate> You can follow this with whatever text/images/markup you like.</translate>
<translate> Wiki Code:</translate>
{{warning}} <translate> Don't do that!</translate>
{{#switch:<translate></translate> | =
{{#if: |}}<translate> Warning</translate> <translate> Warning:</translate> {{#if: | |
| #default=
{{#if: | }}}} <translate> Don't do that!</translate>
<translate>
Method 2
The following includes the text passed to the template, and uses a table to stop the text flowing round the icon.
Wiki Code: </translate>
{{warning|1=<translate> 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.</translate>}}
{{#switch:<translate></translate> | =
{{#if: <translate> 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.</translate>|}}<translate> Warning</translate> <translate> Warning:</translate> {{#if: <translate> 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.</translate>| | <translate> 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.</translate> |
| #default=
{{#if: <translate> 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.</translate>| }}}}
{{#if:<translate>
Usage
This template has two possible usages:
- Will have the text flow below when the warning text is too long</translate>
<translate>
- Uses a table to indent the text.
Method 1
</translate> <translate> The following displays the warning icon and the word "Warning:".</translate> <translate> You can follow this with whatever text/images/markup you like.</translate>
<translate> Wiki Code:</translate>
{{warning}} <translate> Don't do that!</translate>
{{#switch:<translate></translate> | =
{{#if: |
}}<translate> Warning</translate> <translate> Warning:</translate> {{#if: | |
}}
| #default=
{{#if: |
}}
}} <translate> Don't do that!</translate>
<translate>
Method 2
The following includes the text passed to the template, and uses a table to stop the text flowing round the icon.
Wiki Code: </translate>
{{warning|1=<translate> 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.</translate>}}
{{#switch:<translate></translate> | =
{{#if: <translate> 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.</translate>|
}}<translate> Warning</translate> <translate> Warning:</translate> {{#if: <translate> 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.</translate>| | <translate> 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.</translate> |
}}
| #default=
{{#if: <translate> 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.</translate>|
}}
}}| [[Category:Template documentation pages{{#translation:}}]] }} [[Category:Warning templates{{#translation:}}|Warning]]