fix: Translations of strings (#18825)
This commit is contained in:
		
							parent
							
								
									fe579c2efd
								
							
						
					
					
						commit
						d8c262fd5c
					
				| @ -135,11 +135,11 @@ def get_chart_data(filters, columns, asset, liability, equity): | ||||
| 
 | ||||
| 	datasets = [] | ||||
| 	if asset_data: | ||||
| 		datasets.append({'name':'Assets', 'values': asset_data}) | ||||
| 		datasets.append({'name': _('Assets'), 'values': asset_data}) | ||||
| 	if liability_data: | ||||
| 		datasets.append({'name':'Liabilities', 'values': liability_data}) | ||||
| 		datasets.append({'name': _('Liabilities'), 'values': liability_data}) | ||||
| 	if equity_data: | ||||
| 		datasets.append({'name':'Equity', 'values': equity_data}) | ||||
| 		datasets.append({'name': _('Equity'), 'values': equity_data}) | ||||
| 
 | ||||
| 	chart = { | ||||
| 		"data": { | ||||
|  | ||||
| @ -27,8 +27,8 @@ frappe.query_reports["Payment Period Based On Invoice Date"] = { | ||||
| 			fieldname:"payment_type", | ||||
| 			label: __("Payment Type"), | ||||
| 			fieldtype: "Select", | ||||
| 			options: "Incoming\nOutgoing", | ||||
| 			default: "Incoming" | ||||
| 			options: __("Incoming") + "\n" + __("Outgoing"), | ||||
| 			default: __("Incoming") | ||||
| 		}, | ||||
| 		{ | ||||
| 			"fieldname":"party_type", | ||||
|  | ||||
| @ -39,8 +39,8 @@ def execute(filters=None): | ||||
| 	return columns, data | ||||
| 
 | ||||
| def validate_filters(filters): | ||||
| 	if (filters.get("payment_type") == "Incoming" and filters.get("party_type") == "Supplier") or \ | ||||
| 		(filters.get("payment_type") == "Outgoing" and filters.get("party_type") == "Customer"): | ||||
| 	if (filters.get("payment_type") == _("Incoming") and filters.get("party_type") == "Supplier") or \ | ||||
| 		(filters.get("payment_type") == _("Outgoing") and filters.get("party_type") == "Customer"): | ||||
| 			frappe.throw(_("{0} payment entries can not be filtered by {1}")\ | ||||
| 				.format(filters.payment_type, filters.party_type)) | ||||
| 
 | ||||
| @ -51,7 +51,7 @@ def get_columns(filters): | ||||
| 		_("Party Type") + "::100", | ||||
| 		_("Party") + ":Dynamic Link/Party Type:140", | ||||
| 		_("Posting Date") + ":Date:100", | ||||
| 		_("Invoice") + (":Link/Purchase Invoice:130" if filters.get("payment_type") == "Outgoing" else ":Link/Sales Invoice:130"), | ||||
| 		_("Invoice") + (":Link/Purchase Invoice:130" if filters.get("payment_type") == _("Outgoing") else ":Link/Sales Invoice:130"), | ||||
| 		_("Invoice Posting Date") + ":Date:130", | ||||
| 		_("Payment Due Date") + ":Date:130", | ||||
| 		_("Debit") + ":Currency:120", | ||||
| @ -69,7 +69,7 @@ def get_conditions(filters): | ||||
| 	conditions = [] | ||||
| 
 | ||||
| 	if not filters.party_type: | ||||
| 		if filters.payment_type == "Outgoing": | ||||
| 		if filters.payment_type == _("Outgoing"): | ||||
| 			filters.party_type = "Supplier" | ||||
| 		else: | ||||
| 			filters.party_type = "Customer" | ||||
| @ -101,7 +101,7 @@ def get_entries(filters): | ||||
| 
 | ||||
| def get_invoice_posting_date_map(filters): | ||||
| 	invoice_details = {} | ||||
| 	dt = "Sales Invoice" if filters.get("payment_type") == "Incoming" else "Purchase Invoice" | ||||
| 	dt = "Sales Invoice" if filters.get("payment_type") == _("Incoming") else "Purchase Invoice" | ||||
| 	for t in frappe.db.sql("select name, posting_date, due_date from `tab{0}`".format(dt), as_dict=1): | ||||
| 		invoice_details[t.name] = t | ||||
| 
 | ||||
|  | ||||
| @ -75,11 +75,11 @@ def get_chart_data(filters, columns, income, expense, net_profit_loss): | ||||
| 
 | ||||
| 	datasets = [] | ||||
| 	if income_data: | ||||
| 		datasets.append({'name': 'Income', 'values': income_data}) | ||||
| 		datasets.append({'name': _('Income'), 'values': income_data}) | ||||
| 	if expense_data: | ||||
| 		datasets.append({'name': 'Expense', 'values': expense_data}) | ||||
| 		datasets.append({'name': _('Expense'), 'values': expense_data}) | ||||
| 	if net_profit: | ||||
| 		datasets.append({'name': 'Net Profit/Loss', 'values': net_profit}) | ||||
| 		datasets.append({'name': _('Net Profit/Loss'), 'values': net_profit}) | ||||
| 
 | ||||
| 	chart = { | ||||
| 		"data": { | ||||
|  | ||||
| @ -4,7 +4,7 @@ frappe.provide('erpnext.pos'); | ||||
| frappe.pages['point-of-sale'].on_page_load = function(wrapper) { | ||||
| 	frappe.ui.make_app_page({ | ||||
| 		parent: wrapper, | ||||
| 		title: 'Point of Sale', | ||||
| 		title: __('Point of Sale'), | ||||
| 		single_column: true | ||||
| 	}); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user