allow statustext to contain multiple translated sub-strings eg: {Firstname}.{Lastname}

as we do for options already.
This allows to preserve existing translations, while adding further stuff
This commit is contained in:
Ralf Becker 2019-04-19 10:17:09 +02:00
parent b9470e8594
commit aad4db1617

View File

@ -267,6 +267,16 @@ var et2_baseWidget = (function(){ "use strict"; return et2_DOMWidget.extend(et2_
return;
}
// allow statustext to contain multiple translated sub-strings eg: {Firstname}.{Lastname}
if (_value.indexOf('{') !== -1)
{
var egw = this.egw();
_value = _value.replace(/{([^}]+)}/g, function(str,p1)
{
return egw.lang(p1);
});
}
this.statustext = _value;
//Get the domnode the tooltip should be attached to