Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bulk_imports/error.rb')
-rw-r--r--lib/bulk_imports/error.rb26
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/bulk_imports/error.rb b/lib/bulk_imports/error.rb
index c40b4bc7f34..57a55abafa6 100644
--- a/lib/bulk_imports/error.rb
+++ b/lib/bulk_imports/error.rb
@@ -3,35 +3,37 @@
module BulkImports
class Error < StandardError
def self.unsupported_gitlab_version
- self.new("Unsupported GitLab version. Minimum supported version is #{BulkImport::MIN_MAJOR_VERSION}.")
+ self.new(format(s_("BulkImport|Unsupported GitLab version. Minimum supported version is '%{version}'."),
+ version: BulkImport::MIN_MAJOR_VERSION))
end
- def self.scope_validation_failure
- self.new("Personal access token does not have the required " \
- "'api' scope or is no longer valid.")
+ def self.scope_or_url_validation_failure
+ self.new(s_("BulkImport|Check that the source instance base URL and the personal access " \
+ "token meet the necessary requirements."))
end
def self.invalid_url
- self.new("Invalid source URL. Enter only the base URL of the source GitLab instance.")
+ self.new(s_("BulkImport|Invalid source URL. Enter only the base URL of the source GitLab instance."))
end
def self.destination_namespace_validation_failure(destination_namespace)
- self.new("Import failed. Destination '#{destination_namespace}' is invalid, or you don't have permission.")
+ self.new(format(s_("BulkImport|Import failed. Destination '%{destination}' is invalid, " \
+ "or you don't have permission."), destination: destination_namespace))
end
def self.destination_slug_validation_failure
- self.new("Import failed. Destination URL " \
- "#{Gitlab::Regex.oci_repository_path_regex_message}")
+ self.new(format(s_("BulkImport|Import failed. Destination URL %{url}"),
+ url: Gitlab::Regex.oci_repository_path_regex_message))
end
def self.destination_full_path_validation_failure(full_path)
- self.new("Import failed. '#{full_path}' already exists. Change the destination and try again.")
+ self.new(format(s_("BulkImport|Import failed. '%{path}' already exists. Change the destination and try again."),
+ path: full_path))
end
def self.setting_not_enabled
- self.new("Group import disabled on source or destination instance. " \
- "Ask an administrator to enable it on both instances and try again."
- )
+ self.new(s_("BulkImport|Group import disabled on source or destination instance. " \
+ "Ask an administrator to enable it on both instances and try again."))
end
end
end