Handle i18n of profile parameters
This commit is contained in:
parent
aa6d13025c
commit
39b7dd4a0a
1 changed files with 11 additions and 2 deletions
|
|
@ -159,10 +159,19 @@ BR.Profile = L.Evented.extend({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
label.appendChild(input);
|
label.appendChild(input);
|
||||||
label.append(' ' + param);
|
var name = i18next.exists('profileParameters.' + param + '.name')
|
||||||
|
? i18next.t('profileParameters.' + param + '.name')
|
||||||
|
: param;
|
||||||
|
label.append(' ' + name);
|
||||||
|
|
||||||
div.appendChild(label);
|
div.appendChild(label);
|
||||||
|
|
||||||
var small = document.createElement('small');
|
var small = document.createElement('small');
|
||||||
small.innerHTML = ' (' + params[param].description.replace(/^\s+|\s+$/g, '') + ')';
|
var description = i18next.exists('profileParameters.' + param + '.description')
|
||||||
|
? i18next.t('profileParameters.' + param + '.description')
|
||||||
|
: params[param].description.replace(/^\s+|\s+$/g, '');
|
||||||
|
small.innerHTML = ' (' + description + ')';
|
||||||
|
|
||||||
div.appendChild(small);
|
div.appendChild(small);
|
||||||
paramsSection.appendChild(div);
|
paramsSection.appendChild(div);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue