mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-23 16:49:40 +02:00
Revert t function to returning the plain string by default
Add `t.html` function for getting the string with the `lang` attribute
This commit is contained in:
@@ -157,7 +157,7 @@ export function validationAlmostJunction(context) {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t('issues.almost_junction.highway-highway.reference'));
|
||||
.html(t.html('issues.almost_junction.highway-highway.reference'));
|
||||
}
|
||||
|
||||
function isExtendableCandidate(node, way) {
|
||||
|
||||
@@ -486,7 +486,7 @@ export function validationCrossingWays(context) {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t('issues.crossing_ways.' + crossingTypeID + '.reference'));
|
||||
.html(t.html('issues.crossing_ways.' + crossingTypeID + '.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ export function validationDisconnectedWay() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t('issues.disconnected_way.routable.reference'));
|
||||
.html(t.html('issues.disconnected_way.routable.reference'));
|
||||
}
|
||||
|
||||
function routingIslandForEntity(entity) {
|
||||
|
||||
@@ -44,7 +44,7 @@ export function validationHelpRequest(context) {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t('issues.fixme_tag.reference'));
|
||||
.html(t.html('issues.fixme_tag.reference'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ export function validationImpossibleOneway() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t('issues.impossible_oneway.' + referenceID + '.reference'));
|
||||
.html(t.html('issues.impossible_oneway.' + referenceID + '.reference'));
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ export function validationIncompatibleSource() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t('issues.incompatible_source.' + id + '.reference'));
|
||||
.html(t.html('issues.incompatible_source.' + id + '.reference'));
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -28,7 +28,7 @@ export function validationFormatting() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t('issues.invalid_format.email.reference'));
|
||||
.html(t.html('issues.invalid_format.email.reference'));
|
||||
}
|
||||
/*
|
||||
function showReferenceWebsite(selection) {
|
||||
@@ -37,7 +37,7 @@ export function validationFormatting() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t('issues.invalid_format.website.reference'));
|
||||
.html(t.html('issues.invalid_format.website.reference'));
|
||||
}
|
||||
|
||||
if (entity.tags.website) {
|
||||
|
||||
@@ -135,7 +135,7 @@ export function validationMismatchedGeometry() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t('issues.tag_suggests_area.reference'));
|
||||
.html(t.html('issues.tag_suggests_area.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ export function validationMismatchedGeometry() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t('issues.vertex_as_point.reference'));
|
||||
.html(t.html('issues.vertex_as_point.reference'));
|
||||
},
|
||||
entityIds: [entity.id]
|
||||
});
|
||||
@@ -193,7 +193,7 @@ export function validationMismatchedGeometry() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t('issues.point_as_vertex.reference'));
|
||||
.html(t.html('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')
|
||||
.html(t('issues.unclosed_multipolygon_part.reference'));
|
||||
.html(t.html('issues.unclosed_multipolygon_part.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ export function validationMissingRole() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t('issues.missing_role.multipolygon.reference'));
|
||||
.html(t.html('issues.missing_role.multipolygon.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ export function validationMissingTag(context) {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t('issues.' + referenceID + '.reference'));
|
||||
.html(t.html('issues.' + referenceID + '.reference'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -227,11 +227,11 @@ export function validationOutdatedTags() {
|
||||
enter
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t(`issues.outdated_tags.${prefix}reference`));
|
||||
.html(t.html(`issues.outdated_tags.${prefix}reference`));
|
||||
|
||||
enter
|
||||
.append('strong')
|
||||
.html(t('issues.suggested'));
|
||||
.html(t.html('issues.suggested'));
|
||||
|
||||
enter
|
||||
.append('table')
|
||||
@@ -313,7 +313,7 @@ export function validationOutdatedTags() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t('issues.old_multipolygon.reference'));
|
||||
.html(t.html('issues.old_multipolygon.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -112,11 +112,11 @@ export function validationPrivateData() {
|
||||
enter
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t('issues.private_data.reference'));
|
||||
.html(t.html('issues.private_data.reference'));
|
||||
|
||||
enter
|
||||
.append('strong')
|
||||
.html(t('issues.suggested'));
|
||||
.html(t.html('issues.suggested'));
|
||||
|
||||
enter
|
||||
.append('table')
|
||||
|
||||
@@ -96,7 +96,7 @@ export function validationSuspiciousName() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t('issues.generic_name.reference'));
|
||||
.html(t.html('issues.generic_name.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ export function validationSuspiciousName() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t('issues.generic_name.reference'));
|
||||
.html(t.html('issues.generic_name.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ export function validationUnsquareWay(context) {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.html(t('issues.unsquare_way.buildings.reference'));
|
||||
.html(t.html('issues.unsquare_way.buildings.reference'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user