Add lang attributes to some Q/A elements

This commit is contained in:
Quincy Morgan
2020-09-22 12:28:15 -04:00
parent 8883c2f36d
commit df0b826386
6 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -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);
}
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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);
}
+3 -3
View File
@@ -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;
}
+2 -2
View File
@@ -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
+3 -3
View File
@@ -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;
}