Мелочь

This commit is contained in:
2023-08-24 13:22:15 +06:00
parent 4aa9eaa9d3
commit f5fb0d08ad
4 changed files with 57 additions and 20 deletions

View File

@ -9,14 +9,14 @@ function trt(key)
if(val==null || val===undefined)
{
for(let item in g_translations) {
if(item.toLowerCase()==key.toLowerCase())
if(item.toLowerCase()==(''+key).toLowerCase())
{
val=g_translations[item];
break;
}
}
}
if(val==null || val===undefined) return key.replace(/_/g, ' ');
if(val==null || val===undefined) return (''+key).replace(/_/g, ' ');
else return val;
}
@ -1055,6 +1055,14 @@ function applyNodeToNode(first, second, name)
}
}
/*function applyObjectToObject(first, second, name){
if(first===null || second===null || name ===null){
console.error("first="+first+" second="+second+" name="+name);
return;
}
}*/
function escapeRegExp(str) {
return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
}