From 2376fbef6b3faca9956fe9bb6395c55a36c11fcf Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" Date: Wed, 6 Oct 2021 10:07:30 -0300 Subject: [PATCH] chore: Translates the favorite filter param --- superset-frontend/src/views/CRUD/welcome/ChartTable.tsx | 4 +++- superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx b/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx index 60a91813f60c4..c673d2a71e570 100644 --- a/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx +++ b/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx @@ -218,7 +218,9 @@ function ChartTable({ onClick: () => { const target = chartFilter === 'Favorite' - ? '/chart/list/?filters=(favorite:(label:Yes,value:!t))' + ? `/chart/list/?filters=(favorite:(label:${t( + 'Yes', + )},value:!t))` : '/chart/list/'; history.push(target); }, diff --git a/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx b/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx index 0dd594d87b361..f4a3d9d112512 100644 --- a/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx +++ b/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx @@ -220,7 +220,9 @@ function DashboardTable({ onClick: () => { const target = dashboardFilter === 'Favorite' - ? '/dashboard/list/?filters=(favorite:(label:Yes,value:!t))' + ? `/dashboard/list/?filters=(favorite:(label:${t( + 'Yes', + )},value:!t))` : '/dashboard/list/'; history.push(target); },