aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/overview/events/PreviewGraphTooltips.js
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-07-18 10:58:50 +0200
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-07-18 11:50:43 +0200
commitc3e93b8e881a6be261a5cdc800a571cf1343c998 (patch)
tree331cbf5084a98999421a8ed684e93daf511117b7 /server/sonar-web/src/main/js/apps/overview/events/PreviewGraphTooltips.js
parentc7e8ffc345227eb02beb0bfa3c3e9574d86a8957 (diff)
downloadsonarqube-c3e93b8e881a6be261a5cdc800a571cf1343c998.tar.gz
sonarqube-c3e93b8e881a6be261a5cdc800a571cf1343c998.zip
SONAR-9403 Fix metric translation for plugins metrics on project activity page
Diffstat (limited to 'server/sonar-web/src/main/js/apps/overview/events/PreviewGraphTooltips.js')
-rw-r--r--server/sonar-web/src/main/js/apps/overview/events/PreviewGraphTooltips.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/events/PreviewGraphTooltips.js b/server/sonar-web/src/main/js/apps/overview/events/PreviewGraphTooltips.js
index 982320a3a7c..3ee59922574 100644
--- a/server/sonar-web/src/main/js/apps/overview/events/PreviewGraphTooltips.js
+++ b/server/sonar-web/src/main/js/apps/overview/events/PreviewGraphTooltips.js
@@ -21,6 +21,7 @@ import React from 'react';
import BubblePopup from '../../../components/common/BubblePopup';
import FormattedDate from '../../../components/ui/FormattedDate';
import PreviewGraphTooltipsContent from './PreviewGraphTooltipsContent';
+import { getLocalizedMetricName } from '../../../helpers/l10n';
import type { Metric } from '../types';
import type { Serie } from '../../../components/charts/AdvancedTimeline';
@@ -68,7 +69,7 @@ export default class PreviewGraphTooltips extends React.PureComponent {
<PreviewGraphTooltipsContent
key={serie.name}
serie={serie}
- translatedName={metric && metric.custom ? metric.name : serie.translatedName}
+ translatedName={metric ? getLocalizedMetricName(metric) : serie.translatedName}
value={this.props.formatValue(point.y)}
/>
);