summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlauraMon <lmontemayor@gitlab.com>2019-08-29 14:10:17 -0400
committerlauraMon <lmontemayor@gitlab.com>2019-08-29 16:50:49 -0400
commit1425fcb4c0664410cbcc2074c0da0f3f750b6860 (patch)
tree9141de949edd06a8154d85fb7908d863b52cd58d
parent873a344e8605310254d8441ac2c77d730c391aea (diff)
downloadgitlab-ce-internationalization-time-series-wrapper.tar.gz
Adds legendText to timeseries and make default value internationalizedinternationalization-time-series-wrapper
-rw-r--r--app/assets/javascripts/monitoring/components/charts/time_series.vue6
-rw-r--r--changelogs/unreleased/internationalization-time-series-wrapper.yml5
-rw-r--r--locale/gitlab.pot6
3 files changed, 17 insertions, 0 deletions
diff --git a/app/assets/javascripts/monitoring/components/charts/time_series.vue b/app/assets/javascripts/monitoring/components/charts/time_series.vue
index 02e7a7ba0a6..4796f456bc5 100644
--- a/app/assets/javascripts/monitoring/components/charts/time_series.vue
+++ b/app/assets/javascripts/monitoring/components/charts/time_series.vue
@@ -58,6 +58,11 @@ export default {
required: false,
default: () => [],
},
+ legendText: {
+ type: Object,
+ required: false,
+ default: () => ({ average: __('Avg'), max: __('Max') }),
+ },
},
data() {
return {
@@ -304,6 +309,7 @@ export default {
:thresholds="thresholds"
:width="width"
:height="height"
+ :legend-text="legendText"
@updated="onChartUpdated"
>
<template v-if="tooltip.isDeployment">
diff --git a/changelogs/unreleased/internationalization-time-series-wrapper.yml b/changelogs/unreleased/internationalization-time-series-wrapper.yml
new file mode 100644
index 00000000000..99a102f809e
--- /dev/null
+++ b/changelogs/unreleased/internationalization-time-series-wrapper.yml
@@ -0,0 +1,5 @@
+---
+title: adds internationalization support for legend text in charts
+merge_request: 32417
+author:
+type: added
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 1e6285e5809..284b7ec32ec 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -1567,6 +1567,9 @@ msgstr ""
msgid "Average per day: %{average}"
msgstr ""
+msgid "Avg"
+msgstr ""
+
msgid "Background Color"
msgstr ""
@@ -6897,6 +6900,9 @@ msgstr ""
msgid "MattermostService|This service allows users to perform common operations on this project by entering slash commands in Mattermost."
msgstr ""
+msgid "Max"
+msgstr ""
+
msgid "Max access level"
msgstr ""