mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-27 02:12:24 +02:00
Add lang attributes to some Q/A elements
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user