Skip to content

Commit

Permalink
Specify that connecting waterways and highways with the fix will add …
Browse files Browse the repository at this point in the history
…a ford (close #6734)
  • Loading branch information
quincylvania committed Aug 9, 2019
1 parent 5742e58 commit 070cfec
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions data/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1497,6 +1497,8 @@ en:
title: Connect this feature
connect_features:
title: Connect the features
connect_using_ford:
title: Connect using a ford
continue_from_start:
title: Continue drawing from start
continue_from_end:
Expand Down
3 changes: 3 additions & 0 deletions dist/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1863,6 +1863,9 @@
"connect_features": {
"title": "Connect the features"
},
"connect_using_ford": {
"title": "Connect using a ford"
},
"continue_from_start": {
"title": "Continue drawing from start"
},
Expand Down
12 changes: 9 additions & 3 deletions modules/validations/crossing_ways.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ export function validationCrossingWays(context) {

var fixes = [];
if (connectionTags) {
fixes.push(makeConnectWaysFix());
fixes.push(makeConnectWaysFix(connectionTags));
}

var useFixIcon = 'iD-icon-layers';
Expand Down Expand Up @@ -476,10 +476,16 @@ export function validationCrossingWays(context) {
}
}

function makeConnectWaysFix() {
function makeConnectWaysFix(connectionTags) {

var fixTitleID = 'connect_features';
if (connectionTags.ford) {
fixTitleID = 'connect_using_ford';
}

return new validationIssueFix({
icon: 'iD-icon-crossing',
title: t('issues.fix.connect_features.title'),
title: t('issues.fix.' + fixTitleID + '.title'),
onClick: function(context) {
var loc = this.issue.loc;
var connectionTags = this.issue.data.connectionTags;
Expand Down

0 comments on commit 070cfec

Please sign in to comment.