diff --git a/css/65_data.css b/css/65_data.css index 7a885e8be..416321186 100644 --- a/css/65_data.css +++ b/css/65_data.css @@ -174,6 +174,14 @@ color: #2D9359; } +.osmose.category-4080 { + color: #F2F230; +} + +.osmose.category-7040 { + color: #9F16B4; +} + .osmose.category-8300, .osmose.category-8360 { color: #3DE736; diff --git a/data/core.yaml b/data/core.yaml index 340b64a60..8939c3b29 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -869,6 +869,18 @@ en: 3250-32501: title: 'Invalid Opening Hours' description: '{0} has an invalid value for the "opening_hours" tag.' + 4080: + title: 'Object Mapped Twice' + description: '{0} and {1} both appear to represent the same object.' + 7040: + title: 'Unfinished Power Line' + description: 'A power line appears to be unfinished at {0}.' + 7040-1: + title: 'Lone Power Support' + description: '{0} is a power tower or pole with no connected power lines.' + 7040-4: + title: 'Extra Power Line Node' + description: 'Power lines only have nodes at connections and {0} is not tagged as a power line support.' 8300: title: 'Traffic Sign Suggestion' description: 'Traffic signs detected by Mapillary suggest there may be an unmapped {0} nearby.' diff --git a/data/qa_errors.json b/data/qa_errors.json index e0122a371..54eed409b 100644 --- a/data/qa_errors.json +++ b/data/qa_errors.json @@ -34,7 +34,7 @@ } }, "osmose": { - "items": ["0", "1040", "1050", "1070", "1150", "1280", "3161", "3250", "8300", "8360"], + "items": ["0", "1040", "1050", "1070", "1150", "1280", "3161", "3250", "4080", "7040", "8300", "8360"], "errorTypes": { "0-1": { "icon": "maki-home" @@ -87,6 +87,27 @@ "3250-32501": { "icon": "maki-watch" }, + "4080-1": { + "icon": "far-dot-circle" + }, + "4080-2": { + "icon": "far-dot-circle" + }, + "4080-3": { + "icon": "far-dot-circle" + }, + "7040-1": { + "icon": "temaki-power_tower" + }, + "7040-2": { + "icon": "temaki-power" + }, + "7040-4": { + "icon": "maki-marker" + }, + "7040-6": { + "icon": "temaki-power" + }, "8300-20": { "icon": "temaki-height_restrictor" }, diff --git a/dist/locales/en.json b/dist/locales/en.json index b4a04fda9..535db8a62 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -1050,6 +1050,14 @@ "title": "Missing Parking Access", "description": "There is no highway leading to {0}." }, + "4080": { + "title": "Object Mapped Twice", + "description": "{0} and {1} both appear to represent the same object." + }, + "7040": { + "title": "Unfinished Power Line", + "description": "A power line appears to be unfinished at {0}." + }, "8300": { "title": "Traffic Sign Suggestion", "description": "Traffic signs detected by Mapillary suggest there may be an unmapped {0} nearby.", @@ -1107,6 +1115,14 @@ "3250-32501": { "title": "Invalid Opening Hours", "description": "{0} has an invalid value for the \"opening_hours\" tag." + }, + "7040-1": { + "title": "Lone Power Support", + "description": "{0} is a power tower or pole with no connected power lines." + }, + "7040-4": { + "title": "Extra Power Line Node", + "description": "Power lines only have nodes at connections and {0} is not tagged as a power line support." } } }, diff --git a/scripts/build_data.js b/scripts/build_data.js index e5ddff4bf..02f72b80f 100644 --- a/scripts/build_data.js +++ b/scripts/build_data.js @@ -67,11 +67,8 @@ function buildData() { let faIcons = { 'fas-i-cursor': {}, 'fas-lock': {}, - 'fas-long-arrow-alt-right': {}, 'fas-th-list': {}, - 'fas-user-cog': {}, - 'far-clone': {}, - 'fas-weight-hanging': {} + 'fas-user-cog': {} }; // The Noun Project icons used @@ -92,7 +89,7 @@ function buildData() { 'dist/data/*', 'svg/fontawesome/*.svg', ]); - + readQAErrorIcons(faIcons, tnpIcons); let categories = generateCategories(tstrings, faIcons, tnpIcons); let fields = generateFields(tstrings, faIcons, tnpIcons, searchableFieldIDs); let presets = generatePresets(tstrings, faIcons, tnpIcons, searchableFieldIDs); @@ -174,6 +171,28 @@ function validate(file, instance, schema) { } +function readQAErrorIcons(faIcons, tnpIcons) { + const qa = read('data/qa_errors.json'); + + for (const service in qa.services) { + for (const error in qa.services[service].errorTypes) { + const icon = qa.services[service] + .errorTypes[error] + .icon; + + // fontawesome icon, remember for later + if (/^fa[srb]-/.test(icon)) { + faIcons[icon] = {}; + } + // noun project icon, remember for later + if (/^tnp-/.test(icon)) { + tnpIcons[icon] = {}; + } + } + } +} + + function generateCategories(tstrings, faIcons, tnpIcons) { let categories = {}; diff --git a/svg/fontawesome/far-dot-circle.svg b/svg/fontawesome/far-dot-circle.svg new file mode 100644 index 000000000..9decb1145 --- /dev/null +++ b/svg/fontawesome/far-dot-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file