mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Include lang attribute in field labels
This commit is contained in:
@@ -23,7 +23,8 @@ export function presetField(fieldID, field) {
|
||||
_this.t = (scope, options) => t(`presets.fields.${fieldID}.${scope}`, options);
|
||||
_this.t.html = (scope, options) => t.html(`presets.fields.${fieldID}.${scope}`, options);
|
||||
|
||||
_this.label = () => _this.overrideLabel || _this.t('label', { 'default': fieldID });
|
||||
_this.title = () => _this.overrideLabel || _this.t('label', { 'default': fieldID });
|
||||
_this.label = () => _this.overrideLabel || _this.t.html('label', { 'default': fieldID });
|
||||
|
||||
const _placeholder = _this.placeholder;
|
||||
_this.placeholder = () => _this.t('placeholder', { 'default': _placeholder });
|
||||
|
||||
@@ -52,16 +52,16 @@ export function uiFormFields(context) {
|
||||
|
||||
var titles = [];
|
||||
var moreFields = notShown.map(function(field) {
|
||||
var label = field.label();
|
||||
titles.push(label);
|
||||
var title = field.title();
|
||||
titles.push(title);
|
||||
|
||||
var terms = field.terms();
|
||||
if (field.key) terms.push(field.key);
|
||||
if (field.keys) terms = terms.concat(field.keys);
|
||||
|
||||
return {
|
||||
title: label,
|
||||
value: label,
|
||||
title: title,
|
||||
value: title,
|
||||
field: field,
|
||||
terms: terms
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user