From df0b8263868b62b9afaf0043f0a71db2496c0c0d Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Tue, 22 Sep 2020 12:28:15 -0400 Subject: [PATCH] Add lang attributes to some Q/A elements --- modules/ui/improveOSM_details.js | 4 ++-- modules/ui/improveOSM_editor.js | 4 ++-- modules/ui/improveOSM_header.js | 4 ++-- modules/ui/keepRight_details.js | 6 +++--- modules/ui/keepRight_editor.js | 4 ++-- modules/ui/keepRight_header.js | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/ui/improveOSM_details.js b/modules/ui/improveOSM_details.js index 98cd841a9..66cb87b28 100644 --- a/modules/ui/improveOSM_details.js +++ b/modules/ui/improveOSM_details.js @@ -16,8 +16,8 @@ export function uiImproveOsmDetails(context) { if (d.desc) return d.desc; const issueKey = d.issueKey; d.replacements = d.replacements || {}; - d.replacements.default = t('inspector.unknown'); // special key `default` works as a fallback string - return t(`QA.improveOSM.error_types.${issueKey}.description`, d.replacements); + d.replacements.default = t.html('inspector.unknown'); // special key `default` works as a fallback string + return t.html(`QA.improveOSM.error_types.${issueKey}.description`, d.replacements); } diff --git a/modules/ui/improveOSM_editor.js b/modules/ui/improveOSM_editor.js index 948360089..ee5e1f2c5 100644 --- a/modules/ui/improveOSM_editor.js +++ b/modules/ui/improveOSM_editor.js @@ -162,7 +162,7 @@ export function uiImproveOsmEditor(context) { buttonSection.select('.close-button') .html(d => { const andComment = (d.newComment ? '_comment' : ''); - return t(`QA.keepRight.close${andComment}`); + return t.html(`QA.keepRight.close${andComment}`); }) .on('click.close', function(d) { this.blur(); // avoid keeping focus on the button - #4641 @@ -176,7 +176,7 @@ export function uiImproveOsmEditor(context) { buttonSection.select('.ignore-button') .html(d => { const andComment = (d.newComment ? '_comment' : ''); - return t(`QA.keepRight.ignore${andComment}`); + return t.html(`QA.keepRight.ignore${andComment}`); }) .on('click.ignore', function(d) { this.blur(); // avoid keeping focus on the button - #4641 diff --git a/modules/ui/improveOSM_header.js b/modules/ui/improveOSM_header.js index 60c0b85b3..4ad79e32a 100644 --- a/modules/ui/improveOSM_header.js +++ b/modules/ui/improveOSM_header.js @@ -8,8 +8,8 @@ export function uiImproveOsmHeader() { function issueTitle(d) { const issueKey = d.issueKey; d.replacements = d.replacements || {}; - d.replacements.default = t('inspector.unknown'); // special key `default` works as a fallback string - return t(`QA.improveOSM.error_types.${issueKey}.title`, d.replacements); + d.replacements.default = t.html('inspector.unknown'); // special key `default` works as a fallback string + return t.html(`QA.improveOSM.error_types.${issueKey}.title`, d.replacements); } diff --git a/modules/ui/keepRight_details.js b/modules/ui/keepRight_details.js index 9e46069fc..38dcfe0fb 100644 --- a/modules/ui/keepRight_details.js +++ b/modules/ui/keepRight_details.js @@ -15,13 +15,13 @@ export function uiKeepRightDetails(context) { function issueDetail(d) { const { itemType, parentIssueType } = d; - const unknown = t('inspector.unknown'); + const unknown = t.html('inspector.unknown'); let replacements = d.replacements || {}; replacements.default = unknown; // special key `default` works as a fallback string - let detail = t(`QA.keepRight.errorTypes.${itemType}.description`, replacements); + let detail = t.html(`QA.keepRight.errorTypes.${itemType}.description`, replacements); if (detail === unknown) { - detail = t(`QA.keepRight.errorTypes.${parentIssueType}.description`, replacements); + detail = t.html(`QA.keepRight.errorTypes.${parentIssueType}.description`, replacements); } return detail; } diff --git a/modules/ui/keepRight_editor.js b/modules/ui/keepRight_editor.js index 158929c23..5f5cd3186 100644 --- a/modules/ui/keepRight_editor.js +++ b/modules/ui/keepRight_editor.js @@ -173,7 +173,7 @@ export function uiKeepRightEditor(context) { buttonSection.select('.close-button') // select and propagate data .html(d => { const andComment = (d.newComment ? '_comment' : ''); - return t(`QA.keepRight.close${andComment}`); + return t.html(`QA.keepRight.close${andComment}`); }) .on('click.close', function(d) { this.blur(); // avoid keeping focus on the button - #4641 @@ -187,7 +187,7 @@ export function uiKeepRightEditor(context) { buttonSection.select('.ignore-button') // select and propagate data .html(d => { const andComment = (d.newComment ? '_comment' : ''); - return t(`QA.keepRight.ignore${andComment}`); + return t.html(`QA.keepRight.ignore${andComment}`); }) .on('click.ignore', function(d) { this.blur(); // avoid keeping focus on the button - #4641 diff --git a/modules/ui/keepRight_header.js b/modules/ui/keepRight_header.js index 3bb79a893..b966b2fe1 100644 --- a/modules/ui/keepRight_header.js +++ b/modules/ui/keepRight_header.js @@ -8,13 +8,13 @@ export function uiKeepRightHeader() { function issueTitle(d) { const { itemType, parentIssueType } = d; - const unknown = t('inspector.unknown'); + const unknown = t.html('inspector.unknown'); let replacements = d.replacements || {}; replacements.default = unknown; // special key `default` works as a fallback string - let title = t(`QA.keepRight.errorTypes.${itemType}.title`, replacements); + let title = t.html(`QA.keepRight.errorTypes.${itemType}.title`, replacements); if (title === unknown) { - title = t(`QA.keepRight.errorTypes.${parentIssueType}.title`, replacements); + title = t.html(`QA.keepRight.errorTypes.${parentIssueType}.title`, replacements); } return title; }