Skip to content

Commit 827ea84

Browse files
committed
Replace hardcoded texts in EPSS Chart with i18n
Signed-off-by: Torsten Mehnert <[email protected]>
1 parent 5760ade commit 827ea84

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/views/dashboard/ChartEpssVsCvss.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script>
22
import common from "../../shared/common"
3+
import i18n from '../../i18n'
34
import { Scatter } from 'vue-chartjs'
45
import { CustomTooltips } from '@coreui/coreui-plugin-chartjs-custom-tooltips'
56
@@ -89,7 +90,14 @@ export default {
8990
let label = data.labels[tooltipItem.index];
9091
let vulnId = label.vulnId;
9192
let componentLabel = label.componentLabel;
92-
return 'Component<br/>Vulnerability<br/>CVSS<br/>EPSS: ' + componentLabel.replace(":", "&#58;") + '<br/>' + vulnId + '<br/>' + tooltipItem.xLabel + '<br/>' + tooltipItem.yLabel;
93+
return `${i18n.t('message.component')}<br>`
94+
+ `${i18n.t('message.vulnerability')}<br/>`
95+
+ `${i18n.t('message.cvss')}<br/>`
96+
+ `${i18n.t('message.epss')}: `
97+
+ `${componentLabel.replace(":", "&#58;")}<br/>`
98+
+ `${vulnId}<br/>`
99+
+ `${tooltipItem.xLabel}<br/>`
100+
+ tooltipItem.yLabel;
93101
}
94102
}
95103
},

0 commit comments

Comments
 (0)