Changes between Version 11 and Version 12 of De:TaggingPresets


Ignore:
Timestamp:
2014-11-03T23:35:25+01:00 (7 years ago)
Author:
Klumbumbus
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • De:TaggingPresets

    v11 v12  
    1 [[TranslatedPages(revision=75,outdated=Die Syntax der Objektvorlagen wurde geändert und die Kopie des XML-Dokuments muss mit der Wikidokumentation zusammengeführt werden. Wenn dies geschehen ist müssen die Änderungen hier übernommen werden und schließlich dieser Teil noch übersetzt werden. Außerdem sollte das Beispiel geändert werden weil es für OSM ungewöhnliche Schlüssel-Wert-Kombinationen nutzt und Straßen normalerweise NICHT Einbahnstraßen sind.)]]
     1[[TranslatedPages(revision=86,outdated=Die Syntax der Objektvorlagen wurde geändert und die Kopie des XML-Dokuments muss mit der Wikidokumentation zusammengeführt werden. Wenn dies geschehen ist müssen die Änderungen hier übernommen werden und schließlich dieser Teil noch übersetzt werden. Außerdem sollte das Beispiel geändert werden weil es für OSM ungewöhnliche Schlüssel-Wert-Kombinationen nutzt und Straßen normalerweise NICHT Einbahnstraßen sind.)]]
    22[[PageOutline(2-10,Inhaltsverzeichnis)]]
    33= Objektvorlagen =
     
    5252   * '''shortdescription''' (i18n) - very short overview description i.e. the "name" of the preset
    5353   * '''link''' (i18n) - web link to further details (optional)
    54    * '''icon''' - informational icon for the whole preset. (For presets managed in this wiki this is nedded to display the icon in the table at [[Presets]].)
     54   * '''icon''' - informational icon for the whole preset. (This is nedded to display the icon in the table at [[Presets]].)
    5555(i18n) means the values may also be localized (e.g. de.link).
    5656==== Comments ====
     
    6464 '''<separator/>'''::
    6565   Insert a line separator into the menu.
    66 ==== Create instructions for the user ====
     66==== Preset window layout ====
    6767 '''<label>'''::
    68    Labels are static texts for display. ''text'' is a required attribute.
     68   Labels are static texts for display. ''text'' is a required attribute, ''icon'' and ''icon_size'' are optional.
     69 '''<space />'''::
     70   Add some space (ie a newline).
    6971 '''<optional>'''::
    70    Used to group some optional elements of an item. Possibly equivalent to <label text="Optional Attributes:"/>
    71  '''<space />'''::
    72    Add some space (ie a newline) in the preset display.
     72   Used to group some optional elements of an item. The ''text'' attribute is optional. If used without ''text'' then this is equivalent to <space /><label text="Optional Attributes:"/><space />
    7373 '''<item_separator />'''::
    74    Add a horizontal separator line between items (in preset window).
     74   Add a horizontal separator line between items.
    7575 '''<link>'''::
    7676   Specify a web link for this feature or to anything else of use. The ''href'' attribute is required.
     77 '''<checkgroup>'''::
     78   To group checks. The ''columns'' attribute is required.
     79 '''<roles>'''::
     80   This is required around <role> and adds the heading ("Availible roles role count elements") to the table which is generated by several <role>.
     81 '''<role>'''::
     82   To specify possible roles of members in relations. The ''key'' attribute is required, ''text'', ''requisite'', ''count'', ''type'' and ''member_expression'' are optional.
     83 '''<preset_link>'''::
     84   Adds a link to an other preset. The ''preset_name'' attribute is required.
    7785==== Set a fixed key value pair ====
    7886 '''<key>'''::
     
    102110   Translation context for name attribute to separate equals words with different meaning (not required for in-file translations).
    103111 '''type="data_type"'''::
    104    When specified, only objects of the given type will be changed at all by this tagging preset. Can be "node", "relation", "way", "closedway" or any comma separated combination of them.
     112   When specified, only objects of the given type will be changed at all by this tagging preset. Can be "node", "relation", "way", "closedway" or any comma separated combination of them. Also used in the <role> tag to specify which object types are allowed for a specific relation member.
    105113 '''icon="iconname"'''::
    106114   A name or link to an icon. The image will be used as icon to display in the selection list and when adding the preset to the toolbar. The icon should be quadratic in size. See [[Styles#Iconhandling]] how icons can be specified.
     115 '''icon_size="a number"'''::
     116   The maximal size of an icon in px. If no value is given, default is 16 for <label>.
    107117 '''key="some_key"'''::
    108    This specifies the property key that will be modified by the item.
     118   This specifies the property key that will be modified by the item. In case of <role> it is the role name used in a relation.
    109119 '''text="Any text"'''::
    110    The description, that will be displayed before (after in case of <check>) the gui element.
     120   The description, that will be displayed before (after in case of <check>) the gui element. Also used for <label> and <optional>.
    111121 '''text_context="context"'''::
    112122   Translation context for text attribute to separate equals words with different meaning (not required for in-file translations).
     
    145155 '''ref="unique_identifier"'''::
    146156   the unique identifier of the (already defined) template to include
    147 
    148 To 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.
     157 '''columns="a number"'''::
     158   the number of columns of grouped checks
     159 '''requisite="optional|required"'''::
     160   If a relation member is optional or required. Default is "optional".
     161 '''count="a number"'''::
     162   How often can a role occur (if not given unlimited number is assumed)
     163 '''member_expression="an expression"'''::
     164   an expression (cf. search dialog) for objects of this role
     165 '''preset_name="exact_name"'''::
     166   The exact name of the preset to link to.
    149167
    150168== Format description from XML document (needs to be joined with above texts) ==
     
    162180  preset_name_label: whether to insert "[preset name]" label in dialog
    163181                     (defaults to "false" for backward-compatibility on external presets)
    164 
    165 preset_link: a link to an other preset
    166   preset_name: the exact name of the preset to link to
    167 
    168 label: simple static text label
    169   text: the text to display
    170   icon: location of icon to display (optional)
    171   icon_size: maximal size of icon (optional). If no value is given, default is 16px
    172 
    173 optional: optional tags, short for "space" plus "label" plus "space"
    174   text: the text to display (defaults to "Optional Attributes:")
    175182
    176183text: text box
     
    234241  values_searchable: true/false (whether to search in multiselect (display_)values when searching for presets)
    235242
    236 checkgroup: group of checks
    237   columns: number of columns
    238 
    239243check: checkbox
    240244  key: key to set
     
    245249  disable_off: whether the off value is disabled in the dialog, i.e., only unset or yes are provided
    246250
    247 role: type to specify possible roles in relations
    248   key: the role name used in relation
    249   text: fixed label to display
    250   requisite: optional/required (default is "optional")
    251   count: how often can the role occur (if not given unlimited number is assumed)
    252   type: the data types - way,node,relation,closedway (separated by comma)
    253   member_expression: an expression (cf. search dialog) for objects of this role
    254 
    255 The fields "name", "text", "display_values" may also be localized (e.g. de.name).
    256 When translations of equal words but different meanings may conflict, a translation
    257 context should be specified. Use "name_context", "text_context" or "values_context"
    258 for this. The context should be a meaningful short description to help translators.
    259 
    260 In JOSM internally all "name", "text" and "display_values" are translated when
    261 no specific translation has been given in XML file. When no "display_values"
    262 are supplied, then "values" will be treated as "display_values" and translated instead.
    263 
    264251}}}
     252
     253== Translation ==
     254To support translations, all textual elements ("name", "text", "display_values") may also be localized. (E.g. "de.name" would represent the name in case German language support is loaded.)
     255
     256In JOSM internally ([source:josm/trunk/data/defaultpresets.xml internal preset]) all "name", "text" and "display_values" are translated when no specific translation has been given in XML file. When no "display_values" are supplied, then "values" will be treated as "display_values" and translated instead. When translations of equal words but different meanings may conflict, a translation context should be specified. Use "name_context", "text_context" or "values_context" for this. The context should be a meaningful short description to help translators. The translation for the internal preset is done at [https://translations.launchpad.net/josm/trunk Launchpad] (and will probably change to Transifex in the future).
    265257
    266258== Benutzung von Symbolen ==
     
    269261== Ähnliche Seiten ==
    270262* [wiki:De:Presets JOSM Objektvorlagen]
     263* [wiki:Help/Menu/Presets Preset Menü (en)]
    271264* [wiki:Help/Preferences/Map#TaggingPresets Objektvorlageneinstellungen (en)]