Template:Altnames: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Edited the example text further.)
m (autolang replace)
 
(20 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<includeonly><div title="Information" style="margin:0.4em 1em 0.5em;"><strong style="color:#CDF4FF;display:table-cell;text-align:right;white-space:nowrap;padding-right:0.3em;">[[File:Note.png|link=|alt=]] Alternate Names:</strong><span style="display:table-cell;">{{{1}}}</span></div></includeonly><noinclude>
{{ulf|en=1|ru=1|zh=1}}
{{AltNames|This entity has the deprecated/alternative classname(s) of '''x''' and '''y''', which is/are seen in ''z''.}}
{{doc}}
[[Category:Notice templates|{{PAGENAME}}]]</noinclude>
<onlyinclude><includeonly><!--
-->{{Notify
| mode = inline
| img = AltNames.png
| size = 10px
| type = AltNames
| color = 150,150,250
| offset = {{{offset|}}}
|{{{1| {{#switch: {{language}}<!--
 
English
-->
|#default = {{#if: {{{game|}}}|In {{{game}}}, this entity is also tied to |This entity is also tied to }}&nbsp;<!--
-->{{#if: {{{name1|}}} |  <code style=padding:0>{{{name1}}}</code> }}<!--
-->{{#if: {{{name2|}}} | {{#if:{{{name3|}}}|,&nbsp;|&nbsp;and&nbsp;}}<code style=padding:0>{{{name2}}}</code> }}<!--
-->{{#if: {{{name3|}}} | {{#if:{{{name4|}}}|,&nbsp;|&nbsp;and&nbsp;}}<code style=padding:0>{{{name3}}}</code> }}<!--
-->{{#if: {{{name4|}}} | {{#if:{{{name5|}}}|,&nbsp;|&nbsp;and&nbsp;}}<code style=padding:0>{{{name4}}}</code> }}<!--
-->{{#if: {{{name5|}}} | {{#if:{{{name6|}}}|,&nbsp;|&nbsp;and&nbsp;}}<code style=padding:0>{{{name5}}}</code> }}<!--
-->{{#if: {{{name6|}}} | {{#if:{{{name7|}}}|,&nbsp;|&nbsp;and&nbsp;}}<code style=padding:0>{{{name6}}}</code> }}<!--
-->{{#if: {{{name7|}}} | {{#if:{{{name8|}}}|,&nbsp;|&nbsp;and&nbsp;}}<code style=padding:0>{{{name7}}}</code> }}<!--
-->{{#if: {{{name8|}}} | &nbsp;and&nbsp;<code style=padding:0>{{{name8}}}</code> }}.<!--
 
Chinese
-->
|zh={{#if: {{{game|}}}|在 {{{game}}} 中,此实体也绑定到 |此实体也绑定到 }}&nbsp;<!--
-->{{#if: {{{name1|}}} |  <code style=padding:0>{{{name1}}}</code> }}<!--
-->{{#if: {{{name2|}}} | {{#if:{{{name3|}}}|、|&nbsp;和&nbsp;}}<code style=padding:0>{{{name2}}}</code> }}<!--
-->{{#if: {{{name3|}}} | {{#if:{{{name4|}}}|、|&nbsp;和&nbsp;}}<code style=padding:0>{{{name3}}}</code> }}<!--
-->{{#if: {{{name4|}}} | {{#if:{{{name5|}}}|、|&nbsp;和&nbsp;}}<code style=padding:0>{{{name4}}}</code> }}<!--
-->{{#if: {{{name5|}}} | {{#if:{{{name6|}}}|、|&nbsp;和&nbsp;}}<code style=padding:0>{{{name5}}}</code> }}<!--
-->{{#if: {{{name6|}}} | {{#if:{{{name7|}}}|、|&nbsp;和&nbsp;}}<code style=padding:0>{{{name6}}}</code> }}<!--
-->{{#if: {{{name7|}}} | {{#if:{{{name8|}}}|、|&nbsp;和&nbsp;}}<code style=padding:0>{{{name7}}}</code> }}<!--
-->{{#if: {{{name8|}}} | &nbsp;和&nbsp;<code style=padding:0>{{{name8}}}</code> }}。<!--
 
Russian
-->
|ru={{#if: {{{game|}}}|В {{{game}}} этот объект имеет наименование|Этот объект также именуется как}}&nbsp;<!--
-->{{#if: {{{name1|}}} |   <code style=padding:0>{{{name1}}}</code> }}<!--
-->{{#if: {{{name2|}}} | {{#if:{{{name3|}}}|,&nbsp;|&nbsp;и&nbsp;}}<code style=padding:0>{{{name2}}}</code> }}<!--
-->{{#if: {{{name3|}}} | {{#if:{{{name4|}}}|,&nbsp;|&nbsp;и&nbsp;}}<code style=padding:0>{{{name3}}}</code> }}<!--
-->{{#if: {{{name4|}}} | {{#if:{{{name5|}}}|,&nbsp;|&nbsp;и&nbsp;}}<code style=padding:0>{{{name4}}}</code> }}<!--
-->{{#if: {{{name5|}}} | {{#if:{{{name6|}}}|,&nbsp;|&nbsp;и&nbsp;}}<code style=padding:0>{{{name5}}}</code> }}<!--
-->{{#if: {{{name6|}}} | {{#if:{{{name7|}}}|,&nbsp;|&nbsp;и&nbsp;}}<code style=padding:0>{{{name6}}}</code> }}<!--
-->{{#if: {{{name7|}}} | {{#if:{{{name8|}}}|,&nbsp;|&nbsp;и&nbsp;}}<code style=padding:0>{{{name7}}}</code> }}<!--
-->{{#if: {{{name8|}}} | &nbsp;и&nbsp;<code style=padding:0>{{{name8}}}</code> }}.<!--
 
 
-->
}} {{{misc|}}} }}}<!--
-->}}<!--
--></includeonly></onlyinclude>

Latest revision as of 02:17, 6 August 2024

English (en)Русский (ru)中文 (zh)
English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history
Inline note templates
Template Pages using it
28 August 2024
{{note}} 6,436
{{warning}} 1,253
{{bug}} 1,192
{{tip}} 1,516
{{todo}} 1,628
{{inline note}} 2,188
{{confirm}} 672
{{question}} 11
{{fix}} 170
{{important}} 459
{{clarify}} 169
{{elaborate}} 18
{{main}} 143
{{distinguish}} 85
{{workaround}} 122
{{seealso}} 145
{{when}} 1
{{where}} 0
{{which}} 2
{{why}} 38
{{idea}} 21
{{placementTip}} 13
{{codenote}} 21
{{altnames}} 35
{{deprecated}} 109
{{how}} 23
{{example}} 16
{{confusion}} 53
{{thanks}} 7
{{code Fix}} 9 + 7 (16)
{{vote}} 4

This template is intended to be used when multiple entity classnames are tied to single C++ class and they are also usable interchangeably with no or very little side effects, especially those that do not appear to serve any purpose other than deprecation.

Best example of this is prop_physics and physics_prop because physics_prop's classname keyvalue is also fixed-up to prop_physics immediately as it spawns before any classname checks can happen. But prop_physics_override which is also fixed-up shortly after spawning to prop_physics would not be marked as altname because the usage of the entity differs and there are checks in code that allowed it to spawn despite the model not having prop data.

Usage

Parameters

  • {{{name1}}} to {{{name8}}} - The alternate classnames.
  • {{{misc}}} - Optional: Use to display additional text in the same note.
  • {{{suf}}} - Optional: This is a suffix that will be added to all elements of the template to display the content in the desired language (if it is translated into it).
    Note.pngNote:There should be a colon before the language code, for example ":es".

Example

{{altnames|name1=x|name2=y|name3=z}} would return as:

AltNames.pngAltNames: This entity is also tied to xy and z.

{{altnames|name1=x|game={{game link|portal}}}} would return as:

AltNames.pngAltNames: In Portal Portal , this entity is also tied to x.