Merge branch 'i18n' of git://github.com/bperretti/erpnext into bperretti-i18n

This commit is contained in:
Nabin Hait
2013-10-24 11:40:32 +05:30
112 changed files with 677 additions and 617 deletions

View File

@@ -45,7 +45,7 @@ cur_frm.cscript.score = function(doc,cdt,cdn){
var d = locals[cdt][cdn];
if (d.score){
if (flt(d.score) > 5) {
msgprint("Score must be less than or equal to 5");
msgprint(wn._("Score must be less than or equal to 5"));
d.score = 0;
refresh_field('score', d.name, 'appraisal_details');
}

View File

@@ -21,7 +21,7 @@ erpnext.hr.EmployeeController = wn.ui.form.Controller.extend({
var me = this;
erpnext.hide_naming_series();
if(!this.frm.doc.__islocal) {
cur_frm.add_custom_button('Make Salary Structure', function() {
cur_frm.add_custom_button(wn._('Make Salary Structure'), function() {
me.make_salary_structure(this); });
}
},

View File

@@ -93,28 +93,28 @@ cur_frm.cscript.refresh = function(doc,cdt,cdn){
cur_frm.savesubmit();
if(doc.docstatus==1 && wn.model.can_create("Journal Voucher"))
cur_frm.add_custom_button("Make Bank Voucher", cur_frm.cscript.make_bank_voucher);
cur_frm.add_custom_button(wn._("Make Bank Voucher"), cur_frm.cscript.make_bank_voucher);
}
}
cur_frm.cscript.set_help = function(doc) {
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.approval_status=="Draft") {
if(user==doc.exp_approver) {
cur_frm.set_intro("You are the Expense Approver for this record. \
Please Update the 'Status' and Save");
cur_frm.set_intro(wn._("You are the Expense Approver for this record. \
Please Update the 'Status' and Save"));
} else {
cur_frm.set_intro("Expense Claim is pending approval. \
Only the Expense Approver can update status.");
cur_frm.set_intro(wn._("Expense Claim is pending approval. \
Only the Expense Approver can update status."));
}
} else {
if(doc.approval_status=="Approved") {
cur_frm.set_intro("Expense Claim has been approved.");
cur_frm.set_intro(wn._("Expense Claim has been approved."));
} else if(doc.approval_status=="Rejected") {
cur_frm.set_intro("Expense Claim has been rejected.");
cur_frm.set_intro(wn._("Expense Claim has been rejected."));
}
}
}

View File

@@ -7,8 +7,8 @@ cur_frm.cscript = {
onload: function(doc, dt, dn) {
if(in_list(user_roles,'System Manager')) {
cur_frm.footer.help_area.innerHTML = '<hr>\
<p><a href="#Form/Jobs Email Settings">Jobs Email Settings</a><br>\
<span class="help">Automatically extract Job Applicants from a mail box e.g. "jobs@example.com"</span></p>';
<p><a href="#Form/Jobs Email Settings">'+wn._("Jobs Email Settings")+'</a><br>\
<span class="help">'+wn._('Automatically extract Job Applicants from a mail box ')+'e.g. "jobs@example.com"</span></p>';
}
},
refresh: function(doc) {

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);

View File

@@ -15,7 +15,7 @@ cur_frm.cscript.to_date = function(doc, cdt, cdn) {
function(r, rt) {
var doc = locals[cdt][cdn];
if (r.message) {
alert("To date cannot be before from date");
alert(wn._("To date cannot be before from date"));
doc.to_date = '';
refresh_field('to_date');
}

View File

@@ -5,7 +5,7 @@ var display_activity_log = function(msg) {
if(!pscript.ss_html)
pscript.ss_html = $a(cur_frm.fields_dict['activity_log'].wrapper,'div');
pscript.ss_html.innerHTML =
'<div class="panel"><div class="panel-heading">Activity Log:</div>'+msg+'</div>';
'<div class="panel"><div class="panel-heading">'+wn._("Activity Log:")+'</div>'+msg+'</div>';
}
//Create salary slip
@@ -23,7 +23,7 @@ cur_frm.cscript.create_salary_slip = function(doc, cdt, cdn) {
//Submit salary slip
//-----------------------
cur_frm.cscript.submit_salary_slip = function(doc, cdt, cdn) {
var check = confirm("Do you really want to Submit all Salary Slip for month : " + doc.month+" and fiscal year : "+doc.fiscal_year);
var check = confirm(wn._("Do you really want to Submit all Salary Slip for month : ") + doc.month+ wn._(" and fiscal year : ")+doc.fiscal_year);
if(check){
var callback = function(r, rt){
if (r.message)
@@ -49,7 +49,7 @@ cur_frm.cscript.make_jv = function(doc, dt, dn) {
var jv = wn.model.make_new_doc_and_get_name('Journal Voucher');
jv = locals['Journal Voucher'][jv];
jv.voucher_type = 'Bank Voucher';
jv.user_remark = 'Payment of salary for the month: ' + doc.month + 'and fiscal year: ' + doc.fiscal_year;
jv.user_remark = wn._('Payment of salary for the month: ') + doc.month + wn._('and fiscal year: ') + doc.fiscal_year;
jv.fiscal_year = doc.fiscal_year;
jv.company = doc.company;
jv.posting_date = dateutil.obj_to_str(new Date());

View File

@@ -12,7 +12,7 @@ cur_frm.cscript.onload = function(doc, dt, dn){
cur_frm.cscript.refresh = function(doc, dt, dn){
if((!doc.__islocal) && (doc.is_active == 'Yes')){
cur_frm.add_custom_button('Make Salary Slip', cur_frm.cscript['Make Salary Slip']);
cur_frm.add_custom_button(wn._('Make Salary Slip'), cur_frm.cscript['Make Salary Slip']);
}
cur_frm.toggle_enable('employee', doc.__islocal);

View File

@@ -17,7 +17,7 @@ erpnext.hr.AttendanceControlPanel = wn.ui.form.Controller.extend({
get_template:function() {
if(!this.frm.doc.att_fr_date || !this.frm.doc.att_to_date) {
msgprint("Attendance From Date and Attendance To Date is mandatory");
msgprint(wn._("Attendance From Date and Attendance To Date is mandatory"));
return;
}
window.location.href = repl(wn.request.url +
@@ -56,10 +56,10 @@ erpnext.hr.AttendanceControlPanel = wn.ui.form.Controller.extend({
return v;
});
r.messages = ["<h4 style='color:red'>Import Failed!</h4>"]
r.messages = ["<h4 style='color:red'>"+wn._("Import Failed!")+"</h4>"]
.concat(r.messages)
} else {
r.messages = ["<h4 style='color:green'>Import Successful!</h4>"].
r.messages = ["<h4 style='color:green'>"+wn._("Import Successful!")+"</h4>"].
concat(r.message.messages)
}

View File

@@ -5,7 +5,7 @@ wn.query_reports["Employee Birthday"] = {
"filters": [
{
"fieldname":"month",
"label": "Month",
"label": wn._("Month"),
"fieldtype": "Select",
"options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
@@ -13,7 +13,7 @@ wn.query_reports["Employee Birthday"] = {
},
{
"fieldname":"company",
"label": "Company",
"label": wn._("Company"),
"fieldtype": "Link",
"options": "Company",
"default": wn.defaults.get_user_default("company")

View File

@@ -5,14 +5,14 @@ wn.query_reports["Employee Leave Balance"] = {
"filters": [
{
"fieldname":"fiscal_year",
"label": "Fiscal Year",
"label": wn._("Fiscal Year"),
"fieldtype": "Link",
"options": "Fiscal Year",
"default": wn.defaults.get_user_default("fiscal_year")
},
{
"fieldname":"company",
"label": "Company",
"label": wn._("Company"),
"fieldtype": "Link",
"options": "Company",
"default": wn.defaults.get_user_default("company")

View File

@@ -5,7 +5,7 @@ wn.query_reports["Monthly Attendance Sheet"] = {
"filters": [
{
"fieldname":"month",
"label": "Month",
"label": wn._("Month"),
"fieldtype": "Select",
"options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
@@ -13,20 +13,20 @@ wn.query_reports["Monthly Attendance Sheet"] = {
},
{
"fieldname":"fiscal_year",
"label": "Fiscal Year",
"label": wn._("Fiscal Year"),
"fieldtype": "Link",
"options": "Fiscal Year",
"default": sys_defaults.fiscal_year,
},
{
"fieldname":"employee",
"label": "Employee",
"label": wn._("Employee"),
"fieldtype": "Link",
"options": "Employee"
},
{
"fieldname":"company",
"label": "Company",
"label": wn._("Company"),
"fieldtype": "Link",
"options": "Company",
"default": wn.defaults.get_default("company")

View File

@@ -5,7 +5,7 @@ wn.query_reports["Monthly Salary Register"] = {
"filters": [
{
"fieldname":"month",
"label": "Month",
"label": wn._("Month"),
"fieldtype": "Select",
"options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
@@ -13,20 +13,20 @@ wn.query_reports["Monthly Salary Register"] = {
},
{
"fieldname":"fiscal_year",
"label": "Fiscal Year",
"label": wn._("Fiscal Year"),
"fieldtype": "Link",
"options": "Fiscal Year",
"default": sys_defaults.fiscal_year,
},
{
"fieldname":"employee",
"label": "Employee",
"label": wn._("Employee"),
"fieldtype": "Link",
"options": "Employee"
},
{
"fieldname":"company",
"label": "Company",
"label": wn._("Company"),
"fieldtype": "Link",
"options": "Company",
"default": wn.defaults.get_default("company")