gettext js

This commit is contained in:
2020-08-13 23:29:29 +06:00
parent e56556f8d4
commit 643b6850df
4 changed files with 51 additions and 51 deletions

View File

@ -178,7 +178,7 @@ function alert2(title,text)
</tr>\n\
<tr style="height: 10px;">\n\
<td style="width: 100%;">&nbsp;</td>\n\
<td><button class="button-secondary" id="'+win.uid+'_close" style="width: 80px;">'+_('OK')+'</button></td>\n\
<td><button class="button-secondary" id="'+win.uid+'_close" style="width: 80px;">'+trt('OK')+'</button></td>\n\
</tr>\n\
</table>';
@ -205,8 +205,8 @@ function confirm2(title,text,okFunc,cancelFunc)
</tr>\n\
<tr style="height: 10px;">\n\
<td style="width: 100%;">&nbsp;</td>\n\
<td><button class="button-secondary" id="'+win.uid+'_ok" style="width: 80px;">'+_('OK')+'</button></td>\n\
\<td><button class="button-secondary" id="'+win.uid+'_cancel" style="width: 80px;">'+_('Cancel')+'</button></td>\n\
<td><button class="button-secondary" id="'+win.uid+'_ok" style="width: 80px;">'+trt('OK')+'</button></td>\n\
\<td><button class="button-secondary" id="'+win.uid+'_cancel" style="width: 80px;">'+trt('Cancel')+'</button></td>\n\
</tr>\n\
</table>';
@ -982,12 +982,12 @@ class TRequest
//загрузился xml документ начинаем его разбирать (по id функции в документе)
var xmldoc = xmlHttpRequest.responseXML;
if(xmldoc==null){
alert2(_('Alert'),_('Wrong_XML_document')+"!\nXML=("+xmlHttpRequest.responseText+')\nURL=('+url+')\nxmlString=('+xmlString+')');
alert2(trt('Alert'),trt('Wrong_XML_document')+"!\nXML=("+xmlHttpRequest.responseText+')\nURL=('+url+')\nxmlString=('+xmlString+')');
return;
}
var node = xmldoc.documentElement;
if((node==null)||(node.getAttribute("fn")==null)) alert(_('Error')+"\n"+_('No_data')+"!\n"+xmlHttpRequest.responseText);
if((node==null)||(node.getAttribute("fn")==null)) alert(trt('Error')+"\n"+trt('No_data')+"!\n"+xmlHttpRequest.responseText);
else
{
//alert("XML=\n"+getXMLNodeSerialisation(node));
@ -1006,7 +1006,7 @@ class TRequest
}
}else
{
if(confirm(_('Failed_to_get_data')+"\n URL: "+url+"\n"+xmlHttpRequest.statusText+"\nПовторить запрос?"))
if(confirm(trt('Failed_to_get_data')+"\n URL: "+url+"\n"+xmlHttpRequest.statusText+"\nПовторить запрос?"))
{
this.callServer(url,xmlString);
};