mirror of
https://github.com/mastodon/mastodon
synced 2024-12-18 08:38:20 +09:00
3b60832214
- 500.html generated with admin-set default locale if set - Error page `<title>` includes Mastodon site title - 500 title changed to "This page is not correct" (ref: <https://www.youtube.com/watch?v=2VCAP_seh1A>) - 500 content appended with "on our end" to make clear it's not user's fault
19 lines
505 B
Ruby
19 lines
505 B
Ruby
# frozen_string_literal: true
|
|
|
|
namespace :assets do
|
|
desc 'Generate 500.html'
|
|
task :generate_500 do
|
|
I18n.with_locale(ENV['DEFAULT_LOCALE'] || I18n.default_locale) do
|
|
html = ApplicationController.render('errors/500', layout: 'error')
|
|
File.write(Rails.root.join('public', '500.html'), html)
|
|
end
|
|
end
|
|
end
|
|
|
|
if Rake::Task.task_defined?('assets:precompile')
|
|
Rake::Task['assets:precompile'].enhance do
|
|
Webpacker::Manifest.load
|
|
Rake::Task['assets:generate_500'].invoke
|
|
end
|
|
end
|