Skip to content

Commit

Permalink
Handle colons and pipes
Browse files Browse the repository at this point in the history
  • Loading branch information
mereghost committed Oct 7, 2024
1 parent 33c47ee commit f100793
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/storages/app/models/storages/storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions modules/storages/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
Expand All @@ -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:
Expand All @@ -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}.
Expand Down

0 comments on commit f100793

Please sign in to comment.