From 89814d1db2c55c7197fe7b711765a5430c697b26 Mon Sep 17 00:00:00 2001 From: adisposkofh Date: Tue, 12 May 2026 19:21:52 +0200 Subject: [PATCH] localizing column names accordion above table --- public/js/components/filter/Filter.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/public/js/components/filter/Filter.js b/public/js/components/filter/Filter.js index b13cdd675..bc4525a22 100644 --- a/public/js/components/filter/Filter.js +++ b/public/js/components/filter/Filter.js @@ -192,14 +192,6 @@ export const CoreFilterCmpt = { return !def.frozen && def.title && def.formatter != "responsiveCollapse"; }).map(col => col.getField()); }, - fieldNames() { - if (!this.tableBuilt) - return {}; - return this.tabulator.getColumns().reduce((res, col) => { - res[col.getField()] = col.getDefinition().title; - return res; - }, {}); - }, idExtra() { if (!this.uuid) return ''; @@ -811,7 +803,18 @@ export const CoreFilterCmpt = { // parent not found return false; - } + }, + getColumnNames() { + if (!this.tableBuilt) { + return {}; + } else if (this.tabulator.getLocale()); { + return this.tabulator.getLang().columns; + } + return this.tabulator.getColumns().reduce((res, col) => { + res[col.getField()] = col.getDefinition().title; + return res; + }, {}); + }, }, beforeCreate() { if (!this.tableOnly == !this.filterType) @@ -889,7 +892,7 @@ export const CoreFilterCmpt = { :data-bs-parent="'#filterCollapsables' + idExtra" :fields="fieldIdsForVisibilty" :selected="selectedFields" - :names="fieldNames" + :names="getColumnNames()" @hide="tabulator.hideColumn($event)" @show="tabulator.showColumn($event)" v-collapse-auto-close