mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 13:18:15 +02:00
Add lang attribute to more display labels (re: #7963)
This commit is contained in:
@@ -80,7 +80,7 @@ export function rendererBackgroundSource(data) {
|
||||
|
||||
source.description = function() {
|
||||
var id_safe = source.id.replace(/\./g, '<TX_DOT>');
|
||||
return t('imagery.' + id_safe + '.description', { default: _description });
|
||||
return t.html('imagery.' + id_safe + '.description', { default: _description });
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ export function uiGeolocate(context) {
|
||||
// don't hang indefinitely getting the location
|
||||
timeout: 6000 // 6sec
|
||||
};
|
||||
var _locating = uiLoading(context).message(t('geolocate.locating')).blocking(true);
|
||||
var _locating = uiLoading(context).message(t.html('geolocate.locating')).blocking(true);
|
||||
var _layer = context.layers().layer('geolocate');
|
||||
var _position;
|
||||
var _extent;
|
||||
|
||||
+2
-2
@@ -422,7 +422,7 @@ export function uiInit(context) {
|
||||
}
|
||||
|
||||
var osm = context.connection();
|
||||
var auth = uiLoading(context).message(t('loading_auth')).blocking(true);
|
||||
var auth = uiLoading(context).message(t.html('loading_auth')).blocking(true);
|
||||
|
||||
if (osm && auth) {
|
||||
osm
|
||||
@@ -651,7 +651,7 @@ export function uiInit(context) {
|
||||
context.uploader()
|
||||
.on('saveStarted.ui', function() {
|
||||
_saveLoading = uiLoading(context)
|
||||
.message(t('save.uploading'))
|
||||
.message(t.html('save.uploading'))
|
||||
.blocking(true);
|
||||
context.container().call(_saveLoading); // block input during upload
|
||||
})
|
||||
|
||||
@@ -149,13 +149,13 @@ export function uiSectionBackgroundList(context) {
|
||||
if (d.id === previousBackgroundID()) {
|
||||
item.call(uiTooltip()
|
||||
.placement(placement)
|
||||
.title('<div>' + t('background.switch') + '</div>')
|
||||
.title('<div>' + t.html('background.switch') + '</div>')
|
||||
.keys([uiCmd('⌘' + t('background.key'))])
|
||||
);
|
||||
} else if (description || isOverflowing) {
|
||||
item.call(uiTooltip()
|
||||
.placement(placement)
|
||||
.title(description || d.name())
|
||||
.title(description || d.label())
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -67,9 +67,9 @@ export function uiSectionMapFeatures(context) {
|
||||
.append('li')
|
||||
.call(uiTooltip()
|
||||
.title(function(d) {
|
||||
var tip = t(name + '.' + d + '.tooltip');
|
||||
var tip = t.html(name + '.' + d + '.tooltip');
|
||||
if (autoHiddenFeature(d)) {
|
||||
var msg = showsLayer('osm') ? t('map_data.autohidden') : t('map_data.osmhidden');
|
||||
var msg = showsLayer('osm') ? t.html('map_data.autohidden') : t.html('map_data.osmhidden');
|
||||
tip += '<div>' + msg + '</div>';
|
||||
}
|
||||
return tip;
|
||||
|
||||
@@ -48,7 +48,7 @@ export function uiSectionMapStyleOptions(context) {
|
||||
.append('li')
|
||||
.call(uiTooltip()
|
||||
.title(function(d) {
|
||||
return t(name + '.' + d + '.tooltip');
|
||||
return t.html(name + '.' + d + '.tooltip');
|
||||
})
|
||||
.keys(function(d) {
|
||||
var key = (d === 'wireframe' ? t('area_fill.wireframe.key') : null);
|
||||
|
||||
@@ -84,7 +84,7 @@ export function uiSectionValidationRules(context) {
|
||||
if (name === 'rule') {
|
||||
enter
|
||||
.call(uiTooltip()
|
||||
.title(function(d) { return t('issues.' + d + '.tip'); })
|
||||
.title(function(d) { return t.html('issues.' + d + '.tip'); })
|
||||
.placement('top')
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user