mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-21 15:56:56 +02:00
rename method
This commit is contained in:
@@ -370,8 +370,8 @@ export function coreLocalizer() {
|
||||
}
|
||||
};
|
||||
|
||||
// Adds localized text wrapped as an HTML element with locale info to the DOM
|
||||
localizer.t.htmlDom = function(stringId, replacements, locale) {
|
||||
// Adds localized text wrapped as an HTML span element with locale info to the DOM
|
||||
localizer.t.append = function(stringId, replacements, locale) {
|
||||
return function(selection) {
|
||||
const info = localizer.tInfo(stringId, replacements, locale);
|
||||
return selection.append('span')
|
||||
|
||||
@@ -794,7 +794,7 @@ export default {
|
||||
|
||||
label
|
||||
.append('span')
|
||||
.call(t.htmlDom('streetside.hires'));
|
||||
.call(t.append('streetside.hires'));
|
||||
|
||||
|
||||
let captureInfo = line1
|
||||
@@ -835,7 +835,7 @@ export default {
|
||||
.attr('target', '_blank')
|
||||
.attr('href', 'https://www.bing.com/maps?cp=' + d.loc[1] + '~' + d.loc[0] +
|
||||
'&lvl=17&dir=' + d.ca + '&style=x&v=2&sV=1')
|
||||
.call(t.htmlDom('streetside.view_on_bing'));
|
||||
.call(t.append('streetside.view_on_bing'));
|
||||
|
||||
line2
|
||||
.append('a')
|
||||
@@ -843,7 +843,7 @@ export default {
|
||||
.attr('target', '_blank')
|
||||
.attr('href', 'https://www.bing.com/maps/privacyreport/streetsideprivacyreport?bubbleid=' +
|
||||
encodeURIComponent(d.key) + '&focus=photo&lat=' + d.loc[1] + '&lng=' + d.loc[0] + '&z=17')
|
||||
.call(t.htmlDom('streetside.report'));
|
||||
.call(t.append('streetside.report'));
|
||||
|
||||
|
||||
let bubbleIdQuadKey = d.key.toString(4);
|
||||
|
||||
@@ -49,7 +49,7 @@ export function uiAccount(context) {
|
||||
logoutLink.append('a')
|
||||
.attr('class', 'logout')
|
||||
.attr('href', '#')
|
||||
.call(t.htmlDom('logout'))
|
||||
.call(t.append('logout'))
|
||||
.on('click.logout', function(d3_event) {
|
||||
d3_event.preventDefault();
|
||||
osm.logout();
|
||||
|
||||
@@ -107,7 +107,7 @@ export function uiChangesetEditor(context) {
|
||||
.call(svgIcon('#iD-icon-alert', 'inline'))
|
||||
.attr('href', t('commit.google_warning_link'))
|
||||
.append('span')
|
||||
.call(t.htmlDom('commit.google_warning'));
|
||||
.call(t.append('commit.google_warning'));
|
||||
|
||||
commentEnter
|
||||
.transition()
|
||||
|
||||
@@ -221,7 +221,7 @@ export function uiCommit(context) {
|
||||
headerTitle
|
||||
.append('div')
|
||||
.append('h3')
|
||||
.call(t.htmlDom('commit.title'));
|
||||
.call(t.append('commit.title'));
|
||||
|
||||
headerTitle
|
||||
.append('button')
|
||||
@@ -279,7 +279,7 @@ export function uiCommit(context) {
|
||||
prose = prose.enter()
|
||||
.append('p')
|
||||
.attr('class', 'commit-info')
|
||||
.call(t.htmlDom('commit.upload_explanation'))
|
||||
.call(t.append('commit.upload_explanation'))
|
||||
.merge(prose);
|
||||
|
||||
// always check if this has changed, but only update prose.html()
|
||||
@@ -338,7 +338,7 @@ export function uiCommit(context) {
|
||||
|
||||
labelEnter
|
||||
.append('span')
|
||||
.call(t.htmlDom('commit.request_review'));
|
||||
.call(t.append('commit.request_review'));
|
||||
|
||||
// Update
|
||||
requestReview = requestReview
|
||||
@@ -363,7 +363,7 @@ export function uiCommit(context) {
|
||||
.attr('class', 'secondary-action button cancel-button')
|
||||
.append('span')
|
||||
.attr('class', 'label')
|
||||
.call(t.htmlDom('commit.cancel'));
|
||||
.call(t.append('commit.cancel'));
|
||||
|
||||
var uploadButton = buttonEnter
|
||||
.append('button')
|
||||
@@ -371,7 +371,7 @@ export function uiCommit(context) {
|
||||
|
||||
uploadButton.append('span')
|
||||
.attr('class', 'label')
|
||||
.call(t.htmlDom('commit.save'));
|
||||
.call(t.append('commit.save'));
|
||||
|
||||
var uploadBlockerTooltipText = getUploadBlockerMessage();
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ export function uiConfirm(selection) {
|
||||
.on('click.confirm', function() {
|
||||
modalSelection.remove();
|
||||
})
|
||||
.call(t.htmlDom('confirm.okay'))
|
||||
.call(t.append('confirm.okay'))
|
||||
.node()
|
||||
.focus();
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ export function uiConflicts(context) {
|
||||
|
||||
headerEnter
|
||||
.append('h3')
|
||||
.call(t.htmlDom('save.conflict.header'));
|
||||
.call(t.append('save.conflict.header'));
|
||||
|
||||
var bodyEnter = selection.selectAll('.body')
|
||||
.data([0])
|
||||
@@ -76,7 +76,7 @@ export function uiConflicts(context) {
|
||||
var conflictsHelpEnter = bodyEnter
|
||||
.append('div')
|
||||
.attr('class', 'conflicts-help')
|
||||
.call(t.htmlDom('save.conflict.help'));
|
||||
.call(t.append('save.conflict.help'));
|
||||
|
||||
|
||||
// Download changes link
|
||||
@@ -109,7 +109,7 @@ export function uiConflicts(context) {
|
||||
linkEnter
|
||||
.call(svgIcon('#iD-icon-load', 'inline'))
|
||||
.append('span')
|
||||
.call(t.htmlDom('save.conflict.download_changes'));
|
||||
.call(t.append('save.conflict.download_changes'));
|
||||
|
||||
|
||||
bodyEnter
|
||||
@@ -122,7 +122,7 @@ export function uiConflicts(context) {
|
||||
.attr('class', 'conflicts-done')
|
||||
.attr('opacity', 0)
|
||||
.style('display', 'none')
|
||||
.call(t.htmlDom('save.conflict.done'));
|
||||
.call(t.append('save.conflict.done'));
|
||||
|
||||
var buttonsEnter = bodyEnter
|
||||
.append('div')
|
||||
@@ -132,13 +132,13 @@ export function uiConflicts(context) {
|
||||
.append('button')
|
||||
.attr('disabled', _conflictList.length > 1)
|
||||
.attr('class', 'action conflicts-button col6')
|
||||
.call(t.htmlDom('save.title'))
|
||||
.call(t.append('save.title'))
|
||||
.on('click.try_again', tryAgain);
|
||||
|
||||
buttonsEnter
|
||||
.append('button')
|
||||
.attr('class', 'secondary-action conflicts-button col6')
|
||||
.call(t.htmlDom('confirm.cancel'))
|
||||
.call(t.append('confirm.cancel'))
|
||||
.on('click.cancel', cancel);
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ export function uiConflicts(context) {
|
||||
conflictEnter
|
||||
.append('h4')
|
||||
.attr('class', 'conflict-count')
|
||||
.call(t.htmlDom('save.conflict.count', { num: index + 1, total: _conflictList.length }));
|
||||
.call(t.append('save.conflict.count', { num: index + 1, total: _conflictList.length }));
|
||||
|
||||
conflictEnter
|
||||
.append('a')
|
||||
|
||||
@@ -33,7 +33,7 @@ export function uiDataEditor(context) {
|
||||
|
||||
headerEnter
|
||||
.append('h3')
|
||||
.call(t.htmlDom('map_data.title'));
|
||||
.call(t.append('map_data.title'));
|
||||
|
||||
|
||||
var body = selection.selectAll('.body')
|
||||
|
||||
@@ -32,7 +32,7 @@ export function uiDataHeader() {
|
||||
headerEnter
|
||||
.append('div')
|
||||
.attr('class', 'data-header-label')
|
||||
.call(t.htmlDom('map_data.layers.custom.title'));
|
||||
.call(t.append('map_data.layers.custom.title'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ export function uiFeatureInfo(context) {
|
||||
selection.append('a')
|
||||
.attr('class', 'chip')
|
||||
.attr('href', '#')
|
||||
.call(t.htmlDom('feature_info.hidden_warning', { count: count }))
|
||||
.call(t.append('feature_info.hidden_warning', { count: count }))
|
||||
.call(tooltipBehavior)
|
||||
.on('click', function(d3_event) {
|
||||
tooltipBehavior.hide();
|
||||
|
||||
@@ -34,7 +34,7 @@ export function uiFeatureList(context) {
|
||||
|
||||
header
|
||||
.append('h3')
|
||||
.call(t.htmlDom('inspector.feature_list'));
|
||||
.call(t.append('inspector.feature_list'));
|
||||
|
||||
var searchWrap = selection
|
||||
.append('div')
|
||||
@@ -256,7 +256,7 @@ export function uiFeatureList(context) {
|
||||
|
||||
list.selectAll('.no-results-item .entity-name')
|
||||
.html('')
|
||||
.call(t.htmlDom('geocoder.no_results_worldwide'));
|
||||
.call(t.append('geocoder.no_results_worldwide'));
|
||||
|
||||
if (services.geocoder) {
|
||||
list.selectAll('.geocode-item')
|
||||
@@ -269,7 +269,7 @@ export function uiFeatureList(context) {
|
||||
.attr('class', 'label')
|
||||
.append('span')
|
||||
.attr('class', 'entity-name')
|
||||
.call(t.htmlDom('geocoder.search'));
|
||||
.call(t.append('geocoder.search'));
|
||||
}
|
||||
|
||||
list.selectAll('.no-results-item')
|
||||
|
||||
@@ -196,7 +196,7 @@ export function uiFieldHelp(context, fieldName) {
|
||||
titleEnter
|
||||
.append('h2')
|
||||
.attr('class', ((localizer.textDirection() === 'rtl') ? 'fr' : 'fl'))
|
||||
.call(t.htmlDom('help.field.' + fieldName + '.title'));
|
||||
.call(t.append('help.field.' + fieldName + '.title'));
|
||||
|
||||
titleEnter
|
||||
.append('button')
|
||||
|
||||
@@ -83,7 +83,7 @@ export function uiFieldCheck(field, context) {
|
||||
var icon = pseudoDirection ? '#iD-icon-forward' : '#iD-icon-backward';
|
||||
|
||||
selection.selectAll('.reverser-span')
|
||||
.call(t.htmlDom('inspector.check.reverser'))
|
||||
.call(t.append('inspector.check.reverser'))
|
||||
.call(svgIcon(icon, 'inline'));
|
||||
|
||||
return selection;
|
||||
|
||||
@@ -373,7 +373,7 @@ export function uiFieldLocalized(field, context) {
|
||||
text
|
||||
.append('span')
|
||||
.attr('class', 'label-textvalue')
|
||||
.call(t.htmlDom('translate.localized_translation_label'));
|
||||
.call(t.append('translate.localized_translation_label'));
|
||||
|
||||
text
|
||||
.append('span')
|
||||
|
||||
@@ -129,7 +129,7 @@ export function uiFieldRadio(field, context) {
|
||||
.append('span')
|
||||
.attr('class', 'label structure-label-type')
|
||||
.attr('for', 'preset-input-' + selected)
|
||||
.call(t.htmlDom('inspector.radio.structure.type'));
|
||||
.call(t.append('inspector.radio.structure.type'));
|
||||
|
||||
typeEnter
|
||||
.append('div')
|
||||
@@ -174,7 +174,7 @@ export function uiFieldRadio(field, context) {
|
||||
.append('span')
|
||||
.attr('class', 'label structure-label-layer')
|
||||
.attr('for', 'preset-input-layer')
|
||||
.call(t.htmlDom('inspector.radio.structure.layer'));
|
||||
.call(t.append('inspector.radio.structure.layer'));
|
||||
|
||||
layerEnter
|
||||
.append('div')
|
||||
@@ -302,7 +302,7 @@ export function uiFieldRadio(field, context) {
|
||||
var selection = radios.filter(function() { return this.checked; });
|
||||
|
||||
if (selection.empty()) {
|
||||
placeholder.call(t.htmlDom('inspector.none'));
|
||||
placeholder.call(t.append('inspector.none'));
|
||||
} else {
|
||||
placeholder.text(selection.attr('value'));
|
||||
_oldType[selection.datum()] = tags[selection.datum()];
|
||||
|
||||
@@ -124,7 +124,7 @@ export function uiFieldRestrictions(field, context) {
|
||||
distControlEnter
|
||||
.append('span')
|
||||
.attr('class', 'restriction-control-label restriction-distance-label')
|
||||
.call(t.htmlDom('restriction.controls.distance', { suffix: ':' }));
|
||||
.call(t.append('restriction.controls.distance', { suffix: ':' }));
|
||||
|
||||
distControlEnter
|
||||
.append('input')
|
||||
@@ -167,7 +167,7 @@ export function uiFieldRestrictions(field, context) {
|
||||
viaControlEnter
|
||||
.append('span')
|
||||
.attr('class', 'restriction-control-label restriction-via-way-label')
|
||||
.call(t.htmlDom('restriction.controls.via', { suffix: ':' }));
|
||||
.call(t.append('restriction.controls.via', { suffix: ':' }));
|
||||
|
||||
viaControlEnter
|
||||
.append('input')
|
||||
@@ -604,7 +604,7 @@ export function uiFieldRestrictions(field, context) {
|
||||
|
||||
return selection
|
||||
.html('')
|
||||
.call(t.htmlDom('restriction.controls.distance_up_to', opts));
|
||||
.call(t.append('restriction.controls.distance_up_to', opts));
|
||||
};
|
||||
}
|
||||
|
||||
@@ -612,9 +612,9 @@ export function uiFieldRestrictions(field, context) {
|
||||
function displayMaxVia(maxVia) {
|
||||
return selection => {
|
||||
selection = selection.html('');
|
||||
return maxVia === 0 ? selection.call(t.htmlDom('restriction.controls.via_node_only'))
|
||||
: maxVia === 1 ? selection.call(t.htmlDom('restriction.controls.via_up_to_one'))
|
||||
: selection.call(t.htmlDom('restriction.controls.via_up_to_two'));
|
||||
return maxVia === 0 ? selection.call(t.append('restriction.controls.via_node_only'))
|
||||
: maxVia === 1 ? selection.call(t.append('restriction.controls.via_up_to_one'))
|
||||
: selection.call(t.append('restriction.controls.via_up_to_two'));
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ export function uiFormFields(context) {
|
||||
|
||||
moreEnter
|
||||
.append('span')
|
||||
.call(t.htmlDom('inspector.add_fields'));
|
||||
.call(t.append('inspector.add_fields'));
|
||||
|
||||
more = moreEnter
|
||||
.merge(more);
|
||||
|
||||
@@ -42,7 +42,7 @@ export function uiImproveOsmDetails(context) {
|
||||
|
||||
descriptionEnter
|
||||
.append('h4')
|
||||
.call(t.htmlDom('QA.keepRight.detail_description'));
|
||||
.call(t.append('QA.keepRight.detail_description'));
|
||||
|
||||
descriptionEnter
|
||||
.append('div')
|
||||
|
||||
@@ -36,7 +36,7 @@ export function uiImproveOsmEditor(context) {
|
||||
|
||||
headerEnter
|
||||
.append('h3')
|
||||
.call(t.htmlDom('QA.improveOSM.title'));
|
||||
.call(t.append('QA.improveOSM.title'));
|
||||
|
||||
let body = selection.selectAll('.body')
|
||||
.data([0]);
|
||||
@@ -80,7 +80,7 @@ export function uiImproveOsmEditor(context) {
|
||||
saveSectionEnter
|
||||
.append('h4')
|
||||
.attr('class', '.qa-save-header')
|
||||
.call(t.htmlDom('note.newComment'));
|
||||
.call(t.append('note.newComment'));
|
||||
|
||||
saveSectionEnter
|
||||
.append('textarea')
|
||||
@@ -135,7 +135,7 @@ export function uiImproveOsmEditor(context) {
|
||||
buttonEnter
|
||||
.append('button')
|
||||
.attr('class', 'button comment-button action')
|
||||
.call(t.htmlDom('QA.keepRight.save_comment'));
|
||||
.call(t.append('QA.keepRight.save_comment'));
|
||||
|
||||
buttonEnter
|
||||
.append('button')
|
||||
|
||||
@@ -72,7 +72,7 @@ export function uiIntroStartEditing(context, reveal) {
|
||||
|
||||
startbutton
|
||||
.append('h2')
|
||||
.call(t.htmlDom('intro.startediting.start'));
|
||||
.call(t.append('intro.startediting.start'));
|
||||
|
||||
dispatch.call('startEditing');
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ export function uiKeepRightDetails(context) {
|
||||
|
||||
descriptionEnter
|
||||
.append('h4')
|
||||
.call(t.htmlDom('QA.keepRight.detail_description'));
|
||||
.call(t.append('QA.keepRight.detail_description'));
|
||||
|
||||
descriptionEnter
|
||||
.append('div')
|
||||
|
||||
@@ -35,7 +35,7 @@ export function uiKeepRightEditor(context) {
|
||||
|
||||
headerEnter
|
||||
.append('h3')
|
||||
.call(t.htmlDom('QA.keepRight.title'));
|
||||
.call(t.append('QA.keepRight.title'));
|
||||
|
||||
|
||||
let body = selection.selectAll('.body')
|
||||
@@ -90,7 +90,7 @@ export function uiKeepRightEditor(context) {
|
||||
saveSectionEnter
|
||||
.append('h4')
|
||||
.attr('class', '.qa-save-header')
|
||||
.call(t.htmlDom('QA.keepRight.comment'));
|
||||
.call(t.append('QA.keepRight.comment'));
|
||||
|
||||
saveSectionEnter
|
||||
.append('textarea')
|
||||
@@ -146,7 +146,7 @@ export function uiKeepRightEditor(context) {
|
||||
buttonEnter
|
||||
.append('button')
|
||||
.attr('class', 'button comment-button action')
|
||||
.call(t.htmlDom('QA.keepRight.save_comment'));
|
||||
.call(t.append('QA.keepRight.save_comment'));
|
||||
|
||||
buttonEnter
|
||||
.append('button')
|
||||
|
||||
@@ -56,7 +56,7 @@ export function uiNoteComments() {
|
||||
if (d.user) {
|
||||
selection.text(d.user);
|
||||
} else {
|
||||
selection.call(t.htmlDom('note.anonymous'));
|
||||
selection.call(t.append('note.anonymous'));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ export function uiNoteEditor(context) {
|
||||
|
||||
headerEnter
|
||||
.append('h3')
|
||||
.call(t.htmlDom('note.title'));
|
||||
.call(t.append('note.title'));
|
||||
|
||||
|
||||
var body = selection.selectAll('.body')
|
||||
@@ -256,14 +256,14 @@ export function uiNoteEditor(context) {
|
||||
|
||||
authEnter
|
||||
.append('span')
|
||||
.call(t.htmlDom('note.login'));
|
||||
.call(t.append('note.login'));
|
||||
|
||||
authEnter
|
||||
.append('a')
|
||||
.attr('target', '_blank')
|
||||
.call(svgIcon('#iD-icon-out-link', 'inline'))
|
||||
.append('span')
|
||||
.call(t.htmlDom('login'))
|
||||
.call(t.append('login'))
|
||||
.on('click.note-login', function(d3_event) {
|
||||
d3_event.preventDefault();
|
||||
osm.authenticate();
|
||||
@@ -284,7 +284,7 @@ export function uiNoteEditor(context) {
|
||||
prose = prose.enter()
|
||||
.append('p')
|
||||
.attr('class', 'note-save-prose')
|
||||
.call(t.htmlDom('note.upload_explanation'))
|
||||
.call(t.append('note.upload_explanation'))
|
||||
.merge(prose);
|
||||
|
||||
osm.userDetails(function(err, user) {
|
||||
@@ -333,12 +333,12 @@ export function uiNoteEditor(context) {
|
||||
buttonEnter
|
||||
.append('button')
|
||||
.attr('class', 'button cancel-button secondary-action')
|
||||
.call(t.htmlDom('confirm.cancel'));
|
||||
.call(t.append('confirm.cancel'));
|
||||
|
||||
buttonEnter
|
||||
.append('button')
|
||||
.attr('class', 'button save-button action')
|
||||
.call(t.htmlDom('note.save'));
|
||||
.call(t.append('note.save'));
|
||||
|
||||
} else {
|
||||
buttonEnter
|
||||
@@ -348,7 +348,7 @@ export function uiNoteEditor(context) {
|
||||
buttonEnter
|
||||
.append('button')
|
||||
.attr('class', 'button comment-button action')
|
||||
.call(t.htmlDom('note.comment'));
|
||||
.call(t.append('note.comment'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ export function uiNoteReport() {
|
||||
|
||||
linkEnter
|
||||
.append('span')
|
||||
.call(t.htmlDom('note.report'));
|
||||
.call(t.append('note.report'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ export function uiNotice(context) {
|
||||
.call(svgIcon('#iD-icon-plus', 'pre-text'))
|
||||
.append('span')
|
||||
.attr('class', 'label')
|
||||
.call(t.htmlDom('zoom_in_edit'));
|
||||
.call(t.append('zoom_in_edit'));
|
||||
|
||||
|
||||
function disableTooHigh() {
|
||||
|
||||
@@ -44,7 +44,7 @@ export function uiOsmoseDetails(context) {
|
||||
|
||||
div
|
||||
.append('h4')
|
||||
.call(t.htmlDom('QA.keepRight.detail_description'));
|
||||
.call(t.append('QA.keepRight.detail_description'));
|
||||
|
||||
div
|
||||
.append('p')
|
||||
@@ -72,7 +72,7 @@ export function uiOsmoseDetails(context) {
|
||||
|
||||
div
|
||||
.append('h4')
|
||||
.call(t.htmlDom('QA.osmose.fix_title'));
|
||||
.call(t.append('QA.osmose.fix_title'));
|
||||
|
||||
div
|
||||
.append('p')
|
||||
@@ -90,7 +90,7 @@ export function uiOsmoseDetails(context) {
|
||||
|
||||
div
|
||||
.append('h4')
|
||||
.call(t.htmlDom('QA.osmose.trap_title'));
|
||||
.call(t.append('QA.osmose.trap_title'));
|
||||
|
||||
div
|
||||
.append('p')
|
||||
@@ -117,7 +117,7 @@ export function uiOsmoseDetails(context) {
|
||||
if (d.detail) {
|
||||
detailsDiv
|
||||
.append('h4')
|
||||
.call(t.htmlDom('QA.osmose.detail_title'));
|
||||
.call(t.append('QA.osmose.detail_title'));
|
||||
|
||||
detailsDiv
|
||||
.append('p')
|
||||
@@ -130,7 +130,7 @@ export function uiOsmoseDetails(context) {
|
||||
// Create list of linked issue elements
|
||||
elemsDiv
|
||||
.append('h4')
|
||||
.call(t.htmlDom('QA.osmose.elems_title'));
|
||||
.call(t.append('QA.osmose.elems_title'));
|
||||
|
||||
elemsDiv
|
||||
.append('ul').selectAll('li')
|
||||
|
||||
@@ -35,7 +35,7 @@ export function uiOsmoseEditor(context) {
|
||||
|
||||
headerEnter
|
||||
.append('h3')
|
||||
.call(t.htmlDom('QA.osmose.title'));
|
||||
.call(t.append('QA.osmose.title'));
|
||||
|
||||
let body = selection.selectAll('.body')
|
||||
.data([0]);
|
||||
@@ -117,7 +117,7 @@ export function uiOsmoseEditor(context) {
|
||||
.merge(buttonEnter);
|
||||
|
||||
buttonSection.select('.close-button')
|
||||
.call(t.htmlDom('QA.keepRight.close'))
|
||||
.call(t.append('QA.keepRight.close'))
|
||||
.on('click.close', function(d3_event, d) {
|
||||
this.blur(); // avoid keeping focus on the button - #4641
|
||||
const qaService = services.osmose;
|
||||
@@ -128,7 +128,7 @@ export function uiOsmoseEditor(context) {
|
||||
});
|
||||
|
||||
buttonSection.select('.ignore-button')
|
||||
.call(t.htmlDom('QA.keepRight.ignore'))
|
||||
.call(t.append('QA.keepRight.ignore'))
|
||||
.on('click.ignore', function(d3_event, d) {
|
||||
this.blur(); // avoid keeping focus on the button - #4641
|
||||
const qaService = services.osmose;
|
||||
|
||||
@@ -43,7 +43,7 @@ export function uiPanelBackground(context) {
|
||||
.append('li')
|
||||
.attr('class', 'background-info-list-' + k)
|
||||
.classed('hide', !_metadata[k])
|
||||
.call(t.htmlDom('info_panels.background.' + k, { suffix: ':' }))
|
||||
.call(t.append('info_panels.background.' + k, { suffix: ':' }))
|
||||
.append('span')
|
||||
.attr('class', 'background-info-span-' + k)
|
||||
.text(_metadata[k]);
|
||||
@@ -55,7 +55,7 @@ export function uiPanelBackground(context) {
|
||||
|
||||
selection
|
||||
.append('a')
|
||||
.call(t.htmlDom('info_panels.background.' + toggleTiles))
|
||||
.call(t.append('info_panels.background.' + toggleTiles))
|
||||
.attr('href', '#')
|
||||
.attr('class', 'button button-toggle-tiles')
|
||||
.on('click', function(d3_event) {
|
||||
@@ -71,7 +71,7 @@ export function uiPanelBackground(context) {
|
||||
var toggleVintage = showsVintage ? 'hide_vintage' : 'show_vintage';
|
||||
selection
|
||||
.append('a')
|
||||
.call(t.htmlDom('info_panels.background.' + toggleVintage))
|
||||
.call(t.append('info_panels.background.' + toggleVintage))
|
||||
.attr('href', '#')
|
||||
.attr('class', 'button button-toggle-vintage')
|
||||
.on('click', function(d3_event) {
|
||||
|
||||
@@ -21,7 +21,7 @@ export function uiPanelHistory(context) {
|
||||
if (!userName) {
|
||||
selection
|
||||
.append('span')
|
||||
.call(t.htmlDom('info_panels.history.unknown'));
|
||||
.call(t.append('info_panels.history.unknown'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export function uiPanelHistory(context) {
|
||||
if (!changeset) {
|
||||
selection
|
||||
.append('span')
|
||||
.call(t.htmlDom('info_panels.history.unknown'));
|
||||
.call(t.append('info_panels.history.unknown'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ export function uiPanelHistory(context) {
|
||||
selection
|
||||
.append('h4')
|
||||
.attr('class', 'history-heading')
|
||||
.call(t.htmlDom('info_panels.selected', { n: selected.length }));
|
||||
.call(t.append('info_panels.selected', { n: selected.length }));
|
||||
}
|
||||
|
||||
if (!singular) return;
|
||||
@@ -141,7 +141,7 @@ export function uiPanelHistory(context) {
|
||||
if (!note || note.isNew()) {
|
||||
selection
|
||||
.append('div')
|
||||
.call(t.htmlDom('info_panels.history.note_no_history'));
|
||||
.call(t.append('info_panels.history.note_no_history'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -150,20 +150,20 @@ export function uiPanelHistory(context) {
|
||||
|
||||
list
|
||||
.append('li')
|
||||
.call(t.htmlDom('info_panels.history.note_comments', { suffix: ':' }))
|
||||
.call(t.append('info_panels.history.note_comments', { suffix: ':' }))
|
||||
.append('span')
|
||||
.text(note.comments.length);
|
||||
|
||||
if (note.comments.length) {
|
||||
list
|
||||
.append('li')
|
||||
.call(t.htmlDom('info_panels.history.note_created_date', { suffix: ':' }))
|
||||
.call(t.append('info_panels.history.note_created_date', { suffix: ':' }))
|
||||
.append('span')
|
||||
.text(displayTimestamp(note.comments[0].date));
|
||||
|
||||
list
|
||||
.append('li')
|
||||
.call(t.htmlDom('info_panels.history.note_created_user', { suffix: ':' }))
|
||||
.call(t.append('info_panels.history.note_created_user', { suffix: ':' }))
|
||||
.call(displayUser, note.comments[0].user);
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ export function uiPanelHistory(context) {
|
||||
.attr('href', osm.noteURL(note))
|
||||
.call(svgIcon('#iD-icon-out-link', 'inline'))
|
||||
.append('span')
|
||||
.call(t.htmlDom('info_panels.history.note_link_text'));
|
||||
.call(t.append('info_panels.history.note_link_text'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ export function uiPanelHistory(context) {
|
||||
if (!entity || entity.isNew()) {
|
||||
selection
|
||||
.append('div')
|
||||
.call(t.htmlDom('info_panels.history.no_history'));
|
||||
.call(t.append('info_panels.history.no_history'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -214,24 +214,24 @@ export function uiPanelHistory(context) {
|
||||
|
||||
list
|
||||
.append('li')
|
||||
.call(t.htmlDom('info_panels.history.version', { suffix: ':' }))
|
||||
.call(t.append('info_panels.history.version', { suffix: ':' }))
|
||||
.append('span')
|
||||
.text(entity.version);
|
||||
|
||||
list
|
||||
.append('li')
|
||||
.call(t.htmlDom('info_panels.history.last_edit', { suffix: ':' }))
|
||||
.call(t.append('info_panels.history.last_edit', { suffix: ':' }))
|
||||
.append('span')
|
||||
.text(displayTimestamp(entity.timestamp));
|
||||
|
||||
list
|
||||
.append('li')
|
||||
.call(t.htmlDom('info_panels.history.edited_by', { suffix: ':' }))
|
||||
.call(t.append('info_panels.history.edited_by', { suffix: ':' }))
|
||||
.call(displayUser, entity.user);
|
||||
|
||||
list
|
||||
.append('li')
|
||||
.call(t.htmlDom('info_panels.history.changeset', { suffix: ':' }))
|
||||
.call(t.append('info_panels.history.changeset', { suffix: ':' }))
|
||||
.call(displayChangeset, entity.changeset);
|
||||
}
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ export function uiPanelMeasurement(context) {
|
||||
if (geometry) {
|
||||
list
|
||||
.append('li')
|
||||
.call(t.htmlDom('info_panels.measurement.geometry', { suffix: ':' }))
|
||||
.call(t.append('info_panels.measurement.geometry', { suffix: ':' }))
|
||||
.append('span')
|
||||
.html(
|
||||
closed ? t.html('info_panels.measurement.closed_' + geometry) : t.html('geometry.' + geometry)
|
||||
@@ -139,7 +139,7 @@ export function uiPanelMeasurement(context) {
|
||||
if (totalNodeCount) {
|
||||
list
|
||||
.append('li')
|
||||
.call(t.htmlDom('info_panels.measurement.node_count', { suffix: ':' }))
|
||||
.call(t.append('info_panels.measurement.node_count', { suffix: ':' }))
|
||||
.append('span')
|
||||
.text(totalNodeCount.toLocaleString(localeCode));
|
||||
}
|
||||
@@ -147,7 +147,7 @@ export function uiPanelMeasurement(context) {
|
||||
if (area) {
|
||||
list
|
||||
.append('li')
|
||||
.call(t.htmlDom('info_panels.measurement.area', { suffix: ':' }))
|
||||
.call(t.append('info_panels.measurement.area', { suffix: ':' }))
|
||||
.append('span')
|
||||
.text(displayArea(area, _isImperial));
|
||||
}
|
||||
@@ -155,7 +155,7 @@ export function uiPanelMeasurement(context) {
|
||||
if (length) {
|
||||
list
|
||||
.append('li')
|
||||
.call(t.htmlDom('info_panels.measurement.' + (closed ? 'perimeter' : 'length'), { suffix: ':' }))
|
||||
.call(t.append('info_panels.measurement.' + (closed ? 'perimeter' : 'length'), { suffix: ':' }))
|
||||
.append('span')
|
||||
.text(displayLength(length, _isImperial));
|
||||
}
|
||||
@@ -163,7 +163,7 @@ export function uiPanelMeasurement(context) {
|
||||
if (typeof distance === 'number') {
|
||||
list
|
||||
.append('li')
|
||||
.call(t.htmlDom('info_panels.measurement.distance', { suffix: ':' }))
|
||||
.call(t.append('info_panels.measurement.distance', { suffix: ':' }))
|
||||
.append('span')
|
||||
.text(displayLength(distance, _isImperial));
|
||||
}
|
||||
@@ -171,7 +171,7 @@ export function uiPanelMeasurement(context) {
|
||||
if (location) {
|
||||
coordItem = list
|
||||
.append('li')
|
||||
.call(t.htmlDom('info_panels.measurement.location', { suffix: ':' }));
|
||||
.call(t.append('info_panels.measurement.location', { suffix: ':' }));
|
||||
coordItem.append('span')
|
||||
.text(dmsCoordinatePair(location));
|
||||
coordItem.append('span')
|
||||
@@ -181,7 +181,7 @@ export function uiPanelMeasurement(context) {
|
||||
if (centroid) {
|
||||
coordItem = list
|
||||
.append('li')
|
||||
.call(t.htmlDom('info_panels.measurement.centroid', { suffix: ':' }));
|
||||
.call(t.append('info_panels.measurement.centroid', { suffix: ':' }));
|
||||
coordItem.append('span')
|
||||
.text(dmsCoordinatePair(centroid));
|
||||
coordItem.append('span')
|
||||
@@ -191,7 +191,7 @@ export function uiPanelMeasurement(context) {
|
||||
if (center) {
|
||||
coordItem = list
|
||||
.append('li')
|
||||
.call(t.htmlDom('info_panels.measurement.center', { suffix: ':' }));
|
||||
.call(t.append('info_panels.measurement.center', { suffix: ':' }));
|
||||
coordItem.append('span')
|
||||
.text(dmsCoordinatePair(center));
|
||||
coordItem.append('span')
|
||||
@@ -202,7 +202,7 @@ export function uiPanelMeasurement(context) {
|
||||
var toggle = _isImperial ? 'imperial' : 'metric';
|
||||
selection
|
||||
.append('a')
|
||||
.call(t.htmlDom('info_panels.measurement.' + toggle))
|
||||
.call(t.append('info_panels.measurement.' + toggle))
|
||||
.attr('href', '#')
|
||||
.attr('class', 'button button-toggle-units')
|
||||
.on('click', function(d3_event) {
|
||||
|
||||
@@ -382,7 +382,7 @@ export function uiPaneHelp(context) {
|
||||
|
||||
shortcuts
|
||||
.append('div')
|
||||
.call(t.htmlDom('shortcuts.title'));
|
||||
.call(t.append('shortcuts.title'));
|
||||
|
||||
var walkthrough = toc
|
||||
.append('li')
|
||||
@@ -399,7 +399,7 @@ export function uiPaneHelp(context) {
|
||||
|
||||
walkthrough
|
||||
.append('div')
|
||||
.call(t.htmlDom('splash.walkthrough'));
|
||||
.call(t.append('splash.walkthrough'));
|
||||
|
||||
|
||||
var helpContent = content
|
||||
|
||||
@@ -35,7 +35,7 @@ export function uiPresetList(context) {
|
||||
|
||||
var message = messagewrap
|
||||
.append('h3')
|
||||
.call(t.htmlDom('inspector.choose'));
|
||||
.call(t.append('inspector.choose'));
|
||||
|
||||
messagewrap
|
||||
.append('button')
|
||||
|
||||
@@ -17,13 +17,13 @@ export function uiRestore(context) {
|
||||
.append('div')
|
||||
.attr('class', 'modal-section')
|
||||
.append('h3')
|
||||
.call(t.htmlDom('restore.heading'));
|
||||
.call(t.append('restore.heading'));
|
||||
|
||||
introModal
|
||||
.append('div')
|
||||
.attr('class','modal-section')
|
||||
.append('p')
|
||||
.call(t.htmlDom('restore.description'));
|
||||
.call(t.append('restore.description'));
|
||||
|
||||
let buttonWrap = introModal
|
||||
.append('div')
|
||||
@@ -45,7 +45,7 @@ export function uiRestore(context) {
|
||||
|
||||
restore
|
||||
.append('div')
|
||||
.call(t.htmlDom('restore.restore'));
|
||||
.call(t.append('restore.restore'));
|
||||
|
||||
let reset = buttonWrap
|
||||
.append('button')
|
||||
@@ -63,7 +63,7 @@ export function uiRestore(context) {
|
||||
|
||||
reset
|
||||
.append('div')
|
||||
.call(t.htmlDom('restore.reset'));
|
||||
.call(t.append('restore.reset'));
|
||||
|
||||
restore.node().focus();
|
||||
};
|
||||
|
||||
@@ -103,7 +103,7 @@ export function uiSectionBackgroundDisplayOptions(context) {
|
||||
.append('a')
|
||||
.attr('class', 'display-option-resetlink')
|
||||
.attr('href', '#')
|
||||
.call(t.htmlDom('background.reset_all'))
|
||||
.call(t.append('background.reset_all'))
|
||||
.on('click', function(d3_event) {
|
||||
d3_event.preventDefault();
|
||||
for (var i = 0; i < _sliders.length; i++) {
|
||||
|
||||
@@ -70,7 +70,7 @@ export function uiSectionBackgroundList(context) {
|
||||
|
||||
minimapLabelEnter
|
||||
.append('span')
|
||||
.call(t.htmlDom('background.minimap.description'));
|
||||
.call(t.append('background.minimap.description'));
|
||||
|
||||
|
||||
var panelLabelEnter = bgExtrasListEnter
|
||||
@@ -93,7 +93,7 @@ export function uiSectionBackgroundList(context) {
|
||||
|
||||
panelLabelEnter
|
||||
.append('span')
|
||||
.call(t.htmlDom('background.panel.description'));
|
||||
.call(t.append('background.panel.description'));
|
||||
|
||||
var locPanelLabelEnter = bgExtrasListEnter
|
||||
.append('li')
|
||||
@@ -115,7 +115,7 @@ export function uiSectionBackgroundList(context) {
|
||||
|
||||
locPanelLabelEnter
|
||||
.append('span')
|
||||
.call(t.htmlDom('background.location_panel.description'));
|
||||
.call(t.append('background.location_panel.description'));
|
||||
|
||||
|
||||
// "Info / Report a Problem" link
|
||||
@@ -129,7 +129,7 @@ export function uiSectionBackgroundList(context) {
|
||||
.call(svgIcon('#iD-icon-out-link', 'inline'))
|
||||
.attr('href', 'https://github.com/openstreetmap/iD/blob/develop/FAQ.md#how-can-i-report-an-issue-with-background-imagery')
|
||||
.append('span')
|
||||
.call(t.htmlDom('background.imagery_problem_faq'));
|
||||
.call(t.append('background.imagery_problem_faq'));
|
||||
|
||||
_backgroundList
|
||||
.call(drawListItems, 'radio', function(d3_event, d) {
|
||||
|
||||
@@ -132,7 +132,7 @@ export function uiSectionBackgroundOffset(context) {
|
||||
containerEnter
|
||||
.append('div')
|
||||
.attr('class', 'nudge-instructions')
|
||||
.call(t.htmlDom('background.offset'));
|
||||
.call(t.append('background.offset'));
|
||||
|
||||
var nudgeWrapEnter = containerEnter
|
||||
.append('div')
|
||||
|
||||
@@ -132,7 +132,7 @@ export function uiSectionChanges(context) {
|
||||
linkEnter
|
||||
.call(svgIcon('#iD-icon-load', 'inline'))
|
||||
.append('span')
|
||||
.call(t.htmlDom('commit.download_changes'));
|
||||
.call(t.append('commit.download_changes'));
|
||||
|
||||
|
||||
function mouseover(d) {
|
||||
|
||||
@@ -324,7 +324,7 @@ export function uiSectionDataLayers(context) {
|
||||
|
||||
labelEnter
|
||||
.append('span')
|
||||
.call(t.htmlDom('map_data.layers.custom.title'));
|
||||
.call(t.append('map_data.layers.custom.title'));
|
||||
|
||||
liEnter
|
||||
.append('button')
|
||||
@@ -415,7 +415,7 @@ export function uiSectionDataLayers(context) {
|
||||
|
||||
historyPanelLabelEnter
|
||||
.append('span')
|
||||
.call(t.htmlDom('map_data.history_panel.title'));
|
||||
.call(t.append('map_data.history_panel.title'));
|
||||
|
||||
var measurementPanelLabelEnter = panelsListEnter
|
||||
.append('li')
|
||||
@@ -437,7 +437,7 @@ export function uiSectionDataLayers(context) {
|
||||
|
||||
measurementPanelLabelEnter
|
||||
.append('span')
|
||||
.call(t.htmlDom('map_data.measurement_panel.title'));
|
||||
.call(t.append('map_data.measurement_panel.title'));
|
||||
}
|
||||
|
||||
context.layers().on('change.uiSectionDataLayers', section.reRender);
|
||||
|
||||
@@ -169,7 +169,7 @@ export function uiSectionEntityIssues(context) {
|
||||
.call(d.reference);
|
||||
} else {
|
||||
d3_select(this)
|
||||
.call(t.htmlDom('inspector.no_documentation_key'));
|
||||
.call(t.append('inspector.no_documentation_key'));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export function uiSectionMapFeatures(context) {
|
||||
.append('a')
|
||||
.attr('class', 'feature-list-link')
|
||||
.attr('href', '#')
|
||||
.call(t.htmlDom('issues.disable_all'))
|
||||
.call(t.append('issues.disable_all'))
|
||||
.on('click', function(d3_event) {
|
||||
d3_event.preventDefault();
|
||||
context.features().disableAll();
|
||||
@@ -42,7 +42,7 @@ export function uiSectionMapFeatures(context) {
|
||||
.append('a')
|
||||
.attr('class', 'feature-list-link')
|
||||
.attr('href', '#')
|
||||
.call(t.htmlDom('issues.enable_all'))
|
||||
.call(t.append('issues.enable_all'))
|
||||
.on('click', function(d3_event) {
|
||||
d3_event.preventDefault();
|
||||
context.features().enableAll();
|
||||
|
||||
@@ -273,7 +273,7 @@ export function uiSectionPhotoOverlays(context) {
|
||||
|
||||
labelEnter
|
||||
.append('span')
|
||||
.call(t.htmlDom('photo_overlays.username_filter.title'));
|
||||
.call(t.append('photo_overlays.username_filter.title'));
|
||||
|
||||
labelEnter
|
||||
.append('input')
|
||||
|
||||
@@ -41,7 +41,7 @@ export function uiSectionPrivacy(context) {
|
||||
|
||||
thirdPartyIconsEnter
|
||||
.append('span')
|
||||
.call(t.htmlDom('preferences.privacy.third_party_icons.description'));
|
||||
.call(t.append('preferences.privacy.third_party_icons.description'));
|
||||
|
||||
|
||||
// Privacy Policy link
|
||||
@@ -55,7 +55,7 @@ export function uiSectionPrivacy(context) {
|
||||
.call(svgIcon('#iD-icon-out-link', 'inline'))
|
||||
.attr('href', 'https://github.com/openstreetmap/iD/blob/release/PRIVACY.md')
|
||||
.append('span')
|
||||
.call(t.htmlDom('preferences.privacy.privacy_link'));
|
||||
.call(t.append('preferences.privacy.privacy_link'));
|
||||
|
||||
update();
|
||||
|
||||
|
||||
@@ -221,12 +221,12 @@ export function uiSectionRawMemberEditor(context) {
|
||||
labelText
|
||||
.append('span')
|
||||
.attr('class', 'member-entity-type')
|
||||
.call(t.htmlDom('inspector.' + d.type, { id: d.id }));
|
||||
.call(t.append('inspector.' + d.type, { id: d.id }));
|
||||
|
||||
labelText
|
||||
.append('span')
|
||||
.attr('class', 'member-entity-name')
|
||||
.call(t.htmlDom('inspector.incomplete', { id: d.id }));
|
||||
.call(t.append('inspector.incomplete', { id: d.id }));
|
||||
|
||||
label
|
||||
.append('button')
|
||||
|
||||
@@ -174,7 +174,7 @@ export function uiSectionValidationIssues(id, severity, context) {
|
||||
linkEnter
|
||||
.append('span')
|
||||
.attr('class', 'autofix-all-link-text')
|
||||
.call(t.htmlDom('issues.fix_all.title'));
|
||||
.call(t.append('issues.fix_all.title'));
|
||||
|
||||
linkEnter
|
||||
.append('span')
|
||||
|
||||
@@ -45,7 +45,7 @@ export function uiSectionValidationRules(context) {
|
||||
.append('a')
|
||||
.attr('class', 'issue-rules-link')
|
||||
.attr('href', '#')
|
||||
.call(t.htmlDom('issues.disable_all'))
|
||||
.call(t.append('issues.disable_all'))
|
||||
.on('click', function(d3_event) {
|
||||
d3_event.preventDefault();
|
||||
context.validator().disableRules(_ruleKeys);
|
||||
@@ -55,7 +55,7 @@ export function uiSectionValidationRules(context) {
|
||||
.append('a')
|
||||
.attr('class', 'issue-rules-link')
|
||||
.attr('href', '#')
|
||||
.call(t.htmlDom('issues.enable_all'))
|
||||
.call(t.append('issues.enable_all'))
|
||||
.on('click', function(d3_event) {
|
||||
d3_event.preventDefault();
|
||||
context.validator().disableRules([]);
|
||||
|
||||
@@ -96,7 +96,7 @@ export function uiSectionValidationStatus(context) {
|
||||
var hiddenIssues = context.validator().getIssues(hiddenOpts);
|
||||
if (hiddenIssues.length) {
|
||||
selection.select('.box .details')
|
||||
.call(t.htmlDom(
|
||||
.call(t.append(
|
||||
'issues.no_issues.hidden_issues.' + type,
|
||||
{ count: hiddenIssues.length.toString() }
|
||||
));
|
||||
@@ -104,7 +104,7 @@ export function uiSectionValidationStatus(context) {
|
||||
}
|
||||
}
|
||||
selection.select('.box .details')
|
||||
.call(t.htmlDom('issues.no_issues.hidden_issues.none'));
|
||||
.call(t.append('issues.no_issues.hidden_issues.none'));
|
||||
}
|
||||
|
||||
var messageType;
|
||||
@@ -159,7 +159,7 @@ export function uiSectionValidationStatus(context) {
|
||||
}
|
||||
|
||||
selection.select('.box .message')
|
||||
.call(t.htmlDom('issues.no_issues.message.' + messageType));
|
||||
.call(t.append('issues.no_issues.message.' + messageType));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ export function uiSettingsCustomBackground() {
|
||||
|
||||
modal.select('.modal-section.header')
|
||||
.append('h3')
|
||||
.call(t.htmlDom('settings.custom_background.header'));
|
||||
.call(t.append('settings.custom_background.header'));
|
||||
|
||||
|
||||
var textSection = modal.select('.modal-section.message-text');
|
||||
@@ -70,7 +70,7 @@ export function uiSettingsCustomBackground() {
|
||||
buttonSection
|
||||
.insert('button', '.ok-button')
|
||||
.attr('class', 'button cancel-button secondary-action')
|
||||
.call(t.htmlDom('confirm.cancel'));
|
||||
.call(t.append('confirm.cancel'));
|
||||
|
||||
|
||||
buttonSection.select('.cancel-button')
|
||||
|
||||
@@ -30,7 +30,7 @@ export function uiSettingsCustomData(context) {
|
||||
|
||||
modal.select('.modal-section.header')
|
||||
.append('h3')
|
||||
.call(t.htmlDom('settings.custom_data.header'));
|
||||
.call(t.append('settings.custom_data.header'));
|
||||
|
||||
|
||||
var textSection = modal.select('.modal-section.message-text');
|
||||
@@ -38,7 +38,7 @@ export function uiSettingsCustomData(context) {
|
||||
textSection
|
||||
.append('pre')
|
||||
.attr('class', 'instructions-file')
|
||||
.call(t.htmlDom('settings.custom_data.file.instructions'));
|
||||
.call(t.append('settings.custom_data.file.instructions'));
|
||||
|
||||
textSection
|
||||
.append('input')
|
||||
@@ -58,12 +58,12 @@ export function uiSettingsCustomData(context) {
|
||||
|
||||
textSection
|
||||
.append('h4')
|
||||
.call(t.htmlDom('settings.custom_data.or'));
|
||||
.call(t.append('settings.custom_data.or'));
|
||||
|
||||
textSection
|
||||
.append('pre')
|
||||
.attr('class', 'instructions-url')
|
||||
.call(t.htmlDom('settings.custom_data.url.instructions'));
|
||||
.call(t.append('settings.custom_data.url.instructions'));
|
||||
|
||||
textSection
|
||||
.append('textarea')
|
||||
@@ -79,7 +79,7 @@ export function uiSettingsCustomData(context) {
|
||||
buttonSection
|
||||
.insert('button', '.ok-button')
|
||||
.attr('class', 'button cancel-button secondary-action')
|
||||
.call(t.htmlDom('confirm.cancel'));
|
||||
.call(t.append('confirm.cancel'));
|
||||
|
||||
|
||||
buttonSection.select('.cancel-button')
|
||||
|
||||
@@ -27,7 +27,7 @@ export function uiShortcuts(context) {
|
||||
.append('div')
|
||||
.attr('class', 'modal-section')
|
||||
.append('h3')
|
||||
.call(t.htmlDom('shortcuts.title'));
|
||||
.call(t.append('shortcuts.title'));
|
||||
|
||||
fileFetcher.get('shortcuts')
|
||||
.then(function(data) {
|
||||
|
||||
@@ -41,7 +41,7 @@ export function uiSourceSwitch(context) {
|
||||
selection
|
||||
.append('a')
|
||||
.attr('href', '#')
|
||||
.call(t.htmlDom('source_switch.live'))
|
||||
.call(t.append('source_switch.live'))
|
||||
.attr('class', 'live chip')
|
||||
.on('click', click);
|
||||
};
|
||||
|
||||
@@ -42,7 +42,7 @@ export function uiSplash(context) {
|
||||
.append('div')
|
||||
.attr('class','modal-section')
|
||||
.append('h3')
|
||||
.call(t.htmlDom('splash.welcome'));
|
||||
.call(t.append('splash.welcome'));
|
||||
|
||||
let modalSection = introModal
|
||||
.append('div')
|
||||
@@ -84,7 +84,7 @@ export function uiSplash(context) {
|
||||
|
||||
walkthrough
|
||||
.append('div')
|
||||
.call(t.htmlDom('splash.walkthrough'));
|
||||
.call(t.append('splash.walkthrough'));
|
||||
|
||||
let startEditing = buttonWrap
|
||||
.append('button')
|
||||
@@ -99,7 +99,7 @@ export function uiSplash(context) {
|
||||
|
||||
startEditing
|
||||
.append('div')
|
||||
.call(t.htmlDom('splash.start'));
|
||||
.call(t.append('splash.start'));
|
||||
|
||||
modalSelection.select('button.close')
|
||||
.attr('class','hide');
|
||||
|
||||
@@ -22,14 +22,14 @@ export function uiStatus(context) {
|
||||
|
||||
} else if (apiStatus === 'rateLimited') {
|
||||
selection
|
||||
.call(t.htmlDom('osm_api_status.message.rateLimit'))
|
||||
.call(t.append('osm_api_status.message.rateLimit'))
|
||||
.append('a')
|
||||
.attr('href', '#')
|
||||
.attr('class', 'api-status-login')
|
||||
.attr('target', '_blank')
|
||||
.call(svgIcon('#iD-icon-out-link', 'inline'))
|
||||
.append('span')
|
||||
.call(t.htmlDom('login'))
|
||||
.call(t.append('login'))
|
||||
.on('click.login', function(d3_event) {
|
||||
d3_event.preventDefault();
|
||||
osm.authenticate();
|
||||
@@ -47,11 +47,11 @@ export function uiStatus(context) {
|
||||
// eslint-disable-next-line no-warning-comments
|
||||
// TODO: nice messages for different error types
|
||||
selection
|
||||
.call(t.htmlDom('osm_api_status.message.error', { suffix: ' ' }))
|
||||
.call(t.append('osm_api_status.message.error', { suffix: ' ' }))
|
||||
.append('a')
|
||||
.attr('href', '#')
|
||||
// let the user manually retry their connection directly
|
||||
.call(t.htmlDom('osm_api_status.retry'))
|
||||
.call(t.append('osm_api_status.retry'))
|
||||
.on('click.retry', function(d3_event) {
|
||||
d3_event.preventDefault();
|
||||
throttledRetry();
|
||||
@@ -59,9 +59,9 @@ export function uiStatus(context) {
|
||||
}
|
||||
|
||||
} else if (apiStatus === 'readonly') {
|
||||
selection.call(t.htmlDom('osm_api_status.message.readonly'));
|
||||
selection.call(t.append('osm_api_status.message.readonly'));
|
||||
} else if (apiStatus === 'offline') {
|
||||
selection.call(t.htmlDom('osm_api_status.message.offline'));
|
||||
selection.call(t.append('osm_api_status.message.offline'));
|
||||
}
|
||||
|
||||
selection.attr('class', 'api-status ' + (err ? 'error' : apiStatus));
|
||||
@@ -70,7 +70,7 @@ export function uiStatus(context) {
|
||||
osm.on('apiStatusChange.uiStatus', update);
|
||||
|
||||
context.history().on('storage_error', () => {
|
||||
selection.call(t.htmlDom('osm_api_status.message.local_storage_full'));
|
||||
selection.call(t.append('osm_api_status.message.local_storage_full'));
|
||||
selection.attr('class', 'api-status error');
|
||||
});
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ export function uiSuccess(context) {
|
||||
|
||||
header
|
||||
.append('h3')
|
||||
.call(t.htmlDom('success.just_edited'));
|
||||
.call(t.append('success.just_edited'));
|
||||
|
||||
header
|
||||
.append('button')
|
||||
@@ -100,18 +100,18 @@ export function uiSuccess(context) {
|
||||
|
||||
summary
|
||||
.append('h3')
|
||||
.call(t.htmlDom('success.thank_you' + (_location ? '_location' : ''), { where: _location }));
|
||||
.call(t.append('success.thank_you' + (_location ? '_location' : ''), { where: _location }));
|
||||
|
||||
summary
|
||||
.append('p')
|
||||
.call(t.htmlDom('success.help_html'))
|
||||
.call(t.append('success.help_html'))
|
||||
.append('a')
|
||||
.attr('class', 'link-out')
|
||||
.attr('target', '_blank')
|
||||
.attr('href', t('success.help_link_url'))
|
||||
.call(svgIcon('#iD-icon-out-link', 'inline'))
|
||||
.append('span')
|
||||
.call(t.htmlDom('success.help_link_text'));
|
||||
.call(t.append('success.help_link_text'));
|
||||
|
||||
let osm = context.connection();
|
||||
if (!osm) return;
|
||||
@@ -146,7 +146,7 @@ export function uiSuccess(context) {
|
||||
.attr('class', 'cell-detail summary-view-on-osm')
|
||||
.attr('target', '_blank')
|
||||
.attr('href', changesetURL)
|
||||
.call(t.htmlDom('success.view_on_osm'));
|
||||
.call(t.append('success.view_on_osm'));
|
||||
|
||||
summaryDetail
|
||||
.append('div')
|
||||
@@ -194,7 +194,7 @@ export function uiSuccess(context) {
|
||||
|
||||
communityLinks
|
||||
.append('h3')
|
||||
.call(t.htmlDom('success.like_osm'));
|
||||
.call(t.append('success.like_osm'));
|
||||
|
||||
let table = communityLinks
|
||||
.append('table')
|
||||
@@ -228,14 +228,14 @@ export function uiSuccess(context) {
|
||||
communityLinks
|
||||
.append('div')
|
||||
.attr('class', 'community-missing')
|
||||
.call(t.htmlDom('success.missing'))
|
||||
.call(t.append('success.missing'))
|
||||
.append('a')
|
||||
.attr('class', 'link-out')
|
||||
.attr('target', '_blank')
|
||||
.call(svgIcon('#iD-icon-out-link', 'inline'))
|
||||
.attr('href', 'https://github.com/osmlab/osm-community-index/issues')
|
||||
.append('span')
|
||||
.call(t.htmlDom('success.tell_us'));
|
||||
.call(t.append('success.tell_us'));
|
||||
}
|
||||
|
||||
|
||||
@@ -319,7 +319,7 @@ export function uiSuccess(context) {
|
||||
moreEnter
|
||||
.append('div')
|
||||
.attr('class', 'community-languages')
|
||||
.call(t.htmlDom('success.languages', { languages: languageList }));
|
||||
.call(t.append('success.languages', { languages: languageList }));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ export function uiTagReference(what) {
|
||||
_body
|
||||
.append('p')
|
||||
.attr('class', 'tag-reference-description')
|
||||
.call(t.htmlDom('inspector.no_documentation_key'));
|
||||
.call(t.append('inspector.no_documentation_key'));
|
||||
done();
|
||||
return;
|
||||
}
|
||||
@@ -71,7 +71,7 @@ export function uiTagReference(what) {
|
||||
.text(docs.description);
|
||||
} else {
|
||||
tagReferenceDescription = tagReferenceDescription
|
||||
.call(t.htmlDom('inspector.no_documentation_key'));
|
||||
.call(t.append('inspector.no_documentation_key'));
|
||||
}
|
||||
tagReferenceDescription
|
||||
.append('a')
|
||||
@@ -89,7 +89,7 @@ export function uiTagReference(what) {
|
||||
.attr('href', docs.wiki.url)
|
||||
.call(svgIcon('#iD-icon-out-link', 'inline'))
|
||||
.append('span')
|
||||
.call(t.htmlDom(docs.wiki.text));
|
||||
.call(t.append(docs.wiki.text));
|
||||
}
|
||||
|
||||
// Add link to info about "good changeset comments" - #2923
|
||||
@@ -101,7 +101,7 @@ export function uiTagReference(what) {
|
||||
.call(svgIcon('#iD-icon-out-link', 'inline'))
|
||||
.attr('href', t('commit.about_changeset_comments_link'))
|
||||
.append('span')
|
||||
.call(t.htmlDom('commit.about_changeset_comments'));
|
||||
.call(t.append('commit.about_changeset_comments'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ export function uiTooltip(klass) {
|
||||
|
||||
keyhintWrapEnter
|
||||
.append('span')
|
||||
.call(t.htmlDom('tooltip_keyhint'));
|
||||
.call(t.append('tooltip_keyhint'));
|
||||
|
||||
keyhintWrap = keyhintWrapEnter.merge(keyhintWrap);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ export function uiViewOnKeepRight() {
|
||||
|
||||
linkEnter
|
||||
.append('span')
|
||||
.call(t.htmlDom('inspector.view_on_keepRight'));
|
||||
.call(t.append('inspector.view_on_keepRight'));
|
||||
}
|
||||
|
||||
viewOnKeepRight.what = function(val) {
|
||||
|
||||
@@ -33,7 +33,7 @@ export function uiViewOnOSM(context) {
|
||||
|
||||
linkEnter
|
||||
.append('span')
|
||||
.call(t.htmlDom('inspector.view_on_osm'));
|
||||
.call(t.append('inspector.view_on_osm'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ export function uiViewOnOsmose() {
|
||||
|
||||
linkEnter
|
||||
.append('span')
|
||||
.call(t.htmlDom('inspector.view_on_osmose'));
|
||||
.call(t.append('inspector.view_on_osmose'));
|
||||
}
|
||||
|
||||
viewOnOsmose.what = function(val) {
|
||||
|
||||
@@ -157,7 +157,7 @@ export function validationAlmostJunction(context) {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.almost_junction.highway-highway.reference'));
|
||||
.call(t.append('issues.almost_junction.highway-highway.reference'));
|
||||
}
|
||||
|
||||
function isExtendableCandidate(node, way) {
|
||||
|
||||
@@ -481,7 +481,7 @@ export function validationCrossingWays(context) {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.crossing_ways.' + crossingTypeID + '.reference'));
|
||||
.call(t.append('issues.crossing_ways.' + crossingTypeID + '.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ export function validationDisconnectedWay() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.disconnected_way.routable.reference'));
|
||||
.call(t.append('issues.disconnected_way.routable.reference'));
|
||||
}
|
||||
|
||||
function routingIslandForEntity(entity) {
|
||||
|
||||
@@ -46,7 +46,7 @@ export function validationHelpRequest(context) {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.fixme_tag.reference'));
|
||||
.call(t.append('issues.fixme_tag.reference'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@ export function validationImpossibleOneway() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.impossible_oneway.' + referenceID + '.reference'));
|
||||
.call(t.append('issues.impossible_oneway.' + referenceID + '.reference'));
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ export function validationIncompatibleSource() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom(`issues.incompatible_source.reference.${id}`));
|
||||
.call(t.append(`issues.incompatible_source.reference.${id}`));
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -28,7 +28,7 @@ export function validationFormatting() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.invalid_format.email.reference'));
|
||||
.call(t.append('issues.invalid_format.email.reference'));
|
||||
}
|
||||
/*
|
||||
function showReferenceWebsite(selection) {
|
||||
@@ -37,7 +37,7 @@ export function validationFormatting() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.invalid_format.website.reference'));
|
||||
.call(t.append('issues.invalid_format.website.reference'));
|
||||
}
|
||||
|
||||
if (entity.tags.website) {
|
||||
|
||||
@@ -136,7 +136,7 @@ export function validationMismatchedGeometry() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.tag_suggests_area.reference'));
|
||||
.call(t.append('issues.tag_suggests_area.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ export function validationMismatchedGeometry() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.vertex_as_point.reference'));
|
||||
.call(t.append('issues.vertex_as_point.reference'));
|
||||
},
|
||||
entityIds: [entity.id]
|
||||
});
|
||||
@@ -194,7 +194,7 @@ export function validationMismatchedGeometry() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.point_as_vertex.reference'));
|
||||
.call(t.append('issues.point_as_vertex.reference'));
|
||||
},
|
||||
entityIds: [entity.id],
|
||||
dynamicFixes: extractPointDynamicFixes
|
||||
@@ -274,7 +274,7 @@ export function validationMismatchedGeometry() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.mismatched_geometry.reference'));
|
||||
.call(t.append('issues.mismatched_geometry.reference'));
|
||||
},
|
||||
entityIds: [entity.id],
|
||||
dynamicFixes: dynamicFixes
|
||||
@@ -393,7 +393,7 @@ export function validationMismatchedGeometry() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.unclosed_multipolygon_part.reference'));
|
||||
.call(t.append('issues.unclosed_multipolygon_part.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ export function validationMissingRole() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.missing_role.multipolygon.reference'));
|
||||
.call(t.append('issues.missing_role.multipolygon.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ export function validationMissingTag(context) {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.' + referenceID + '.reference'));
|
||||
.call(t.append('issues.' + referenceID + '.reference'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -198,11 +198,11 @@ export function validationOutdatedTags() {
|
||||
enter
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom(`issues.outdated_tags.${prefix}reference`));
|
||||
.call(t.append(`issues.outdated_tags.${prefix}reference`));
|
||||
|
||||
enter
|
||||
.append('strong')
|
||||
.call(t.htmlDom('issues.suggested'));
|
||||
.call(t.append('issues.suggested'));
|
||||
|
||||
enter
|
||||
.append('table')
|
||||
@@ -284,7 +284,7 @@ export function validationOutdatedTags() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.old_multipolygon.reference'));
|
||||
.call(t.append('issues.old_multipolygon.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -112,11 +112,11 @@ export function validationPrivateData() {
|
||||
enter
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.private_data.reference'));
|
||||
.call(t.append('issues.private_data.reference'));
|
||||
|
||||
enter
|
||||
.append('strong')
|
||||
.call(t.htmlDom('issues.suggested'));
|
||||
.call(t.append('issues.suggested'));
|
||||
|
||||
enter
|
||||
.append('table')
|
||||
|
||||
@@ -92,7 +92,7 @@ export function validationSuspiciousName() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.generic_name.reference'));
|
||||
.call(t.append('issues.generic_name.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ export function validationSuspiciousName() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.generic_name.reference'));
|
||||
.call(t.append('issues.generic_name.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ export function validationUnsquareWay(context) {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.call(t.htmlDom('issues.unsquare_way.buildings.reference'));
|
||||
.call(t.append('issues.unsquare_way.buildings.reference'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user