Restore tooltips on rule checkboxes, separate 'tip' and 'reference'

Reference will show on clicking info button, and can contain more
useful information than a tooltip can.
This commit is contained in:
Bryan Housel
2019-04-19 13:24:55 -04:00
parent 4d66cacb27
commit 2ebbb68604
15 changed files with 110 additions and 79 deletions

View File

@@ -1278,60 +1278,63 @@ en:
almost_junction:
title: Almost Junctions
message: "{feature} is very close but not connected to {feature2}"
tip: "Find features that should possibly be connected to other nearby features"
highway-highway:
tip: Intersecting highways should share a junction vertex.
reference: Intersecting highways should share a junction vertex.
crossing_ways:
title: Crossings Ways
message: "{feature} crosses {feature2}"
tip: Highways, railways, waterways, and buildings should not cross ambiguously.
tip: "Find features that incorrectly cross over one another"
building-building:
tip: "Buildings should not intersect except on different layers."
reference: "Buildings should not intersect except on different layers."
building-highway:
tip: "Highways crossing buildings should use bridges, tunnels, coverings, or entrances."
reference: "Highways crossing buildings should use bridges, tunnels, coverings, or entrances."
building-railway:
tip: "Railways crossing buildings should use bridges or tunnels."
reference: "Railways crossing buildings should use bridges or tunnels."
building-waterway:
tip: "Waterways crossing buildings should use tunnels or different layers."
reference: "Waterways crossing buildings should use tunnels or different layers."
highway-highway:
tip: "Crossing highways should use bridges, tunnels, or intersections."
reference: "Crossing highways should use bridges, tunnels, or intersections."
highway-railway:
tip: "Highways crossing railways should use bridges, tunnels, or level crossings."
reference: "Highways crossing railways should use bridges, tunnels, or level crossings."
highway-waterway:
tip: "Highways crossing waterways should use bridges, tunnels, or fords."
reference: "Highways crossing waterways should use bridges, tunnels, or fords."
railway-railway:
tip: "Crossing railways should be connected or use bridges or tunnels."
reference: "Crossing railways should be connected or use bridges or tunnels."
railway-waterway:
tip: "Railways crossing waterways should use bridges or tunnels."
reference: "Railways crossing waterways should use bridges or tunnels."
waterway-waterway:
tip: "Crossing waterways should be connected or use tunnels."
reference: "Crossing waterways should be connected or use tunnels."
tunnel-tunnel:
tip: "Crossing tunnels should use different layers."
reference: "Crossing tunnels should use different layers."
tunnel-tunnel_connectable:
tip: "Crossing tunnels should be connected or use different layers."
reference: "Crossing tunnels should be connected or use different layers."
bridge-bridge:
tip: "Crossing bridges should use different layers."
reference: "Crossing bridges should use different layers."
bridge-bridge_connectable:
tip: "Crossing bridges should be connected or use different layers."
reference: "Crossing bridges should be connected or use different layers."
indoor-indoor:
tip: "Crossing indoor features should use different levels."
reference: "Crossing indoor features should use different levels."
indoor-indoor_connectable:
tip: "Crossing indoor features should be connected or use different levels."
reference: "Crossing indoor features should be connected or use different levels."
disconnected_way:
title: Disconnected Ways
tip: "Find unconnected highways and paths"
highway:
message: "{highway} is disconnected from other roads and paths"
tip: "Highways should connect to other highways or building entrances."
reference: "Highways should connect to other highways or building entrances."
generic_name:
title: Generic Names
message: '{feature} has the generic name "{name}"'
tip: "Names should be the actual, on-the-ground names of features."
title: Suspicious Names
message: '{feature} has the suspicious name "{name}"'
tip: "Find features with generic or suspicious names"
reference: "Names should be the actual, on-the-ground names of features."
incompatible_source:
title: Incompatible Data Sources
title: Suspicious Sources
tip: "Find features with suspicious source tags"
google:
feature:
message: '{feature} lists Google as a data source'
tip: "Google products are proprietary and must not be used as references."
tip: "Source data must be licensed in a manner compatible with OpenStreetMap."
reference: "Google products are proprietary and must not be used as references."
many_deletions:
title: Many Deletions
points-lines-areas:
@@ -1342,38 +1345,45 @@ en:
missing_role:
title: Missing Roles
message: "{member} has no role within {relation}"
tip: "Find relations with missing or incorrect member roles"
multipolygon:
tip: "Multipolygon members must have an inner or outer role."
reference: "Multipolygon members must have an inner or outer role."
missing_tag:
title: Missing Tags
tip: "Find features that are missing descriptive tags"
reference: "Features must have tags that define what they are."
any:
message: "{feature} has no tags"
descriptive:
message: "{feature} has no descriptive tags"
specific:
message: '{feature} has no "{tag}" tag'
tip: "Features must have tags that define what they are."
old_multipolygon:
title: Misplaced Multipolygon Tags
message: "{multipolygon} has misplaced tags"
tip: "Multipolygons should be tagged on their relation, not their outer way."
tip: "Find old multipolygons with tags assigned to the outer way"
reference: "Multipolygons should be tagged on their relation, not their outer way."
outdated_tags:
title: Outdated Tags
message: '{feature} has outdated tags'
tip: "Some tags change over time and should be updated."
tip: "Find features with deprecated tags that can be updated"
reference: "Some tags change over time and should be updated."
private_data:
title: Private Information
tip: "Find features that may contain private information"
reference: "Sensitive data like personal phone numbers should not be tagged."
contact:
message: '{feature} might be tagged with private contact information'
tip: "Sensitive data like personal phone numbers should not be tagged."
tag_suggests_area:
title: Lines Tagged as Areas
message: '{feature} should be a closed area based on the tag "{tag}"'
tip: "Areas must have connected endpoints."
tip: "Find features that are tagged as lines and should possibly be tagged as areas"
reference: "Areas must have connected endpoints."
unknown_road:
title: Unknown Roads
message: "{feature} has no classification"
tip: "Roads without a specific type may not appear in maps or routing."
tip: "Find roads that are missing a proper road classification"
reference: "Roads without a specific type may not appear in maps or routing."
fix:
connect_almost_junction:
annotation: Connected very close features.

