diff --git a/css/80_app.css b/css/80_app.css index 0238d3b4c..d50f3a1d3 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -2024,13 +2024,13 @@ a.hide-toggle { } .restriction-control input, -.restriction-control span { +.restriction-control > span { display: table-cell; text-align: start; padding: 0px 5px; } -.restriction-control span.restriction-control-label { +.restriction-control > span.restriction-control-label { text-align: end; } diff --git a/modules/ui/field_help.js b/modules/ui/field_help.js index 2f4d35dda..ab8cdad4b 100644 --- a/modules/ui/field_help.js +++ b/modules/ui/field_help.js @@ -55,8 +55,8 @@ export function uiFieldHelp(context, fieldName) { var fieldHelpHeadings = {}; var replacements = { - distField: t('restriction.controls.distance'), - viaField: t('restriction.controls.via'), + distField: t.html('restriction.controls.distance'), + viaField: t.html('restriction.controls.via'), fromShadow: icon('#iD-turn-shadow', 'inline shadow from'), allowShadow: icon('#iD-turn-shadow', 'inline shadow allow'), restrictShadow: icon('#iD-turn-shadow', 'inline shadow restrict'), @@ -74,12 +74,12 @@ export function uiFieldHelp(context, fieldName) { var subkey = helpkey + '.' + part; var depth = fieldHelpHeadings[subkey]; // is this subkey a heading? var hhh = depth ? Array(depth + 1).join('#') + ' ' : ''; // if so, prepend with some ##'s - return all + hhh + t(subkey, replacements) + '\n\n'; + return all + hhh + t.html(subkey, replacements) + '\n\n'; }, ''); return { key: helpkey, - title: t(helpkey + '.title'), + title: t.html(helpkey + '.title'), html: marked(text.trim()) }; }); diff --git a/modules/ui/fields/restrictions.js b/modules/ui/fields/restrictions.js index 6f3bd4a02..4efca8927 100644 --- a/modules/ui/fields/restrictions.js +++ b/modules/ui/fields/restrictions.js @@ -497,21 +497,21 @@ export function uiFieldRestrictions(field, context) { } else if (datum instanceof osmTurn) { var restrictionType = osmInferRestriction(vgraph, datum, projection); var turnType = restrictionType.replace(/^(only|no)\_/, ''); - var indirect = (datum.direct === false ? t('restriction.help.indirect') : ''); + var indirect = (datum.direct === false ? t.html('restriction.help.indirect') : ''); var klass, turnText, nextText; if (datum.no) { klass = 'restrict'; - turnText = t('restriction.help.turn.no_' + turnType, { indirect: indirect }); - nextText = t('restriction.help.turn.only_' + turnType, { indirect: '' }); + turnText = t.html('restriction.help.turn.no_' + turnType, { indirect: indirect }); + nextText = t.html('restriction.help.turn.only_' + turnType, { indirect: '' }); } else if (datum.only) { klass = 'only'; - turnText = t('restriction.help.turn.only_' + turnType, { indirect: indirect }); - nextText = t('restriction.help.turn.allowed_' + turnType, { indirect: '' }); + turnText = t.html('restriction.help.turn.only_' + turnType, { indirect: indirect }); + nextText = t.html('restriction.help.turn.allowed_' + turnType, { indirect: '' }); } else { klass = 'allow'; - turnText = t('restriction.help.turn.allowed_' + turnType, { indirect: indirect }); - nextText = t('restriction.help.turn.no_' + turnType, { indirect: '' }); + turnText = t.html('restriction.help.turn.allowed_' + turnType, { indirect: indirect }); + nextText = t.html('restriction.help.turn.no_' + turnType, { indirect: '' }); } help @@ -596,14 +596,14 @@ export function uiFieldRestrictions(field, context) { opts = { distance: t('units.meters', { quantity: maxDist }) }; } - return t('restriction.controls.distance_up_to', opts); + return t.html('restriction.controls.distance_up_to', opts); } function displayMaxVia(maxVia) { - return maxVia === 0 ? t('restriction.controls.via_node_only') - : maxVia === 1 ? t('restriction.controls.via_up_to_one') - : t('restriction.controls.via_up_to_two'); + return maxVia === 0 ? t.html('restriction.controls.via_node_only') + : maxVia === 1 ? t.html('restriction.controls.via_up_to_one') + : t.html('restriction.controls.via_up_to_two'); }