Fix translate hr/doctype/leave_application/leave_application.js

This commit is contained in:
Bárbara Perretti 2013-10-07 16:22:21 -03:00
parent 28181d3384
commit f70e3aabcb

View File

@ -31,14 +31,14 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
}
cur_frm.set_intro("");
if(doc.__islocal && !in_list(user_roles, "HR User")) {
cur_frm.set_intro("Fill the form and save it")
cur_frm.set_intro(wn._("Fill the form and save it"))
} else {
if(doc.docstatus==0 && doc.status=="Open") {
if(user==doc.leave_approver) {
cur_frm.set_intro("You are the Leave Approver for this record. Please Update the 'Status' and Save");
cur_frm.set_intro(wn._("You are the Leave Approver for this record. Please Update the 'Status' and Save"));
cur_frm.toggle_enable("status", true);
} else {
cur_frm.set_intro("This Leave Application is pending approval. Only the Leave Apporver can update status.")
cur_frm.set_intro(wn._("This Leave Application is pending approval. Only the Leave Apporver can update status."))
cur_frm.toggle_enable("status", false);
if(!doc.__islocal) {
if(cur_frm.frm_head.appframe.buttons.Submit)
@ -47,12 +47,12 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
}
} else {
if(doc.status=="Approved") {
cur_frm.set_intro("Leave application has been approved.");
cur_frm.set_intro(wn._("Leave application has been approved."));
if(cur_frm.doc.docstatus==0) {
cur_frm.set_intro("Please submit to update Leave Balance.");
cur_frm.set_intro(wn._("Please submit to update Leave Balance."));
}
} else if(doc.status=="Rejected") {
cur_frm.set_intro("Leave application has been rejected.");
cur_frm.set_intro(wn._("Leave application has been rejected."));
}
}
}
@ -86,7 +86,7 @@ cur_frm.cscript.from_date = function(doc, dt, dn) {
cur_frm.cscript.to_date = function(doc, dt, dn) {
if(cint(doc.half_day) == 1 && cstr(doc.from_date) && doc.from_date != doc.to_date){
msgprint("To Date should be same as From Date for Half Day leave");
msgprint(wn._("To Date should be same as From Date for Half Day leave"));
set_multiple(dt,dn,{to_date:doc.from_date});
}
cur_frm.cscript.calculate_total_days(doc, dt, dn);