Skip to content

Commit

Permalink
[FIX] charts: translate gauge chart titles
Browse files Browse the repository at this point in the history
Currently the demo dashboards in Odoo have their gauge chart titles not
translated, although they are exported for translation in the .pot file.

In this commit we make them go through the `_t()` function, just like
the titles of the scorecard charts.

closes #5374

Task: 4421055
Signed-off-by: Adrien Minne (adrm) <[email protected]>
  • Loading branch information
dylankiss committed Dec 19, 2024
1 parent 9a9ae31 commit eb99bab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/helpers/figures/charts/gauge_chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
DEFAULT_GAUGE_UPPER_COLOR,
} from "../../../constants";
import { BasePlugin } from "../../../plugins/base_plugin";
import { _t } from "../../../translation";
import {
AddColumnsRowsCommand,
ApplyRangeChange,
Expand Down Expand Up @@ -317,7 +318,7 @@ export function createGaugeChartRuntime(chart: GaugeChart, getters: Getters): Ga

return {
background: getters.getStyleOfSingleCellChart(chart.background, dataRange).background,
title: chart.title,
title: _t(chart.title),
minValue: {
value: minValue,
label: formatValue(minValue, { locale, format }),
Expand Down

0 comments on commit eb99bab

Please sign in to comment.