80
dist/locales/en.json vendored
View File

@@ -1559,84 +1559,87 @@
"almost_junction": {
"title": "Almost Junctions",
"message": "{feature} is very close but not connected to {feature2}",
"tip": "Find features that should possibly be connected to other nearby features",
"highway-highway": {
"tip": "Intersecting highways should share a junction vertex."
"reference": "Intersecting highways should share a junction vertex."
}
},
"crossing_ways": {
"title": "Crossings Ways",
"message": "{feature} crosses {feature2}",
"tip": "Highways, railways, waterways, and buildings should not cross ambiguously.",
"tip": "Find features that incorrectly cross over one another",
"building-building": {
"tip": "Buildings should not intersect except on different layers."
"reference": "Buildings should not intersect except on different layers."
},
"building-highway": {
"tip": "Highways crossing buildings should use bridges, tunnels, coverings, or entrances."
"reference": "Highways crossing buildings should use bridges, tunnels, coverings, or entrances."
},
"building-railway": {
"tip": "Railways crossing buildings should use bridges or tunnels."
"reference": "Railways crossing buildings should use bridges or tunnels."
},
"building-waterway": {
"tip": "Waterways crossing buildings should use tunnels or different layers."
"reference": "Waterways crossing buildings should use tunnels or different layers."
},
"highway-highway": {
"tip": "Crossing highways should use bridges, tunnels, or intersections."
"reference": "Crossing highways should use bridges, tunnels, or intersections."
},
"highway-railway": {
"tip": "Highways crossing railways should use bridges, tunnels, or level crossings."
"reference": "Highways crossing railways should use bridges, tunnels, or level crossings."
},
"highway-waterway": {
"tip": "Highways crossing waterways should use bridges, tunnels, or fords."
"reference": "Highways crossing waterways should use bridges, tunnels, or fords."
},
"railway-railway": {
"tip": "Crossing railways should be connected or use bridges or tunnels."
"reference": "Crossing railways should be connected or use bridges or tunnels."
},
"railway-waterway": {
"tip": "Railways crossing waterways should use bridges or tunnels."
"reference": "Railways crossing waterways should use bridges or tunnels."
},
"waterway-waterway": {
"tip": "Crossing waterways should be connected or use tunnels."
"reference": "Crossing waterways should be connected or use tunnels."
},
"tunnel-tunnel": {
"tip": "Crossing tunnels should use different layers."
"reference": "Crossing tunnels should use different layers."
},
"tunnel-tunnel_connectable": {
"tip": "Crossing tunnels should be connected or use different layers."
"reference": "Crossing tunnels should be connected or use different layers."
},
"bridge-bridge": {
"tip": "Crossing bridges should use different layers."
"reference": "Crossing bridges should use different layers."
},
"bridge-bridge_connectable": {
"tip": "Crossing bridges should be connected or use different layers."
"reference": "Crossing bridges should be connected or use different layers."
},
"indoor-indoor": {
"tip": "Crossing indoor features should use different levels."
"reference": "Crossing indoor features should use different levels."
},
"indoor-indoor_connectable": {
"tip": "Crossing indoor features should be connected or use different levels."
"reference": "Crossing indoor features should be connected or use different levels."
}
},
"disconnected_way": {
"title": "Disconnected Ways",
"tip": "Find unconnected highways and paths",
"highway": {
"message": "{highway} is disconnected from other roads and paths",
"tip": "Highways should connect to other highways or building entrances."
"reference": "Highways should connect to other highways or building entrances."
}
},
"generic_name": {
"title": "Generic Names",
"message": "{feature} has the generic name \"{name}\"",
"tip": "Names should be the actual, on-the-ground names of features."
"title": "Suspicious Names",
"message": "{feature} has the suspicious name \"{name}\"",
"tip": "Find features with generic or suspicious names",
"reference": "Names should be the actual, on-the-ground names of features."
},
"incompatible_source": {
"title": "Incompatible Data Sources",
"title": "Suspicious Sources",
"tip": "Find features with suspicious source tags",
"google": {
"feature": {
"message": "{feature} lists Google as a data source"
},
"tip": "Google products are proprietary and must not be used as references."
},
"tip": "Source data must be licensed in a manner compatible with OpenStreetMap."
"reference": "Google products are proprietary and must not be used as references."
}
},
"many_deletions": {
"title": "Many Deletions",
@@ -1651,12 +1654,15 @@
"missing_role": {
"title": "Missing Roles",
"message": "{member} has no role within {relation}",
"tip": "Find relations with missing or incorrect member roles",
"multipolygon": {
"tip": "Multipolygon members must have an inner or outer role."
"reference": "Multipolygon members must have an inner or outer role."
}
},
"missing_tag": {
"title": "Missing Tags",
"tip": "Find features that are missing descriptive tags",
"reference": "Features must have tags that define what they are.",
"any": {
"message": "{feature} has no tags"
},
@@ -1665,35 +1671,39 @@
},
"specific": {
"message": "{feature} has no \"{tag}\" tag"
},
"tip": "Features must have tags that define what they are."
}
},
"old_multipolygon": {
"title": "Misplaced Multipolygon Tags",
"message": "{multipolygon} has misplaced tags",
"tip": "Multipolygons should be tagged on their relation, not their outer way."
"tip": "Find old multipolygons with tags assigned to the outer way",
"reference": "Multipolygons should be tagged on their relation, not their outer way."
},
"outdated_tags": {
"title": "Outdated Tags",
"message": "{feature} has outdated tags",
"tip": "Some tags change over time and should be updated."
"tip": "Find features with deprecated tags that can be updated",
"reference": "Some tags change over time and should be updated."
},
"private_data": {
"title": "Private Information",
"tip": "Find features that may contain private information",
"reference": "Sensitive data like personal phone numbers should not be tagged.",
"contact": {
"message": "{feature} might be tagged with private contact information"
},
"tip": "Sensitive data like personal phone numbers should not be tagged."
}
},
"tag_suggests_area": {
"title": "Lines Tagged as Areas",
"message": "{feature} should be a closed area based on the tag \"{tag}\"",
"tip": "Areas must have connected endpoints."
"tip": "Find features that are tagged as lines and should possibly be tagged as areas",
"reference": "Areas must have connected endpoints."
},
"unknown_road": {
"title": "Unknown Roads",
"message": "{feature} has no classification",
"tip": "Roads without a specific type may not appear in maps or routing."
"tip": "Find roads that are missing a proper road classification",
"reference": "Roads without a specific type may not appear in maps or routing."
},
"fix": {
"connect_almost_junction": {

View File

@@ -305,16 +305,19 @@ export function uiIssues(context) {
updateRulesList();
}
function updateRulesList() {
var ruleKeys = context.validator().getRuleKeys();
_rulesList
.call(drawListItems, ruleKeys, 'checkbox', 'rule', toggleRule, isRuleEnabled);
}
function isRuleEnabled(d) {
return context.validator().isRuleEnabled(d);
}
function toggleRule(d) {
context.validator().toggleRule(d);
}
@@ -398,6 +401,14 @@ export function uiIssues(context) {
var enter = items.enter()
.append('li');
if (name === 'rule') {
enter
.call(tooltip()
.title(function(d) { return t('issues.' + d + '.tip'); })
.placement('top')
);
}
var label = enter
.append('label');

View File

@@ -111,7 +111,7 @@ export function validationAlmostJunction() {
.enter()
.append('div')
.attr('class', 'issue-reference')
.text(t('issues.almost_junction.highway-highway.tip'));
.text(t('issues.almost_junction.highway-highway.reference'));
}

View File

@@ -517,7 +517,7 @@ export function validationCrossingWays() {
.enter()
.append('div')
.attr('class', 'issue-reference')
.text(t('issues.crossing_ways.' + crossingTypeID + '.tip'));
.text(t('issues.crossing_ways.' + crossingTypeID + '.reference'));
}
}

View File

@@ -89,7 +89,7 @@ export function validationDisconnectedWay() {
.enter()
.append('div')
.attr('class', 'issue-reference')
.text(t('issues.disconnected_way.highway.tip'));
.text(t('issues.disconnected_way.highway.reference'));
}

View File

@@ -84,7 +84,7 @@ export function validationGenericName() {
.enter()
.append('div')
.attr('class', 'issue-reference')
.text(t('issues.generic_name.tip'));
.text(t('issues.generic_name.reference'));
}
};

View File

@@ -43,7 +43,7 @@ export function validationIncompatibleSource() {
.enter()
.append('div')
.attr('class', 'issue-reference')
.text(t('issues.incompatible_source.' + id + '.tip'));
.text(t('issues.incompatible_source.' + id + '.reference'));
};
}
};

