Skip to content

Commit ac08f7d

Browse files
authored
Docs: Document "strings" with "title" and "description"
1 parent 4cbf8d4 commit ac08f7d

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,11 +558,14 @@ The user can pick from any of the options, or type their own value.
558558

559559
The `strings` object contains values that the field wants to be translated on Transifex.
560560

561-
[Combo field types](#combodropdown-fields) can accept key-label pairs in the `options` value of the `strings` property.
561+
[Combo field types](#combodropdown-fields) can accept custom translations for `options` values via the `strings` property.
562562
These values populate the `options` property if it isn't otherwise specified.
563563
If `autoSuggestions` is `true` (as per default), then raw and labeled values might be mixed
564564
in the dropdown suggestions.
565565

566+
The options can either be a string or `{"title": "…", "description": "…"}` object where the description is shown on mouse over
567+
in iD to give additional context on a value ([Example](https://github.com/openstreetmap/id-tagging-schema/blob/main/data/fields/parking.json)).
568+
566569
```js
567570
{
568571
"key": "smoothness",
@@ -584,6 +587,20 @@ in the dropdown suggestions.
584587
}
585588
```
586589

590+
```js
591+
//
592+
"strings": {
593+
"options": {
594+
"excellent": {
595+
"title": "Thin Rollers: rollerblade, skateboard",
596+
"description": "As-new asphalt or concrete, smooth paving stones with seamless connections, etc."
597+
},
598+
//
599+
}
600+
}
601+
//
602+
```
603+
587604
[Checkbox field tyes](#checkboxes) use the options keys to specify the values of the OSM tag corresponding
588605
to the different states of the checkbox input element, in the following order:
589606
1. fields of type `check`: _unset state_ (must use the option `undefined`), _checked state_,

0 commit comments

Comments
 (0)