From eb961370ff81f7ce81b10937f4e1e455db60d757 Mon Sep 17 00:00:00 2001
From: Rushabh Mehta
Date: Mon, 4 Jan 2016 15:48:37 +0530
Subject: [PATCH] [translations] fixes #4532
---
.../budget_variance_report.js | 9 +++++++--
erpnext/buying/doctype/supplier/supplier.js | 4 ++--
erpnext/config/desktop.py | 6 ++++--
erpnext/public/js/controllers/transaction.js | 18 +++++++++---------
erpnext/public/js/financial_statements.js | 7 ++++++-
erpnext/public/js/stock_analytics.js | 10 ++++++++--
erpnext/public/js/templates/address_list.html | 2 +-
erpnext/public/js/templates/contact_list.html | 2 +-
erpnext/selling/doctype/customer/customer.js | 2 +-
...s_person_target_variance_item_group_wise.js | 9 +++++++--
...erritory_target_variance_item_group_wise.js | 9 +++++++--
erpnext/stock/get_item_details.py | 2 +-
12 files changed, 54 insertions(+), 26 deletions(-)
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 203f22322c..a58b8f2cf2 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 @@ frappe.query_reports["Budget Variance Report"] = {
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 @@ frappe.query_reports["Budget Variance Report"] = {
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 646dfbf018..375d4d2409 100644
--- a/erpnext/buying/doctype/supplier/supplier.js
+++ b/erpnext/buying/doctype/supplier/supplier.js
@@ -25,7 +25,7 @@ cur_frm.cscript.make_dashboard = function(doc) {
if(doc.__islocal)
return;
if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager"))
- cur_frm.dashboard.set_headline('Loading...')
+ cur_frm.dashboard.set_headline('' + __('Loading') + '')
cur_frm.dashboard.add_doctype_badge("Supplier Quotation", "supplier");
cur_frm.dashboard.add_doctype_badge("Purchase Order", "supplier");
@@ -41,7 +41,7 @@ cur_frm.cscript.make_dashboard = function(doc) {
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: ") + ""
+ __("Total billing this year") + ": "
+ format_currency(r.message.billing_this_year, cur_frm.doc.party_account_currency)
+ ' / ' + __("Total Unpaid") + ": "
+ 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 c3fe141ff8..a8ce6a7a68 100644
--- a/erpnext/config/desktop.py
+++ b/erpnext/config/desktop.py
@@ -32,7 +32,8 @@ def get_data():
"icon": "icon-th",
"icon": "octicon octicon-credit-card",
"type": "page",
- "link": "pos"
+ "link": "pos",
+ "label": _("POS")
},
"Projects": {
"color": "#8e44ad",
@@ -68,6 +69,7 @@ def get_data():
"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 4c81b42b8a..d3fa0a8c1e 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -489,7 +489,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
if(docfield) {
var label = __(docfield.label || "").replace(/\([^\)]*\)/g, "");
field_label_map[grid_doctype + "-" + fname] =
- label.trim() + " (" + currency + ")";
+ label.trim() + " (" + __(currency) + ")";
}
});
}
@@ -876,36 +876,36 @@ frappe.ui.form.on(cur_frm.doctype, "additional_discount_percentage", function(fr
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 fd3165edcd..206be3c287 100644
--- a/erpnext/public/js/financial_statements.js
+++ b/erpnext/public/js/financial_statements.js
@@ -22,7 +22,12 @@ erpnext.financial_statements = {
"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 e07e3d4c5b..a8229baf0f 100644
--- a/erpnext/public/js/stock_analytics.js
+++ b/erpnext/public/js/stock_analytics.js
@@ -51,7 +51,7 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({
},
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 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({
{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 54f8ce2c09..0e8b3459e0 100644
--- a/erpnext/public/js/templates/address_list.html
+++ b/erpnext/public/js/templates/address_list.html
@@ -1,4 +1,4 @@
-
+
{% for(var i=0, l=addr_list.length; i
diff --git a/erpnext/public/js/templates/contact_list.html b/erpnext/public/js/templates/contact_list.html
index a2aedc52cd..363e07613f 100644
--- a/erpnext/public/js/templates/contact_list.html
+++ b/erpnext/public/js/templates/contact_list.html
@@ -1,5 +1,5 @@
+ {{ __("New Contact") }}
{% for(var i=0, l=contact_list.length; i"
+ __("Total billing this year") + ": "
+ format_currency(r.message.billing_this_year, cur_frm.doc.party_account_currency)
+ ' / ' + __("Unpaid") + ": "
+ 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 7bfabb2f06..f1cb3b7461 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 @@ frappe.query_reports["Sales Person Target Variance Item Group-Wise"] = {
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 @@ frappe.query_reports["Sales Person Target Variance Item Group-Wise"] = {
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 1e39146a2e..7631fcb02f 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 @@ frappe.query_reports["Territory Target Variance Item Group-Wise"] = {
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 @@ frappe.query_reports["Territory Target Variance Item Group-Wise"] = {
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 43aa0598f9..fa51ab9de9 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -246,7 +246,7 @@ def insert_item_price(args):
"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):