From 211bb7de0f77265f5fda33e243f459702762fc13 Mon Sep 17 00:00:00 2001 From: artemonsh Date: Wed, 11 Jan 2023 10:55:23 +0300 Subject: [PATCH] localize legacy pivot table --- superset/viz.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/superset/viz.py b/superset/viz.py index b91fdc3aaf0ff..09260900203d7 100644 --- a/superset/viz.py +++ b/superset/viz.py @@ -51,7 +51,7 @@ import simplejson as json from dateutil import relativedelta as rdelta from flask import request -from flask_babel import lazy_gettext as _ +from flask_babel import gettext as __, lazy_gettext as _ from geopy.point import Point from pandas.tseries.frequencies import to_offset @@ -1004,6 +1004,7 @@ def get_data(self, df: pd.DataFrame) -> VizData: values=metrics, aggfunc=aggfuncs, margins=self.form_data.get("pivot_margins"), + margins_name=__("Total"), ) # Re-order the columns adhering to the metric ordering.