From 9d1bf8cda443bacd4f582ede9ee634c756e0327d Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Fri, 6 Dec 2024 14:25:04 -0500 Subject: [PATCH] i18n: translate chart units + choropleth count --- src/js/components/Overview/Chart.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/components/Overview/Chart.tsx b/src/js/components/Overview/Chart.tsx index 91b471a9..172300ae 100644 --- a/src/js/components/Overview/Chart.tsx +++ b/src/js/components/Overview/Chart.tsx @@ -39,6 +39,7 @@ const Chart = memo(({ chartConfig, data, units, id, isClickable }: ChartProps) = }; const { chart_type: type } = chartConfig; + units = t(units); // Units can be a word, like "years". Make sure this word gets translated. switch (type) { case CHART_TYPE_BAR: @@ -101,7 +102,7 @@ const Chart = memo(({ chartConfig, data, units, id, isClickable }: ChartProps) = }} renderPopupBody={(_f, d) => ( <> - Count: {(d ?? 0).toString()} {units} + {t('Count') + ':'} {(d ?? 0).toString()} {units} )} />