diff options
Diffstat (limited to 'app/presenters/merge_request_presenter.rb')
-rw-r--r-- | app/presenters/merge_request_presenter.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/presenters/merge_request_presenter.rb b/app/presenters/merge_request_presenter.rb index 284b1ad9b55..e4a62deda7a 100644 --- a/app/presenters/merge_request_presenter.rb +++ b/app/presenters/merge_request_presenter.rb @@ -50,7 +50,7 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated if user_can_fork_project? && cached_can_be_reverted? continue_params = { to: merge_request_path(merge_request), - notice: "#{edit_in_new_fork_notice} Try to cherry-pick this commit again.", + notice: _('%{edit_in_new_fork_notice} Try to cherry-pick this commit again.') % { edit_in_new_fork_notice: edit_in_new_fork_notice }, notice_now: edit_in_new_fork_notice_now } @@ -64,7 +64,7 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated if user_can_fork_project? && can_be_cherry_picked? continue_params = { to: merge_request_path(merge_request), - notice: "#{edit_in_new_fork_notice} Try to revert this commit again.", + notice: _('%{edit_in_new_fork_notice} Try to revert this commit again.') % { edit_in_new_fork_notice: edit_in_new_fork_notice }, notice_now: edit_in_new_fork_notice_now } @@ -156,8 +156,11 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated ).assignable_issues path = assign_related_issues_project_merge_request_path(project, merge_request) if issues.present? - pluralize_this_issue = issues.count > 1 ? "these issues" : "this issue" - link_to "Assign yourself to #{pluralize_this_issue}", path, method: :post + if issues.count > 1 + link_to _('Assign yourself to these issues'), path, method: :post + else + link_to _('Assign yourself to this issue'), path, method: :post + end end # rubocop: enable CodeReuse/ServiceClass end |