Changes between Version 1 and Version 2 of Ru:TaggingPresets
- Timestamp:
- 2016-11-19T18:51:28+01:00 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ru:TaggingPresets
v1 v2 1 '' If you want to learn installation steps for presets, see[Help/Preferences/Map#TaggingPresets "Tagging Presets" tab in Preferences > Map Settings]''[[br]]2 '' If you want to use presets or need complete reference of presets see[wiki:Presets Presets]''[[br]]1 ''Если вы хотите узнать шаги по установке заготовок тегов, смотрите [Help/Preferences/Map#TaggingPresets "Tagging Presets" tab in Preferences > Map Settings]''[[br]] 2 ''Если вы хотите использовать заготовки тегов или необходима ссылка на заготовку, смотрите [wiki:Presets Presets]''[[br]] 3 3 ''If you want to add the preset to the list of available presets see [[Extend JOSM#Custompresetsandpublication]]'' 4 4 [[TranslatedPages(revision=1,outdated=Перевод неполный)]] 5 5 [[PageOutline(2-10,Table of Contents)]] 6 = Tagging Presets=7 JOSM supportsdistributedtagging presets. This is a XML config file that describes a GUI for entering tags (or properties, annotations, sometimes called map features).8 9 The presets can be placed anywhere in the web or at the users local file system. JOSMcan be configured to use custom local or remote Presets.10 11 == Develop a new preset==12 The tagging preset description is in a very simple XML format. Details see[#XMLbelow].13 14 See the**[source:trunk/data/defaultpresets.xml defaultpresets.xml]**for an example covering most of the possibilities listed below.15 16 Example:6 = Заготовки тегов = 7 JOSM поддерживает distributed заготовки тегов. Это XML файл, описывающий графический интерфейс для ввода тегов (или свойства, аннотации, иногда называемый картой функции). 8 9 Предварительные настройки могут быть размещены в любом месте в интернете или у пользователей в локальной файловой системе. JOSM может быть настроен на использование пользовательских локальных или удаленных заготовок тегов. 10 11 == Разработка новой заготовки == 12 Заготовки тегов описываются в очень простом XML файле. Подробнее смотрите [#XML ниже]. 13 14 Смотрите для примера **[source:trunk/data/defaultpresets.xml defaultpresets.xml]**, охватывающий большую часть возможностей, перечисленных ниже. 15 16 Пример: 17 17 [[Image(Change 1 object.png,align=right)]] 18 18 … … 37 37 }}} 38 38 39 == XML Format description==#XML40 41 The full XSD schema is available at the namespace URI(http://josm.openstreetmap.de/tagging-preset-1.0)as well as[source:trunk/data/tagging-preset.xsd the source repository].42 === Tags===43 ==== The document prolog====39 == Описание XML формата ==#XML 40 41 Полная схема XSD доступна по следующей ссылке (http://josm.openstreetmap.de/tagging-preset-1.0) а также [source:trunk/data/tagging-preset.xsd the source repository]. 42 === Теги === 43 ==== Вводная часть ==== 44 44 <presets>:: 45 Has to be the main tag of the file. Supports following attributes45 Должен быть основным тегом файла. Поддерживает следующие атрибуты: 46 46 * '''xmlns="http://josm.openstreetmap.de/tagging-preset-1.0"''' 47 47 * '''author''' - имя автора заготовки 48 * '''version''' - the version number of the file. For automatical version adjustment of presets managed in this wiki you can use two internal variables: `[[revision]]` (the latest version number of the wiki page) and`[[date]]` (the date of the last edit).49 * '''description''' (i18n) - description what the file contains50 * '''shortdescription''' (i18n) - very short overview description i.e. the"name"of the preset51 * '''link''' (i18n) - web link to further details (optional)52 * '''icon''' - informational icon for the whole preset. (This is nedded to display the icon in the table at[[Presets]].)53 * '''baselanguage''' - when the base language is not English, specify it here (using non English preset texts prevents automatic translation)54 55 (i18n) means the values may also be localized (e.g.de.description).56 [[BR]] 57 ==== Comments====48 * '''version''' - номер версии файла. Для указания версии вы можете использовать две встроенные переменные: `[[revision]]` (номер последней версии страницы wiki) и `[[date]]` (дата последнего редактирования). 49 * '''description''' (i18n) - описание того, что содержит файл 50 * '''shortdescription''' (i18n) - очень краткое описание, т.е. "name" заготовки 51 * '''link''' (i18n) - веб-ссылка на дополнительную информацию (необязательна) 52 * '''icon''' - информационная иконка для всей заготовки. (Это необходимо для отображения значка в таблице [[Presets]].) 53 * '''baselanguage''' - когда основной язык не английский, укажите его здесь (при использовании не английских текстов в заготовках, предотвращает автоматический перевод) 54 55 (i18n) означает, что значения могут быть локализованы (например de.description). 56 [[BR]] 57 ==== Коментарии ==== 58 58 <!-- это пример комментария -->:: 59 59 Документ может содержать встроенные комментарии. 60 60 [[BR]] 61 ==== Preset group creation====61 ==== Создание группы заготовок ==== 62 62 <group>:: 63 Used to group items in sub menus. `name`is required, `icon`is optional attribute.63 Используется для группировки элементов в меню. `name` необходимо, `icon` необязательный атрибут. 64 64 <item>:: 65 Every item is one annotation set to select from. `name` is required, `type`and`preset_name_label`are recommended, `icon` and `name_template`are optional attributes.65 Every item is one annotation set to select from. `name` необходимо, `type` и `preset_name_label` рекомендуются, `icon` and `name_template` необязательные атрибуты. 66 66 <separator/>:: 67 Insert a line separator into the menu.67 Добавляет горизонтальную разделительную линию в меню. 68 68 [[BR]] 69 69 ==== Preset window layout ==== 70 70 <label>:: 71 Labels are static texts for display. `text`is a required attribute, `icon`and`icon_size`are optional.71 Метки для отображения статического текста. `text` обязательный атрибут, `icon` и `icon_size` необязательные атрибуты. 72 72 <space />:: 73 Add some space (ie a newline).73 Добавляет пустую строку (перевод строки). 74 74 <optional>:: 75 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 />75 Используется для группировки различных дополнительных параметров. `text` необязательный атрибут. Если используется без `text`, то это эквивалентно <space /><label text="Дополнительные атрибуты:"/><space /> 76 76 <item_separator />:: 77 Add a horizontal separator line between items.77 Добавляет горизонтальную разделительную линию между элементами. 78 78 <link>:: 79 Specify a web link for this feature or to anything else of use. The`href`attribute is required.79 Используется для вставки веб-ссылки. Атрибут `href` необходим. 80 80 <checkgroup>:: 81 To group checks. The`columns`attribute is required.81 Группировка флажков. Атрибут `columns` необходим. 82 82 <roles>:: 83 This is required around<role>and adds the heading("Availible roles role count elements")to the table which is generated by several<role>.83 Это необходимо возле <role> и добавляет заголовок ("Availible roles role count elements") к таблице, которая образуется за счет нескольких <role>. 84 84 <role>:: 85 To specify possible roles of members in relations. The`key`attribute is required, `text`, `requisite`, `count`, `type`and`member_expression`are optional.85 Чтобы указать возможные роли членов в отношениях. Атрибут `key` необходим, `text`, `requisite`, `count`, `type` и `member_expression` необязательные атрибуты. 86 86 <preset_link>:: 87 Adds a link to an other preset. The`preset_name`attribute is required.88 [[BR]] 89 ==== Set a fixed key value pair====87 Добавляет ссылку на другую заготовку. Атрибут `preset_name` необходим. 88 [[BR]] 89 ==== Установка фиксированного значения у ключа ==== 90 90 <key>:: 91 This tag will always set a key to a specific value. `key` is required and if `value` is present, the key will be set. If `value` attribute is ommited, the key is removed. The `match` attribute is optional.91 Этот тег позволяет присвоить какому-либо ключу определённое значение. `key` необходим и, если `value` присутствует, то ключ будет установлен. Если значение отсутствует, то ключ удаляется. `match` необязательный атрибут. 92 92 [[BR]] 93 93 ==== Attribute entry and selection dialog boxes ==== … … 98 98 If editable is true (default), combo boxes can be edited as if they were text fields (additional to the drop down menu). Non editable combo boxes can only contain one of the specified values. 99 99 <multiselect>:: 100 Displays a list from which zero or more items can be chosen. `key` and `values` are mandatory, and `text`, `default`, `delimiter`, `values_from`, `rows`, `display_values`, `short_descriptions`, `use_last_as_default`, `values_searchable`, `values_no_i18n`, `values_sort` and `match` are optional. The selected values will be concatenated with the specified delimiter (default: semicolon) and written to the tag value. If a tag value has already been set when the preset dialog is opened, the multiselect will attempt to mark the appropriate items in the list as select. If the tag value cannot be represented by a combination of choices in the list, then the list will be disabled so that the user cannot accidentally overwrite a custom value. In contrast to the "combo" element, the "multiselect" expects the list of values, descriptions etc. to use the specified delimiter, i.e. by default you will have to use a semicolon. You can specify delimiter="," but then a comma will also be used in the tag value.100 Displays a list from which zero or more items can be chosen. `key` and `values` are mandatory, and `text`, `default`, `delimiter`, `values_from`, `rows`, `display_values`, `short_descriptions`, `use_last_as_default`, `values_searchable`, `values_no_i18n`, `values_sort` and `match` не обязательные атрибуты. The selected values will be concatenated with the specified delimiter (default: semicolon) and written to the tag value. If a tag value has already been set when the preset dialog is opened, the multiselect will attempt to mark the appropriate items in the list as select. If the tag value cannot be represented by a combination of choices in the list, then the list will be disabled so that the user cannot accidentally overwrite a custom value. In contrast to the "combo" element, the "multiselect" expects the list of values, descriptions etc. to use the specified delimiter, i.e. by default you will have to use a semicolon. You can specify delimiter="," but then a comma will also be used in the tag value. 101 101 <list_entry>:: 102 102 Used in <combo> and <multiselect>. More information see `short_descriptions`. The attributes are `value`, `display_value`, `short_description`, `icon` and `icon_size`. 103 103 <check>:: 104 A checkbox which the user can only select or deselect (or set as unset). The `key` attribute is mandatory. `text`, `default`, `match`, `value_on` , `value_off` and `disable_off` are optional.104 A checkbox which the user can only select or deselect (or set as unset). The `key` attribute is mandatory. `text`, `default`, `match`, `value_on` , `value_off` and `disable_off` не обязательные атрибуты. 105 105 [[BR]] 106 106 ==== Templates ==== … … 111 111 [[BR]] 112 112 === Attributes === 113 The attributes of the tags have the following meaning:113 Атрибуты тегов имеют следующие значения:: 114 114 name="a_name":: 115 115 Specify a name for an item. This name will be used in the GUI to display the tagging preset. … … 157 157 Specify the number of rows to display in <multiselect> entry (if not set, it is auto determined by java or the look and feel and results in e.g. 8). 158 158 name_template="template", name_template_filter="search expression":: 159 Custom name formatter for osm primitives matching this preset. See below[[#name_templatedetails]] for details.159 Custom name formatter for osm primitives matching this preset. Смотрите ниже [[#name_templatedetails]] for details. 160 160 match="none|key|key!|keyvalue|keyvalue!":: 161 161 Allows to change the matching process, i.e., determining whether the tags of an OSM object fit into this preset. If a preset fits then it is linked in the [wiki:Help/Dialog/TagsMembership Tags/Membership dialog]. … … 166 166 * keyvalue!: positive if key and value matches, negative otherwise 167 167 168 Note that for a match, at least one positive and no negative is required. Default is "keyvalue!" for <key> and "none" for <text>, <combo>, <multiselect> and <check>.168 Note that for a match, at least one positive and no negative необходимо. Default is "keyvalue!" for <key> and "none" for <text>, <combo>, <multiselect> and <check>. 169 169 id="unique_identifier":: 170 170 the unique identifier for this chunk … … 192 192 The character that separates values. In case of <combo> the default is comma. In case of <multiselect> the default is semicolon and this will also be used to separate selected values in the tag. More information see <multiselect>. 193 193 short_descriptions=""Entry1,Entry2,Entry3":: 194 A delimiter-separated list of texts to be displayed beloweach `display_value`. (Only if it is not possible to describe the entry in 2-3 words.) Instead of comma separated list instead using values, display_values and short_descriptions, the following form is also supported: <list_entry value="" display_value="" short_description="" icon="" icon_size="" />194 A delimiter-separated list of texts to be displayed ниже each `display_value`. (Only if it is not possible to describe the entry in 2-3 words.) Instead of comma separated list instead using values, display_values and short_descriptions, the following form is also supported: <list_entry value="" display_value="" short_description="" icon="" icon_size="" /> 195 195 values_searchable="true|false":: 196 196 Whether to search in <combo> or <multiselect> (display_)values when searching for presets. … … 198 198 ===== name_template details ===== 199 199 200 **Name templates can be used to define custom formatting for OSM primitives or GPX waypoints** ( for example in the Relations orthe Selection).200 **Name templates can be used to define custom formatting for OSM primitives or GPX waypoints** (для примера в Отношениях или the Selection). 201 201 202 202 {{{
