Skip to content

Commit 165261d

Browse files
committed
AO3-6911: prefer double quotes, add i18n support
1 parent c420089 commit 165261d

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

app/controllers/application_controller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def raise_not_found
2828
rescue_from Rack::Timeout::RequestTimeoutException, with: :raise_timeout
2929

3030
def raise_timeout
31-
redirect_to '/timeout'
31+
redirect_to "/timeout"
3232
end
3333

3434
helper :all # include all helpers, all the time

app/views/errors/timeout.html.erb

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
<h3 class="heading">The page was responding too slowly. Please try again after a few minutes.</h3>
2-
<p>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.</p>
1+
<h2 class="heading"><%= t("errors.timeout.title") %></h2>
2+
<h3 class="heading"><%= t("errors.timeout.subtitle") %></h3>
3+
<p><%= t("errors.timeout.html", contact_support_link: link_to(ts("contact Support"), new_feedback_report_path)) %></p>

config/locales/views/en.yml

+5
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,11 @@ en:
611611
restricted_html: A translation of [Restricted Work] by %{creator_link}
612612
revealed_html: A translation of %{work_link} by %{creator_link}
613613
unrevealed: A translation of a work in an unrevealed collection
614+
errors:
615+
timeout:
616+
title: Timeout
617+
subtitle: The page was responding too slowly. Please try again after a few minutes.
618+
html: If you still get this error after a few tries, please %{contact_support_link}.
614619
feedbacks:
615620
new:
616621
abuse:

config/routes.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
get '/422', to: 'errors#422'
5454
get '/500', to: 'errors#500'
5555
get '/auth_error', to: 'errors#auth_error'
56-
get '/timeout', to: 'errors#timeout'
56+
get "/timeout", to: "errors#timeout"
5757

5858
#### DOWNLOADS ####
5959

0 commit comments

Comments
 (0)