Skip to content

Commit

Permalink
i18n: translate chart units + choropleth count
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Dec 6, 2024
1 parent df6d813 commit 9d1bf8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/components/Overview/Chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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}
</>
)}
/>
Expand Down

0 comments on commit 9d1bf8c

Please sign in to comment.