From eb99bab02c9422dea0bea306ffa0f49620098c1c Mon Sep 17 00:00:00 2001 From: "Dylan Kiss (dyki)" Date: Thu, 19 Dec 2024 15:00:25 +0100 Subject: [PATCH] [FIX] charts: translate gauge chart titles 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 odoo/o-spreadsheet#5374 Task: 4421055 Signed-off-by: Adrien Minne (adrm) --- src/helpers/figures/charts/gauge_chart.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helpers/figures/charts/gauge_chart.ts b/src/helpers/figures/charts/gauge_chart.ts index 9b63a3ba7f..8c5b105350 100644 --- a/src/helpers/figures/charts/gauge_chart.ts +++ b/src/helpers/figures/charts/gauge_chart.ts @@ -5,6 +5,7 @@ import { DEFAULT_GAUGE_UPPER_COLOR, } from "../../../constants"; import { BasePlugin } from "../../../plugins/base_plugin"; +import { _t } from "../../../translation"; import { AddColumnsRowsCommand, ApplyRangeChange, @@ -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 }),