Changes between Version 7 and Version 8 of De:TaggingPresets


Ignore:
Timestamp:
2014-10-29T13:56:16+01:00 (9 years ago)
Author:
Klumbumbus
Comment:

update

Legend:

Unmodified
Added
Removed
Modified
  • De:TaggingPresets

    v7 v8  
    1 [[TranslatedPages(revision=56,outdated=Die Syntax der Objektvorlagen wurde geändert - deshalb benötigt diese Seite eine Bearbeitung\, partielle Übersetzung)]]
     1[[TranslatedPages(revision=57,outdated=Die Syntax der Objektvorlagen wurde geändert und die Kopie des XML-Dokuments muss mit der Wikidokumentation zusammengeführt werden. Weiterhin sind einige Teile noch nicht übersetzt.)]]
    22= Objektvorlagen =
    33
     
    144144To support translations, all textual elements may be used in translated form. E.g. "de.name" would represent the name in case German language support is loaded.
    145145
     146=== Format description from XML document (needs to be joined with above texts) ===
     147
     148item:
     149  name: the text to display
     150  icon: the icon to display
     151  - relative to the icon path
     152  - URL's are also supported to allow remote icons (are cached locally)
     153  type: the data types - way,node,relation,closedway (separated by comma)
     154  name_template: define custom formatting for OSM primitives
     155                 see [[NameTemplate]]
     156  preset_name_label: whether to insert "[preset name]" label in dialog
     157                     (defaults to "false" for backward-compatibility on external presets)
     158
     159preset_link: a link to an other preset
     160  preset_name: the exact name of the preset to link to
     161
     162label: simple static text label
     163  text: the text to display
     164  icon: location of icon to display (optional)
     165  icon_size: maximal size of icon (optional). If no value is given, default is 16px
     166
     167optional: optional tags, short for "space" plus "label" plus "space"
     168  text: the text to display (defaults to "Optional Attributes:")
     169
     170item_separator: horizontal separator line between items (in window)
     171
     172key: fixed key/value pair to be set
     173  key: key to set
     174  value: value to set
     175  match: none/key/key!/keyvalue/keyvalue! (default is "keyvalue!", see below for more information)
     176
     177text: text box
     178  key: key to set
     179  text: fixed label to display
     180  default: default string to display (defaults to "")
     181  use_last_as_default: true/false/force (default is "false")
     182  auto_increment: may contain a comma separated list of integer increments or
     183                  decrements, e.g. "-2,-1,+1,+2"; a button will be shown next
     184                  to the text field for each value, allowing the user to select
     185                  auto-increment with the given stepping. auto-increment only
     186                  happens if the user selects it. default is no auto-increment;
     187                  mutually exclusive with use_last_as_default.
     188  match: none/key/key!/keyvalue/keyvalue! (default is "none", see below for more information)
     189  length: length of input box (number of characters allowed)
     190  alternative_autocomplete_keys: comma separated list of alternative keys to use for autocompletion
     191
     192combo: combo box, with multiple choices and possible to enter free form text
     193  key: key to set
     194  text: fixed label to display
     195  delimiter: character that separates values (default: comma)
     196  values: separated list of values
     197  values_from: to use instead of "values" if the list of values has to be obtained with a Java method
     198               of this form: public static String[] getValues();
     199               The value must be: "full.package.name.ClassName#methodName"
     200  display_values: comma separated list of values to be displayed instead of the
     201                  database values, order and number must be equal to values
     202  short_descriptions: comma separated list of texts to be displayed below each
     203                      display_value. (Only if it is not possible to describe
     204                      the entry in 2-3 words.) Instead of comma separated list
     205  instead using values, display_values and short_descriptions, the following form is also supported:
     206    <list_entry value="" display_value="" short_description="" icon="" icon_size="" />
     207        icon: location of icon
     208        icon_size: maximal size of icon. If tag is not setup it is taken default size of icon file
     209  default: default string to display (defaults to "")
     210  use_last_as_default: true/false/force (default is "false")
     211  editable: allow to add other values as text (default is "true")
     212  match: none/key/key!/keyvalue/keyvalue! (default is none, see below for more information)
     213  values_searchable: true/false (whether to search in combo (display_)values when searching for presets)
     214  length: length of input box (number of characters allowed)
     215
     216multiselect: list of values from which zero or more can be selected
     217  key: key to set
     218  text: fixed label to display
     219  delimiter: character that separates values (default: semicolon) - this
     220             will also be used to separate selected values in the tag.
     221  values: delimiter-separated list of values (delimiter can be escaped with backslash)
     222  values_from: to use instead of "values" if the list of values has to be obtained with a Java method
     223               of this form: public static String[] getValues();
     224               The value must be: "full.package.name.ClassName#methodName"
     225  rows: specify the number of rows to display (default -1)
     226  display_values: delimiter-separated list of values to be displayed instead of the
     227                  database values, order and number must be equal to values
     228  short_descriptions: delimiter-separated list of texts to be displayed below each
     229                      display_value. (Only if it is not possible to describe
     230                      the entry in 2-3 words.) Instead of a separated list
     231  instead using values, display_values and short_descriptions, the following form is also supported:
     232    <list_entry value="" display_value="' short_description="" icon="" icon_size="" />
     233        icon: location of icon
     234        icon_size: maximal size of icon. If tag is not setup it is taken default size of icon file
     235  default: default string to display (defaults to "")
     236  use_last_as_default: true/false/force (default is "false")
     237  match: none/key/key!/keyvalue/keyvalue! (default is "none", see below for more information)
     238  values_searchable: true/false (whether to search in multiselect (display_)values when searching for presets)
     239
     240checkgroup: group of checks
     241  columns: number of columns
     242
     243check: checkbox
     244  key: key to set
     245  text: fixed label to display
     246  default: ticked on/off (default is "off")
     247  value_on: the value to set when checked (default is "yes")
     248  value_off: the value to set when unchecked (default is "no")
     249  disable_off: whether the off value is disabled in the dialog, i.e., only unset or yes are provided
     250  match: none/key/key!/keyvalue/keyvalue! (default is "none", see below for more information)
     251
     252role: type to specify possible roles in relations
     253  key: the role name used in relation
     254  text: fixed label to display
     255  requisite: optional/required (default is "optional")
     256  count: how often can the role occur (if not given unlimited number is assumed)
     257  type: the data types - way,node,relation,closedway (separated by comma)
     258  member_expression: an expression (cf. search dialog) for objects of this role
     259
     260chunk: a template of elements for later (repeated) use
     261  id: the unique identifier for this chunk
     262
     263reference: include an earlier defined template
     264  ref: the unique identifier of the (already defined) template to include
     265
     266 presets: For external files <presets> should have following attributes:
     267   author: the author of the preset
     268   version: a version number of some sort (e.g. creation date)
     269   description: what is your preset meant to be
     270   shortdescription: very short description
     271   link: a link to a helpful website (optional)
     272   icon: an icon for the whole presets
     273 The fields description, shortdescription and link may also be localized (e.g. de.link)
     274
     275The fields "name", "text", "display_values" may also be localized (e.g. de.name).
     276When translations of equal words but different meanings may conflict, a translation
     277context should be specified. Use "name_context", "text_context" or "values_context"
     278for this. The context should be a meaningful short description to help translators.
     279
     280In JOSM internally all "name", "text" and "display_values" are translated when
     281no specific translation has been given in XML file. When no "display_values"
     282are supplied, then "values" will be treated as "display_values" and translated instead.
     283
     284The match attribute allows to change the matching process, i.e., determining whether
     285the tags of an OSM object fit into this preset.
     286 - none: neutral, i.e., do not consider this item for matching
     287 - key: positive if key matches, neutral otherwise
     288 - key!: positive if key matches, negative otherwise
     289 - keyvalue: positive if key and value matches, neutral otherwise
     290 - keyvalue!: positive if key and value matches, negative otherwise
     291Note that for a match, at least one positive and no negative is required.
     292
    146293=== Benutzung von Symbolen ===
    147294Siehe [wiki:De:Styles#Iconhandling Styles].