User:Charel/Template:DescriptionCategoriesTest

From OpenStreetMap Wiki
Jump to navigation Jump to search
[Edit] [Purge] Documentation

Aim

A unique, yet flexible framework to categorise relation, key and value descriptions.

Usage

You can choose which categories to use and how to name them in the translation template Template:DescriptionCategoriesLang

Parameters

  • type
  • key
  • value
  • group

as used in Template:KeyDescription and Template:ValueDescription

Examples

You might try these examples in the Template Expander. Just copy them in the main frame, and enter a random page title in the "Context title" line (different language namespaces will get you different results).

 {{DescriptionCategories|type=value|key=building|value=house|group=building}}
 {{DescriptionCategories|type=key|key=building|group=building}}
 {{DescriptionCategories|type=relation}}

Thoughts

  • Subcategories are only used if they exist (to avoid spamming small languages with red-link categories).
  • The categories Key descriptions, Tag descriptions by key and Tag descriptions by value act as some sort of "overview lists" for those who do not want to click through tons of subcategories.
  • Currently, the English namespace is being used like a "global" namespace (e.g. see Category:Tag_descriptions_by_value). However, global categories are not needed if the main categories have a {languages} template. (Already working on that within the current setup)
  • (Idea/Todo:It might be useful to add a "catching" category to monitor keys and tags which are not organised in group subcategories) Done

See also