mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-24 00:54:03 +02:00
Make t function return a span element with a lang attribute unless html: false is specified in the options (re: #7963)
Update `text` functions to `html` to support inserting the `span` elements Specify `html: false` for various instances where a `span` is not desired, e.g. `placeholder` and `title` attributes
This commit is contained in:
@@ -31,7 +31,7 @@ export function uiSourceSwitch(context) {
|
||||
context.flush(); // remove stored data
|
||||
|
||||
d3_select(this)
|
||||
.text(isLive ? t('source_switch.live') : t('source_switch.dev'))
|
||||
.html(isLive ? t('source_switch.live') : t('source_switch.dev'))
|
||||
.classed('live', isLive)
|
||||
.classed('chip', isLive);
|
||||
|
||||
@@ -42,7 +42,7 @@ export function uiSourceSwitch(context) {
|
||||
selection
|
||||
.append('a')
|
||||
.attr('href', '#')
|
||||
.text(t('source_switch.live'))
|
||||
.html(t('source_switch.live'))
|
||||
.attr('class', 'live chip')
|
||||
.on('click', click);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user