Commit 871ca1e5 authored by Scott Hampton's avatar Scott Hampton

Adjusting internationalization of tooltip title

Based on MR comments, changing how the i18n works for the tooltip title.
parent 12459e50
- status = local_assigns.fetch(:status) - status = local_assigns.fetch(:status)
- size = local_assigns.fetch(:size, 16) - size = local_assigns.fetch(:size, 16)
- type = local_assigns.fetch(:type, 'pipeline') - type = local_assigns.fetch(:type, 'pipeline')
- title = local_assigns.fetch(:title, _("%{type}: %{label}" % {type: type.titleize, label: status.label}))
- tooltip_placement = local_assigns.fetch(:tooltip_placement, "left") - tooltip_placement = local_assigns.fetch(:tooltip_placement, "left")
- path = local_assigns.fetch(:path, status.has_details? ? status.details_path : nil) - path = local_assigns.fetch(:path, status.has_details? ? status.details_path : nil)
- css_classes = "ci-status-link ci-status-icon ci-status-icon-#{status.group} has-tooltip" - css_classes = "ci-status-link ci-status-icon ci-status-icon-#{status.group} has-tooltip"
- title = s_("PipelineStatusTooltip|Pipeline: %{ci_status}") % {ci_status: status.label}
- if type == 'commit'
- title = s_("PipelineStatusTooltip|Commit: %{ci_status}") % {ci_status: status.label}
- if path - if path
= link_to path, class: css_classes, title: title, data: { html: true, placement: tooltip_placement } do = link_to path, class: css_classes, title: title, data: { html: true, placement: tooltip_placement } do
......
...@@ -5362,6 +5362,12 @@ msgstr "" ...@@ -5362,6 +5362,12 @@ msgstr ""
msgid "PipelineSheduleIntervalPattern|Custom" msgid "PipelineSheduleIntervalPattern|Custom"
msgstr "" msgstr ""
msgid "PipelineStatusTooltip|Commit: %{ci_status}"
msgstr ""
msgid "PipelineStatusTooltip|Pipeline: %{ci_status}"
msgstr ""
msgid "Pipelines" msgid "Pipelines"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment