Follow-up from "Restore namespace requirement for project deletion confirmation"

Problem to solve

The following issues from !73176 (merged) should be addressed.

  1. Question by @pslaughter in !73176 (comment 720370838):

question (ux): Have we considered using project.path_with_namespace instead of full_name?

  1. Suggestion by @aregnery in !73176 (comment 719948309):

@jiaan can we remove the "delete" term from the string, or would a follow-up be better to remove that piece?

Suggested solution

Investigate if we can replace project.full_name with project.path_with_namespace for the confirmation message.

@pslaughter has provided a patch for this:

diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index bee25e2a569..6b472db886f 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -389,7 +389,7 @@ def project_classes(project)
   # Thus the phrase should be the project full name to include the namespace.
   # Relevant issue: https://gitlab.com/gitlab-org/gitlab/-/issues/343591
   def delete_confirm_phrase(project)
-    s_('DeleteProject|Delete %{name}') % { name: project.full_name }
+    s_('DeleteProject|Delete %{name}') % { name: project.path_with_namespace }
   end
 
   private

Remove Delete from the start of the confirmation message.