From 94c5164fe2bb300beca6c9ebe0459400ab3e842e Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 17 May 2019 02:15:20 -0400 Subject: [PATCH] Add ability to show the square threshold in the rule name --- data/core.yaml | 2 +- dist/locales/en.json | 2 +- modules/ui/issues.js | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/data/core.yaml b/data/core.yaml index 921fc8487..dbfe60cc7 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -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: diff --git a/dist/locales/en.json b/dist/locales/en.json index ac759bbda..5e9fbb897 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -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": { diff --git a/modules/ui/issues.js b/modules/ui/issues.js index aabf13a8a..65efe66c0 100644 --- a/modules/ui/issues.js +++ b/modules/ui/issues.js @@ -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