Give a warning & return if you try to translate an object

This commit is contained in:
Nathan Gray 2012-03-26 23:24:56 +00:00
parent e330a7bfdc
commit 3aa8e64f73

View File

@ -48,6 +48,11 @@ egw.extend('lang', egw.MODULE_GLOBAL, function() {
*/
lang: function(_msg, _arg1)
{
if(typeof _msg !== "string")
{
egw().debug("warn", "Cannot translate an object", _msg);
return _msg;
}
var translation = _msg;
_msg = _msg.toLowerCase();