mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-05 14:38:05 +02:00
Make t function return a span element with a lang attribute unless html: false is specified in the options (re: #7963)
Update `text` functions to `html` to support inserting the `span` elements Specify `html: false` for various instances where a `span` is not desired, e.g. `placeholder` and `title` attributes
This commit is contained in:
@@ -157,7 +157,7 @@ export function validationAlmostJunction(context) {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.almost_junction.highway-highway.reference'));
|
||||
.html(t('issues.almost_junction.highway-highway.reference'));
|
||||
}
|
||||
|
||||
function isExtendableCandidate(node, way) {
|
||||
|
||||
@@ -200,7 +200,7 @@ export function validationCloseNodes(context) {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(referenceText);
|
||||
.html(referenceText);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ export function validationCloseNodes(context) {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(referenceText);
|
||||
.html(referenceText);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -486,7 +486,7 @@ export function validationCrossingWays(context) {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.crossing_ways.' + crossingTypeID + '.reference'));
|
||||
.html(t('issues.crossing_ways.' + crossingTypeID + '.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ export function validationDisconnectedWay() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.disconnected_way.routable.reference'));
|
||||
.html(t('issues.disconnected_way.routable.reference'));
|
||||
}
|
||||
|
||||
function routingIslandForEntity(entity) {
|
||||
|
||||
@@ -44,7 +44,7 @@ export function validationHelpRequest(context) {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.fixme_tag.reference'));
|
||||
.html(t('issues.fixme_tag.reference'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ export function validationImpossibleOneway() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.impossible_oneway.' + referenceID + '.reference'));
|
||||
.html(t('issues.impossible_oneway.' + referenceID + '.reference'));
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ export function validationIncompatibleSource() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.incompatible_source.' + id + '.reference'));
|
||||
.html(t('issues.incompatible_source.' + id + '.reference'));
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -28,7 +28,7 @@ export function validationFormatting() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.invalid_format.email.reference'));
|
||||
.html(t('issues.invalid_format.email.reference'));
|
||||
}
|
||||
/*
|
||||
function showReferenceWebsite(selection) {
|
||||
@@ -37,7 +37,7 @@ export function validationFormatting() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.invalid_format.website.reference'));
|
||||
.html(t('issues.invalid_format.website.reference'));
|
||||
}
|
||||
|
||||
if (entity.tags.website) {
|
||||
|
||||
@@ -135,7 +135,7 @@ export function validationMismatchedGeometry() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.tag_suggests_area.reference'));
|
||||
.html(t('issues.tag_suggests_area.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ export function validationMismatchedGeometry() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.vertex_as_point.reference'));
|
||||
.html(t('issues.vertex_as_point.reference'));
|
||||
},
|
||||
entityIds: [entity.id]
|
||||
});
|
||||
@@ -193,7 +193,7 @@ export function validationMismatchedGeometry() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.point_as_vertex.reference'));
|
||||
.html(t('issues.point_as_vertex.reference'));
|
||||
},
|
||||
entityIds: [entity.id],
|
||||
dynamicFixes: function(context) {
|
||||
@@ -280,7 +280,7 @@ export function validationMismatchedGeometry() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.unclosed_multipolygon_part.reference'));
|
||||
.html(t('issues.unclosed_multipolygon_part.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ export function validationMissingRole() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.missing_role.multipolygon.reference'));
|
||||
.html(t('issues.missing_role.multipolygon.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ export function validationMissingTag(context) {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.' + referenceID + '.reference'));
|
||||
.html(t('issues.' + referenceID + '.reference'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -227,11 +227,11 @@ export function validationOutdatedTags() {
|
||||
enter
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t(`issues.outdated_tags.${prefix}reference`));
|
||||
.html(t(`issues.outdated_tags.${prefix}reference`));
|
||||
|
||||
enter
|
||||
.append('strong')
|
||||
.text(t('issues.suggested'));
|
||||
.html(t('issues.suggested'));
|
||||
|
||||
enter
|
||||
.append('table')
|
||||
@@ -246,7 +246,7 @@ export function validationOutdatedTags() {
|
||||
let klass = d.type === '+' ? 'add' : 'remove';
|
||||
return `tagDiff-cell tagDiff-cell-${klass}`;
|
||||
})
|
||||
.text(d => d.display);
|
||||
.html(d => d.display);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ export function validationOutdatedTags() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.old_multipolygon.reference'));
|
||||
.html(t('issues.old_multipolygon.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -112,11 +112,11 @@ export function validationPrivateData() {
|
||||
enter
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.private_data.reference'));
|
||||
.html(t('issues.private_data.reference'));
|
||||
|
||||
enter
|
||||
.append('strong')
|
||||
.text(t('issues.suggested'));
|
||||
.html(t('issues.suggested'));
|
||||
|
||||
enter
|
||||
.append('table')
|
||||
@@ -131,7 +131,7 @@ export function validationPrivateData() {
|
||||
var klass = d.type === '+' ? 'add' : 'remove';
|
||||
return 'tagDiff-cell tagDiff-cell-' + klass;
|
||||
})
|
||||
.text(function(d) { return d.display; });
|
||||
.html(function(d) { return d.display; });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ export function validationSuspiciousName() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.generic_name.reference'));
|
||||
.html(t('issues.generic_name.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ export function validationSuspiciousName() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.generic_name.reference'));
|
||||
.html(t('issues.generic_name.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ export function validationUnsquareWay(context) {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.unsquare_way.buildings.reference'));
|
||||
.html(t('issues.unsquare_way.buildings.reference'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user