Always-prog commented on code in PR #20078:
URL: https://github.com/apache/superset/pull/20078#discussion_r1085634140
##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -47,7 +48,7 @@ function displayHeaderCell(
>
{ArrowIcon}
</span>
- <span className="toggle-val">{parseLabel(name)}</span>
+ <span className="toggle-val">{t(parseLabel(name))}</span>
Review Comment:
Hello @villebro @aehanno!
We should not translate the results of the parseLabel function, because
users can just set the verbose name of the column/metric in the dataset or
manual SQL, excluding the string 'metric' that appears in the top left corner.

To translate that metric, we can just add a translation for the METRIC_KEY
constant at
superset-frontend/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx:59,
and it will work properly.
Result of translating METRIC_KEY:

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]