gettext
This commit is contained in:
@ -139,8 +139,8 @@ class EdtRec
|
||||
str+=' <caption><b id="caption'+this.uid+'"></b></caption>';
|
||||
str+=' <thead>';
|
||||
str+=' <tr bgcolor="#dadada">';
|
||||
str+=' <th width="20%">'+_('Name')+'</th>';
|
||||
str+=' <th width="80%">'+_('Value')+'</th>';
|
||||
str+=' <th width="20%">'+trt('Name')+'</th>';
|
||||
str+=' <th width="80%">'+trt('Value')+'</th>';
|
||||
str+=' </tr>';
|
||||
str+=' </thead>';
|
||||
str+=' <tbody></tbody>';
|
||||
@ -379,11 +379,11 @@ class EdtRec
|
||||
select.appendChild( option );
|
||||
option = document.createElement("option");
|
||||
option.setAttribute("value","1");
|
||||
option.appendChild(document.createTextNode(_('Yes')));
|
||||
option.appendChild(document.createTextNode(trt('Yes')));
|
||||
select.appendChild( option );
|
||||
option = document.createElement("option");
|
||||
option.setAttribute("value","0");
|
||||
option.appendChild(document.createTextNode(_('Not')));
|
||||
option.appendChild(document.createTextNode(trt('Not')));
|
||||
select.appendChild( option );
|
||||
}else
|
||||
{
|
||||
@ -406,7 +406,7 @@ class EdtRec
|
||||
if(vt=="i4")
|
||||
{
|
||||
|
||||
//alert2(_('Alert'),"prop name = "+nodeProp.getAttribute("n"));
|
||||
//alert2(trt('Alert'),"prop name = "+nodeProp.getAttribute("n"));
|
||||
|
||||
//If there is a node "list" with the elements "CheckBox" then create them.
|
||||
var opt=findNode(nodeProp, "options");
|
||||
@ -456,7 +456,7 @@ class EdtRec
|
||||
button.className='button-secondary';
|
||||
button.setAttribute("type","button");
|
||||
button.setAttribute("value","+");
|
||||
button.setAttribute("title",_("Increase_by_1"));
|
||||
button.setAttribute("title",trt("Increase_by_1"));
|
||||
button.style.cssText="height:100%;width:22px;margin:0px;padding:0px;";
|
||||
button.onclick=function(inp){return function(){inp.value=getIntVal(inp.value)+1;}}(input);
|
||||
|
||||
@ -466,7 +466,7 @@ class EdtRec
|
||||
button.className='button-secondary';
|
||||
button.setAttribute("type","button");
|
||||
button.setAttribute("value","-");
|
||||
button.setAttribute("title",_("Decrease_by_1"));
|
||||
button.setAttribute("title",trt("Decrease_by_1"));
|
||||
button.style.cssText="height:100%;width:22px;margin:0px;padding:0px;";
|
||||
button.onclick=function(inp){return function(){inp.value=getIntVal(inp.value)-1;}}(input);
|
||||
newCell3.appendChild( button );
|
||||
@ -657,7 +657,7 @@ class EdtRec
|
||||
btnSel.className='button-secondary';
|
||||
btnSel.setAttribute("type","button");
|
||||
btnSel.setAttribute("value","...");
|
||||
btnSel.setAttribute("title",_('Upload'));
|
||||
btnSel.setAttribute("title",trt('Upload'));
|
||||
|
||||
btnSel.style.cssText="width:30px;font-size:9pt;margin:0px;padding:0px;";
|
||||
newCell2.appendChild(btnSel);
|
||||
@ -666,13 +666,13 @@ class EdtRec
|
||||
button2.className='button-secondary';
|
||||
button2.setAttribute("type","button");
|
||||
button2.setAttribute("value","X");
|
||||
button2.setAttribute("title",_('Delete'));
|
||||
button2.setAttribute("title",trt('Delete'));
|
||||
button2.style.cssText="height:22px;width:22px;margin:0px;padding:0px;";
|
||||
button2.onclick=function(inp,ifr){return function(){ inp.value=''; getIframeDocument(ifr).forms["form"].reset(); }}(input,ifr);
|
||||
newCell3.appendChild(button2);
|
||||
|
||||
//Download button
|
||||
newCell4.innerHTML='<form action="'+ScriptDName+'" method="get" style="display:inline;" target="_blank"><input type="hidden" name="fn" value="10"/><input type="hidden" name="n" value="'+nodeProp.getAttribute('cd')+'"/><input type="hidden" name="t" value="'+nodeType.getAttribute('n')+'"/><input type="hidden" name="f" value="'+nodeProp.getAttribute('n')+'"/><input type="hidden" name="i" value="'+record_id+'"/><input class="button-secondary" style="height:22px;width:22px;" type="submit" title="'+_('Download')+'" value="D" /></form>'
|
||||
newCell4.innerHTML='<form action="'+ScriptDName+'" method="get" style="display:inline;" target="_blank"><input type="hidden" name="fn" value="10"/><input type="hidden" name="n" value="'+nodeProp.getAttribute('cd')+'"/><input type="hidden" name="t" value="'+nodeType.getAttribute('n')+'"/><input type="hidden" name="f" value="'+nodeProp.getAttribute('n')+'"/><input type="hidden" name="i" value="'+record_id+'"/><input class="button-secondary" style="height:22px;width:22px;" type="submit" title="'+trt('Download')+'" value="D" /></form>'
|
||||
|
||||
td2.appendChild( tbl_b );
|
||||
|
||||
@ -768,7 +768,7 @@ class EdtRec
|
||||
var td = document.createElement('td');
|
||||
td.style.cssText="padding: 5px; vertical-align: bottom;";
|
||||
td.setAttribute("colspan", "2");
|
||||
if (this.record_id==-1) td.innerHTML='<label style="float: left; white-space: nowrap;"><input id="readd_'+this.uid+'" type="checkbox"> '+_('Repeat_the_addition_of_the_entry')+'</label>';
|
||||
if (this.record_id==-1) td.innerHTML='<label style="float: left; white-space: nowrap;"><input id="readd_'+this.uid+'" type="checkbox"> '+trt('Repeat_the_addition_of_the_entry')+'</label>';
|
||||
tr.appendChild(td);
|
||||
//var td = document.createElement('td');
|
||||
td.setAttribute("align","right");
|
||||
@ -776,7 +776,7 @@ class EdtRec
|
||||
button.className='button-secondary';
|
||||
button.setAttribute("type","button");
|
||||
button.style.cssText="margin:0px;margin-right:1px;";
|
||||
button.setAttribute("value",_('Apply'));
|
||||
button.setAttribute("value",trt('Apply'));
|
||||
button.onclick=function(thiz){
|
||||
return function(){
|
||||
thiz.sendData();
|
||||
@ -788,8 +788,8 @@ class EdtRec
|
||||
button.setAttribute("type","button");
|
||||
button.className='button-secondary';
|
||||
button.style.cssText="margin:0px;";
|
||||
button.setAttribute("value",_('Cancel'));
|
||||
//button.onclick=function f_exit(this) { alert2(_('Alert'),this.win.div); }
|
||||
button.setAttribute("value",trt('Cancel'));
|
||||
//button.onclick=function f_exit(this) { alert2(trt('Alert'),this.win.div); }
|
||||
button.onclick=function(thiz){ return function(){thiz.win.Close();};}(this);
|
||||
td.appendChild( button );
|
||||
tr.appendChild(td);
|
||||
@ -798,13 +798,13 @@ class EdtRec
|
||||
//Height adjust the height of the page
|
||||
//this.win.div.style.width="400px"
|
||||
//this.win.div.style.height="100px"
|
||||
//alert2(_('Alert'),document.documentElement.scrollTop)
|
||||
//alert2(_('Alert'),document.documentElement.clientHeight)
|
||||
//alert2(trt('Alert'),document.documentElement.scrollTop)
|
||||
//alert2(trt('Alert'),document.documentElement.clientHeight)
|
||||
|
||||
this.win.setHeight(eTable.offsetHeight+40); //this.win.div.style.height=(eTable.offsetHeight+40)+"px";
|
||||
|
||||
//alert2(_('Alert'),this.win.div.style.width)
|
||||
//alert2(_('Alert'),this.win.div.style.height)
|
||||
//alert2(trt('Alert'),this.win.div.style.width)
|
||||
//alert2(trt('Alert'),this.win.div.style.height)
|
||||
|
||||
|
||||
this.win.setCenter();
|
||||
@ -1115,7 +1115,7 @@ class EdtRec
|
||||
nodeProp=nodeProp.nextSibling;
|
||||
}
|
||||
|
||||
if(count==0) alert2(_('Alert'),_("No_results_were_found_for_your_search"));
|
||||
if(count==0) alert2(trt('Alert'),trt("No_results_were_found_for_your_search"));
|
||||
else
|
||||
if(count==1) //1 item has been selected, fill in the field.
|
||||
{
|
||||
@ -1153,7 +1153,7 @@ class EdtRec
|
||||
var win=new TWin();
|
||||
win.BuildGUI(pageX-280,pageY-7);
|
||||
win.setContent(htmlString);
|
||||
win.setCaption(document.createTextNode(_("Selection")));
|
||||
win.setCaption(document.createTextNode(trt("Selection")));
|
||||
win.setParent(this.win);
|
||||
//win.obj=this
|
||||
}
|
||||
@ -1161,10 +1161,10 @@ class EdtRec
|
||||
};
|
||||
|
||||
applyReq(req,fn,node,xmldoc,win)
|
||||
{ //alert2(_('Alert'),"erec XML=\n"+getXMLNodeSerialisation(node));
|
||||
{ //alert2(trt('Alert'),"erec XML=\n"+getXMLNodeSerialisation(node));
|
||||
if (fn==-1)
|
||||
{
|
||||
alert2(_('Alert'),findFirstNode(node,'#cdata-section').nodeValue);
|
||||
alert2(trt('Alert'),findFirstNode(node,'#cdata-section').nodeValue);
|
||||
//this.pBarCnt=0;
|
||||
this.hideProgressBar();
|
||||
}else
|
||||
@ -1204,7 +1204,7 @@ class EdtRec
|
||||
this.setData(node);
|
||||
}else
|
||||
{
|
||||
alert2(_('Alert'),"Unknown function! fn=\""+fn+"\"" );
|
||||
alert2(trt('Alert'),"Unknown function! fn=\""+fn+"\"" );
|
||||
this.hideProgressBar();
|
||||
}
|
||||
};
|
||||
@ -1230,7 +1230,7 @@ class EdtRec
|
||||
}
|
||||
}else
|
||||
{
|
||||
alert2(_('Alert'),'Field "'+prop_id+'" not find!');
|
||||
alert2(trt('Alert'),'Field "'+prop_id+'" not find!');
|
||||
}
|
||||
};
|
||||
|
||||
@ -1242,7 +1242,7 @@ class EdtRec
|
||||
//filterName - filter name
|
||||
callFilterVal(typeName,name,value,htmlid,filterName)
|
||||
{
|
||||
//alert2(_('Alert')," typeName="+typeName+" name="+name+" value="+value+" htmlid="+htmlid);
|
||||
//alert2(trt('Alert')," typeName="+typeName+" name="+name+" value="+value+" htmlid="+htmlid);
|
||||
if(value!="")
|
||||
{
|
||||
var xml='<?xml version="1.0" encoding="utf-8"?><metadata fn="6"><type n="'+typeName+'" c="'+name+'" pn="'+htmlid+'"><objects-list><filter>';
|
||||
@ -1274,8 +1274,8 @@ class EdtRec
|
||||
{
|
||||
var nProps1=findFirstNode(node, 'properties')
|
||||
var nProps2=findFirstNode(this.nodeMetadata, 'properties') //Since the values came in abbreviated XML
|
||||
if(nProps1==null){ alert2(_('Alert'),'Error, node='+getXMLNodeSerialisation(node)); return; }
|
||||
if(nProps2==null){ alert2(_('Alert'),'Error, nodeMetadata='+getXMLNodeSerialisation(this.nodeMetadata)); return; }
|
||||
if(nProps1==null){ alert2(trt('Alert'),'Error, node='+getXMLNodeSerialisation(node)); return; }
|
||||
if(nProps2==null){ alert2(trt('Alert'),'Error, nodeMetadata='+getXMLNodeSerialisation(this.nodeMetadata)); return; }
|
||||
var nProp1=nProps1.firstChild
|
||||
while(nProp1!=null)
|
||||
{
|
||||
@ -1406,7 +1406,7 @@ class EdtRec
|
||||
//Проверяю тип дпнных и заполненость полей
|
||||
if (!this.checkData(value,nodeProp.getAttribute("vt"),nodeProp.getAttribute("maybenull")))
|
||||
{
|
||||
alert2(_('Alert'),_("The_field_data_is_incorrect")+" \""+nodeProp.getAttribute("d")+"\"=\""+value+"\"!");
|
||||
alert2(trt('Alert'),trt("The_field_data_is_incorrect")+" \""+nodeProp.getAttribute("d")+"\"=\""+value+"\"!");
|
||||
return;
|
||||
}
|
||||
s+=' <prop n="'+nodeProp.getAttribute("n")+'"><![CDATA['+value+']]></prop>\n';
|
||||
@ -1416,7 +1416,7 @@ class EdtRec
|
||||
s+=' </properties>\n';
|
||||
s+='</type>\n';
|
||||
s+='</metadata>';
|
||||
//alert2(_('Alert'),s);
|
||||
//alert2(trt('Alert'),s);
|
||||
if(this.request.callServer(ScriptName,s,true))
|
||||
{
|
||||
this.showProgressBar();
|
||||
@ -1451,7 +1451,7 @@ class EdtRec
|
||||
//inserting the selected record
|
||||
setPropVal(id,caption,prop_id)
|
||||
{
|
||||
//alert2(_('Alert'),"id="+id+" caption="+caption+" prop_id="+prop_id)
|
||||
//alert2(trt('Alert'),"id="+id+" caption="+caption+" prop_id="+prop_id)
|
||||
var prop=document.getElementById("prop_"+this.uid+"_"+prop_id);
|
||||
var propvis=document.getElementById("prop_"+this.uid+"_"+prop_id+"_visible");
|
||||
if ((prop!=null)&&(propvis!=null))
|
||||
@ -1477,9 +1477,9 @@ class EdtRec
|
||||
|
||||
let readd=document.getElementById("readd_"+this.uid);
|
||||
if(readd!==null && readd.checked){
|
||||
//if(!confirm(_("Successfully_added_data")+".\n"+_("Add_more")+"?")) this.win.Close();
|
||||
//if(!confirm(trt("Successfully_added_data")+".\n"+trt("Add_more")+"?")) this.win.Close();
|
||||
|
||||
confirm2(_('Warning'),_("Successfully_added_data")+"<br>"+_("Add_more")+"?",null,function(thiz){return function(){thiz.win.Close();};}(this));
|
||||
confirm2(trt('Warning'),trt("Successfully_added_data")+"<br>"+trt("Add_more")+"?",null,function(thiz){return function(){thiz.win.Close();};}(this));
|
||||
|
||||
|
||||
}else
|
||||
|
||||
Reference in New Issue
Block a user