From 827608ad2388055454e4f3052518ffc2f254a69a Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Mon, 28 Nov 2022 19:18:35 +0100 Subject: [PATCH] add warning icon also to "regular" max length indicator warning --- data/core.yaml | 2 +- modules/ui/length_indicator.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/data/core.yaml b/data/core.yaml index a67b88248..d8c68b709 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -615,7 +615,7 @@ en: comment_needed_message: Please add a changeset comment first. about_changeset_comments: About changeset comments about_changeset_comments_link: //wiki.openstreetmap.org/wiki/Good_changeset_comments - changeset_comment_length_warning: "Changeset comments can have a maximum of {maxChars} characters" + changeset_comment_length_warning: "Changeset comments can have a maximum of {maxChars} characters." google_warning: "You mentioned Google in this comment: remember that copying from Google Maps is strictly forbidden." google_warning_link: https://www.openstreetmap.org/copyright contributors: diff --git a/modules/ui/length_indicator.js b/modules/ui/length_indicator.js index d6e034f88..ae11e7922 100644 --- a/modules/ui/length_indicator.js +++ b/modules/ui/length_indicator.js @@ -1,6 +1,7 @@ import { select as d3_select } from 'd3-selection'; import { t } from '../core/localizer'; +import { svgIcon } from '../svg'; import { utilUnicodeCharsCount, utilCleanOsmString @@ -15,7 +16,8 @@ export function uiLengthIndicator(maxChars) { .hasArrow(true) .content(() => selection => { selection.text(''); - t.append('inspector.max_length_reached', { maxChars })(selection); + selection.call(svgIcon('#iD-icon-alert', 'inline')); + selection.call(t.append('inspector.max_length_reached', { maxChars })); }); var _silent = false;