Merge pull request #16195 from alyf-de/translate-query-report-columns

feat: translate column names in export of query report
This commit is contained in:
mergify[bot] 2022-03-07 04:59:45 +00:00 committed by GitHub
commit dc7647f86d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -406,7 +406,7 @@ def build_xlsx_data(columns, data, visible_idx, include_indentation, ignore_visi
for column in data.columns:
if column.get("hidden"):
continue
result[0].append(column.get("label"))
result[0].append(_(column.get("label")))
column_width = cint(column.get('width', 0))
# to convert into scale accepted by openpyxl
column_width /= 10

View file

@ -1343,7 +1343,7 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
if (file_format === 'CSV') {
const column_row = this.columns.reduce((acc, col) => {
if (!col.hidden) {
acc.push(col.label);
acc.push(__(col.label));
}
return acc;
}, []);