From 3b60832214fdd9d8b5fd01e9a177a6dde5259907 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 25 Sep 2017 23:05:54 +0200 Subject: New error page graphic. Other error page improvements (#5099) - 500.html generated with admin-set default locale if set - Error page `` 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 --- lib/tasks/assets.rake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake index ad7c6ba90..2ef72fdef 100644 --- a/lib/tasks/assets.rake +++ b/lib/tasks/assets.rake @@ -3,15 +3,16 @@ namespace :assets do desc 'Generate 500.html' task :generate_500 do - html = ApplicationController.render('errors/500', layout: 'error') - File.write(Rails.root.join('public', '500.html'), html) + 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 -- cgit