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

Improve wording when nudging to login to file storage (#14738)

Wieland Lindenthal1e2968ca914f
diff --git a/modules/storages/app/components/storages/admin/oauth_access_grant_nudge_modal_component.rb b/modules/storages/app/components/storages/admin/oauth_access_grant_nudge_modal_component.rb
index 65582a8d262..17d1604f287 100644
--- a/modules/storages/app/components/storages/admin/oauth_access_grant_nudge_modal_component.rb
+++ b/modules/storages/app/components/storages/admin/oauth_access_grant_nudge_modal_component.rb
@@ -64,7 +64,7 @@ module Storages::Admin
success_subtitle = I18n.t('storages.oauth_grant_nudge_modal.storage_ready', storage: project_storage.storage.name)
concat(render(Storages::OpenProjectStorageModalComponent::Body.new(:success, success_subtitle:, success_title:)))
else
- I18n.t('storages.oauth_grant_nudge_modal.body')
+ I18n.t('storages.oauth_grant_nudge_modal.body', storage: project_storage.storage.name)
end
end
diff --git a/modules/storages/config/locales/en.yml b/modules/storages/config/locales/en.yml
index 98e9ee00ffe..a38edcb7dd2 100644
--- a/modules/storages/config/locales/en.yml
+++ b/modules/storages/config/locales/en.yml
@@ -180,11 +180,11 @@ en:
of each desired project to use it.
oauth_grant_nudge_modal:
access_granted: Access granted
- body: You have successfully added a storage to this project. Would you like to login in the storage and authenticate your user to start using the storage?
+ body: To get access to the project folder you need to login to %{storage}.
cancel_button_label: I will do it later
- confirm_button_label: 'Yes'
+ confirm_button_label: Login
storage_ready: You are now ready to use %{storage}
- title: Storage added
+ title: One more step...
open_project_storage_modal:
success:
subtitle: You are being redirected
diff --git a/modules/storages/spec/components/storages/admin/oauth_access_grant_nudge_modal_component_spec.rb b/modules/storages/spec/components/storages/admin/oauth_access_grant_nudge_modal_component_spec.rb
index f5c69e170cd..bec1ca5c9f4 100644
--- a/modules/storages/spec/components/storages/admin/oauth_access_grant_nudge_modal_component_spec.rb
+++ b/modules/storages/spec/components/storages/admin/oauth_access_grant_nudge_modal_component_spec.rb
@@ -42,13 +42,11 @@ RSpec.describe Storages::Admin::OAuthAccessGrantNudgeModalComponent, type: :comp
let(:oauth_access_grant_nudge_modal_component) { described_class.new(project_storage_id: project_storage.id) }
it 'renders the nudge modal' do
- expect(page).to have_text('Storage added')
- expect(page).to have_text('You have successfully added a storage to this project. ' \
- 'Would you like to login in the storage and authenticate ' \
- 'your user to start using the storage?')
+ expect(page).to have_text('One more step...')
+ expect(page).to have_text("To get access to the project folder you need to login to #{project_storage.storage.name}.")
expect(page).to have_button('I will do it later')
- expect(page).to have_link('Yes',
+ expect(page).to have_link('Login',
href: oauth_access_grant_project_settings_project_storage_path(
project_id: project_storage.project_id, id: project_storage
))
diff --git a/modules/storages/spec/features/storages/project_settings/oauth_access_grant_spec.rb b/modules/storages/spec/features/storages/project_settings/oauth_access_grant_spec.rb
index 805115f9eef..1125256c884 100644
--- a/modules/storages/spec/features/storages/project_settings/oauth_access_grant_spec.rb
+++ b/modules/storages/spec/features/storages/project_settings/oauth_access_grant_spec.rb
@@ -81,9 +81,9 @@ RSpec.describe 'OAuth Access Grant Nudge upon adding a storage to a project',
expect(page).to have_text(storage.name)
within_test_selector('oauth-access-grant-nudge-modal') do
- expect(page).to have_text('Storage added')
+ expect(page).to have_text('One more step...')
- click_on('Yes')
+ click_on('Login')
expect(page).to have_current_path("/index.php/apps/oauth2/authorize?client_id=#{storage.oauth_client.client_id}&" \
"redirect_uri=#{redirect_uri}&response_type=code&state=#{nonce}")
end