View File

@@ -72,7 +72,7 @@ export function validationMissingRole() {
.enter()
.append('div')
.attr('class', 'issue-reference')
.text(t('issues.missing_role.multipolygon.tip'));
.text(t('issues.missing_role.multipolygon.reference'));
}
}

View File

@@ -102,7 +102,7 @@ export function validationMissingTag() {
.enter()
.append('div')
.attr('class', 'issue-reference')
.text(t('issues.missing_tag.tip'));
.text(t('issues.missing_tag.reference'));
}
};

View File

@@ -57,7 +57,7 @@ export function validationOldMultipolygon() {
.enter()
.append('div')
.attr('class', 'issue-reference')
.text(t('issues.old_multipolygon.tip'));
.text(t('issues.old_multipolygon.reference'));
}
};

View File

@@ -88,7 +88,7 @@ export function validationOutdatedTags() {
enter
.append('div')
.attr('class', 'issue-reference')
.text(t('issues.outdated_tags.tip'));
.text(t('issues.outdated_tags.reference'));
enter
.append('strong')

View File

@@ -96,7 +96,7 @@ export function validationPrivateData() {
enter
.append('div')
.attr('class', 'issue-reference')
.text(t('issues.private_data.tip'));
.text(t('issues.private_data.reference'));
enter
.append('strong')

View File

@@ -107,7 +107,7 @@ export function validationTagSuggestsArea() {
.enter()
.append('div')
.attr('class', 'issue-reference')
.text(t('issues.tag_suggests_area.tip'));
.text(t('issues.tag_suggests_area.reference'));
}
};

View File

@@ -54,7 +54,7 @@ export function validationUnknownRoad() {
.enter()
.append('div')
.attr('class', 'issue-reference')
.text(t('issues.unknown_road.tip'));
.text(t('issues.unknown_road.reference'));
}
};