From cc3039033f541ed25bfab492abb9934e1cbe02ac Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Mon, 30 Dec 2019 23:03:43 +0000 Subject: [PATCH] Support more subtypes of osmose error type 8300 --- data/core.yaml | 2 ++ data/qa_errors.json | 54 ++++++++++++++++++++++++++++++++++++++ dist/locales/en.json | 4 ++- modules/services/osmose.js | 13 ++++++--- 4 files changed, 69 insertions(+), 4 deletions(-) diff --git a/data/core.yaml b/data/core.yaml index 44f12d4d6..027b6769b 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -888,10 +888,12 @@ en: title: 'Traffic Sign Suggestion' description: 'Traffic signs detected by Mapillary suggest there may be an unmapped {0} nearby.' parts: + 1: 'speed limit' 20: 'max height limit' 21: 'max weight limit' 32: 'roundabout' 34: 'set of speed bumps' + 39: 'living street' 8360: title: 'Missing Street Object' description: 'Object detection by Mapillary suggests there may be an unmapped {0} nearby.' diff --git a/data/qa_errors.json b/data/qa_errors.json index ddf8e3507..5bfeff88a 100644 --- a/data/qa_errors.json +++ b/data/qa_errors.json @@ -111,6 +111,57 @@ "7040-6": { "icon": "temaki-power" }, + "8300-1": { + "icon": "fas-tachometer-alt" + }, + "8300-2": { + "icon": "fas-tachometer-alt" + }, + "8300-3": { + "icon": "fas-tachometer-alt" + }, + "8300-4": { + "icon": "fas-tachometer-alt" + }, + "8300-5": { + "icon": "fas-tachometer-alt" + }, + "8300-6": { + "icon": "fas-tachometer-alt" + }, + "8300-7": { + "icon": "fas-tachometer-alt" + }, + "8300-8": { + "icon": "fas-tachometer-alt" + }, + "8300-9": { + "icon": "fas-tachometer-alt" + }, + "8300-10": { + "icon": "fas-tachometer-alt" + }, + "8300-11": { + "icon": "fas-tachometer-alt" + }, + "8300-12": { + "icon": "fas-tachometer-alt" + }, + "8300-13": { + "icon": "fas-tachometer-alt" + }, + "8300-14": { + "icon": "fas-tachometer-alt" + }, + "8300-15": { + "icon": "fas-tachometer-alt" + }, + "8300-16": { + "icon": "fas-tachometer-alt" + }, + "8300-17": { + "icon": "fas-tachometer-alt" + }, "8300-20": { "icon": "temaki-height_restrictor" }, @@ -123,6 +174,9 @@ "8300-34": { "icon": "temaki-diamond" }, + "8300-39": { + "icon": "temaki-pedestrian" + }, "8360-1": { "icon": "temaki-bench" }, diff --git a/dist/locales/en.json b/dist/locales/en.json index 60ff1331e..e1434169f 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -1062,10 +1062,12 @@ "title": "Traffic Sign Suggestion", "description": "Traffic signs detected by Mapillary suggest there may be an unmapped {0} nearby.", "parts": { + "1": "speed limit", "20": "max height limit", "21": "max weight limit", "32": "roundabout", - "34": "set of speed bumps" + "34": "set of speed bumps", + "39": "living street" } }, "8360": { diff --git a/modules/services/osmose.js b/modules/services/osmose.js index d42994e5a..74648053e 100644 --- a/modules/services/osmose.js +++ b/modules/services/osmose.js @@ -140,13 +140,20 @@ export default { }); // Special handling for some error types - // Setting elems here prevents UI error detail requests switch (d.item) { case 8300: case 8360: { // Parts only exists for these error types let { parts } = dataEn.QA.osmose.error_types[d.item]; - d.replacements = [parts[error_class]]; + let k = error_class; + + // First 17 classes are all speed limits + if (item === 8300 && error_class <= 17) { + k = 1; + } + + // Setting elems here prevents UI error detail requests + d.replacements = [parts[k]]; d.elems = []; break; } @@ -272,4 +279,4 @@ export default { getClosedCounts() { return _erCache.closed; } -}; +}; \ No newline at end of file