fix: Incorrect translation syntax

This commit is contained in:
Suraj Shetty
2020-01-29 15:06:18 +05:30
parent 239f0d529e
commit 48e9bc3fc9
59 changed files with 124 additions and 124 deletions

View File

@@ -9,7 +9,7 @@ from erpnext import get_region
def check_deletion_permission(doc, method):
region = get_region(doc.company)
if region in ["Nepal", "France"] and doc.docstatus != 0:
frappe.throw(_("Deletion is not permitted for country {0}".format(region)))
frappe.throw(_("Deletion is not permitted for country {0}").format(region))
def create_transaction_log(doc, method):
"""

View File

@@ -417,7 +417,7 @@ class GSTR3BReport(Document):
if gst_details:
return gst_details[0]
else:
frappe.throw(_("Please enter GSTIN and state for the Company Address {0}".format(self.company_address)))
frappe.throw(_("Please enter GSTIN and state for the Company Address {0}").format(self.company_address))
def get_account_heads(self):
@@ -430,7 +430,7 @@ class GSTR3BReport(Document):
if account_heads:
return account_heads
else:
frappe.throw(_("Please set account heads in GST Settings for Compnay {0}".format(self.company)))
frappe.throw(_("Please set account heads in GST Settings for Compnay {0}").format(self.company))
def get_missing_field_invoices(self):

View File

@@ -252,7 +252,7 @@ def sales_invoice_validate(doc):
else:
for row in doc.taxes:
if row.rate == 0 and row.tax_amount == 0 and not row.tax_exemption_reason:
frappe.throw(_("Row {0}: Please set at Tax Exemption Reason in Sales Taxes and Charges".format(row.idx)),
frappe.throw(_("Row {0}: Please set at Tax Exemption Reason in Sales Taxes and Charges").format(row.idx),
title=_("E-Invoicing Information Missing"))
for schedule in doc.payment_schedule:
@@ -272,10 +272,10 @@ def sales_invoice_on_submit(doc, method):
else:
for schedule in doc.payment_schedule:
if not schedule.mode_of_payment:
frappe.throw(_("Row {0}: Please set the Mode of Payment in Payment Schedule".format(schedule.idx)),
frappe.throw(_("Row {0}: Please set the Mode of Payment in Payment Schedule").format(schedule.idx),
title=_("E-Invoicing Information Missing"))
elif not frappe.db.get_value("Mode of Payment", schedule.mode_of_payment, "mode_of_payment_code"):
frappe.throw(_("Row {0}: Please set the correct code on Mode of Payment {1}".format(schedule.idx, schedule.mode_of_payment)),
frappe.throw(_("Row {0}: Please set the correct code on Mode of Payment {1}").format(schedule.idx, schedule.mode_of_payment),
title=_("E-Invoicing Information Missing"))
prepare_and_attach_invoice(doc)
@@ -355,7 +355,7 @@ def validate_address(address_name):
for field in fields:
if not data.get(field):
frappe.throw(_("Please set {0} for address {1}".format(field.replace('-',''), address_name)),
frappe.throw(_("Please set {0} for address {1}").format(field.replace('-',''), address_name),
title=_("E-Invoicing Information Missing"))
def get_unamended_name(doc):