diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index d2d5cf5c58..0836444486 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -28,7 +28,7 @@ def raise_not_found rescue_from Rack::Timeout::RequestTimeoutException, with: :raise_timeout def raise_timeout - redirect_to '/timeout' + redirect_to "/timeout" end helper :all # include all helpers, all the time diff --git a/app/views/errors/timeout.html.erb b/app/views/errors/timeout.html.erb index d7c1b0c013..e71e6b0812 100644 --- a/app/views/errors/timeout.html.erb +++ b/app/views/errors/timeout.html.erb @@ -1,2 +1,3 @@ -
If you still get this error after a few tries, you can <%= link_to ts('contact Support'), new_feedback_report_path %>. In the form, please include a link to the page you're trying to reach and what action you are taking.
+<%= t("errors.timeout.html", contact_support_link: link_to(ts("contact Support"), new_feedback_report_path)) %>
\ No newline at end of file diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index bcd303d271..0a0def3fdc 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -611,6 +611,11 @@ en: restricted_html: A translation of [Restricted Work] by %{creator_link} revealed_html: A translation of %{work_link} by %{creator_link} unrevealed: A translation of a work in an unrevealed collection + errors: + timeout: + title: Timeout + subtitle: The page was responding too slowly. Please try again after a few minutes. + html: If you still get this error after a few tries, please %{contact_support_link}. feedbacks: new: abuse: diff --git a/config/routes.rb b/config/routes.rb index 32f4c0fed5..eb89103a8c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -53,7 +53,7 @@ get '/422', to: 'errors#422' get '/500', to: 'errors#500' get '/auth_error', to: 'errors#auth_error' - get '/timeout', to: 'errors#timeout' + get "/timeout", to: "errors#timeout" #### DOWNLOADS ####