mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
add more explicit html formatting of translated texts
This commit is contained in:
@@ -9,7 +9,7 @@ export function uiFeatureInfo(context) {
|
||||
var hiddenList = features.hidden().map(function(k) {
|
||||
if (stats[k]) {
|
||||
count += stats[k];
|
||||
return t('inspector.title_count', { title: t.html('feature.' + k + '.description'), count: stats[k] });
|
||||
return t.html('inspector.title_count', { title: { html: t.html('feature.' + k + '.description') }, count: stats[k] });
|
||||
}
|
||||
return null;
|
||||
}).filter(Boolean);
|
||||
|
||||
@@ -132,7 +132,7 @@ export function uiPanelMeasurement(context) {
|
||||
.html(t.html('info_panels.measurement.geometry') + ':')
|
||||
.append('span')
|
||||
.html(
|
||||
closed ? t('info_panels.measurement.closed_' + geometry) : t.html('geometry.' + geometry)
|
||||
closed ? t.html('info_panels.measurement.closed_' + geometry) : t.html('geometry.' + geometry)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ export function uiSectionChanges(context) {
|
||||
.label(function() {
|
||||
var history = context.history();
|
||||
var summary = history.difference().summary();
|
||||
return t.html('inspector.title_count', { title: t('commit.changes'), count: summary.length });
|
||||
return t.html('inspector.title_count', { title: { html: t.html('commit.changes') }, count: summary.length });
|
||||
})
|
||||
.disclosureContent(renderDisclosureContent);
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ export function uiSectionEntityIssues(context) {
|
||||
return _issues.length > 0;
|
||||
})
|
||||
.label(function() {
|
||||
return t.html('inspector.title_count', { title: t('issues.list_title'), count: _issues.length });
|
||||
return t.html('inspector.title_count', { title: { html: t.html('issues.list_title') }, count: _issues.length });
|
||||
})
|
||||
.disclosureContent(renderDisclosureContent);
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ export function uiSectionRawMemberEditor(context) {
|
||||
|
||||
var gt = entity.members.length > _maxMembers ? '>' : '';
|
||||
var count = gt + entity.members.slice(0, _maxMembers).length;
|
||||
return t.html('inspector.title_count', { title: t('inspector.members'), count: count });
|
||||
return t.html('inspector.title_count', { title: { html: t.html('inspector.members') }, count: count });
|
||||
})
|
||||
.disclosureContent(renderDisclosureContent);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ export function uiSectionRawMembershipEditor(context) {
|
||||
var parents = getSharedParentRelations();
|
||||
var gt = parents.length > _maxMemberships ? '>' : '';
|
||||
var count = gt + parents.slice(0, _maxMemberships).length;
|
||||
return t('inspector.title_count', { title: t.html('inspector.relations'), count: count });
|
||||
return t.html('inspector.title_count', { title: { html: t.html('inspector.relations') }, count: count });
|
||||
})
|
||||
.disclosureContent(renderDisclosureContent);
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ export function uiSectionRawTagEditor(id, context) {
|
||||
.classes('raw-tag-editor')
|
||||
.label(function() {
|
||||
var count = Object.keys(_tags).filter(function(d) { return d; }).length;
|
||||
return t('inspector.title_count', { title: t.html('inspector.tags'), count: count });
|
||||
return t.html('inspector.title_count', { title: { html: t.html('inspector.tags') }, count: count });
|
||||
})
|
||||
.expandedByDefault(false)
|
||||
.disclosureContent(renderDisclosureContent);
|
||||
|
||||
@@ -17,7 +17,7 @@ export function uiSectionSelectionList(context) {
|
||||
return _selectedIDs.length > 1;
|
||||
})
|
||||
.label(function() {
|
||||
return t('inspector.title_count', { title: t.html('inspector.features'), count: _selectedIDs.length });
|
||||
return t.html('inspector.title_count', { title: { html: t.html('inspector.features') }, count: _selectedIDs.length });
|
||||
})
|
||||
.disclosureContent(renderDisclosureContent);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ export function uiSectionValidationIssues(id, severity, context) {
|
||||
.label(function() {
|
||||
if (!_issues) return '';
|
||||
var issueCountText = _issues.length > 1000 ? '1000+' : String(_issues.length);
|
||||
return t('inspector.title_count', { title: t.html('issues.' + severity + 's.list_title'), count: issueCountText });
|
||||
return t.html('inspector.title_count', { title: { html: t.html('issues.' + severity + 's.list_title') }, count: issueCountText });
|
||||
})
|
||||
.disclosureContent(renderDisclosureContent)
|
||||
.shouldDisplay(function() {
|
||||
|
||||
@@ -78,7 +78,7 @@ export function uiSectionValidationStatus(context) {
|
||||
.merge(resetIgnoredEnter);
|
||||
|
||||
resetIgnored.select('a')
|
||||
.html(t.html('inspector.title_count', { title: t('issues.reset_ignored'), count: ignoredIssues.length }));
|
||||
.html(t.html('inspector.title_count', { title: { html: t.html('issues.reset_ignored') }, count: ignoredIssues.length }));
|
||||
|
||||
resetIgnored.on('click', function(d3_event) {
|
||||
d3_event.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user