From c94a4609bbac4ab74ff751162ba2b26f9c27a4e8 Mon Sep 17 00:00:00 2001 From: Stepan <66589759+Always-prog@users.noreply.github.com> Date: Thu, 15 Feb 2024 20:16:02 +0300 Subject: [PATCH] fix(pivot-table-v2): Added forgotten translation pivot table v2 (#22840) (cherry picked from commit 60fe58196a6e8dd1ea7a2e6aaf8401d0a718bc41) --- .../src/react-pivottable/TableRenderers.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx b/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx index 760ff90c15d8f..41063c290f3fa 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx +++ b/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx @@ -24,7 +24,11 @@ import { PivotData, flatKey } from './utilities'; import { Styles } from './Styles'; const parseLabel = value => { - if (typeof value === 'number' || typeof value === 'string') { + if (typeof value === 'string') { + if (value === 'metric') return t('metric'); + return value; + } + if (typeof value === 'number') { return value; } return String(value);