summaryrefslogtreecommitdiff
path: root/app/presenters/ci/pipeline_presenter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/presenters/ci/pipeline_presenter.rb')
-rw-r--r--app/presenters/ci/pipeline_presenter.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/app/presenters/ci/pipeline_presenter.rb b/app/presenters/ci/pipeline_presenter.rb
index ce9a3346b4b..395eaeea8de 100644
--- a/app/presenters/ci/pipeline_presenter.rb
+++ b/app/presenters/ci/pipeline_presenter.rb
@@ -36,16 +36,18 @@ module Ci
end
end
- NAMES = {
- merge_train: s_('Pipeline|Merge train pipeline'),
- merged_result: s_('Pipeline|Merged result pipeline'),
- detached: s_('Pipeline|Detached merge request pipeline')
- }.freeze
+ def localized_names
+ {
+ merge_train: s_('Pipeline|Merge train pipeline'),
+ merged_result: s_('Pipeline|Merged result pipeline'),
+ detached: s_('Pipeline|Detached merge request pipeline')
+ }.freeze
+ end
def name
# Currently, `merge_request_event_type` is the only source to name pipelines
# but this could be extended with the other types in the future.
- NAMES.fetch(pipeline.merge_request_event_type, s_('Pipeline|Pipeline'))
+ localized_names.fetch(pipeline.merge_request_event_type, s_('Pipeline|Pipeline'))
end
def ref_text