Fix Style/FormatString offenses in MergeRequestPresenter

What does this MR do and why?

Fixes the 2 remaining Style/FormatString offenses in app/presenters/merge_request_presenter.rb.

Two i18n fork notices, in revert_in_fork_path and cherry_pick_in_fork_path, used _('... %{edit_in_new_fork_notice} ...') % { ... }. They now use format(_('...'), edit_in_new_fork_notice: ...), the form the i18n externalization guide recommends.

The third offense, in pipeline_coverage_delta, was fixed in !257704 (merged).

String#% with a hash argument behaves the same as format, so this does not change behaviour. The translation strings themselves are unchanged, so there is no locale/gitlab.pot update.

With the file clean, it is removed from .rubocop_todo/style/format_string.yml, so the cop now guards this file going forward.

References

This cleanup was suggested during review on !257704 (merged), where the reviewer offered to split it out separately.

Screenshots or screen recordings

Not applicable. This is a backend-only refactor with no UI changes.

How to set up and validate locally

  1. Run bundle exec rubocop app/presenters/merge_request_presenter.rb. It reports no offenses, now that the file's exclusion from .rubocop_todo/style/format_string.yml is removed.
  2. Run bundle exec rspec spec/presenters/merge_request_presenter_spec.rb.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

No changelog is needed (internal refactor with no user-facing change), no feature flag is needed, and there are no database changes.

Edited by zli

Merge request reports

Loading
Loading