From 8a9f4c3131a3f5f7ca6a8d4b76fd2d9924c74a57 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Tue, 5 May 2020 14:46:34 -0700 Subject: [PATCH] Add Image field (close #7531) --- data/presets.yaml | 7 +++++++ data/presets/fields.json | 1 + data/presets/fields/image.json | 13 +++++++++++++ data/taginfo.json | 1 + dist/locales/en.json | 5 +++++ 5 files changed, 27 insertions(+) create mode 100644 data/presets/fields/image.json diff --git a/data/presets.yaml b/data/presets.yaml index 9aaded62b3..10971ac4cd 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -1110,6 +1110,13 @@ en: icao: # icao=* label: ICAO Airport Code + image: + # image=* + label: Image + # image field placeholder + placeholder: 'https://example.com/photo.jpg' + # 'terms: icon,image uri,photo,picture' + terms: '[translate with synonyms or related terms for ''Image'', separated by commas]' incline: # incline=* label: Incline diff --git a/data/presets/fields.json b/data/presets/fields.json index b2553ab7d7..5ef6625915 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -207,6 +207,7 @@ "hot_water": {"key": "hot_water", "type": "check", "label": "Hot Water"}, "iata": {"key": "iata", "type": "text", "label": "IATA Airport Code"}, "icao": {"key": "icao", "type": "text", "label": "ICAO Airport Code"}, + "image": {"key": "image", "type": "url", "label": "Image", "placeholder": "https://example.com/photo.jpg", "universal": true, "terms": ["icon", "image uri", "photo", "picture"]}, "incline_steps": {"key": "incline", "type": "combo", "label": "Incline", "strings": {"options": {"up": "Up", "down": "Down"}}}, "incline": {"key": "incline", "type": "combo", "label": "Incline"}, "indoor_type": {"key": "indoor", "type": "typeCombo", "label": "Type"}, diff --git a/data/presets/fields/image.json b/data/presets/fields/image.json new file mode 100644 index 0000000000..31fbec0180 --- /dev/null +++ b/data/presets/fields/image.json @@ -0,0 +1,13 @@ +{ + "key": "image", + "type": "url", + "label": "Image", + "placeholder": "https://example.com/photo.jpg", + "universal": true, + "terms": [ + "icon", + "image uri", + "photo", + "picture" + ] +} diff --git a/data/taginfo.json b/data/taginfo.json index 0573edf5d8..dd05378365 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -1563,6 +1563,7 @@ {"key": "hot_water", "description": "🄵 Hot Water"}, {"key": "iata", "description": "🄵 IATA Airport Code"}, {"key": "icao", "description": "🄵 ICAO Airport Code"}, + {"key": "image", "description": "🄵 Image"}, {"key": "incline", "value": "up", "description": "🄵 Incline"}, {"key": "incline", "value": "down", "description": "🄵 Incline"}, {"key": "incline", "description": "🄵 Incline"}, diff --git a/dist/locales/en.json b/dist/locales/en.json index 47bdb161a3..7f3e70d250 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -3570,6 +3570,11 @@ "icao": { "label": "ICAO Airport Code" }, + "image": { + "label": "Image", + "terms": "icon,image uri,photo,picture", + "placeholder": "https://example.com/photo.jpg" + }, "incline_steps": { "label": "Incline", "options": {