From d7ef2de0735fb1c3c0b88e3b5ced5d355bd6b00a Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Thu, 20 Dec 2018 12:16:54 -0500 Subject: [PATCH] Re-organizes issue messages and tooltips --- data/core.yaml | 45 ++++++++++------- dist/locales/en.json | 56 ++++++++++++++------- modules/validations/crossing_ways.js | 4 +- modules/validations/deprecated_tag.js | 2 +- modules/validations/disconnected_highway.js | 4 +- modules/validations/many_deletions.js | 2 +- modules/validations/missing_tag.js | 4 +- modules/validations/old_multipolygon.js | 4 +- modules/validations/tag_suggests_area.js | 2 +- 9 files changed, 75 insertions(+), 48 deletions(-) diff --git a/data/core.yaml b/data/core.yaml index 88615fafa..3764707af 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -622,24 +622,6 @@ en: description: Description on_wiki: "{tag} on wiki.osm.org" used_with: "used with {type}" - validations: - disconnected_highway: "{entityLabel} is disconnected from other highways." - disconnected_highway_tooltip: "Roads should be connected to other roads or building entrances." - old_multipolygon: Multipolygon tags on outer way - old_multipolygon_tooltip: "This style of multipolygon is deprecated. Please assign the tags to the parent multipolygon instead of the outer way." - untagged_point: Untagged point - untagged_point_tooltip: "Select a feature type that describes what this point is." - untagged_line: Untagged line - untagged_line_tooltip: "Select a feature type that describes what this line is." - untagged_area: Untagged area - untagged_area_tooltip: "Select a feature type that describes what this area is." - untagged_relation: Untagged relation - untagged_relation_tooltip: "Select a feature type that describes what this relation is." - many_deletions: "You're deleting {n} features: {p} nodes, {l} lines, {a} areas, {r} relations. Are you sure you want to do this? This will delete them from the map that everyone else sees on openstreetmap.org." - tag_suggests_area: "The tag {tag} suggests line should be area, but it is not an area" - deprecated_tags: "Deprecated tags: {tags}" - crossing_ways: Crossing ways without connection - crossing_ways_tooltip: "Roads are crossing other roads, buildings, railroads, or waterways without connection nodes or a bridge tag." zoom: in: Zoom in out: Zoom out @@ -900,6 +882,33 @@ en: severity: error: error warning: warning + disconnected_highway: + message: "{entityLabel} is disconnected from other highways." + tooltip: "Roads should be connected to other roads or building entrances." + old_multipolygon: + message: Multipolygon tags on outer way + tooltip: "This style of multipolygon is deprecated. Please assign the tags to the parent multipolygon instead of the outer way." + untagged_point: + message: Untagged point + tooltip: "Select a feature type that describes what this point is." + untagged_line: + message: Untagged line + tooltip: "Select a feature type that describes what this line is." + untagged_area: + message: Untagged area + tooltip: "Select a feature type that describes what this area is." + untagged_relation: + message: Untagged relation + tooltip: "Select a feature type that describes what this relation is." + many_deletions: + message: "You're deleting {n} features: {p} nodes, {l} lines, {a} areas, {r} relations. Are you sure you want to do this? This will delete them from the map that everyone else sees on openstreetmap.org." + tag_suggests_area: + message: "The tag {tag} suggests line should be area, but it is not an area" + deprecated_tags: + message: "Deprecated tags: {tags}" + crossing_ways: + message: Crossing ways without connection + tooltip: "Roads are crossing other roads, buildings, railroads, or waterways without connection nodes or a bridge tag." intro: done: done ok: OK diff --git a/dist/locales/en.json b/dist/locales/en.json index ed8c8a1cc..51ce3eabf 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -759,25 +759,6 @@ "on_wiki": "{tag} on wiki.osm.org", "used_with": "used with {type}" }, - "validations": { - "disconnected_highway": "{entityLabel} is disconnected from other highways.", - "disconnected_highway_tooltip": "Roads should be connected to other roads or building entrances.", - "old_multipolygon": "Multipolygon tags on outer way", - "old_multipolygon_tooltip": "This style of multipolygon is deprecated. Please assign the tags to the parent multipolygon instead of the outer way.", - "untagged_point": "Untagged point", - "untagged_point_tooltip": "Select a feature type that describes what this point is.", - "untagged_line": "Untagged line", - "untagged_line_tooltip": "Select a feature type that describes what this line is.", - "untagged_area": "Untagged area", - "untagged_area_tooltip": "Select a feature type that describes what this area is.", - "untagged_relation": "Untagged relation", - "untagged_relation_tooltip": "Select a feature type that describes what this relation is.", - "many_deletions": "You're deleting {n} features: {p} nodes, {l} lines, {a} areas, {r} relations. Are you sure you want to do this? This will delete them from the map that everyone else sees on openstreetmap.org.", - "tag_suggests_area": "The tag {tag} suggests line should be area, but it is not an area", - "deprecated_tags": "Deprecated tags: {tags}", - "crossing_ways": "Crossing ways without connection", - "crossing_ways_tooltip": "Roads are crossing other roads, buildings, railroads, or waterways without connection nodes or a bridge tag." - }, "zoom": { "in": "Zoom in", "out": "Zoom out" @@ -1070,6 +1051,43 @@ "severity": { "error": "error", "warning": "warning" + }, + "disconnected_highway": { + "message": "{entityLabel} is disconnected from other highways.", + "tooltip": "Roads should be connected to other roads or building entrances." + }, + "old_multipolygon": { + "message": "Multipolygon tags on outer way", + "tooltip": "This style of multipolygon is deprecated. Please assign the tags to the parent multipolygon instead of the outer way." + }, + "untagged_point": { + "message": "Untagged point", + "tooltip": "Select a feature type that describes what this point is." + }, + "untagged_line": { + "message": "Untagged line", + "tooltip": "Select a feature type that describes what this line is." + }, + "untagged_area": { + "message": "Untagged area", + "tooltip": "Select a feature type that describes what this area is." + }, + "untagged_relation": { + "message": "Untagged relation", + "tooltip": "Select a feature type that describes what this relation is." + }, + "many_deletions": { + "message": "You're deleting {n} features: {p} nodes, {l} lines, {a} areas, {r} relations. Are you sure you want to do this? This will delete them from the map that everyone else sees on openstreetmap.org." + }, + "tag_suggests_area": { + "message": "The tag {tag} suggests line should be area, but it is not an area" + }, + "deprecated_tags": { + "message": "Deprecated tags: {tags}" + }, + "crossing_ways": { + "message": "Crossing ways without connection", + "tooltip": "Roads are crossing other roads, buildings, railroads, or waterways without connection nodes or a bridge tag." } }, "intro": { diff --git a/modules/validations/crossing_ways.js b/modules/validations/crossing_ways.js index c991b58bb..8c23b62e1 100644 --- a/modules/validations/crossing_ways.js +++ b/modules/validations/crossing_ways.js @@ -96,8 +96,8 @@ export function validationHighwayCrossingOtherWays() { issues.push(new validationIssue({ type: ValidationIssueType.crossing_ways, severity: ValidationIssueSeverity.error, - message: t('validations.crossing_ways'), - tooltip: t('validations.crossing_ways_tooltip'), + message: t('issues.crossing_ways.message'), + tooltip: t('issues.crossing_ways.tooltip'), entities: crosses[j].ways, coordinates: crosses[j].cross_point, })); diff --git a/modules/validations/deprecated_tag.js b/modules/validations/deprecated_tag.js index 50f8606c0..64ca4c644 100644 --- a/modules/validations/deprecated_tag.js +++ b/modules/validations/deprecated_tag.js @@ -22,7 +22,7 @@ export function validationDeprecatedTag() { issues.push(new validationIssue({ type: ValidationIssueType.deprecated_tags, severity: ValidationIssueSeverity.warning, - message: t('validations.deprecated_tags', { tags: tags }), + message: t('issues.deprecated_tags.message', { tags: tags }), entities: [change], })); } diff --git a/modules/validations/disconnected_highway.js b/modules/validations/disconnected_highway.js index 6a3cd088f..4805a0d29 100644 --- a/modules/validations/disconnected_highway.js +++ b/modules/validations/disconnected_highway.js @@ -50,8 +50,8 @@ export function validationDisconnectedHighway(context) { issues.push(new validationIssue({ type: ValidationIssueType.disconnected_highway, severity: ValidationIssueSeverity.warning, - message: t('validations.disconnected_highway', {entityLabel: entityLabel}), - tooltip: t('validations.disconnected_highway_tooltip'), + message: t('issues.disconnected_highway.message', {entityLabel: entityLabel}), + tooltip: t('issues.disconnected_highway.tooltip'), entities: [entity], })); } diff --git a/modules/validations/many_deletions.js b/modules/validations/many_deletions.js index 9624c2baa..dc0545ae6 100644 --- a/modules/validations/many_deletions.js +++ b/modules/validations/many_deletions.js @@ -23,7 +23,7 @@ export function validationManyDeletions() { type: ValidationIssueType.many_deletions, severity: ValidationIssueSeverity.warning, message: t( - 'validations.many_deletions', + 'issues.many_deletions.message', { n: changes.deleted.length, p: nodes, l: ways, a:areas, r: relations } ), })); diff --git a/modules/validations/missing_tag.js b/modules/validations/missing_tag.js index 53f977e3b..40adb5acd 100644 --- a/modules/validations/missing_tag.js +++ b/modules/validations/missing_tag.js @@ -26,8 +26,8 @@ export function validationMissingTag() { issues.push(new validationIssue({ type: ValidationIssueType.missing_tag, severity: ValidationIssueSeverity.error, - message: t('validations.untagged_' + geometry), - tooltip: t('validations.untagged_' + geometry + '_tooltip'), + message: t('issues.untagged_' + geometry + '.message'), + tooltip: t('issues.untagged_' + geometry + '.tooltip'), entities: [change], })); } diff --git a/modules/validations/old_multipolygon.js b/modules/validations/old_multipolygon.js index e1b2da7be..0681ab4f9 100644 --- a/modules/validations/old_multipolygon.js +++ b/modules/validations/old_multipolygon.js @@ -17,8 +17,8 @@ export function validationOldMultipolygon() { issues.push(new validationIssue({ type: ValidationIssueType.old_multipolygon, severity: ValidationIssueSeverity.warning, - message: t('validations.old_multipolygon'), - tooltip: t('validations.old_multipolygon_tooltip'), + message: t('issues.old_multipolygon.message'), + tooltip: t('issues.old_multipolygon.tooltip'), entities: [parent], })); } diff --git a/modules/validations/tag_suggests_area.js b/modules/validations/tag_suggests_area.js index 4ef06f39c..bed1f9a63 100644 --- a/modules/validations/tag_suggests_area.js +++ b/modules/validations/tag_suggests_area.js @@ -40,7 +40,7 @@ export function validationTagSuggestsArea() { issues.push(new validationIssue({ type: ValidationIssueType.tag_suggests_area, severity: ValidationIssueSeverity.warning, - message: t('validations.tag_suggests_area', { tag: suggestion }), + message: t('issues.tag_suggests_area.message', { tag: suggestion }), entities: [change], })); }