From c443b28b8d4504db1aca45b5c9a90605f92b2d02 Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Wed, 23 Sep 2020 11:03:47 -0400 Subject: [PATCH] Add `lang` attribute to more display labels (re: #7963) --- modules/renderer/background_source.js | 2 +- modules/ui/geolocate.js | 2 +- modules/ui/init.js | 4 ++-- modules/ui/sections/background_list.js | 4 ++-- modules/ui/sections/map_features.js | 4 ++-- modules/ui/sections/map_style_options.js | 2 +- modules/ui/sections/validation_rules.js | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/renderer/background_source.js b/modules/renderer/background_source.js index d0dc312bb..d6020d752 100644 --- a/modules/renderer/background_source.js +++ b/modules/renderer/background_source.js @@ -80,7 +80,7 @@ export function rendererBackgroundSource(data) { source.description = function() { var id_safe = source.id.replace(/\./g, ''); - return t('imagery.' + id_safe + '.description', { default: _description }); + return t.html('imagery.' + id_safe + '.description', { default: _description }); }; diff --git a/modules/ui/geolocate.js b/modules/ui/geolocate.js index c1a94b394..26dc2b144 100644 --- a/modules/ui/geolocate.js +++ b/modules/ui/geolocate.js @@ -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; diff --git a/modules/ui/init.js b/modules/ui/init.js index 589e44482..5345eb8a7 100644 --- a/modules/ui/init.js +++ b/modules/ui/init.js @@ -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 }) diff --git a/modules/ui/sections/background_list.js b/modules/ui/sections/background_list.js index 0ccb264ae..bd11aa0ee 100644 --- a/modules/ui/sections/background_list.js +++ b/modules/ui/sections/background_list.js @@ -149,13 +149,13 @@ export function uiSectionBackgroundList(context) { if (d.id === previousBackgroundID()) { item.call(uiTooltip() .placement(placement) - .title('
' + t('background.switch') + '
') + .title('
' + t.html('background.switch') + '
') .keys([uiCmd('⌘' + t('background.key'))]) ); } else if (description || isOverflowing) { item.call(uiTooltip() .placement(placement) - .title(description || d.name()) + .title(description || d.label()) ); } }); diff --git a/modules/ui/sections/map_features.js b/modules/ui/sections/map_features.js index 1b0ae3011..ec1d8fa4c 100644 --- a/modules/ui/sections/map_features.js +++ b/modules/ui/sections/map_features.js @@ -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 += '
' + msg + '
'; } return tip; diff --git a/modules/ui/sections/map_style_options.js b/modules/ui/sections/map_style_options.js index cf7b1bafd..dc08c4c2d 100644 --- a/modules/ui/sections/map_style_options.js +++ b/modules/ui/sections/map_style_options.js @@ -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); diff --git a/modules/ui/sections/validation_rules.js b/modules/ui/sections/validation_rules.js index ef0e9f561..8270e6e58 100644 --- a/modules/ui/sections/validation_rules.js +++ b/modules/ui/sections/validation_rules.js @@ -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') ); }