Add ability to show the square threshold in the rule name

This commit is contained in:
Bryan Housel
2019-05-17 02:15:20 -04:00
parent 8d0fa289cf
commit 94c5164fe2
3 changed files with 9 additions and 3 deletions

View File

@@ -1444,7 +1444,7 @@ en:
message: "{feature} has no outlet"
reference: "One-way roads must lead to other roads."
unsquare_way:
title: Unsquare Corners
title: "Unsquare Corners (up to {val}°)"
message: "{feature} has unsquare corners"
tip: "Find features with unsquare corners that can be drawn better"
buildings:

View File

@@ -1790,7 +1790,7 @@
}
},
"unsquare_way": {
"title": "Unsquare Corners",
"title": "Unsquare Corners (up to {val}°)",
"message": "{feature} has unsquare corners",
"tip": "Find features with unsquare corners that can be drawn better",
"buildings": {

View File

@@ -564,7 +564,13 @@ export function uiIssues(context) {
label
.append('span')
.text(function(d) { return t('issues.' + d + '.title'); });
.text(function(d) {
var params = {};
if (d === 'unsquare_way') {
params.val = 6.5;
}
return t('issues.' + d + '.title', params);
});
// Update
items = items