From 00b0e3c862e95627bc2180be84e7814fb2aab9ed Mon Sep 17 00:00:00 2001 From: Marc Anguera Insa Date: Mon, 29 Jan 2018 11:51:41 +0100 Subject: [PATCH] error pages: integrate i18n --- app/views/errors/internal_server_error.html.erb | 9 +++------ app/views/errors/not_found.html.erb | 9 +++------ config/locales/en.yml | 7 +++++++ 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/app/views/errors/internal_server_error.html.erb b/app/views/errors/internal_server_error.html.erb index 80e296e44..24030fbba 100644 --- a/app/views/errors/internal_server_error.html.erb +++ b/app/views/errors/internal_server_error.html.erb @@ -1,8 +1,5 @@
-

Internal server error

-

- 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. -

-

<%= link_to 'Home', root_path, class: 'btn btn-default' %>

+

<%= t('.title') %>

+

<%= t('.description') %>

+

<%= link_to t('global.home'), root_path, class: 'btn btn-default' %>

\ No newline at end of file diff --git a/app/views/errors/not_found.html.erb b/app/views/errors/not_found.html.erb index 1c75680d6..24030fbba 100644 --- a/app/views/errors/not_found.html.erb +++ b/app/views/errors/not_found.html.erb @@ -1,8 +1,5 @@
-

Not found

-

- The page you were looking for doesn't exist. - You may have mistyped the address or the page may have moved. -

-

<%= link_to 'Home', root_path, class: 'btn btn-default' %>

+

<%= t('.title') %>

+

<%= t('.description') %>

+

<%= link_to t('global.home'), root_path, class: 'btn btn-default' %>

\ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index 2e26b68a1..af07cb283 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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 @@ -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:'