Template:Infobox character: Difference between revisions

From PZwiki
m (fixed extra new line being created)
m (Automated Formatting)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>{{Languages}}</noinclude><includeonly>{{Infobox
<noinclude>{{Documentation/sandbox|doc=
|bodystyle  = width:350px; -moz-box-shadow: 0px 0px 2px 2px #{{Infobox nc|{{{name_colour|}}}}}; -webkit-box-shadow: 0px 0px 2px 2px #{{Infobox nc|{{{name_colour|}}}}}; box-shadow: 0px 0px 2px 2px #{{Infobox nc|{{{name_colour|}}}}}; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}};
This is an infobox used on articles about an in-game character.
| above      = <div style="background: #{{Infobox nc|}}; padding: 5px; font-weight: bold; text-align: center; font-size: 120%; color:#{{Infobox nc||text}};">{{#if:{{{honorific prefix|{{{honorific_prefix|}}}}}}|<span class="honorific-prefix" style="font-size: small">{{{honorific prefix|{{{honorific_prefix|}}}}}}</span><br />}}<span class="fn">{{Translation|{{{name|{{PAGENAME}}}}}}}</span>{{#if:{{{honorific suffix|{{{honorific_suffix|}}}}}}|<br /><span class="honorific-suffix" style="font-size: small">{{{honorific suffix|{{{honorific_suffix|}}}}}}</span>}}</div>
| image      = {{#if:{{{image|}}}|[[File:{{{image}}}|{{px|{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}|frameless}}|alt={{{alt|}}}]]}}
| caption    = {{{image caption|{{{caption|{{{image_caption|}}}}}}}}}


| imagestyle = padding:10px;
==Usage==
| headerstyle = background-color: #{{Infobox nc|{{{name_colour|}}}}}; color: #{{Infobox nc|{{{name_text_colour|}}}|text}};
{{Infobox character
| labelstyle = background-color:#eee; width:50%;
|name=name
| datastyle  = width:50%;
|image=Image.png
|image2=Image.png
|image3=Image.png
|image4=Image.png
|image5=Image.png
|image_name=image1
|image_name2=image2
|image_name3=image3
|image_name4=image4
|image_name5=image5
|nickname=nickname
|sex=sex
|personality=personality
|occupation=occupation
|traits=traits
|location=location
|coordinates=coordinates
<!-- ITEMS -->
|items=items
}}
<syntaxhighlight lang=text>{{Infobox character
|name=
|image=
|image2=
|image3=
|image4=
|image5=
|image_name=
|image_name2=
|image_name3=
|image_name4=
|image_name5=
<!-- GENERAL -->
|nickname=
|sex=
|personality=
|occupation=
|traits=
|location=
|coordinates=
<!-- ITEMS -->
|items=
}}</syntaxhighlight>
{{Clear}}


| header1    = {{Translation|General}}
==Example==
{{Infobox character
|name=Kate Smith
|image=805 max.jpg
|image2=Kate.png
|image3=Kate Smith.png
|image4=K&B intro.png
|image_name=Concept art
|image_name2=Outfit
|image_name3=In-game (past)
|image_name4=In-game (future)
|sex=Female
|personality=Friendly
|location=Bob and Kate's safehouse
|coordinates=10746x9415
|items=Crutches, Bandages, Painkillers, Pillow
}}
<syntaxhighlight lang=text>{{Infobox character
|name=Kate Smith
|image=805 max.jpg
|image3=Kate Smith.png
|image4=K&B intro.png
|image_name=Concept art
|image_name2=Outfit
|image_name3=In-game (past)
|image_name4=In-game (future)
|sex=Female
|personality=Friendly
|location=Bob and Kate's safehouse
|coordinates=10746x9415
|items=Crutches, Bandages, Painkillers, Pillow
}}</syntaxhighlight>
{{Clear}}


| label2    = {{Translation|Nickname}}
{{Translation guide|<syntaxhighlight lang="html">
| data2      = {{{nickname|}}}
{{#switch: {{{1|}}}
 
<!-- section -->
| label3    = {{Translation|Sex}}
| general = General
| data3      = {{{gender|{{{sex|}}}}}}
| items = Items
 
<!-- data -->
| label4    = {{Translation|Age}}
| nickname = Nickname
| data4      = {{{age|}}}
| sex = Sex
 
| personality = Personality
| label5    = {{Translation|Personality}}
| occupation = Occupation
| data5      = {{{personality|}}}
| traits = Traits
 
| location = Location
| label6    = {{Translation|Occupation}}
| #default = [[Category:Incorrect template usage]]
| data6      = {{{occupation|}}}
}}
 
</syntaxhighlight>}}
| label7    = {{Translation|Traits}}
}}
| data7      = {{{traits|}}}
{{ll|Category:Infobox}}
 
</noinclude><includeonly>{{Infobox/sandbox
| label8    = {{Translation|Start location}}
| title = {{{name|{{#getdisplaytitle:{{FULLPAGENAME}}}}}}}
| data8      = {{{location|}}}<br>{{#if:{{{coordinates|}}}|[[File:Geographylogo.png{{!}}26px{{!}}link=https://map.projectzomboid.com/?#{{{coordinates}}}{{!}}Show location on an interactive map]]<span class="plainlinks">[https://map.projectzomboid.com/?#{{{coordinates}}} {{{coordinates}}}]</span>}}
| color = var(--color-red)
 
| {{Infobox/image <!-- ## Image -->
| label9    = {{Translation|Weapon}}
| p1 = {{#if:{{{image|}}}|[[File:{{{image}}}|{{{image_size|}}}|{{{image_name|{{{name|}}}}}}]]}}
| data9      = {{{weapon|}}}
| 1 = {{#if:{{{image2|}}}|[[File:{{{icon|{{{image}}}}}}|{{{icon_name|{{{image_name|{{{name|}}}}}}}}}|link=]]}}
 
| p2 = {{#if:{{{image2|}}}|[[File:{{{image2}}}|{{{image_size2|}}}|{{{image_name2|{{{name|}}}}}}]]}}
| below      = {{#if:{{{notes|}}}|<center>'''{{Translation|Notes}}'''</center><div style="line-height:1.2em;">{{{notes}}}</div>}}
| 2 = {{#if:{{{image2|}}}|[[File:{{{icon2|{{{image2}}}}}}|{{{icon_name2|{{{image_name2|{{{name|}}}}}}}}}|link=]]}}
| belowstyle = border-top:1px solid #aaaaaa; text-align:left
| p3 = {{#if:{{{image3|}}}|[[File:{{{image3}}}|{{{image_size3|}}}|{{{image_name3|{{{name|}}}}}}]]}}
 
| 3 = {{#if:{{{image3|}}}|[[File:{{{icon3|{{{image3}}}}}}|{{{icon_name3|{{{image_name3|{{{name|}}}}}}}}}|link=]]}}
}}</includeonly><noinclude>{{documentation}}[[Category:Infobox]]</noinclude>
| p4 = {{#if:{{{image4|}}}|[[File:{{{image4}}}|{{{image_size4|}}}|{{{image_name4|{{{name|}}}}}}]]}}
| 4 = {{#if:{{{image4|}}}|[[File:{{{icon4|{{{image4}}}}}}|{{{icon_name4|{{{image_name4|{{{name|}}}}}}}}}|link=]]}}
| p5 = {{#if:{{{image5|}}}|[[File:{{{image5}}}|{{{image_size5|}}}|{{{image_name5|{{{name|}}}}}}]]}}
| 5 = {{#if:{{{image5|}}}|[[File:{{{icon5|{{{image5}}}}}}|{{{icon_name5|{{{image_name5|{{{name|}}}}}}}}}|link=]]}}
| caption = {{#if: {{{image_caption|}}}|''{{{image_caption|}}}''}}
}}{{#if:{{{nickname|}}}{{{sex|}}}{{{personality|}}}{{{occupation|}}}{{{traits|}}}{{{location|}}}
| {{Infobox/section <!-- ## General ## -->
| {{tt|name=Infobox character|default=General|arg1=general}}
| color = var(--color-red)
| id = character-general
| {{#if:{{{nickname|}}}
|{{Infobox/sandbox/row
|{{tt|name=Infobox character|default=Nickname|arg1=nickname}}
|{{{nickname|}}}
}}
}}{{#if:{{{sex|}}}
|{{Infobox/sandbox/row
|{{tt|name=Infobox character|default=Sex|arg1=sex}}
|{{{sex|}}}
}}
}}{{#if:{{{personality|}}}
|{{Infobox/sandbox/row
|{{tt|name=Infobox character|default=Personality|arg1=personality}}
|{{{personality|}}}
}}
}}{{#if:{{{occupation|}}}
|{{Infobox/sandbox/row
|{{tt|name=Infobox character|default=Occupation|arg1=occupation}}
|{{{occupation|}}}
}}
}}{{#if:{{{traits|}}}
|{{Infobox/sandbox/row
|{{tt|name=Infobox character|default=Traits|arg1=traits}}
|{{{traits|}}}
}}
}}{{#if:{{{location|}}}
|{{Infobox/sandbox/row
|{{tt|name=Infobox character|default=Location|arg1=location}}
|{{{location|}}}<br>{{#if:{{{coordinates|}}}|[[File:Geographylogo.png{{!}}26px{{!}}link=https://map.projectzomboid.com/?#{{{coordinates}}}{{!}}Show location on an interactive map.]]<span class="plainlinks" title="Show location on an interactive map.">[https://map.projectzomboid.com/?#{{{coordinates}}} {{{coordinates}}}]</span>}}
}}
}}
}}
}}{{#if:{{{items|}}}
|{{Infobox/section <!-- ## Items ## -->
| {{tt|name=Infobox character|default=Items|arg1=items}}
| color = var(--color-red)
| id = character-items
| <div style{{=}}"padding:0em 0.5em 0.5em;">{{{items|}}}</div>
}}
}}
}}</includeonly>

Latest revision as of 14:09, 14 April 2024

Notebook.pngTemplate Documentation

This is an infobox used on articles about an in-game character.

Usage

name
image1
image2
image3
image4
image5
General
Nickname
nickname
Sex
sex
Personality
personality
Occupation
occupation
Traits
traits
Location
location
Show location on an interactive map.coordinates
Items
items
{{Infobox character
|name=
|image=
|image2=
|image3=
|image4=
|image5=
|image_name=
|image_name2=
|image_name3=
|image_name4=
|image_name5=
<!-- GENERAL -->
|nickname=
|sex=
|personality=
|occupation=
|traits=
|location=
|coordinates=
<!-- ITEMS -->
|items=
}}

Example

Kate Smith
Concept art
Outfit
In-game (past)
In-game (future)
General
Sex
Female
Personality
Friendly
Location
Bob and Kate's safehouse
Show location on an interactive map.10746x9415
Items
Crutches, Bandages, Painkillers, Pillow
{{Infobox character
|name=Kate Smith
|image=805 max.jpg
|image3=Kate Smith.png
|image4=K&B intro.png
|image_name=Concept art
|image_name2=Outfit
|image_name3=In-game (past)
|image_name4=In-game (future)
|sex=Female
|personality=Friendly
|location=Bob and Kate's safehouse
|coordinates=10746x9415
|items=Crutches, Bandages, Painkillers, Pillow
}}

How to translate

This template is translatable.

Template code

Paste the following code into the <includeonly> tag of the translated template and translate the text after each = sign (except for #default =).

{{#switch: {{{1|}}}
<!-- section -->
| general = General
| items = Items
<!-- data -->
| nickname = Nickname
| sex = Sex
| personality = Personality
| occupation = Occupation
| traits = Traits
| location = Location
| #default = [[Category:Incorrect template usage]]
}}

Template documentation

Copy the code wrapped in the <noinclude> tag in this template and translate the text after doc = in the {{Documentation}} template.

{{Translation guide}} template should be removed from the translated documentation.
Editors can experiment in this template's sandbox.