From f1007936a8eba4f899e6336208b54b41f5512786 Mon Sep 17 00:00:00 2001 From: Marcello Rocha Date: Mon, 7 Oct 2024 17:19:02 +0200 Subject: [PATCH] Handle colons and pipes --- modules/storages/app/models/storages/storage.rb | 2 +- modules/storages/config/locales/en.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/storages/app/models/storages/storage.rb b/modules/storages/app/models/storages/storage.rb index 068a6b316c4a..a154bbebe322 100644 --- a/modules/storages/app/models/storages/storage.rb +++ b/modules/storages/app/models/storages/storage.rb @@ -110,7 +110,7 @@ def self.one_drive_without_ee_token?(provider_type) def self.extract_part_from_piped_string(text, index) return if text.nil? - split_reason = text.split("|") + split_reason = text.split(/[|:]/) if split_reason.length > index split_reason[index].strip end diff --git a/modules/storages/config/locales/en.yml b/modules/storages/config/locales/en.yml index 0471043a59f9..dfcfc75faec1 100644 --- a/modules/storages/config/locales/en.yml +++ b/modules/storages/config/locales/en.yml @@ -115,8 +115,8 @@ en: hide_inactive_folders: permission_not_set: could not set permissions on %{path}. remote_folders: - not_allowed: The %{username} doesn't have access to the %{group_folder}. Please check the folder permissions on Nextcloud. - not_found: "%{group_folder} wasn't found. Please check your Nextcloud setup." + not_allowed: The %{username} doesn't have access to the %{group_folder} folder. Please check the folder permissions on Nextcloud. + not_found: "%{group_folder} folder wasn't found. Please check your Nextcloud setup." remove_user_from_group: conflict: 'The user %{user} could not be removed from the %{group} group for the following reason: %{reason}' failed_to_remove: 'The user %{user} could not be removed from the %{group} group for the following reason: %{reason}' @@ -129,7 +129,7 @@ en: group_does_not_exist: "%{group} does not exist. Check your Nextcloud instance configuration." insufficient_privileges: OpenProject does not have enough privileges to add %{user} to %{group}. Check you group settings in Nextcloud. not_allowed: Nextcloud block the request. - unauthorized: OpenProject could not sync with Nextcloud. Please check you storage and Nextcloud configuration. + unauthorized: OpenProject could not sync with Nextcloud. Please check your storage and Nextcloud configuration. user_does_not_exist: "%{user} does not exist in Nextcloud." one_drive_sync_service: attributes: @@ -148,7 +148,7 @@ en: permission_not_set: could not set permissions on %{path}. error: An unexpected error occurred. Please ensure that you Nextcloud instance is reachable and check OpenProject worker logs for more information not_allowed: OpenProject wasn't allowed to access your OneDrive drive. Please check the permissions set on the Azure Application. - unauthorized: OpenProject could not sync with OneDrive. Please check you storage and Azure Application configuration. + unauthorized: OpenProject could not sync with OneDrive. Please check your storage and Azure Application configuration. user_does_not_exist: "%{user} does not exist in Nextcloud." upload_link_service: not_found: The destination folder %{folder} could not be found on %{storage_name}.