diff options
author | rpereira2 <rpereira@gitlab.com> | 2019-09-02 18:32:22 +0530 |
---|---|---|
committer | rpereira2 <rpereira@gitlab.com> | 2019-09-02 18:42:36 +0530 |
commit | 6a43f321c7751bcdb43cba645480f343feed091d (patch) | |
tree | 88137ac9f79d36194d804842978f48b653ab4e2a | |
parent | e7a8528ae1cabf9749991b97318fd15211a99112 (diff) | |
download | gitlab-ce-66791-handle-different-listen-address-formats.tar.gz |
Do not internationalize log strings66791-handle-different-listen-address-formats
-rw-r--r-- | lib/gitlab/database_importers/self_monitoring/project/create_service.rb | 24 | ||||
-rw-r--r-- | locale/gitlab.pot | 24 |
2 files changed, 12 insertions, 36 deletions
diff --git a/lib/gitlab/database_importers/self_monitoring/project/create_service.rb b/lib/gitlab/database_importers/self_monitoring/project/create_service.rb index 6059fc587ae..5422a8631a0 100644 --- a/lib/gitlab/database_importers/self_monitoring/project/create_service.rb +++ b/lib/gitlab/database_importers/self_monitoring/project/create_service.rb @@ -45,20 +45,20 @@ module Gitlab def validate_application_settings return success if application_settings - log_error(_('No application_settings found')) + log_error('No application_settings found') error(_('No application_settings found')) end def validate_project_created return success unless project_created? - log_error(_('Project already created')) + log_error('Project already created') error(_('Project already created')) end def validate_admins unless instance_admins.any? - log_error(_('No active admin user found')) + log_error('No active admin user found') return error(_('No active admin user found')) end @@ -83,7 +83,7 @@ module Gitlab def create_project if project_created? - log_info(_('Instance administration project already exists')) + log_info('Instance administration project already exists') @project = application_settings.instance_administration_project return success(project: project) end @@ -93,7 +93,7 @@ module Gitlab if project.persisted? success(project: project) else - log_error(_("Could not create instance administration project. Errors: %{errors}") % { errors: project.errors.full_messages }) + log_error("Could not create instance administration project. Errors: %{errors}" % { errors: project.errors.full_messages }) error(_('Could not create project')) end end @@ -106,7 +106,7 @@ module Gitlab if result success else - log_error(_("Could not save instance administration project ID, errors: %{errors}") % { errors: application_settings.errors.full_messages }) + log_error("Could not save instance administration project ID, errors: %{errors}" % { errors: application_settings.errors.full_messages }) error(_('Could not save project ID')) end end @@ -116,7 +116,7 @@ module Gitlab errors = members.flat_map { |member| member.errors.full_messages } if errors.any? - log_error(_('Could not add admins as members to self-monitoring project. Errors: %{errors}') % { errors: errors }) + log_error('Could not add admins as members to self-monitoring project. Errors: %{errors}' % { errors: errors }) error(_('Could not add admins as members')) else success @@ -140,7 +140,7 @@ module Gitlab Gitlab::CurrentSettings.expire_current_application_settings success else - log_error(_("Could not add prometheus URL to whitelist, errors: %{errors}") % { errors: application_settings.errors.full_messages }) + log_error("Could not add prometheus URL to whitelist, errors: %{errors}" % { errors: application_settings.errors.full_messages }) error(_('Could not add prometheus URL to whitelist')) end end @@ -152,7 +152,7 @@ module Gitlab service = project.find_or_initialize_service('prometheus') unless service.update(prometheus_service_attributes) - log_error(_('Could not save prometheus manual configuration for self-monitoring project. Errors: %{errors}') % { errors: service.errors.full_messages }) + log_error('Could not save prometheus manual configuration for self-monitoring project. Errors: %{errors}' % { errors: service.errors.full_messages }) return error(_('Could not save prometheus manual configuration')) end @@ -175,7 +175,7 @@ module Gitlab def prometheus_enabled? Gitlab.config.prometheus.enable if Gitlab.config.prometheus rescue Settingslogic::MissingSetting - log_error(_('prometheus.enable is not present in config/gitlab.yml')) + log_error('prometheus.enable is not present in config/gitlab.yml') false end @@ -183,7 +183,7 @@ module Gitlab def prometheus_listen_address Gitlab.config.prometheus.listen_address.to_s if Gitlab.config.prometheus rescue Settingslogic::MissingSetting - log_error(_('Prometheus listen_address is not present in config/gitlab.yml')) + log_error('Prometheus listen_address is not present in config/gitlab.yml') nil end @@ -228,7 +228,7 @@ module Gitlab end def internal_prometheus_listen_address_uri - if prometheus_listen_address.starts_with?('0.0.0.0') + if prometheus_listen_address.starts_with?('0.0.0.0:') # 0.0.0.0:9090 port = ':' + prometheus_listen_address.split(':').second 'http://localhost' + port diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 158b1ae2543..a1836646b1a 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -3374,15 +3374,9 @@ msgstr "" msgid "Could not add admins as members" msgstr "" -msgid "Could not add admins as members to self-monitoring project. Errors: %{errors}" -msgstr "" - msgid "Could not add prometheus URL to whitelist" msgstr "" -msgid "Could not add prometheus URL to whitelist, errors: %{errors}" -msgstr "" - msgid "Could not authorize chat nickname. Try again!" msgstr "" @@ -3398,9 +3392,6 @@ msgstr "" msgid "Could not create group" msgstr "" -msgid "Could not create instance administration project. Errors: %{errors}" -msgstr "" - msgid "Could not create project" msgstr "" @@ -3419,18 +3410,12 @@ msgstr "" msgid "Could not revoke personal access token %{personal_access_token_name}." msgstr "" -msgid "Could not save instance administration project ID, errors: %{errors}" -msgstr "" - msgid "Could not save project ID" msgstr "" msgid "Could not save prometheus manual configuration" msgstr "" -msgid "Could not save prometheus manual configuration for self-monitoring project. Errors: %{errors}" -msgstr "" - msgid "Coverage" msgstr "" @@ -6098,9 +6083,6 @@ msgstr "" msgid "Instance Statistics visibility" msgstr "" -msgid "Instance administration project already exists" -msgstr "" - msgid "Instance administrators group already exists" msgstr "" @@ -9205,9 +9187,6 @@ msgstr "" msgid "Prometheus listen_address in config/gitlab.yml is not a valid URI" msgstr "" -msgid "Prometheus listen_address is not present in config/gitlab.yml" -msgstr "" - msgid "PrometheusService|%{exporters} with %{metrics} were found" msgstr "" @@ -14180,9 +14159,6 @@ msgstr "" msgid "project avatar" msgstr "" -msgid "prometheus.enable is not present in config/gitlab.yml" -msgstr "" - msgid "quick actions" msgstr "" |