You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2024/02/22 17:41:45 UTC

(superset) 06/14: fix(pivot-table-v2): Added forgotten translation pivot table v2 (#22840)

This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.1
in repository https://gitbox.apache.org/repos/asf/superset.git

commit c94a4609bbac4ab74ff751162ba2b26f9c27a4e8
Author: Stepan <66...@users.noreply.github.com>
AuthorDate: Thu Feb 15 20:16:02 2024 +0300

    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 760ff90c15..41063c290f 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);