Merge pull request #12944 from alyf-de/report_column_context
This commit is contained in:
commit
ce10753e91
2 changed files with 3 additions and 2 deletions
|
|
@ -1094,7 +1094,7 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
|
|||
|
||||
return Object.assign(column, {
|
||||
id: column.fieldname,
|
||||
name: __(column.label),
|
||||
name: __(column.label, null, `Column of report '${this.report_name}'`), // context has to match context in get_messages_from_report in translate.py
|
||||
width: parseInt(column.width) || null,
|
||||
editable: false,
|
||||
compareValue: compareFn,
|
||||
|
|
|
|||
|
|
@ -444,7 +444,8 @@ def get_messages_from_report(name):
|
|||
frappe.db.get_value("DocType", report.ref_doctype, "module"))
|
||||
|
||||
if report.columns:
|
||||
messages.extend([(None, report_column.label) for report_column in report.columns])
|
||||
context = "Column of report '%s'" % report.name # context has to match context in `prepare_columns` in query_report.js
|
||||
messages.extend([(None, report_column.label, context) for report_column in report.columns])
|
||||
|
||||
if report.filters:
|
||||
messages.extend([(None, report_filter.label) for report_filter in report.filters])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue