summaryrefslogtreecommitdiff
path: root/app/services/groups
diff options
context:
space:
mode:
authorLuke Bennett <lbennett@gitlab.com>2019-01-30 05:10:37 +0000
committerLuke Bennett <lbennett@gitlab.com>2019-01-31 04:56:51 +0000
commite33e3d29ae56ddd10b66513c35f3e318ea375cb9 (patch)
treece5d1515f93c1e38a01c95b5e0f07f1b572f3763 /app/services/groups
parentb5f089f2b7100dffb1a346e95022f88e6ff06415 (diff)
downloadgitlab-ce-e33e3d29ae56ddd10b66513c35f3e318ea375cb9.tar.gz
Autofixed some untranslated stringsi18n-cop
Diffstat (limited to 'app/services/groups')
-rw-r--r--app/services/groups/create_service.rb4
-rw-r--r--app/services/groups/nested_create_service.rb2
-rw-r--r--app/services/groups/transfer_service.rb10
3 files changed, 8 insertions, 8 deletions
diff --git a/app/services/groups/create_service.rb b/app/services/groups/create_service.rb
index 24d8400c625..275bf69fff7 100644
--- a/app/services/groups/create_service.rb
+++ b/app/services/groups/create_service.rb
@@ -38,13 +38,13 @@ module Groups
if @group.subgroup?
unless can?(current_user, :create_subgroup, @group.parent)
@group.parent = nil
- @group.errors.add(:parent_id, 'You don’t have permission to create a subgroup in this group.')
+ @group.errors.add(:parent_id, _('You don’t have permission to create a subgroup in this group.'))
return false
end
else
unless can?(current_user, :create_group)
- @group.errors.add(:base, 'You don’t have permission to create groups.')
+ @group.errors.add(:base, _('You don’t have permission to create groups.'))
return false
end
diff --git a/app/services/groups/nested_create_service.rb b/app/services/groups/nested_create_service.rb
index f01f5656296..f9492def58e 100644
--- a/app/services/groups/nested_create_service.rb
+++ b/app/services/groups/nested_create_service.rb
@@ -19,7 +19,7 @@ module Groups
end
if group_path.include?('/') && !Group.supports_nested_objects?
- raise 'Nested groups are not supported on MySQL'
+ raise _('Nested groups are not supported on MySQL')
end
create_group_path
diff --git a/app/services/groups/transfer_service.rb b/app/services/groups/transfer_service.rb
index f64e327416a..f52abb3f40d 100644
--- a/app/services/groups/transfer_service.rb
+++ b/app/services/groups/transfer_service.rb
@@ -3,11 +3,11 @@
module Groups
class TransferService < Groups::BaseService
ERROR_MESSAGES = {
- database_not_supported: 'Database is not supported.',
- namespace_with_same_path: 'The parent group already has a subgroup with the same path.',
- group_is_already_root: 'Group is already a root group.',
- same_parent_as_current: 'Group is already associated to the parent group.',
- invalid_policies: "You don't have enough permissions."
+ database_not_supported: _('Database is not supported.'),
+ namespace_with_same_path: _('The parent group already has a subgroup with the same path.'),
+ group_is_already_root: _('Group is already a root group.'),
+ same_parent_as_current: _('Group is already associated to the parent group.'),
+ invalid_policies: _("You don't have enough permissions.")
}.freeze
TransferError = Class.new(StandardError)