Skip to content

Commit

Permalink
error pages: integrate i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
markets authored and enricostano committed Feb 21, 2018
1 parent f2d3779 commit 00b0e3c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
9 changes: 3 additions & 6 deletions app/views/errors/internal_server_error.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<div class='text-center errors'>
<h1>Internal server error</h1>
<h3>
We're sorry, there seems to be an error with this request.
A notification has automatically been sent to us, and we will resolve this as soon as possible.
</h3>
<p><%= link_to 'Home', root_path, class: 'btn btn-default' %></p>
<h1><%= t('.title') %></h1>
<h3><%= t('.description') %></h3>
<p><%= link_to t('global.home'), root_path, class: 'btn btn-default' %></p>
</div>
9 changes: 3 additions & 6 deletions app/views/errors/not_found.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<div class='text-center errors'>
<h1>Not found</h1>
<h3>
The page you were looking for doesn't exist.
You may have mistyped the address or the page may have moved.
</h3>
<p><%= link_to 'Home', root_path, class: 'btn btn-default' %></p>
<h1><%= t('.title') %></h1>
<h3><%= t('.description') %></h3>
<p><%= link_to t('global.home'), root_path, class: 'btn btn-default' %></p>
</div>
7 changes: 7 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,12 @@ en:
send_paranoid_instructions: If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.
unlocked: Your account has been unlocked successfully. Please sign in to continue.
errors:
internal_server_error:
title: Internal server error
description: We're sorry, there seems to be an error with this request. A notification has automatically been sent to us, and we will resolve this as soon as possible.
not_found:
title: Not found
description: The page you were looking for doesn't exist. You may have mistyped the address or the page may have moved.
messages:
already_confirmed: was already confirmed, please try signing in
confirmation_period_expired: needs to be confirmed within %{period}, please request a new one
Expand All @@ -289,6 +295,7 @@ en:
edit: Update
filter: Filter
give_time: Time transfer
home: Home
information: Information
locales_header: change language
member_count: 'Number of users:'
Expand Down

0 comments on commit 00b0e3c

Please sign in to comment.