From 8f6adc62da2a5a34be5ed620d28a618ae808cc58 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) --- .../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);