diff options
author | Martin Wortschack <mwortschack@gitlab.com> | 2019-04-15 12:25:48 +0000 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-04-15 12:25:48 +0000 |
commit | 5770b6544d3476e27d77a0ab11f162c941aa0cae (patch) | |
tree | c6e60cc32fc4a8fa5fe089a530a6446d3a03756e /app/services/groups | |
parent | 0c0be8d68e8f899da4e80dd4bdf44a01dfa54cee (diff) | |
download | gitlab-ce-5770b6544d3476e27d77a0ab11f162c941aa0cae.tar.gz |
Externalize strings detected by rubocop-i18n
- Externalize strings in milestones_helper
- Externalize strings in app/services
- Update PO file
Diffstat (limited to 'app/services/groups')
-rw-r--r-- | app/services/groups/create_service.rb | 4 | ||||
-rw-r--r-- | app/services/groups/transfer_service.rb | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/app/services/groups/create_service.rb b/app/services/groups/create_service.rb index 8f1f25a7307..e9659f5489a 100644 --- a/app/services/groups/create_service.rb +++ b/app/services/groups/create_service.rb @@ -46,13 +46,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, s_('CreateGroup|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, s_('CreateGroup|You don’t have permission to create groups.')) return false end diff --git a/app/services/groups/transfer_service.rb b/app/services/groups/transfer_service.rb index 94185605ab9..98e7c311572 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: s_('TransferGroup|Database is not supported.'), + namespace_with_same_path: s_('TransferGroup|The parent group already has a subgroup with the same path.'), + group_is_already_root: s_('TransferGroup|Group is already a root group.'), + same_parent_as_current: s_('TransferGroup|Group is already associated to the parent group.'), + invalid_policies: s_("TransferGroup|You don't have enough permissions.") }.freeze TransferError = Class.new(StandardError) @@ -26,7 +26,7 @@ module Groups rescue TransferError, ActiveRecord::RecordInvalid, Gitlab::UpdatePathError => e @group.errors.clear - @error = "Transfer failed: " + e.message + @error = s_("TransferGroup|Transfer failed: %{error_message}") % { error_message: e.message } false end |