From ac08f7d03cccf242d727ca64088065a288f8dd19 Mon Sep 17 00:00:00 2001 From: Tobias Date: Fri, 23 May 2025 06:57:47 +0200 Subject: [PATCH] Docs: Document "strings" with "title" and "description" --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 94b65e3..0865f5d 100644 --- a/README.md +++ b/README.md @@ -558,11 +558,14 @@ The user can pick from any of the options, or type their own value. The `strings` object contains values that the field wants to be translated on Transifex. -[Combo field types](#combodropdown-fields) can accept key-label pairs in the `options` value of the `strings` property. +[Combo field types](#combodropdown-fields) can accept custom translations for `options` values via the `strings` property. These values populate the `options` property if it isn't otherwise specified. If `autoSuggestions` is `true` (as per default), then raw and labeled values might be mixed in the dropdown suggestions. +The options can either be a string or `{"title": "…", "description": "…"}` object where the description is shown on mouse over +in iD to give additional context on a value ([Example](https://github.com/openstreetmap/id-tagging-schema/blob/main/data/fields/parking.json)). + ```js { "key": "smoothness", @@ -584,6 +587,20 @@ in the dropdown suggestions. } ``` +```js +//… + "strings": { + "options": { + "excellent": { + "title": "Thin Rollers: rollerblade, skateboard", + "description": "As-new asphalt or concrete, smooth paving stones with seamless connections, etc." + }, + //… + } + } +//– +``` + [Checkbox field tyes](#checkboxes) use the options keys to specify the values of the OSM tag corresponding to the different states of the checkbox input element, in the following order: 1. fields of type `check`: _unset state_ (must use the option `undefined`), _checked state_,