Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix missing title param in FeedbackDialogs

Alexander Brandon Coles7b0bd78f5a85
diff --git a/app/components/my/access_token/access_token_created_dialog_component.html.erb b/app/components/my/access_token/access_token_created_dialog_component.html.erb
index 395e20e6b18..ad570b7a3de 100644
--- a/app/components/my/access_token/access_token_created_dialog_component.html.erb
+++ b/app/components/my/access_token/access_token_created_dialog_component.html.erb
@@ -29,10 +29,10 @@ See COPYRIGHT and LICENSE files for more details.
<%=
render(Primer::OpenProject::FeedbackDialog.new(
- id:,
- title: nil,
- size: :large
- )) do |dialog|
+ id:,
+ title: I18n.t("my.access_token.create_dialog.title"),
+ size: :large
+ )) do |dialog|
dialog.with_feedback_message do |message|
message.with_heading(tag: :h2) { I18n.t("my.access_token.create_dialog.header", type: "API") }
end
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 966345b0ca9..73e08a13e6a 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -513,6 +513,7 @@ en:
my:
access_token:
create_dialog:
+ title: Token generated
header: The %{type} token has been generated
warning: Note that this is the only time you will see this token, make sure to copy it now.
errors:
diff --git a/modules/storages/app/components/storages/project_storages/destroy_confirmation_dialog_component.html.erb b/modules/storages/app/components/storages/project_storages/destroy_confirmation_dialog_component.html.erb
index 43231f3549f..297636d4245 100644
--- a/modules/storages/app/components/storages/project_storages/destroy_confirmation_dialog_component.html.erb
+++ b/modules/storages/app/components/storages/project_storages/destroy_confirmation_dialog_component.html.erb
@@ -40,11 +40,11 @@ See COPYRIGHT and LICENSE files for more details.
method: :delete
) do |form|
render(Primer::OpenProject::FeedbackDialog.new(
- id: id,
- title: nil,
- test_selector: id,
- size: :large
- )) do |dialog|
+ id:,
+ title:,
+ test_selector: id,
+ size: :large
+ )) do |dialog|
dialog.with_feedback_message(icon_arguments: { icon: :alert, color: :danger }) do |message|
message.with_heading(tag: :h2) { heading }
message.with_description { text }
diff --git a/modules/storages/app/components/storages/project_storages/destroy_confirmation_dialog_component.rb b/modules/storages/app/components/storages/project_storages/destroy_confirmation_dialog_component.rb
index ecd4b986e0d..59927488524 100644
--- a/modules/storages/app/components/storages/project_storages/destroy_confirmation_dialog_component.rb
+++ b/modules/storages/app/components/storages/project_storages/destroy_confirmation_dialog_component.rb
@@ -44,6 +44,10 @@ module Storages::ProjectStorages
"project-storage-#{@project_storage.id}-destroy-confirmation-dialog"
end
+ def title
+ I18n.t("project_storages.remove_project.dialog.title")
+ end
+
def heading
I18n.t("project_storages.remove_project.dialog.heading_text", storage: @storage.name)
end
diff --git a/modules/storages/config/locales/en.yml b/modules/storages/config/locales/en.yml
index 51654644ded..2ddc071ed56 100644
--- a/modules/storages/config/locales/en.yml
+++ b/modules/storages/config/locales/en.yml
@@ -75,6 +75,7 @@ en:
confirmation_text: Please, confirm you understand and want to remove this file storage from this project
heading_text: Remove project from %{storage}
text: This action is irreversible and will remove all links from work packages of this project to files and folders of that storage.
+ title: Remove project from storage
label: Remove project
services:
attributes: