diff --git a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js
index 423c4e4..c8fdeaf 100644
--- a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js
+++ b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js
@@ -60,12 +60,12 @@
 cur_frm.cscript.add_deduct_tax = function(doc, cdt, cdn) {
   var d = locals[cdt][cdn];
   if(!d.category && d.add_deduct_tax){
-    alert("Please select Category first");
+    alert(wn._("Please select Category first"));
     d.add_deduct_tax = '';
   }
   else if(d.category != 'Total' && d.add_deduct_tax == 'Deduct') {
 	console.log([d.category, d.add_deduct_tax]);
-    msgprint("You cannot deduct when category is for 'Valuation' or 'Valuation and Total'");
+    msgprint(wn._("You cannot deduct when category is for 'Valuation' or 'Valuation and Total'"));
     d.add_deduct_tax = '';
   }
 
@@ -74,15 +74,15 @@
 cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
   var d = locals[cdt][cdn];
   if(!d.category && d.charge_type){
-    alert("Please select Category first");
+    alert(wn._("Please select Category first"));
     d.charge_type = '';
   }  
   else if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')){
-    alert("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row");
+    alert(wn._("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"));
     d.charge_type = '';
   }
   else if((d.category == 'Valuation' || d.category == 'Valuation and Total') && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')){
-    alert("You cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for valuation. You can select only 'Total' option for previous row amount or previous row total")
+    alert(wn._("You cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for valuation. You can select only 'Total' option for previous row amount or previous row total"))
     d.charge_type = '';
   }
   validated = false;
@@ -97,16 +97,16 @@
 cur_frm.cscript.row_id = function(doc, cdt, cdn) {
   var d = locals[cdt][cdn];
   if(!d.charge_type && d.row_id){
-    alert("Please select Charge Type first");
+    alert(wn._("Please select Charge Type first"));
     d.row_id = '';
   }
   else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) {
-    alert("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'");
+    alert(wn._("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'"));
     d.row_id = '';
   }
   else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id){
     if(d.row_id >= d.idx){
-      alert("You cannot Enter Row no. greater than or equal to current row no. for this Charge type");
+      alert(wn._("You cannot Enter Row no. greater than or equal to current row no. for this Charge type"));
       d.row_id = '';
     }
   }
@@ -137,7 +137,7 @@
 cur_frm.cscript.account_head = function(doc, cdt, cdn) {
   var d = locals[cdt][cdn];
   if(!d.charge_type && d.account_head){
-    alert("Please select Charge Type first");
+    alert(wn._("Please select Charge Type first"));
     validated = false;
     d.account_head = '';
   }
@@ -151,7 +151,7 @@
 cur_frm.cscript.rate = function(doc, cdt, cdn) {
   var d = locals[cdt][cdn];
   if(!d.charge_type && d.rate) {
-    alert("Please select Charge Type first");
+    alert(wn._("Please select Charge Type first"));
     d.rate = '';
   }
   validated = false;
@@ -161,11 +161,11 @@
 cur_frm.cscript.tax_amount = function(doc, cdt, cdn) {
   var d = locals[cdt][cdn];
   if(!d.charge_type && d.tax_amount){
-    alert("Please select Charge Type first");
+    alert(wn._("Please select Charge Type first"));
     d.tax_amount = '';
   }
   else if(d.charge_type && d.tax_amount) {
-    alert("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate");
+    alert(wn._("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate"));
     d.tax_amount = '';
   }
   validated = false;
