diff options
author | Jose Ivan Vargas Lopez <jvargas@gitlab.com> | 2017-11-15 11:42:37 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-11-15 11:42:37 +0300 |
commit | e30cecbc27d45b384ace57a9f616a4d34acf9ec3 (patch) | |
tree | 56eb7fe03231acc6bfedf1ffaefa0da2f51ce96c /app | |
parent | f2997af4d5cdec3266d3178edeedc36d4e590062 (diff) |
Resolve "Internationalization support for Prometheus Service Configuration"
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project_services/prometheus_service.rb | 6 | ||||
-rw-r--r-- | app/views/projects/services/prometheus/_show.html.haml | 27 |
2 files changed, 15 insertions, 18 deletions
diff --git a/app/models/project_services/prometheus_service.rb b/app/models/project_services/prometheus_service.rb index 217f753f05f..fa7b3f2bcaf 100644 --- a/app/models/project_services/prometheus_service.rb +++ b/app/models/project_services/prometheus_service.rb @@ -25,7 +25,7 @@ class PrometheusService < MonitoringService end def description - 'Prometheus monitoring' + s_('PrometheusService|Prometheus monitoring') end def self.to_param @@ -38,8 +38,8 @@ class PrometheusService < MonitoringService type: 'text', name: 'api_url', title: 'API URL', - placeholder: 'Prometheus API Base URL, like http://prometheus.example.com/', - help: 'By default, Prometheus listens on ‘http://localhost:9090’. It’s not recommended to change the default address and port as this might affect or conflict with other services running on the GitLab server.', + placeholder: s_('PrometheusService|Prometheus API Base URL, like http://prometheus.example.com/'), + help: s_('PrometheusService|By default, Prometheus listens on ‘http://localhost:9090’. It’s not recommended to change the default address and port as this might affect or conflict with other services running on the GitLab server.'), required: true } ] diff --git a/app/views/projects/services/prometheus/_show.html.haml b/app/views/projects/services/prometheus/_show.html.haml index d8e11500964..b0cb5ce5e8f 100644 --- a/app/views/projects/services/prometheus/_show.html.haml +++ b/app/views/projects/services/prometheus/_show.html.haml @@ -4,42 +4,39 @@ .row.prepend-top-default.append-bottom-default.prometheus-metrics-monitoring.js-prometheus-metrics-monitoring .col-lg-3 %h4.prepend-top-0 - Metrics + = s_('PrometheusService|Metrics') %p - Metrics are automatically configured and monitored - based on a library of metrics from popular exporters. - = link_to 'More information', help_page_path('user/project/integrations/prometheus') + = s_('PrometheusService|Metrics are automatically configured and monitored based on a library of metrics from popular exporters.') + = link_to s_('PrometheusService|More information'), help_page_path('user/project/integrations/prometheus') .col-lg-9 .panel.panel-default.js-panel-monitored-metrics{ data: { "active-metrics" => "#{project_prometheus_active_metrics_path(@project, :json)}" } } .panel-heading %h3.panel-title - Monitored + = s_('PrometheusService|Monitored') %span.badge.js-monitored-count 0 .panel-body .loading-metrics.text-center.js-loading-metrics = icon('spinner spin 3x', class: 'metrics-load-spinner') - %p Finding and configuring metrics... + %p + = s_('PrometheusService|Finding and configuring metrics...') .empty-metrics.text-center.hidden.js-empty-metrics = custom_icon('icon_empty_metrics') - %p No metrics are being monitored. To start monitoring, deploy to an environment. - = link_to project_environments_path(@project), title: 'View environments', class: 'btn btn-success' do - View environments + %p + = s_('PrometheusService|No metrics are being monitored. To start monitoring, deploy to an environment.') + = link_to s_('PrometheusService|View environments'), project_environments_path(@project), class: 'btn btn-success' %ul.list-unstyled.metrics-list.hidden.js-metrics-list .panel.panel-default.hidden.js-panel-missing-env-vars .panel-heading %h3.panel-title = icon('caret-right lg fw', class: 'panel-toggle js-panel-toggle', 'aria-label' => 'Toggle panel') - Missing environment variable + = s_('PrometheusService|Missing environment variable') %span.badge.js-env-var-count 0 .panel-body.hidden .flash-container .flash-notice .flash-text - To set up automatic monitoring, add the environment variable - %code - $CI_ENVIRONMENT_SLUG - to exporter’s queries. - = link_to 'More information', help_page_path('user/project/integrations/prometheus', anchor: 'metrics-and-labels') + = s_("PrometheusService|To set up automatic monitoring, add the environment variable %{variable} to exporter's queries." % { variable: "<code>$CI_ENVIRONMENT_SLUG</code>" }).html_safe + = link_to s_('PrometheusService|More information'), help_page_path('user/project/integrations/prometheus', anchor: 'metrics-and-labels') %ul.list-unstyled.metrics-list.js-missing-var-metrics-list |