Template:KeyDescription/Sandbox

From OpenStreetMap Wiki
Jump to: navigation, search
[Edit] [Octicons-sync.svgpurge] Template-info.svg Template documentation

This is a proposed replacement for the {{KeyDescription}} template. The goal is to let it get the data from the data items if needed, but continue to work with the template parameters as before. This offers a migration path to removing all the template parameters in the future. Note that the template itself has just a few lines. All of the work is done in Module:DescriptionFromDataItem. At a minimum, template needs to figure out what key it is describing. If this template is placed in a key page, it will automatically determine the right data item, so inserting it is as simple as {{KeyDescription}}, with no parameters. Magic. For this help page, we have to specify the key parameter. Everything else is optional.

TODO
  • Support statuslink URLs (stored as references in some of the entities)
  • The "status" localization word should come from data item, not be hardcoded in {{Description}}
  • Import and support seealso, required, and other, less structured values

Dynamic - no template parameters

These templates do not provide any functional parameters. For this demo page, you still have to specify the key/tag values because the current page is not where the template will be placed. Also need to specify the language code (might be required), and hide the languagelink bar to reduce the clutter.

Done
  • descriptions
  • image
  • element icons (node/way/area/...)
  • status
  • Support local restrictions with the limited to language (P26) qualifiers (e.g. noexit=* should not be used on ways in the German-speaking regions)
{{KeyDescription/Sandbox
  |key=bridge:movable
  |lang=en
  |languagelinks=no
}}
lang=en lang=fr lang=de
Public-images-osm logo.svg bridge:movable
MovableBridge roll.gif
Description
The mechanism by which a movable bridge moves to clear the way below. Edit or translate this description.
Group: Bridges
Used on these elements
should not be used on nodesmay be used on waysmay be used on areasmay be used on relations
Wikidata
Status: approvedPage for proposal

Public-images-osm logo.svg bridge:movable
MovableBridge roll.gif
Description
Décrit le mécanisme par lequel un pont mobile fait mouvement pour dégager le passage sur la voie inférieure. Edit or translate this description.
Groupe: Ponts
Utilisé pour ces éléments
ne devrait pas être utilisé sur des nœudspeut être utilisé sur des cheminspeut être utilisé sur des zonespeut être utilisé sur des relations
Wikidata
Statut : approuvéPage for proposal

Public-images-osm logo.svg bridge:movable
MovableBridge roll.gif
Beschreibung
Mechanismus, der die bewegliche Brücke öffnet Edit or translate this description.
Gruppe: Brücken
Für diese Elemente
sollte nicht über Punkten verwendet werdenkann Linien zugeordnet werdenkann Flächen zugeordnet werdenkann Relationen zugeordnet werden
Wikidata
Status: akzeptiertPage for proposal

Template with parameters that partially match data item

Here are some examples of how side cards will be different when generated with and without parameters. In each pair, left card is generated just like above, without parameters.

bridge:movable=*

{{KeyDescription/Sandbox
|key=bridge:movable
|languagelinks=no
}}
{{KeyDescription/Sandbox
|key=bridge:movable
|image=File:MovableBridge roll.gif
|description=The mechanism by which a movable bridge moves to clear the way beloweea.
|group=Bridges
|onNode=no
|onWay=yes
|onArea=yes
|onRelation=yes
|combination=
* {{Tag|bridge|movable}}
* {{Tag|man_made|bridge}}
|status=approved
|statuslink=Proposed features/Bridge types
|languagelinks=no
}}

noexit=* with the English description:

{{KeyDescription/Sandbox
|key=noexit
|languagelinks=no
}}
{{KeyDescription/Sandbox
|key=noexit
|description=To describe the end of a way.
|image=File:Noexit.jpg
|group=Restrictions
|onNode=yes
|onWay=yes
|onArea=no
|onRelation=no
|status=In use
|languagelinks=no
}}

noexit=* with the German description.
Note that the onWay here is different because the German-speaking community prohibits it. See noexit (Q501).

{{KeyDescription/Sandbox
|key=noexit
|lang=de
|languagelinks=no
}}
{{KeyDescription/Sandbox
|key=noexit
|image=File:Noexit.jpg
|description=Beschreibt, dass ab diesem Punkt kein Weiterkommen möglich ist
|group=Properties
|onNode=yes
|onWay=no
|onArea=no
|onRelation=no
|lang=de
|status=In use
|languagelinks=no
}}
Public-images-osm logo.svg bridge:movable
MovableBridge roll.gif
Description
The mechanism by which a movable bridge moves to clear the way below. Edit or translate this description.
Group: Bridges
Used on these elements
should not be used on nodesmay be used on waysmay be used on areasmay be used on relations
Wikidata
Status: approvedPage for proposal

Public-images-osm logo.svg bridge:movable
MovableBridge roll.gif
Description
The mechanism by which a movable bridge moves to clear the way beloweea. Edit this description in the wiki page. Edit this description in the data item.
Group: Bridges
Used on these elements
should not be used on nodesmay be used on waysmay be used on areasmay be used on relations
Useful combination
Wikidata
Status: approvedPage for proposal

Public-images-osm logo.svg noexit
Noexit.jpg
Description
To describe the end of a way. Edit or translate this description.
Group: Restrictions
Used on these elements
may be used on nodesmay be used on waysshould not be used on areasshould not be used on relations
Wikidata
Status: in use

Public-images-osm logo.svg noexit
Noexit.jpg
Description
To describe the end of a way. Edit or translate this description.
Group: Restrictions
Used on these elements
may be used on nodesmay be used on waysshould not be used on areasshould not be used on relations
Wikidata
Status: in use

Public-images-osm logo.svg noexit
Noexit.jpg
Beschreibung
Beschreibt, dass ab diesem Punkt kein Weiterkommen möglich ist Edit or translate this description.
Gruppe: Eigenschaften
Für diese Elemente
kann Punkten zugeordnet wardensollte nicht über Linien verwendet werdensollte nicht über Flächen verwendet werdensollte nicht über Relationen verwendet werden
Wikidata
Status: in Benutzung

Public-images-osm logo.svg noexit
Noexit.jpg
Beschreibung
Beschreibt, dass ab diesem Punkt kein Weiterkommen möglich ist Edit or translate this description.
Gruppe: Properties
Für diese Elemente
kann Punkten zugeordnet wardensollte nicht über Linien verwendet werdensollte nicht über Flächen verwendet werdensollte nicht über Relationen verwendet werden
Wikidata
Status: in Benutzung