[translations] fixes #4532
diff --git a/erpnext/accounts/report/budget_variance_report/budget_variance_report.js b/erpnext/accounts/report/budget_variance_report/budget_variance_report.js
index 203f223..a58b8f2 100644
--- a/erpnext/accounts/report/budget_variance_report/budget_variance_report.js
+++ b/erpnext/accounts/report/budget_variance_report/budget_variance_report.js
@@ -14,7 +14,12 @@
fieldname: "period",
label: __("Period"),
fieldtype: "Select",
- options: "Monthly\nQuarterly\nHalf-Yearly\nYearly",
+ options: [
+ { "value": "Monthly", "label": __("Monthly") },
+ { "value": "Quarterly", "label": __("Quarterly") },
+ { "value": "Half-Yearly", "label": __("Half-Yearly") },
+ { "value": "Yearly", "label": __("Yearly") }
+ ],
default: "Monthly"
},
{
@@ -25,4 +30,4 @@
default: frappe.defaults.get_user_default("Company")
},
]
-}
\ No newline at end of file
+}
diff --git a/erpnext/buying/doctype/supplier/supplier.js b/erpnext/buying/doctype/supplier/supplier.js
index 646dfbf..375d4d2 100644
--- a/erpnext/buying/doctype/supplier/supplier.js
+++ b/erpnext/buying/doctype/supplier/supplier.js
@@ -25,7 +25,7 @@
if(doc.__islocal)
return;
if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager"))
- cur_frm.dashboard.set_headline('<span class="text-muted">Loading...</span>')
+ cur_frm.dashboard.set_headline('<span class="text-muted">' + __('Loading') + '</span>')
cur_frm.dashboard.add_doctype_badge("Supplier Quotation", "supplier");
cur_frm.dashboard.add_doctype_badge("Purchase Order", "supplier");
@@ -41,7 +41,7 @@
callback: function(r) {
if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager")) {
cur_frm.dashboard.set_headline(
- __("Total Billing This Year: ") + "<b>"
+ __("Total billing this year") + ": <b>"
+ format_currency(r.message.billing_this_year, cur_frm.doc.party_account_currency)
+ '</b> / <span class="text-muted">' + __("Total Unpaid") + ": <b>"
+ format_currency(r.message.total_unpaid, cur_frm.doc.party_account_currency)
diff --git a/erpnext/config/desktop.py b/erpnext/config/desktop.py
index c3fe141..a8ce6a7 100644
--- a/erpnext/config/desktop.py
+++ b/erpnext/config/desktop.py
@@ -32,7 +32,8 @@
"icon": "icon-th",
"icon": "octicon octicon-credit-card",
"type": "page",
- "link": "pos"
+ "link": "pos",
+ "label": _("POS")
},
"Projects": {
"color": "#8e44ad",
@@ -68,6 +69,7 @@
"force_show": True,
"icon": "octicon octicon-device-camera-video",
"type": "module",
- "is_help": True
+ "is_help": True,
+ "label": _("Learn")
}
}
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index 4c81b42..d3fa0a8 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -489,7 +489,7 @@
if(docfield) {
var label = __(docfield.label || "").replace(/\([^\)]*\)/g, "");
field_label_map[grid_doctype + "-" + fname] =
- label.trim() + " (" + currency + ")";
+ label.trim() + " (" + __(currency) + ")";
}
});
}
@@ -876,36 +876,36 @@
if (frm.via_discount_amount) {
return;
}
-
+
if(!frm.doc.apply_discount_on) {
frappe.msgprint(__("Please set 'Apply Additional Discount On'"));
return
}
-
+
frm.via_discount_percentage = true;
-
+
if(frm.doc.additional_discount_percentage && frm.doc.discount_amount) {
// Reset discount amount and net / grand total
frm.set_value("discount_amount", 0);
}
-
+
var total = flt(frm.doc[frappe.model.scrub(frm.doc.apply_discount_on)]);
- var discount_amount = flt(total*flt(frm.doc.additional_discount_percentage) / 100,
+ var discount_amount = flt(total*flt(frm.doc.additional_discount_percentage) / 100,
precision("discount_amount"));
-
+
frm.set_value("discount_amount", discount_amount);
delete frm.via_discount_percentage;
});
frappe.ui.form.on(cur_frm.doctype, "discount_amount", function(frm) {
frm.cscript.set_dynamic_labels();
-
+
if (!frm.via_discount_percentage) {
frm.via_discount_amount = true;
frm.set_value("additional_discount_percentage", 0);
delete frm.via_discount_amount;
}
-
+
frm.cscript.calculate_taxes_and_totals();
});
diff --git a/erpnext/public/js/financial_statements.js b/erpnext/public/js/financial_statements.js
index fd3165e..206be3c 100644
--- a/erpnext/public/js/financial_statements.js
+++ b/erpnext/public/js/financial_statements.js
@@ -22,7 +22,12 @@
"fieldname": "periodicity",
"label": __("Periodicity"),
"fieldtype": "Select",
- "options": "Yearly\nHalf-yearly\nQuarterly\nMonthly",
+ "options": [
+ { "value": "Monthly", "label": __("Monthly") },
+ { "value": "Quarterly", "label": __("Quarterly") },
+ { "value": "Half-Yearly", "label": __("Half-Yearly") },
+ { "value": "Yearly", "label": __("Yearly") }
+ ],
"default": "Yearly",
"reqd": 1
}
diff --git a/erpnext/public/js/stock_analytics.js b/erpnext/public/js/stock_analytics.js
index e07e3d4..a8229ba 100644
--- a/erpnext/public/js/stock_analytics.js
+++ b/erpnext/public/js/stock_analytics.js
@@ -51,7 +51,7 @@
},
filters: [
{fieldtype:"Select", label: __("Value or Qty"), fieldname: "value_or_qty",
- options:["Value", "Quantity"],
+ options:[{label:__("Value"), value:"Value"}, {label:__("Quantity"), value:"Quantity"}],
filter: function(val, item, opts, me) {
return me.apply_zero_filter(val, item, opts, me);
}},
@@ -64,7 +64,13 @@
{fieldtype:"Date", label: __("From Date"), fieldname: "from_date"},
{fieldtype:"Date", label: __("To Date"), fieldname: "to_date"},
{fieldtype:"Select", label: __("Range"), fieldname: "range",
- options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}
+ options:[
+ {label:__("Daily"), value:"Daily"},
+ {label:__("Weekly"), value:"Weekly"},
+ {label:__("Monthly"), value:"Monthly"},
+ {label:__("Quarterly"), value:"Quarterly"},
+ {label:__("Yearly"), value:"Yearly"},
+ ]}
],
setup_filters: function() {
var me = this;
diff --git a/erpnext/public/js/templates/address_list.html b/erpnext/public/js/templates/address_list.html
index 54f8ce2..0e8b345 100644
--- a/erpnext/public/js/templates/address_list.html
+++ b/erpnext/public/js/templates/address_list.html
@@ -1,4 +1,4 @@
-<p><button class="btn btn-xs btn-default btn-address">New Address</button></p>
+<p><button class="btn btn-xs btn-default btn-address">{{ __("New Address") }}</button></p>
<div class="clearfix"></div>
{% for(var i=0, l=addr_list.length; i<l; i++) { %}
<p class="h6">
diff --git a/erpnext/public/js/templates/contact_list.html b/erpnext/public/js/templates/contact_list.html
index a2aedc5..363e076 100644
--- a/erpnext/public/js/templates/contact_list.html
+++ b/erpnext/public/js/templates/contact_list.html
@@ -1,5 +1,5 @@
<p><button class="btn btn-xs btn-default btn-contact">
- New Contact</button></p>
+ {{ __("New Contact") }}</button></p>
<div class="clearfix"></div>
{% for(var i=0, l=contact_list.length; i<l; i++) { %}
diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js
index 4cd5cc7..7bbd693 100644
--- a/erpnext/selling/doctype/customer/customer.js
+++ b/erpnext/selling/doctype/customer/customer.js
@@ -66,7 +66,7 @@
callback: function(r) {
if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager")) {
cur_frm.dashboard.set_headline(
- __("Total Billing This Year: ") + "<b>"
+ __("Total billing this year") + ": <b>"
+ format_currency(r.message.billing_this_year, cur_frm.doc.party_account_currency)
+ '</b> / <span class="text-muted">' + __("Unpaid") + ": <b>"
+ format_currency(r.message.total_unpaid, cur_frm.doc.party_account_currency)
diff --git a/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js b/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js
index 7bfabb2..f1cb3b7 100644
--- a/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js
+++ b/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js
@@ -14,7 +14,12 @@
fieldname: "period",
label: __("Period"),
fieldtype: "Select",
- options: "Monthly\nQuarterly\nHalf-Yearly\nYearly",
+ options: [
+ { "value": "Monthly", "label": __("Monthly") },
+ { "value": "Quarterly", "label": __("Quarterly") },
+ { "value": "Half-Yearly", "label": __("Half-Yearly") },
+ { "value": "Yearly", "label": __("Yearly") }
+ ],
default: "Monthly"
},
{
@@ -25,4 +30,4 @@
default: "Quantity"
},
]
-}
\ No newline at end of file
+}
diff --git a/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js b/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js
index 1e39146..7631fcb 100644
--- a/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js
+++ b/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js
@@ -14,7 +14,12 @@
fieldname: "period",
label: __("Period"),
fieldtype: "Select",
- options: "Monthly\nQuarterly\nHalf-Yearly\nYearly",
+ options: [
+ { "value": "Monthly", "label": __("Monthly") },
+ { "value": "Quarterly", "label": __("Quarterly") },
+ { "value": "Half-Yearly", "label": __("Half-Yearly") },
+ { "value": "Yearly", "label": __("Yearly") }
+ ],
default: "Monthly"
},
{
@@ -25,4 +30,4 @@
default: "Quantity"
},
]
-}
\ No newline at end of file
+}
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index 43aa059..fa51ab9 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -246,7 +246,7 @@
"price_list_rate": price_list_rate
})
item_price.insert()
- frappe.msgprint("Item Price added for {0} in Price List {1}".format(args.item_code,
+ frappe.msgprint(_("Item Price added for {0} in Price List {1}").format(args.item_code,
args.price_list))
def get_price_list_rate_for(args, item_code):