Template:ValueDescription/doc: Difference between revisions
(→Usage: removed specialty params to avoid their proliferation on regular wiki pages) |
(→Additional information: added the rest of the statuses from Template:StatusLang) |
||
(One intermediate revision by the same user not shown) | |||
Line 3: | Line 3: | ||
{{Heavily used template}} |
{{Heavily used template}} |
||
=== Intro === |
=== Intro === |
||
This template provides a description box suitable for key/value pairs. As of December 2018, a backing [[ |
This template provides a description box suitable for key/value pairs. As of December 2018, a backing [[Data items|data item]] is created either by a bot or by hand for all pages that use this template. The bot copies many of the template parameters to the data item, making them available in a machine-readable format. |
||
This template uses corresponding data item for some of the missing parameters (e.g. key, image, description, group, status, on*, ...), so in theory most of the template parameters are no longer needed, but they should not be deleted just yet -- some tools like [[TagInfo]] do not consume data items directly, but instead try to parse template parameters. Once TagInfo is updated, it will be ok to delete parameters -- just placing '''<nowiki>{{ValueDescription}}</nowiki>''' template without parameters to a properly named Tag:* or Lang:Tag:* page will show values from the data item in the correct language (for other pages '''key''', '''value''', and '''lang''' parameters will still be needed). |
This template uses corresponding data item for some of the missing parameters (e.g. key, image, description, group, status, on*, ...), so in theory most of the template parameters are no longer needed, but they should not be deleted just yet -- some tools like [[TagInfo]] do not consume data items directly, but instead try to parse template parameters. Once TagInfo is updated, it will be ok to delete parameters -- just placing '''<nowiki>{{ValueDescription}}</nowiki>''' template without parameters to a properly named Tag:* or Lang:Tag:* page will show values from the data item in the correct language (for other pages '''key''', '''value''', and '''lang''' parameters will still be needed). |
||
Line 117: | Line 117: | ||
* '''seeAlso''': references to additional pages which may be of interest |
* '''seeAlso''': references to additional pages which may be of interest |
||
* '''status''': the approval status of this feature; possible values include: |
* '''status''': the approval status of this feature; possible values include: |
||
⚫ | |||
⚫ | |||
⚫ | |||
** <code>approved</code>: the feature has successfully competed the approval process |
** <code>approved</code>: the feature has successfully competed the approval process |
||
** <code>de facto</code>: not an approved feature, but commonly used in the map |
|||
⚫ | |||
** <code>deprecated</code>: [[deprecated features|deprecated tags]] that will not be used anymore |
|||
** <code>discardable</code>: a few features not carrying any meaning anymore like [[Tag:odbl=clean]] |
|||
⚫ | |||
** <code>inactive</code>: more general term for any one of <code>abandoned</code>, <code>deprecated</code>, <code>discardable</code>, <code>obsolete</code>, or <code>unspecified</code> |
|||
⚫ | |||
** <code>obsolete</code>: an unapproved feature which is now superceded by a different approved one |
|||
⚫ | |||
** <code>rejected</code>: the feature was rejected during the approval process |
** <code>rejected</code>: the feature was rejected during the approval process |
||
** <code>unspecified</code> or <code>undefined</code> or <code>unknown</code>: unclear situation, a potentially abandoned draft of a proposal and some usage only |
|||
** <code>voting</code>: the feature is currently being voted on as part of the approval process |
** <code>voting</code>: the feature is currently being voted on as part of the approval process |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
* '''wikidata''': the equivalent, top-level, item on [[Wikidata]] |
* '''wikidata''': the equivalent, top-level, item on [[Wikidata]] |
||
Revision as of 09:17, 30 May 2019
This is a documentation subpage for Template:ValueDescription. It contains usage information, categories and other content or metadata that is not part of the original template. |
Please discuss proposed changes on the talk page first.
Editing a template causes all pages that use the template to be re-rendered. If the Template is used often, this can put a lot of load on the servers since it fills up the job queue. [statistics]
Intro
This template provides a description box suitable for key/value pairs. As of December 2018, a backing data item is created either by a bot or by hand for all pages that use this template. The bot copies many of the template parameters to the data item, making them available in a machine-readable format.
This template uses corresponding data item for some of the missing parameters (e.g. key, image, description, group, status, on*, ...), so in theory most of the template parameters are no longer needed, but they should not be deleted just yet -- some tools like TagInfo do not consume data items directly, but instead try to parse template parameters. Once TagInfo is updated, it will be ok to delete parameters -- just placing {{ValueDescription}} template without parameters to a properly named Tag:* or Lang:Tag:* page will show values from the data item in the correct language (for other pages key, value, and lang parameters will still be needed).
To view or translate the data item, click the gray pencil icon next to the description, or click the OpenStreetMap Wiki item link in the left sidebar. If the description is different from the data item, it will also show a red pencil icon to edit the wiki page itself. They should be made identical. Description should be one or more complete sentences (start with a capitalized letter, ending with a period), max 250 symbols. Do not use any wiki markup. English label should be identical to the tag (key=value, usually a lower case). When translating, make sure to add description, but labels are optional. Do not copy English label if it is the same. Some languages like to add "nativekey" and "nativevalue" - a localized alternative to the original tag. Lastly, add any number of alternative names for the key to the "also known as" (aliases) column. Some tools use aliases to offer a quick key search.
All data item logic is done by Module:DescriptionFromDataItem Lua code.
Usage
Vertical list | Prerequisites | Brief instructions / notes |
---|---|---|
{{ValueDescription | key = | value = | image = | image_caption = | description = | osmcarto-rendering = | osmcarto-rendering-size = | group = | onNode = | onWay = | onArea = | onRelation = | requires = | implies = | combination = | seeAlso = | status = | statuslink = | wikidata = }} |
image status |
|
- If a field name is listed in the Prerequisites column it is a prerequisite for the field to the left.
Parameters
The following parameters are recognised:
Feature description
- key: the key being described
- value: the value being described
- image: the name of an image to be used to illustrate the feature
- image_caption: the description of the image to be used to illustrate the feature (optional)
- description: a short description of the feature in question. Description is preferable to a single word, as it reduces chances for miscommunication - author of a definition is unable to assess whatever one specific word is ambiguous to all readers
- osmcarto-rendering: to show the osmcarto rendering (use
osmcarto-rendering-size
at the same time) - group: the name of the broader group to which this feature belongs. Please use names from Category:Features or from your namespaced (Category:DE:Features) or l10n version. Working example can be found in Tag:amenity=bbq and Category:Amenities. Namespaced category will be generated from Template:Feature. Just use template Template:Feature at your l10n page (for ex. DE:Busse) and it will create category Category:DE:Busse for you. Right now it works by creating namespaced categories, we need to further improve Template:Feature and add support for l10n names as parameter in Feature template.
Feature usage
- onNode:
yes
if the feature being described is suitable for use on node elements,no
otherwise - onWay:
yes
if the feature being described is suitable for use on (unclosed) way elements,no
otherwise - onArea:
yes
if the feature being described is suitable for use on area elements,no
otherwise - onRelation:
yes
if the feature being described is suitable for use on (non-multipolygon) relation elements,no
otherwise
Additional information
- requires: a list of tags which are necessary (often higher/lower in hierarchy) for this tag and must be set to give its actual meaning;
- implies: a list of tags/values which are assumed when absent; see below for examples; tag them explicitly for exceptions
- combination: a list of additional tags which are useful in combination with this one; see below for examples
- seeAlso: references to additional pages which may be of interest
- status: the approval status of this feature; possible values include:
- statuslink: name of the proposal page, for linking
abandoned
: the approval process for this feature has been terminated before completionapproved
: the feature has successfully competed the approval processde facto
: not an approved feature, but commonly used in the mapdefacto
: the tag is in widespread use, but no formal proposal process has taken placedeprecated
: deprecated tags that will not be used anymorediscardable
: a few features not carrying any meaning anymore like Tag:odbl=cleandraft
: the feature has a draft proposal being writteninactive
: more general term for any one ofabandoned
,deprecated
,discardable
,obsolete
, orunspecified
inuse
: the feature is in useobsolete
: an unapproved feature which is now superceded by a different approved oneproposed
: the feature has been formally proposedrejected
: the feature was rejected during the approval processunspecified
orundefined
orunknown
: unclear situation, a potentially abandoned draft of a proposal and some usage onlyvoting
: the feature is currently being voted on as part of the approval process
- wikidata: the equivalent, top-level, item on Wikidata
Language support
- lang: the ISO 639-2 code for the language used to document this feature: this will generate aspects of the description box in the specified language, if translations are available
Advanced formatting parameters
These parameters can generally be ignored by the majority of users. They are available for fine-tuning the presentation of the description box, and are useful for including in examples, or embedding in tutorial pages.
- class: specify the CSS class of the HTML table used to form the description box
- float: specify the CSS float value of the table: set to
none
to disable the standard right float - style: the CSS style to be applied to the HTML table: overrides
|float=
if present - languagelinks: set to
no
to inhibit links to corresponding pages in other languages
Examples
Note: In these examples, long lines have been wrapped for convenience. The advanced formatting parameters, class, float, style and languagelinks are not shown, as their values are too specific to use them as examples.
{{ValueDescription | type = value | key = dessert | value = cheesecake | image = File:Cheesecake image.jpg | image_caption = A slice of cheesecake. | description = Cheesecake is a type of cake with two layers: a soft, deep top layer and a firm bottom layer. | onNode = yes | onWay = no | onArea = | onRelation = yes | requires = Good quality cheese | combination = * {{tag|meal|dinner}} * {{tag|flavour|lemon}} * {{tag|origin|new_york}} | implies = * {{tag|edible|yes}} * {{tag|sweet|yes}} | seeAlso = The {{tag|dessert|gateau}} tag is sometimes confused with this one. | status = Imaginary | lang = en }}
dessert = cheesecake |
Description |
---|
Cheesecake is a type of cake with two layers: a soft, deep top layer and a firm bottom layer. |
Used on these elements |
Requires |
Good quality cheese |
Implies |
Useful combination |
See also |
Status: imaginary |
Tools for this tag |
|
- (debug) Category:Tag descriptions by group, sorted as "dessert cheesecake".
- (debug) Category:Tag descriptions by key, sorted as "dessert cheesecake".
- (debug) Category:Tag descriptions, sorted as "dessert cheesecake".
- (debug) Category:Tag descriptions by value, sorted as "cheesecake dessert".
- (debug) Category:Tag descriptions with status "imaginary", sorted as "dessert cheesecake".
- (debug) [[:Category:]]
{{ValueDescription | type = value | key = highway | value = residential | image = Image:Residential.jpg | description = Road in a residential area | onNode = no | onWay = yes | onArea = no | onRelation = | combination = * {{Key|name}} * {{Key|oneway}} | implies = | seeAlso = | status = Approved | lang = }}
highway = residential |
Description |
---|
Road in a residential area |
Rendering in OSM Carto |
Group: highways |
Used on these elements |
Useful combination |
See also |
Status: approved |
Tools for this tag |
|
- (debug) Category:Tag descriptions for group "highways", sorted as "highway residential".
- (debug) Category:Tag descriptions for key "highway", sorted as "residential".
- (debug) Category:Tag descriptions, sorted as "highway residential".
- (debug) Category:Tag descriptions by value, sorted as "residential highway".
- (debug) Category:Tag descriptions with status "approved", sorted as "highway residential".
{{ValueDescription | type = value | key = power | value = generator | image = File:Kraftwerk Staudinger von_Limes-B.jpg | description = Kraftwerk - dient der Erzeugung von Strom oder Wärme | onNode = yes | onWay = yes | onArea = yes | onRelation = | combination = * {{Key|generator:source|kl=DE}} * {{Key|generator:method|kl=DE}} * {{Key|generator:output|kl=DE}} * {{Tag|name|kl=DE}} * {{Tag|operator|kl=DE}} | implies = | seeAlso = | status = | lang = de }}
power = generator |
Beschreibung |
---|
Kraftwerk - dient der Erzeugung von Strom oder Wärme |
Darstellung in OSM Carto |
Gruppe: Energie |
Für diese Elemente |
Sinnvolle Kombinationen |
Status: akzeptiert |
Werkzeuge für dieses Attribut |
|
- (debug) Category:DE:Beschreibungen der Attribute für Gruppe "Energie", sorted as "power generator".
- (debug) Category:DE:Beschreibungen der Attribute für Schlüssel "power", sorted as "generator".
- (debug) Category:DE:Beschreibungen der Attribute, sorted as "power generator".
- (debug) Category:DE:Beschreibungen der Attribute nach Wert, sorted as "generator power".
- (debug) Category:DE:Beschreibungen der Attribute mit Status "akzeptiert", sorted as "power generator".
See also
- {{Description}}
- {{KeyDescription}}
- {{RelationDescription}}