gettext js
This commit is contained in:
@ -61,7 +61,7 @@ class DBMSUser
|
||||
{
|
||||
if(findNode(node,'#cdata-section').nodeValue=="0") //if not logged
|
||||
{
|
||||
alert(_('Invalid_username_and_or_password'));
|
||||
alert(trt('Invalid_username_and_or_password'));
|
||||
}else
|
||||
{
|
||||
//location.reload();
|
||||
@ -76,7 +76,7 @@ class DBMSUser
|
||||
{
|
||||
//if(findNode(node,'#cdata-section').nodeValue=="1") //if register
|
||||
//{
|
||||
// alert(_('New_user_is_registered')+'\n'+_('The_password_has_been_sent_to_you_by_Email'));
|
||||
// alert(trt('New_user_is_registered')+'\n'+trt('The_password_has_been_sent_to_you_by_Email'));
|
||||
// location.reload();
|
||||
//}
|
||||
}
|
||||
@ -91,7 +91,7 @@ class DBMSUser
|
||||
{
|
||||
this.win=new TWin(true);
|
||||
this.win.BuildGUI(10,10);
|
||||
this.win.setCaption(_('Authorization'));
|
||||
this.win.setCaption(trt('Authorization'));
|
||||
|
||||
this.win.setSize("350px","200px");
|
||||
|
||||
@ -101,7 +101,7 @@ class DBMSUser
|
||||
<tr><td>\n\
|
||||
<table border="0" style="width: 100%; height: 100%;">\n\
|
||||
<tr>\n\
|
||||
<td style="padding: 2px; width: 30%; white-space: nowrap"><b>'+_('Login')+' (E-mail):</b></td>\n\
|
||||
<td style="padding: 2px; width: 30%; white-space: nowrap"><b>'+trt('Login')+' (E-mail):</b></td>\n\
|
||||
<td style="padding: 2px;"><input type="text" maxlength="50" style="width: 100%; padding: 2px; display: inline;" id="tcLogin'+this.uid+'" name="login"><br></td>\n\
|
||||
</tr>\n\
|
||||
<tr>\n\
|
||||
@ -111,7 +111,7 @@ class DBMSUser
|
||||
<tr>\n\
|
||||
<td style="padding: 2px;" colspan="2"><table cellspacing="0" cellpadding="0" border="0" style="width: 100%;"><tr><td><label for="save0" style="white-space: nowrap;"><input id="save_'+this.uid+'" type="checkbox" style="display: inline;" checked/> Remember (<a href="#" onclick="showRestoreForm();">Forgot your password?</a>)</label></td></tr></table></td>\n\
|
||||
</tr>\n\
|
||||
<tr><td colspan="2" style="text-align: right;"><input class="button-secondary" id="TLogin_E'+this.uid+'" type="button" style="display: inline;" value="'+_('Log_in')+'"></td></tr>\n\
|
||||
<tr><td colspan="2" style="text-align: right;"><input class="button-secondary" id="TLogin_E'+this.uid+'" type="button" style="display: inline;" value="'+trt('Log_in')+'"></td></tr>\n\
|
||||
</table>\n\
|
||||
</td></tr>\n\
|
||||
</tbody>\n\
|
||||
@ -241,7 +241,7 @@ class DBMSUser
|
||||
<tr><td>\n\
|
||||
<table border="0" style="width: 100%; height: 100%;">\n\
|
||||
<tr>\n\
|
||||
<td style="padding: 2px; width: 30%; white-space: nowrap"><b>'+_('Login')+' (E-mail):</b></td>\n\
|
||||
<td style="padding: 2px; width: 30%; white-space: nowrap"><b>'+trt('Login')+' (E-mail):</b></td>\n\
|
||||
<td style="padding: 2px;"><input type="text" maxlength="50" style="width: 100%; padding: 2px; display: inline;" id="tcLogin'+this.uid+'" name="login"><br></td>\n\
|
||||
</tr>\n\
|
||||
<tr>\n\
|
||||
@ -251,7 +251,7 @@ class DBMSUser
|
||||
<tr>\n\
|
||||
<td style="padding: 2px;" colspan="2"><table cellspacing="0" cellpadding="0" border="0" style="width: 100%;"><tr><td><label for="save0" style="white-space: nowrap;"><input id="save_'+this.uid+'" type="checkbox" style="display: inline;" checked/> Remember (<a href="#" onclick="showRestoreForm();">Forgot your password?</a>)</label></td></tr></table></td>\n\
|
||||
</tr>\n\
|
||||
<tr><td colspan="2" style="text-align: right;"><input class="button-secondary" id="TLogin_E'+this.uid+'" type="button" style="display: inline;" value="'+_('Log_in')+'"></td></tr>\n\
|
||||
<tr><td colspan="2" style="text-align: right;"><input class="button-secondary" id="TLogin_E'+this.uid+'" type="button" style="display: inline;" value="'+trt('Log_in')+'"></td></tr>\n\
|
||||
</table>\n\
|
||||
</td></tr>\n\
|
||||
</tbody>\n\
|
||||
@ -281,7 +281,7 @@ class DBMSUser
|
||||
var password=document.getElementById('tcPassword'+this.uid).value;
|
||||
if(login=='' || password=='')
|
||||
{ str="Not filled in the required fields: ";
|
||||
if(login=='') str+='"'+_('Login')+' (E-mail)"';
|
||||
if(login=='') str+='"'+trt('Login')+' (E-mail)"';
|
||||
if(login=='' && password=='') str+=', ';
|
||||
if(password=='') str+='"Password"';
|
||||
str+='!';
|
||||
@ -434,16 +434,16 @@ function showRestoreForm()
|
||||
{
|
||||
var win=new TWin(true);
|
||||
win.BuildGUI(10,10);
|
||||
win.setCaption(_("Password_recovery"));
|
||||
win.setCaption(trt("Password_recovery"));
|
||||
|
||||
str='<div id="TWin_DT_'+win.tWinId+'" style="width: 100%; height: 100%; padding: 4px; text-align: left;">\n\
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%; padding: 0px;">\n\
|
||||
<tr>\n\
|
||||
<td style="padding: 2px; white-space: nowrap"><b>'+_('Login')+' (E-mail)</b></td>\n\
|
||||
<td style="padding: 2px; white-space: nowrap"><b>'+trt('Login')+' (E-mail)</b></td>\n\
|
||||
<td style="padding: 2px;"><input type="text" maxlength="40" style="width: 100%; display: inline;" id="'+win.uid+'_email" name="login">\n\
|
||||
<table id="'+win.uid+'_phone" style="width: 100%; display: none;" cellpadding="0" cellspacing="0"><tr><td style="white-space: nowrap;"><b>+7 ( </b><input type="text" maxlength="3" onkeydown="this.value = this.value.replace(/[^0-9]/g, \'\')" onkeyup="this.value = this.value.replace(/[^0-9]/g, \'\')" style="width: 35px; display: inline;" id="'+win.uid+'_phone0" value=""><b> ) </b></td><td style="width: 90%;"><input type="text" onkeydown="this.value = this.value.replace(/[^0-9]/g, \'\')" onkeyup="this.value = this.value.replace(/[^0-9]/g, \'\')" maxlength="7" style="width: 100%;display: inline;" id="'+win.uid+'_phone1" value=""></td></tr></table><br></td>\n\
|
||||
</tr>\n\
|
||||
<tr><td colspan="2" style="text-align: right; padding: 2px;"><input class="button-secondary" id="'+win.uid+'_restore" type="button" style="display: inline;" value="'+_('Restore')+'"></td></tr>\n\
|
||||
<tr><td colspan="2" style="text-align: right; padding: 2px;"><input class="button-secondary" id="'+win.uid+'_restore" type="button" style="display: inline;" value="'+trt('Restore')+'"></td></tr>\n\
|
||||
</table>\n\
|
||||
</td></tr>\n\
|
||||
</div>';
|
||||
@ -471,8 +471,8 @@ function showRestoreForm()
|
||||
|
||||
var em=document.getElementById(win.uid+'_email').value;
|
||||
|
||||
if(em==''){ document.getElementById(win.uid+'_email').select(); alert(_('Not_filled_Email_address')); win.hideProgressBar(); return; }
|
||||
if(! isEmail(em)){ document.getElementById(win.uid+'_email').select(); alert(_('Please_enter_a_valid_email_address')); win.hideProgressBar(); return; }
|
||||
if(em==''){ document.getElementById(win.uid+'_email').select(); alert(trt('Not_filled_Email_address')); win.hideProgressBar(); return; }
|
||||
if(! isEmail(em)){ document.getElementById(win.uid+'_email').select(); alert(trt('Please_enter_a_valid_email_address')); win.hideProgressBar(); return; }
|
||||
|
||||
//Send AJAX reqwest to server
|
||||
var xml='<?xml version="1.0" encoding="utf-8"?>\
|
||||
@ -495,12 +495,12 @@ function showRestoreForm()
|
||||
//загрузился xml документ начинаем его разбирать (по id функции в документе)
|
||||
var xmldoc = xmlHttpRequest.responseXML
|
||||
if(xmldoc==null) {
|
||||
alert2(_('Alert'), _('Wrong_XML_document') + "!\n" + xmlHttpRequest.responseText);
|
||||
alert2(trt('Alert'), trt('Wrong_XML_document') + "!\n" + xmlHttpRequest.responseText);
|
||||
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));
|
||||
@ -518,7 +518,7 @@ function showRestoreForm()
|
||||
}
|
||||
}else
|
||||
{
|
||||
if(confirm(_('Failed_to_get_data')+"\n URL: "+url+"\n"+xmlHttpRequest.statusText+"\nRedo the request?"))
|
||||
if(confirm(trt('Failed_to_get_data')+"\n URL: "+url+"\n"+xmlHttpRequest.statusText+"\nRedo the request?"))
|
||||
{
|
||||
var call=new myXMLHttpRequest(this);
|
||||
call.callServer(url,xmlString);
|
||||
|
||||
Reference in New Issue
Block a user