summaryrefslogtreecommitdiff
path: root/lib/backup
diff options
context:
space:
mode:
Diffstat (limited to 'lib/backup')
-rw-r--r--lib/backup/database.rb2
-rw-r--r--lib/backup/files.rb4
-rw-r--r--lib/backup/manager.rb6
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/backup/database.rb b/lib/backup/database.rb
index e6bf3d1856f..036e4b5ff72 100644
--- a/lib/backup/database.rb
+++ b/lib/backup/database.rb
@@ -46,7 +46,7 @@ module Backup
end
report_success(success)
- raise Backup::Error, 'Backup failed' unless success
+ raise Backup::Error, _('Backup failed') unless success
end
def restore
diff --git a/lib/backup/files.rb b/lib/backup/files.rb
index 2bac84846c5..ca088401abd 100644
--- a/lib/backup/files.rb
+++ b/lib/backup/files.rb
@@ -28,7 +28,7 @@ module Backup
unless status.zero?
puts output
- raise Backup::Error, 'Backup failed'
+ raise Backup::Error, _('Backup failed')
end
run_pipeline!([%W(#{tar} --exclude=lost+found -C #{@backup_files_dir} -cf - .), %w(gzip -c -1)], out: [backup_tarball, 'w', 0600])
@@ -78,7 +78,7 @@ module Backup
return if status.compact.all?(&:success?)
regex = /^g?tar: \.: Cannot mkdir: No such file or directory$/
- raise Backup::Error, 'Backup failed' unless err_r.read =~ regex
+ raise Backup::Error, _('Backup failed') unless err_r.read =~ regex
end
end
end
diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb
index 06b0338b1ed..aebb662d508 100644
--- a/lib/backup/manager.rb
+++ b/lib/backup/manager.rb
@@ -29,7 +29,7 @@ module Backup
progress.puts "done".color(:green)
else
puts "creating archive #{tar_file} failed".color(:red)
- raise Backup::Error, 'Backup failed'
+ raise Backup::Error, _('Backup failed')
end
upload
@@ -55,7 +55,7 @@ module Backup
progress.puts "done".color(:green)
else
puts "uploading backup to #{remote_directory} failed".color(:red)
- raise Backup::Error, 'Backup failed'
+ raise Backup::Error, _('Backup failed')
end
end
@@ -69,7 +69,7 @@ module Backup
progress.puts "done".color(:green)
else
puts "deleting tmp directory '#{dir}' failed".color(:red)
- raise Backup::Error, 'Backup failed'
+ raise Backup::Error, _('Backup failed')
end
end
end