diff options
Diffstat (limited to 'app/models/ci')
-rw-r--r-- | app/models/ci/build_trace_chunk.rb | 12 | ||||
-rw-r--r-- | app/models/ci/job_artifact.rb | 2 | ||||
-rw-r--r-- | app/models/ci/runner.rb | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/app/models/ci/build_trace_chunk.rb b/app/models/ci/build_trace_chunk.rb index da08214963f..a150cf9e47e 100644 --- a/app/models/ci/build_trace_chunk.rb +++ b/app/models/ci/build_trace_chunk.rb @@ -67,16 +67,16 @@ module Ci end def truncate(offset = 0) - raise ArgumentError, 'Offset is out of range' if offset > size || offset < 0 + raise ArgumentError, _('Offset is out of range') if offset > size || offset < 0 return if offset == size # Skip the following process as it doesn't affect anything self.append("", offset) end def append(new_data, offset) - raise ArgumentError, 'New data is missing' unless new_data - raise ArgumentError, 'Offset is out of range' if offset > size || offset < 0 - raise ArgumentError, 'Chunk size overflow' if CHUNK_SIZE < (offset + new_data.bytesize) + raise ArgumentError, _('New data is missing') unless new_data + raise ArgumentError, _('Offset is out of range') if offset > size || offset < 0 + raise ArgumentError, _('Chunk size overflow') if CHUNK_SIZE < (offset + new_data.bytesize) in_lock(*lock_params) do # Write operation is atomic unsafe_set_data!(data.byteslice(0, offset) + new_data) @@ -115,7 +115,7 @@ module Ci current_data = get_data unless current_data&.bytesize.to_i == CHUNK_SIZE - raise FailedToPersistDataError, 'Data is not fullfilled in a bucket' + raise FailedToPersistDataError, _('Data is not fullfilled in a bucket') end old_store_class = self.class.get_store_class(data_store) @@ -134,7 +134,7 @@ module Ci end def unsafe_set_data!(value) - raise ArgumentError, 'New data size exceeds chunk size' if value.bytesize > CHUNK_SIZE + raise ArgumentError, _('New data size exceeds chunk size') if value.bytesize > CHUNK_SIZE self.class.get_store_class(data_store).set_data(self, value) @data = value diff --git a/app/models/ci/job_artifact.rb b/app/models/ci/job_artifact.rb index 11c88200c37..093e9b24fc1 100644 --- a/app/models/ci/job_artifact.rb +++ b/app/models/ci/job_artifact.rb @@ -153,7 +153,7 @@ module Ci def each_blob(&blk) unless file_format_adapter_class - raise NotSupportedAdapterError, 'This file format requires a dedicated adapter' + raise NotSupportedAdapterError, _('This file format requires a dedicated adapter') end file.open do |stream| diff --git a/app/models/ci/runner.rb b/app/models/ci/runner.rb index 5aae31de6e2..554ad5de90b 100644 --- a/app/models/ci/runner.rb +++ b/app/models/ci/runner.rb @@ -152,7 +152,7 @@ module Ci if instance_type? self.runner_type = :project_type elsif group_type? - raise ArgumentError, 'Transitioning a group runner to a project runner is not supported' + raise ArgumentError, _('Transitioning a group runner to a project runner is not supported') end begin |