diff options
author | Luke Bennett <lbennett@gitlab.com> | 2019-01-30 05:10:37 +0000 |
---|---|---|
committer | Luke Bennett <lbennett@gitlab.com> | 2019-01-31 04:56:51 +0000 |
commit | e33e3d29ae56ddd10b66513c35f3e318ea375cb9 (patch) | |
tree | ce5d1515f93c1e38a01c95b5e0f07f1b572f3763 /app/models/concerns | |
parent | b5f089f2b7100dffb1a346e95022f88e6ff06415 (diff) | |
download | gitlab-ce-e33e3d29ae56ddd10b66513c35f3e318ea375cb9.tar.gz |
Autofixed some untranslated stringsi18n-cop
Diffstat (limited to 'app/models/concerns')
-rw-r--r-- | app/models/concerns/atomic_internal_id.rb | 2 | ||||
-rw-r--r-- | app/models/concerns/bulk_member_access_load.rb | 2 | ||||
-rw-r--r-- | app/models/concerns/each_batch.rb | 2 | ||||
-rw-r--r-- | app/models/concerns/fast_destroy_all.rb | 2 | ||||
-rw-r--r-- | app/models/concerns/optionally_search.rb | 2 | ||||
-rw-r--r-- | app/models/concerns/token_authenticatable_strategies/base.rb | 6 | ||||
-rw-r--r-- | app/models/concerns/token_authenticatable_strategies/encrypted.rb | 6 |
7 files changed, 11 insertions, 11 deletions
diff --git a/app/models/concerns/atomic_internal_id.rb b/app/models/concerns/atomic_internal_id.rb index 4e15b60ccd1..3e6f00f83fd 100644 --- a/app/models/concerns/atomic_internal_id.rb +++ b/app/models/concerns/atomic_internal_id.rb @@ -30,7 +30,7 @@ module AtomicInternalId def has_internal_id(column, scope:, init:, presence: true) # rubocop:disable Naming/PredicateName # We require init here to retain the ability to recalculate in the absence of a # InternaLId record (we may delete records in `internal_ids` for example). - raise "has_internal_id requires a init block, none given." unless init + raise _("has_internal_id requires a init block, none given.") unless init before_validation :"ensure_#{scope}_#{column}!", on: :create validates column, presence: presence diff --git a/app/models/concerns/bulk_member_access_load.rb b/app/models/concerns/bulk_member_access_load.rb index 041ed3755e0..1bff67a149c 100644 --- a/app/models/concerns/bulk_member_access_load.rb +++ b/app/models/concerns/bulk_member_access_load.rb @@ -10,7 +10,7 @@ module BulkMemberAccessLoad # # Returns a Hash mapping resource ID -> maximum access level. def max_member_access_for_resource_ids(resource_klass, resource_ids, memoization_index = self.id, &block) - raise 'Block is mandatory' unless block_given? + raise _('Block is mandatory') unless block_given? resource_ids = resource_ids.uniq key = max_member_access_for_resource_key(resource_klass, memoization_index) diff --git a/app/models/concerns/each_batch.rb b/app/models/concerns/each_batch.rb index 6314b46a7e3..f8f681f3fc9 100644 --- a/app/models/concerns/each_batch.rb +++ b/app/models/concerns/each_batch.rb @@ -50,7 +50,7 @@ module EachBatch def each_batch(of: 1000, column: primary_key, order_hint: nil) unless column raise ArgumentError, - 'the column: argument must be set to a column name to use for ordering rows' + _('the column: argument must be set to a column name to use for ordering rows') end start = except(:select) diff --git a/app/models/concerns/fast_destroy_all.rb b/app/models/concerns/fast_destroy_all.rb index 1e3afd641ed..b43393156fb 100644 --- a/app/models/concerns/fast_destroy_all.rb +++ b/app/models/concerns/fast_destroy_all.rb @@ -34,7 +34,7 @@ module FastDestroyAll included do before_destroy do - raise ForbiddenActionError, '`destroy` and `destroy_all` are forbidden. Please use `fast_destroy_all`' + raise ForbiddenActionError, _('`destroy` and `destroy_all` are forbidden. Please use `fast_destroy_all`') end end diff --git a/app/models/concerns/optionally_search.rb b/app/models/concerns/optionally_search.rb index 4093429e372..dddc3d1144c 100644 --- a/app/models/concerns/optionally_search.rb +++ b/app/models/concerns/optionally_search.rb @@ -7,7 +7,7 @@ module OptionallySearch def search(*) raise( NotImplementedError, - 'Your model must implement the "search" class method' + _('Your model must implement the "search" class method') ) end diff --git a/app/models/concerns/token_authenticatable_strategies/base.rb b/app/models/concerns/token_authenticatable_strategies/base.rb index 01fb194281a..8c5a001fd90 100644 --- a/app/models/concerns/token_authenticatable_strategies/base.rb +++ b/app/models/concerns/token_authenticatable_strategies/base.rb @@ -41,7 +41,7 @@ module TokenAuthenticatableStrategies def fallback? unless options[:fallback].in?([true, false, nil]) - raise ArgumentError, 'fallback: needs to be a boolean value!' + raise ArgumentError, _('fallback: needs to be a boolean value!') end options[:fallback] == true @@ -49,7 +49,7 @@ module TokenAuthenticatableStrategies def migrating? unless options[:migrating].in?([true, false, nil]) - raise ArgumentError, 'migrating: needs to be a boolean value!' + raise ArgumentError, _('migrating: needs to be a boolean value!') end options[:migrating] == true @@ -57,7 +57,7 @@ module TokenAuthenticatableStrategies def self.fabricate(model, field, options) if options[:digest] && options[:encrypted] - raise ArgumentError, 'Incompatible options set!' + raise ArgumentError, _('Incompatible options set!') end if options[:digest] diff --git a/app/models/concerns/token_authenticatable_strategies/encrypted.rb b/app/models/concerns/token_authenticatable_strategies/encrypted.rb index 152491aa6e9..f17ee81812d 100644 --- a/app/models/concerns/token_authenticatable_strategies/encrypted.rb +++ b/app/models/concerns/token_authenticatable_strategies/encrypted.rb @@ -6,7 +6,7 @@ module TokenAuthenticatableStrategies super if migrating? && fallback? - raise ArgumentError, '`fallback` and `migrating` options are not compatible!' + raise ArgumentError, _('`fallback` and `migrating` options are not compatible!') end end @@ -23,7 +23,7 @@ module TokenAuthenticatableStrategies elsif migrating? find_by_plaintext_token(token, unscoped) else - raise ArgumentError, 'Unknown encryption phase!' + raise ArgumentError, _('Unknown encryption phase!') end end @@ -42,7 +42,7 @@ module TokenAuthenticatableStrategies return super if instance.has_attribute?(encrypted_field) if fully_encrypted? - raise ArgumentError, 'Using encrypted strategy when encrypted field is missing!' + raise ArgumentError, _('Using encrypted strategy when encrypted field is missing!') else insecure_strategy.ensure_token(instance) end |