diff --git a/data/presets.yaml b/data/presets.yaml index 81d69aa13..e5122ab3c 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -77,6 +77,10 @@ en: label: Type aerialway/access: label: Access + options: + entry: Entry + exit: Exit + both: Both aerialway/bubble: label: Bubble aerialway/capacity: @@ -92,6 +96,10 @@ en: placeholder: "2, 4, 8..." aerialway/summer/access: label: Access (summer) + options: + entry: Entry + exit: Exit + both: Both aeroway: label: Type amenity: @@ -119,6 +127,23 @@ en: placeholder: "50, 100, 200..." cardinal_direction: label: Direction + options: + "N": North + E: East + S: South + W: West + NE: Northeast + SE: Southeast + SW: Southwest + NW: Northwest + NNE: North-northeast + ENE: East-northeast + ESE: East-southeast + SSE: South-southeast + SSW: South-southwest + WSW: West-southwest + WNW: West-northwest + NNW: North-northwest clock_direction: label: Direction options: @@ -146,6 +171,12 @@ en: label: Description electrified: label: Electrification + placeholder: "Contact Line, Electrified Rail..." + options: + contact_line: Contact Line + rail: Electrified Rail + "yes": Yes (unspecified) + "no": "No" elevation: label: Elevation emergency: @@ -161,6 +192,11 @@ en: label: Fee fire_hydrant/type: label: Type + options: + pillar: Pillar/Aboveground + underground: Underground + wall: Wall + pond: Pond fixme: label: Fix Me fuel: @@ -279,15 +315,49 @@ en: label: Park and Ride parking: label: Type + options: + surface: Surface + multi-storey: Multilevel + underground: Underground + sheds: Sheds + carports: Carports + garage_boxes: Garage Boxes + lane: Roadside Lane phone: label: Phone placeholder: +31 42 123 4567 piste/difficulty: label: Difficulty + placeholder: "Easy, Intermediate, Advanced..." + options: + novice: Novice (instructional) + easy: Easy (green circle) + intermediate: Intermediate (blue square) + advanced: Advanced (black diamond) + expert: Expert (double black diamond) + freeride: Freeride (off-piste) + extreme: Extreme (climing equipment required) piste/grooming: label: Grooming + options: + classic: Classic + mogul: Mogul + backcountry: Backcountry + classic+skating: Classic and Skating + scooter: Scooter/Snowmobile + skating: Skating piste/type: label: Type + options: + downhill: Downhill + nordic: Nordic + skitour: Skitour + sled: Sled + hike: Hike + sleigh: Sleigh + ice_skate: Ice Skate + snow_park: Snow Park + playground: Playground place: label: Type population: @@ -310,14 +380,6 @@ en: label: Type religion: label: Religion - options: - christian: Christian - muslim: Muslim - buddhist: Buddhist - jewish: Jewish - hindu: Hindu - shinto: Shinto - taoist: Taoist restriction: label: Type restrictions: @@ -328,6 +390,14 @@ en: label: Type sac_scale: label: Path Difficulty + placeholder: "Mountain Hiking, Alpine Hiking..." + options: + hiking: "T1: Hiking" + mountain_hiking: "T2: Mountain Hiking" + demanding_mountain_hiking: "T3: Demanding Mountain Hiking" + alpine_hiking: "T4: Alpine Hiking" + demanding_alpine_hiking: "T5: Demanding Alpine Hiking" + difficult_alpine_hiking: "T6: Difficult Alpine Hiking" seasonal: label: Seasonal service: @@ -342,6 +412,26 @@ en: label: Sloped Curb smoking: label: Smoking + placeholder: "No, Separated, Yes..." + options: + "no": No smoking anywhere + separated: "In smoking areas, not physically isolated" + isolated: "In smoking areas, physically isolated" + outside: Allowed outside + "yes": Allowed everywhere + dedicated: "Dedicated to smokers (e.g. smokers' club)" + smoothness: + label: Smoothness + placeholder: "Thin Rollers, Wheels, Off-Road..." + options: + excellent: "Thin Rollers: rollerblade, skateboard" + good: "Thin Wheels: racing bike" + intermediate: "Wheels: city bike, wheelchair, scooter" + bad: "Robust Wheels: trekking bike, car, rickshaw" + very_bad: "High Clearance: light duty off-road vehicle" + horrible: "Off-Road: heavy duty off-road vehicle" + very_horrible: "Specialized off-road: tractor, ATV" + impassible: Impassible / No wheeled vehicle social_facility_for: label: People served placeholder: "Homeless, Disabled, Child, etc" @@ -370,14 +460,34 @@ en: label: Tactile Paving toilets/disposal: label: Disposal + options: + flush: Flush + pitlatrine: Pit/Latrine + chemical: Chemical + bucket: Bucket tourism: label: Type towertype: label: Tower type tracktype: label: Type + placeholder: "Solid, Mostly Solid, Soft..." + options: + grade1: "Solid: paved or heavily compacted hardcore surface" + grade2: "Mostly Solid: gravel/rock with some soft material mixed in" + grade3: Even mixture of hard and soft materials + grade4: "Mostly Soft: soil/sand/grass with some hard material mixed in" + grade5: "Soft: soil/sand/grass" trail_visibility: label: Trail Visibility + placeholder: "Excellent, Good, Bad..." + options: + excellent: "Excellent: unambiguous path or markers everywhere" + good: "Good: markers visible, sometimes require searching" + intermediate: "Intermediate: few markers, path mostly visible" + bad: "Bad: no markers, path sometimes invisible/pathless" + horrible: "Horrible: often pathless, some orientation skills required" + "no": "No: pathless, excellent orientation skills required" tree_type: label: Type trees: diff --git a/data/presets/fields.json b/data/presets/fields.json index d4014c6ec..cf554ae8d 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -118,12 +118,14 @@ "aerialway/access": { "key": "aerialway:access", "type": "combo", - "options": [ - "entry", - "exit", - "both" - ], - "label": "Access" + "label": "Access", + "strings": { + "options": { + "entry": "Entry", + "exit": "Exit", + "both": "Both" + } + } }, "aerialway/bubble": { "key": "aerialway:bubble", @@ -156,12 +158,14 @@ "aerialway/summer/access": { "key": "aerialway:summer:access", "type": "combo", - "options": [ - "entry", - "exit", - "both" - ], - "label": "Access (summer)" + "label": "Access (summer)", + "strings": { + "options": { + "entry": "Entry", + "exit": "Exit", + "both": "Both" + } + } }, "aeroway": { "key": "aeroway", @@ -229,32 +233,31 @@ "cardinal_direction": { "key": "direction", "type": "combo", - "options": [ - "N", - "E", - "S", - "W", - "NE", - "SE", - "SW", - "NNE", - "ENE", - "ESE", - "SSE", - "SSW", - "WSW", - "WNW", - "NNW" - ], - "label": "Direction" + "label": "Direction", + "strings": { + "options": { + "N": "North", + "E": "East", + "S": "South", + "W": "West", + "NE": "Northeast", + "SE": "Southeast", + "SW": "Southwest", + "NW": "Northwest", + "NNE": "North-northeast", + "ENE": "East-northeast", + "ESE": "East-southeast", + "SSE": "South-southeast", + "SSW": "South-southwest", + "WSW": "West-southwest", + "WNW": "West-northwest", + "NNW": "North-northwest" + } + } }, "clock_direction": { "key": "direction", "type": "combo", - "options": [ - "clockwise", - "anticlockwise" - ], "label": "Direction", "strings": { "options": { @@ -296,7 +299,6 @@ "cuisine": { "key": "cuisine", "type": "combo", - "indexed": true, "label": "Cuisine" }, "denomination": { @@ -318,12 +320,15 @@ "key": "electrified", "type": "combo", "label": "Electrification", - "options": [ - "contact_line", - "rail", - "yes", - "no" - ] + "placeholder": "Contact Line, Electrified Rail...", + "strings": { + "options": { + "contact_line": "Contact Line", + "rail": "Electrified Rail", + "yes": "Yes (unspecified)", + "no": "No" + } + } }, "elevation": { "key": "ele", @@ -361,13 +366,15 @@ "fire_hydrant/type": { "key": "fire_hydrant:type", "type": "combo", - "options": [ - "pillar", - "pond", - "underground", - "wall" - ], - "label": "Type" + "label": "Type", + "strings": { + "options": { + "pillar": "Pillar/Aboveground", + "underground": "Underground", + "wall": "Wall", + "pond": "Pond" + } + } }, "fixme": { "key": "fixme", @@ -495,13 +502,6 @@ "internet_access": { "key": "internet_access", "type": "combo", - "options": [ - "yes", - "no", - "wlan", - "wired", - "terminal" - ], "label": "Internet Access", "strings": { "options": { @@ -647,16 +647,18 @@ "parking": { "key": "parking", "type": "combo", - "options": [ - "surface", - "multi-storey", - "underground", - "sheds", - "carports", - "garage_boxes", - "lane" - ], - "label": "Type" + "label": "Type", + "strings": { + "options": { + "surface": "Surface", + "multi-storey": "Multilevel", + "underground": "Underground", + "sheds": "Sheds", + "carports": "Carports", + "garage_boxes": "Garage Boxes", + "lane": "Roadside Lane" + } + } }, "phone": { "key": "phone", @@ -669,17 +671,52 @@ "piste/difficulty": { "key": "piste:difficulty", "type": "combo", - "label": "Difficulty" + "label": "Difficulty", + "placeholder": "Easy, Intermediate, Advanced...", + "strings": { + "options": { + "novice": "Novice (instructional)", + "easy": "Easy (green circle)", + "intermediate": "Intermediate (blue square)", + "advanced": "Advanced (black diamond)", + "expert": "Expert (double black diamond)", + "freeride": "Freeride (off-piste)", + "extreme": "Extreme (climing equipment required)" + } + } }, "piste/grooming": { "key": "piste:grooming", "type": "combo", - "label": "Grooming" + "label": "Grooming", + "strings": { + "options": { + "classic": "Classic", + "mogul": "Mogul", + "backcountry": "Backcountry", + "classic+skating": "Classic and Skating", + "scooter": "Scooter/Snowmobile", + "skating": "Skating" + } + } }, "piste/type": { "key": "piste:type", "type": "typeCombo", - "label": "Type" + "label": "Type", + "strings": { + "options": { + "downhill": "Downhill", + "nordic": "Nordic", + "skitour": "Skitour", + "sled": "Sled", + "hike": "Hike", + "sleigh": "Sleigh", + "ice_skate": "Ice Skate", + "snow_park": "Snow Park", + "playground": "Playground" + } + } }, "place": { "key": "place", @@ -734,27 +771,7 @@ "religion": { "key": "religion", "type": "combo", - "options": [ - "christian", - "muslim", - "buddhist", - "jewish", - "hindu", - "shinto", - "taoist" - ], - "label": "Religion", - "strings": { - "options": { - "christian": "Christian", - "muslim": "Muslim", - "buddhist": "Buddhist", - "jewish": "Jewish", - "hindu": "Hindu", - "shinto": "Shinto", - "taoist": "Taoist" - } - } + "label": "Religion" }, "restriction": { "key": "restriction", @@ -783,7 +800,18 @@ "sac_scale": { "key": "sac_scale", "type": "combo", - "label": "Path Difficulty" + "label": "Path Difficulty", + "placeholder": "Mountain Hiking, Alpine Hiking...", + "strings": { + "options": { + "hiking": "T1: Hiking", + "mountain_hiking": "T2: Mountain Hiking", + "demanding_mountain_hiking": "T3: Demanding Mountain Hiking", + "alpine_hiking": "T4: Alpine Hiking", + "demanding_alpine_hiking": "T5: Demanding Alpine Hiking", + "difficult_alpine_hiking": "T6: Difficult Alpine Hiking" + } + } }, "seasonal": { "key": "seasonal", @@ -793,14 +821,14 @@ "service": { "key": "service", "type": "combo", + "label": "Type", "options": [ "parking_aisle", "driveway", "alley", - "drive-through", - "emergency_access" - ], - "label": "Type" + "emergency_access", + "drive-through" + ] }, "shelter": { "key": "shelter", @@ -810,15 +838,6 @@ "shelter_type": { "key": "shelter_type", "type": "combo", - "options": [ - "public_transport", - "picnic_shelter", - "weather_shelter", - "lean_to", - "basic_hut", - "field_shelter", - "rock_shelter" - ], "label": "Type" }, "shop": { @@ -834,13 +853,36 @@ "smoking": { "key": "smoking", "type": "combo", - "options": [ - "no", - "outside", - "separated", - "yes" - ], - "label": "Smoking" + "label": "Smoking", + "placeholder": "No, Separated, Yes...", + "strings": { + "options": { + "no": "No smoking anywhere", + "separated": "In smoking areas, not physically isolated", + "isolated": "In smoking areas, physically isolated", + "outside": "Allowed outside", + "yes": "Allowed everywhere", + "dedicated": "Dedicated to smokers (e.g. smokers' club)" + } + } + }, + "smoothness": { + "key": "smoothness", + "type": "combo", + "label": "Smoothness", + "placeholder": "Thin Rollers, Wheels, Off-Road...", + "strings": { + "options": { + "excellent": "Thin Rollers: rollerblade, skateboard", + "good": "Thin Wheels: racing bike", + "intermediate": "Wheels: city bike, wheelchair, scooter", + "bad": "Robust Wheels: trekking bike, car, rickshaw", + "very_bad": "High Clearance: light duty off-road vehicle", + "horrible": "Off-Road: heavy duty off-road vehicle", + "very_horrible": "Specialized off-road: tractor, ATV", + "impassible": "Impassible / No wheeled vehicle" + } + } }, "social_facility_for": { "key": "social_facility:for", @@ -879,14 +921,14 @@ "sport_ice": { "key": "sport", "type": "combo", + "label": "Sport", "options": [ "skating", "hockey", "multi", "curling", "ice_stock" - ], - "label": "Sport" + ] }, "structure": { "type": "radio", @@ -912,11 +954,11 @@ "studio_type": { "key": "type", "type": "combo", + "label": "Type", "options": [ "audio", "video" - ], - "label": "Type" + ] }, "supervised": { "key": "supervised", @@ -936,7 +978,15 @@ "toilets/disposal": { "key": "toilets:disposal", "type": "combo", - "label": "Disposal" + "label": "Disposal", + "strings": { + "options": { + "flush": "Flush", + "pitlatrine": "Pit/Latrine", + "chemical": "Chemical", + "bucket": "Bucket" + } + } }, "tourism": { "key": "tourism", @@ -951,22 +1001,43 @@ "tracktype": { "key": "tracktype", "type": "combo", - "label": "Type" + "label": "Type", + "placeholder": "Solid, Mostly Solid, Soft...", + "strings": { + "options": { + "grade1": "Solid: paved or heavily compacted hardcore surface", + "grade2": "Mostly Solid: gravel/rock with some soft material mixed in", + "grade3": "Even mixture of hard and soft materials", + "grade4": "Mostly Soft: soil/sand/grass with some hard material mixed in", + "grade5": "Soft: soil/sand/grass" + } + } }, "trail_visibility": { "key": "trail_visibility", "type": "combo", - "label": "Trail Visibility" + "label": "Trail Visibility", + "placeholder": "Excellent, Good, Bad...", + "strings": { + "options": { + "excellent": "Excellent: unambiguous path or markers everywhere", + "good": "Good: markers visible, sometimes require searching", + "intermediate": "Intermediate: few markers, path mostly visible", + "bad": "Bad: no markers, path sometimes invisible/pathless", + "horrible": "Horrible: often pathless, some orientation skills required", + "no": "No: pathless, excellent orientation skills required" + } + } }, "tree_type": { "key": "type", "type": "combo", + "label": "Type", "options": [ "broad_leaved", "conifer", "palm" - ], - "label": "Type" + ] }, "trees": { "key": "trees", diff --git a/data/presets/fields/aerialway/access.json b/data/presets/fields/aerialway/access.json index 64f7ffee5..8f23f1c75 100644 --- a/data/presets/fields/aerialway/access.json +++ b/data/presets/fields/aerialway/access.json @@ -1,10 +1,12 @@ { "key": "aerialway:access", "type": "combo", - "options": [ - "entry", - "exit", - "both" - ], - "label": "Access" -} \ No newline at end of file + "label": "Access", + "strings": { + "options": { + "entry": "Entry", + "exit": "Exit", + "both": "Both" + } + } +} diff --git a/data/presets/fields/aerialway/summer/access.json b/data/presets/fields/aerialway/summer/access.json index 1426e6160..717e4326e 100644 --- a/data/presets/fields/aerialway/summer/access.json +++ b/data/presets/fields/aerialway/summer/access.json @@ -1,10 +1,12 @@ { "key": "aerialway:summer:access", "type": "combo", - "options": [ - "entry", - "exit", - "both" - ], - "label": "Access (summer)" -} \ No newline at end of file + "label": "Access (summer)", + "strings": { + "options": { + "entry": "Entry", + "exit": "Exit", + "both": "Both" + } + } +} diff --git a/data/presets/fields/cardinal_direction.json b/data/presets/fields/cardinal_direction.json index 16e0d293a..7f7912b0b 100644 --- a/data/presets/fields/cardinal_direction.json +++ b/data/presets/fields/cardinal_direction.json @@ -1,22 +1,25 @@ { "key": "direction", "type": "combo", - "options": [ - "N", - "E", - "S", - "W", - "NE", - "SE", - "SW", - "NNE", - "ENE", - "ESE", - "SSE", - "SSW", - "WSW", - "WNW", - "NNW" - ], - "label": "Direction" -} \ No newline at end of file + "label": "Direction", + "strings": { + "options": { + "N": "North", + "E": "East", + "S": "South", + "W": "West", + "NE": "Northeast", + "SE": "Southeast", + "SW": "Southwest", + "NW": "Northwest", + "NNE": "North-northeast", + "ENE": "East-northeast", + "ESE": "East-southeast", + "SSE": "South-southeast", + "SSW": "South-southwest", + "WSW": "West-southwest", + "WNW": "West-northwest", + "NNW": "North-northwest" + } + } +} diff --git a/data/presets/fields/clock_direction.json b/data/presets/fields/clock_direction.json index 8b24111b6..8744ffc9f 100644 --- a/data/presets/fields/clock_direction.json +++ b/data/presets/fields/clock_direction.json @@ -1,15 +1,11 @@ { "key": "direction", "type": "combo", - "options": [ - "clockwise", - "anticlockwise" - ], "label": "Direction", "strings": { "options": { - "clockwise": "Clockwise", - "anticlockwise": "Counterclockwise" + "clockwise": "Clockwise", + "anticlockwise": "Counterclockwise" } } -} \ No newline at end of file +} diff --git a/data/presets/fields/cuisine.json b/data/presets/fields/cuisine.json index 654b05302..307826ca7 100644 --- a/data/presets/fields/cuisine.json +++ b/data/presets/fields/cuisine.json @@ -1,6 +1,5 @@ { "key": "cuisine", "type": "combo", - "indexed": true, "label": "Cuisine" -} \ No newline at end of file +} diff --git a/data/presets/fields/electrified.json b/data/presets/fields/electrified.json index 327c77cee..71cc4a3ff 100644 --- a/data/presets/fields/electrified.json +++ b/data/presets/fields/electrified.json @@ -2,10 +2,13 @@ "key": "electrified", "type": "combo", "label": "Electrification", - "options": [ - "contact_line", - "rail", - "yes", - "no" - ] + "placeholder": "Contact Line, Electrified Rail...", + "strings": { + "options": { + "contact_line": "Contact Line", + "rail": "Electrified Rail", + "yes": "Yes (unspecified)", + "no": "No" + } + } } diff --git a/data/presets/fields/fire_hydrant/type.json b/data/presets/fields/fire_hydrant/type.json index 27325048c..13f5e6cde 100644 --- a/data/presets/fields/fire_hydrant/type.json +++ b/data/presets/fields/fire_hydrant/type.json @@ -1,11 +1,13 @@ { "key": "fire_hydrant:type", "type": "combo", - "options": [ - "pillar", - "pond", - "underground", - "wall" - ], - "label": "Type" -} \ No newline at end of file + "label": "Type", + "strings": { + "options": { + "pillar": "Pillar/Aboveground", + "underground": "Underground", + "wall": "Wall", + "pond": "Pond" + } + } +} diff --git a/data/presets/fields/internet_access.json b/data/presets/fields/internet_access.json index 2a0db4f5b..a628dfd5f 100644 --- a/data/presets/fields/internet_access.json +++ b/data/presets/fields/internet_access.json @@ -1,13 +1,6 @@ { "key": "internet_access", "type": "combo", - "options": [ - "yes", - "no", - "wlan", - "wired", - "terminal" - ], "label": "Internet Access", "strings": { "options": { @@ -18,4 +11,4 @@ "terminal": "Terminal" } } -} \ No newline at end of file +} diff --git a/data/presets/fields/parking.json b/data/presets/fields/parking.json index c287a4050..d0ff081d2 100644 --- a/data/presets/fields/parking.json +++ b/data/presets/fields/parking.json @@ -1,14 +1,16 @@ { "key": "parking", "type": "combo", - "options": [ - "surface", - "multi-storey", - "underground", - "sheds", - "carports", - "garage_boxes", - "lane" - ], - "label": "Type" + "label": "Type", + "strings": { + "options": { + "surface": "Surface", + "multi-storey": "Multilevel", + "underground": "Underground", + "sheds": "Sheds", + "carports": "Carports", + "garage_boxes": "Garage Boxes", + "lane": "Roadside Lane" + } + } } diff --git a/data/presets/fields/piste/difficulty.json b/data/presets/fields/piste/difficulty.json index a75ecaaf3..ebbe3d558 100644 --- a/data/presets/fields/piste/difficulty.json +++ b/data/presets/fields/piste/difficulty.json @@ -1,5 +1,17 @@ { "key": "piste:difficulty", "type": "combo", - "label": "Difficulty" -} \ No newline at end of file + "label": "Difficulty", + "placeholder": "Easy, Intermediate, Advanced...", + "strings": { + "options": { + "novice": "Novice (instructional)", + "easy": "Easy (green circle)", + "intermediate": "Intermediate (blue square)", + "advanced": "Advanced (black diamond)", + "expert": "Expert (double black diamond)", + "freeride": "Freeride (off-piste)", + "extreme": "Extreme (climing equipment required)" + } + } +} diff --git a/data/presets/fields/piste/grooming.json b/data/presets/fields/piste/grooming.json index 81005d9d8..a96c9f563 100644 --- a/data/presets/fields/piste/grooming.json +++ b/data/presets/fields/piste/grooming.json @@ -1,5 +1,15 @@ { "key": "piste:grooming", "type": "combo", - "label": "Grooming" -} \ No newline at end of file + "label": "Grooming", + "strings": { + "options": { + "classic": "Classic", + "mogul": "Mogul", + "backcountry": "Backcountry", + "classic+skating": "Classic and Skating", + "scooter": "Scooter/Snowmobile", + "skating": "Skating" + } + } +} diff --git a/data/presets/fields/piste/type.json b/data/presets/fields/piste/type.json index 93ec7f0b5..e9494d9e8 100644 --- a/data/presets/fields/piste/type.json +++ b/data/presets/fields/piste/type.json @@ -1,5 +1,18 @@ { "key": "piste:type", "type": "typeCombo", - "label": "Type" -} \ No newline at end of file + "label": "Type", + "strings": { + "options": { + "downhill": "Downhill", + "nordic": "Nordic", + "skitour": "Skitour", + "sled": "Sled", + "hike": "Hike", + "sleigh": "Sleigh", + "ice_skate": "Ice Skate", + "snow_park": "Snow Park", + "playground": "Playground" + } + } +} diff --git a/data/presets/fields/religion.json b/data/presets/fields/religion.json index 8e44ad1d8..36b5b67c6 100644 --- a/data/presets/fields/religion.json +++ b/data/presets/fields/religion.json @@ -1,25 +1,5 @@ { "key": "religion", "type": "combo", - "options": [ - "christian", - "muslim", - "buddhist", - "jewish", - "hindu", - "shinto", - "taoist" - ], - "label": "Religion", - "strings": { - "options": { - "christian": "Christian", - "muslim": "Muslim", - "buddhist": "Buddhist", - "jewish": "Jewish", - "hindu": "Hindu", - "shinto": "Shinto", - "taoist": "Taoist" - } - } -} \ No newline at end of file + "label": "Religion" +} diff --git a/data/presets/fields/sac_scale.json b/data/presets/fields/sac_scale.json index 875568a26..c8f17e4ea 100644 --- a/data/presets/fields/sac_scale.json +++ b/data/presets/fields/sac_scale.json @@ -1,5 +1,16 @@ { "key": "sac_scale", "type": "combo", - "label": "Path Difficulty" -} \ No newline at end of file + "label": "Path Difficulty", + "placeholder": "Mountain Hiking, Alpine Hiking...", + "strings": { + "options": { + "hiking": "T1: Hiking", + "mountain_hiking": "T2: Mountain Hiking", + "demanding_mountain_hiking": "T3: Demanding Mountain Hiking", + "alpine_hiking": "T4: Alpine Hiking", + "demanding_alpine_hiking": "T5: Demanding Alpine Hiking", + "difficult_alpine_hiking": "T6: Difficult Alpine Hiking" + } + } +} diff --git a/data/presets/fields/service.json b/data/presets/fields/service.json index ca5eefa2b..5686b0a6e 100644 --- a/data/presets/fields/service.json +++ b/data/presets/fields/service.json @@ -1,12 +1,12 @@ { "key": "service", "type": "combo", + "label": "Type", "options": [ "parking_aisle", "driveway", "alley", - "drive-through", - "emergency_access" - ], - "label": "Type" -} \ No newline at end of file + "emergency_access", + "drive-through" + ] +} diff --git a/data/presets/fields/shelter_type.json b/data/presets/fields/shelter_type.json index a767b53ec..2ea69ac6b 100644 --- a/data/presets/fields/shelter_type.json +++ b/data/presets/fields/shelter_type.json @@ -1,14 +1,5 @@ { "key": "shelter_type", "type": "combo", - "options": [ - "public_transport", - "picnic_shelter", - "weather_shelter", - "lean_to", - "basic_hut", - "field_shelter", - "rock_shelter" - ], "label": "Type" } diff --git a/data/presets/fields/smoking.json b/data/presets/fields/smoking.json index 9c660c961..43a8aaaf9 100644 --- a/data/presets/fields/smoking.json +++ b/data/presets/fields/smoking.json @@ -1,11 +1,16 @@ { "key": "smoking", "type": "combo", - "options": [ - "no", - "outside", - "separated", - "yes" - ], - "label": "Smoking" + "label": "Smoking", + "placeholder": "No, Separated, Yes...", + "strings": { + "options": { + "no": "No smoking anywhere", + "separated": "In smoking areas, not physically isolated", + "isolated": "In smoking areas, physically isolated", + "outside": "Allowed outside", + "yes": "Allowed everywhere", + "dedicated": "Dedicated to smokers (e.g. smokers' club)" + } + } } diff --git a/data/presets/fields/smoothness.json b/data/presets/fields/smoothness.json new file mode 100644 index 000000000..b0a5583b7 --- /dev/null +++ b/data/presets/fields/smoothness.json @@ -0,0 +1,18 @@ +{ + "key": "smoothness", + "type": "combo", + "label": "Smoothness", + "placeholder": "Thin Rollers, Wheels, Off-Road...", + "strings": { + "options": { + "excellent": "Thin Rollers: rollerblade, skateboard", + "good": "Thin Wheels: racing bike", + "intermediate": "Wheels: city bike, wheelchair, scooter", + "bad": "Robust Wheels: trekking bike, car, rickshaw", + "very_bad": "High Clearance: light duty off-road vehicle", + "horrible": "Off-Road: heavy duty off-road vehicle", + "very_horrible": "Specialized off-road: tractor, ATV", + "impassible": "Impassible / No wheeled vehicle" + } + } +} diff --git a/data/presets/fields/sport_ice.json b/data/presets/fields/sport_ice.json index facfb728c..7e5133bf9 100644 --- a/data/presets/fields/sport_ice.json +++ b/data/presets/fields/sport_ice.json @@ -1,12 +1,12 @@ { "key": "sport", "type": "combo", + "label": "Sport", "options": [ "skating", "hockey", "multi", "curling", "ice_stock" - ], - "label": "Sport" + ] } diff --git a/data/presets/fields/studio_type.json b/data/presets/fields/studio_type.json index 27499ae65..8d452be7a 100644 --- a/data/presets/fields/studio_type.json +++ b/data/presets/fields/studio_type.json @@ -1,9 +1,9 @@ { "key": "type", "type": "combo", + "label": "Type", "options": [ "audio", "video" - ], - "label": "Type" + ] } diff --git a/data/presets/fields/toilets/disposal.json b/data/presets/fields/toilets/disposal.json index 1ca02b975..9658c7e6c 100644 --- a/data/presets/fields/toilets/disposal.json +++ b/data/presets/fields/toilets/disposal.json @@ -1,5 +1,13 @@ { "key": "toilets:disposal", "type": "combo", - "label": "Disposal" -} \ No newline at end of file + "label": "Disposal", + "strings": { + "options": { + "flush": "Flush", + "pitlatrine": "Pit/Latrine", + "chemical": "Chemical", + "bucket": "Bucket" + } + } +} diff --git a/data/presets/fields/tracktype.json b/data/presets/fields/tracktype.json index 4736dfbc4..41277c4f6 100644 --- a/data/presets/fields/tracktype.json +++ b/data/presets/fields/tracktype.json @@ -1,5 +1,15 @@ { "key": "tracktype", "type": "combo", - "label": "Type" -} \ No newline at end of file + "label": "Type", + "placeholder": "Solid, Mostly Solid, Soft...", + "strings": { + "options": { + "grade1": "Solid: paved or heavily compacted hardcore surface", + "grade2": "Mostly Solid: gravel/rock with some soft material mixed in", + "grade3": "Even mixture of hard and soft materials", + "grade4": "Mostly Soft: soil/sand/grass with some hard material mixed in", + "grade5": "Soft: soil/sand/grass" + } + } +} diff --git a/data/presets/fields/trail_visibility.json b/data/presets/fields/trail_visibility.json index e2514da05..03e3d01e1 100644 --- a/data/presets/fields/trail_visibility.json +++ b/data/presets/fields/trail_visibility.json @@ -1,5 +1,16 @@ { "key": "trail_visibility", "type": "combo", - "label": "Trail Visibility" -} \ No newline at end of file + "label": "Trail Visibility", + "placeholder": "Excellent, Good, Bad...", + "strings": { + "options": { + "excellent": "Excellent: unambiguous path or markers everywhere", + "good": "Good: markers visible, sometimes require searching", + "intermediate": "Intermediate: few markers, path mostly visible", + "bad": "Bad: no markers, path sometimes invisible/pathless", + "horrible": "Horrible: often pathless, some orientation skills required", + "no": "No: pathless, excellent orientation skills required" + } + } +} diff --git a/data/presets/fields/tree_type.json b/data/presets/fields/tree_type.json index 3e668def3..54faa3793 100644 --- a/data/presets/fields/tree_type.json +++ b/data/presets/fields/tree_type.json @@ -1,10 +1,10 @@ { "key": "type", "type": "combo", + "label": "Type", "options": [ "broad_leaved", "conifer", "palm" - ], - "label": "Type" + ] } diff --git a/data/presets/presets.json b/data/presets/presets.json index 9ede71da3..5fbd5b5b7 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -4337,6 +4337,7 @@ "icon": "highway-track", "fields": [ "tracktype", + "smoothness", "oneway", "maxspeed", "structure", diff --git a/data/presets/presets/highway/track.json b/data/presets/presets/highway/track.json index c0db026b1..1b921a928 100644 --- a/data/presets/presets/highway/track.json +++ b/data/presets/presets/highway/track.json @@ -2,6 +2,7 @@ "icon": "highway-track", "fields": [ "tracktype", + "smoothness", "oneway", "maxspeed", "structure", @@ -16,4 +17,4 @@ }, "terms": [], "name": "Track" -} \ No newline at end of file +} diff --git a/data/presets/schema/field.json b/data/presets/schema/field.json index 3cc081660..c51c0cddd 100644 --- a/data/presets/schema/field.json +++ b/data/presets/schema/field.json @@ -79,9 +79,6 @@ "default": { "type": "string" }, - "indexed": { - "type": "boolean" - }, "options": { "type": "array", "items": { diff --git a/dist/locales/en.json b/dist/locales/en.json index d37957e37..e929c90c7 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -518,7 +518,12 @@ "label": "Type" }, "aerialway/access": { - "label": "Access" + "label": "Access", + "options": { + "entry": "Entry", + "exit": "Exit", + "both": "Both" + } }, "aerialway/bubble": { "label": "Bubble" @@ -539,7 +544,12 @@ "placeholder": "2, 4, 8..." }, "aerialway/summer/access": { - "label": "Access (summer)" + "label": "Access (summer)", + "options": { + "entry": "Entry", + "exit": "Exit", + "both": "Both" + } }, "aeroway": { "label": "Type" @@ -579,7 +589,25 @@ "placeholder": "50, 100, 200..." }, "cardinal_direction": { - "label": "Direction" + "label": "Direction", + "options": { + "N": "North", + "E": "East", + "S": "South", + "W": "West", + "NE": "Northeast", + "SE": "Southeast", + "SW": "Southwest", + "NW": "Northwest", + "NNE": "North-northeast", + "ENE": "East-northeast", + "ESE": "East-southeast", + "SSE": "South-southeast", + "SSW": "South-southwest", + "WSW": "West-southwest", + "WNW": "West-northwest", + "NNW": "North-northwest" + } }, "clock_direction": { "label": "Direction", @@ -619,7 +647,14 @@ "label": "Description" }, "electrified": { - "label": "Electrification" + "label": "Electrification", + "placeholder": "Contact Line, Electrified Rail...", + "options": { + "contact_line": "Contact Line", + "rail": "Electrified Rail", + "yes": "Yes (unspecified)", + "no": "No" + } }, "elevation": { "label": "Elevation" @@ -641,7 +676,13 @@ "label": "Fee" }, "fire_hydrant/type": { - "label": "Type" + "label": "Type", + "options": { + "pillar": "Pillar/Aboveground", + "underground": "Underground", + "wall": "Wall", + "pond": "Pond" + } }, "fixme": { "label": "Fix Me" @@ -810,20 +851,58 @@ "label": "Park and Ride" }, "parking": { - "label": "Type" + "label": "Type", + "options": { + "surface": "Surface", + "multi-storey": "Multilevel", + "underground": "Underground", + "sheds": "Sheds", + "carports": "Carports", + "garage_boxes": "Garage Boxes", + "lane": "Roadside Lane" + } }, "phone": { "label": "Phone", "placeholder": "+31 42 123 4567" }, "piste/difficulty": { - "label": "Difficulty" + "label": "Difficulty", + "placeholder": "Easy, Intermediate, Advanced...", + "options": { + "novice": "Novice (instructional)", + "easy": "Easy (green circle)", + "intermediate": "Intermediate (blue square)", + "advanced": "Advanced (black diamond)", + "expert": "Expert (double black diamond)", + "freeride": "Freeride (off-piste)", + "extreme": "Extreme (climing equipment required)" + } }, "piste/grooming": { - "label": "Grooming" + "label": "Grooming", + "options": { + "classic": "Classic", + "mogul": "Mogul", + "backcountry": "Backcountry", + "classic+skating": "Classic and Skating", + "scooter": "Scooter/Snowmobile", + "skating": "Skating" + } }, "piste/type": { - "label": "Type" + "label": "Type", + "options": { + "downhill": "Downhill", + "nordic": "Nordic", + "skitour": "Skitour", + "sled": "Sled", + "hike": "Hike", + "sleigh": "Sleigh", + "ice_skate": "Ice Skate", + "snow_park": "Snow Park", + "playground": "Playground" + } }, "place": { "label": "Type" @@ -856,16 +935,7 @@ "label": "Type" }, "religion": { - "label": "Religion", - "options": { - "christian": "Christian", - "muslim": "Muslim", - "buddhist": "Buddhist", - "jewish": "Jewish", - "hindu": "Hindu", - "shinto": "Shinto", - "taoist": "Taoist" - } + "label": "Religion" }, "restriction": { "label": "Type" @@ -880,7 +950,16 @@ "label": "Type" }, "sac_scale": { - "label": "Path Difficulty" + "label": "Path Difficulty", + "placeholder": "Mountain Hiking, Alpine Hiking...", + "options": { + "hiking": "T1: Hiking", + "mountain_hiking": "T2: Mountain Hiking", + "demanding_mountain_hiking": "T3: Demanding Mountain Hiking", + "alpine_hiking": "T4: Alpine Hiking", + "demanding_alpine_hiking": "T5: Demanding Alpine Hiking", + "difficult_alpine_hiking": "T6: Difficult Alpine Hiking" + } }, "seasonal": { "label": "Seasonal" @@ -901,7 +980,30 @@ "label": "Sloped Curb" }, "smoking": { - "label": "Smoking" + "label": "Smoking", + "placeholder": "No, Separated, Yes...", + "options": { + "no": "No smoking anywhere", + "separated": "In smoking areas, not physically isolated", + "isolated": "In smoking areas, physically isolated", + "outside": "Allowed outside", + "yes": "Allowed everywhere", + "dedicated": "Dedicated to smokers (e.g. smokers' club)" + } + }, + "smoothness": { + "label": "Smoothness", + "placeholder": "Thin Rollers, Wheels, Off-Road...", + "options": { + "excellent": "Thin Rollers: rollerblade, skateboard", + "good": "Thin Wheels: racing bike", + "intermediate": "Wheels: city bike, wheelchair, scooter", + "bad": "Robust Wheels: trekking bike, car, rickshaw", + "very_bad": "High Clearance: light duty off-road vehicle", + "horrible": "Off-Road: heavy duty off-road vehicle", + "very_horrible": "Specialized off-road: tractor, ATV", + "impassible": "Impassible / No wheeled vehicle" + } }, "social_facility_for": { "label": "People served", @@ -940,7 +1042,13 @@ "label": "Tactile Paving" }, "toilets/disposal": { - "label": "Disposal" + "label": "Disposal", + "options": { + "flush": "Flush", + "pitlatrine": "Pit/Latrine", + "chemical": "Chemical", + "bucket": "Bucket" + } }, "tourism": { "label": "Type" @@ -949,10 +1057,27 @@ "label": "Tower type" }, "tracktype": { - "label": "Type" + "label": "Type", + "placeholder": "Solid, Mostly Solid, Soft...", + "options": { + "grade1": "Solid: paved or heavily compacted hardcore surface", + "grade2": "Mostly Solid: gravel/rock with some soft material mixed in", + "grade3": "Even mixture of hard and soft materials", + "grade4": "Mostly Soft: soil/sand/grass with some hard material mixed in", + "grade5": "Soft: soil/sand/grass" + } }, "trail_visibility": { - "label": "Trail Visibility" + "label": "Trail Visibility", + "placeholder": "Excellent, Good, Bad...", + "options": { + "excellent": "Excellent: unambiguous path or markers everywhere", + "good": "Good: markers visible, sometimes require searching", + "intermediate": "Intermediate: few markers, path mostly visible", + "bad": "Bad: no markers, path sometimes invisible/pathless", + "horrible": "Horrible: often pathless, some orientation skills required", + "no": "No: pathless, excellent orientation skills required" + } }, "tree_type": { "label": "Type" diff --git a/js/id/ui/preset/combo.js b/js/id/ui/preset/combo.js index eda700ad9..dc1b93d88 100644 --- a/js/id/ui/preset/combo.js +++ b/js/id/ui/preset/combo.js @@ -1,6 +1,9 @@ iD.ui.preset.combo = iD.ui.preset.typeCombo = function(field) { var event = d3.dispatch('change'), + optstrings = field.strings && field.strings.options, + optarray = field.options, + strings = {}, input; function combo(selection) { @@ -9,44 +12,66 @@ iD.ui.preset.typeCombo = function(field) { input = selection.selectAll('input') .data([0]); - input.enter().append('input') + var enter = input.enter() + .append('input') .attr('type', 'text') .attr('id', 'preset-input-' + field.id); + if (optstrings) { enter.attr('readonly', 'readonly'); } + input .call(combobox) .on('change', change) .on('blur', change) .each(function() { - if (field.options) { - options(field.options); + if (optstrings) { + _.each(optstrings, function(v, k) { + strings[k] = field.t('options.' + k, { 'default': v }); + }); + stringsLoaded(); + } else if (optarray) { + _.each(optarray, function(k) { + strings[k] = k.replace(/_+/g, ' '); + }); + stringsLoaded(); } else { - iD.taginfo().values({ - key: field.key - }, function(err, data) { - if (!err) options(_.pluck(data, 'value')); + iD.taginfo().values({key: field.key}, function(err, data) { + if (!err) { + _.each(_.pluck(data, 'value'), function(k) { + strings[k] = k.replace(/_+/g, ' '); + }); + stringsLoaded(); + } }); } }); - function options(opts) { - combobox.data(opts.map(function(d) { - var o = {}; - o.title = o.value = d.replace(/_+/g, ' '); + function stringsLoaded() { + var keys = _.keys(strings), + strs = [], + placeholders; + + combobox.data(keys.map(function(k) { + var s = strings[k], + o = {}; + o.title = o.value = s; + if (s.length < 20) { strs.push(s); } return o; })); + placeholders = strs.length > 1 ? strs : keys; input.attr('placeholder', field.placeholder() || - (opts.length < 3 ? '' : opts.slice(0, 3).join(', ') + '...')); + (placeholders.slice(0, 3).join(', ') + '...')); } } function change() { - var value = input.value() - .split(';') - .map(function(s) { return s.trim(); }) - .join(';') - .replace(/\s+/g, '_'); + var optstring = _.find(_.keys(strings), function(k) { return strings[k] === input.value(); }), + value = optstring || (input.value() + .split(';') + .map(function(s) { return s.trim(); }) + .join(';') + .replace(/\s+/g, '_')); if (field.type === 'typeCombo' && !value) value = 'yes'; @@ -56,8 +81,9 @@ iD.ui.preset.typeCombo = function(field) { } combo.tags = function(tags) { - var value = tags[field.key] || ''; - if (field.type === 'typeCombo' && value === 'yes') value = ''; + var key = tags[field.key], + value = strings[key] || key || ''; + if (field.type === 'typeCombo' && value.toLowerCase() === 'yes') value = ''; input.value(value); }; diff --git a/js/lib/d3.combobox.js b/js/lib/d3.combobox.js index d59e463e1..174d08c9c 100644 --- a/js/lib/d3.combobox.js +++ b/js/lib/d3.combobox.js @@ -44,8 +44,12 @@ d3.combobox = function() { // on mousedown d3.event.stopPropagation(); d3.event.preventDefault(); - input.node().focus(); - fetch('', render); + if (!shown) { + input.node().focus(); + fetch('', render); + } else { + hide(); + } }); });