[translations] fixes #4532

This commit is contained in:
Rushabh Mehta 2016-01-04 15:48:37 +05:30
parent aee8b5bcad
commit eb961370ff
12 changed files with 54 additions and 26 deletions

View File

@ -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")
},
]
}
}

View File

@ -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('<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 @@ 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: ") + "<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)

View File

@ -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")
}
}

View File

@ -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();
});

View File

@ -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
}

View File

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

View File

@ -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">

View File

@ -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++) { %}

View File

@ -66,7 +66,7 @@ cur_frm.cscript.setup_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: ") + "<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)

View File

@ -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"
},
]
}
}

View File

@ -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"
},
]
}
}

View File

@ -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):