From 66e75264c25ff4d9cd0bdf973a942f1bb69ff6fd Mon Sep 17 00:00:00 2001 From: Fabian Schwahn Date: Wed, 16 Nov 2011 16:47:20 +0100 Subject: [PATCH] i18n for standard error message --- config/locales/en.yml | 1 + lib/errship.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index b5e7d06..874f5ff 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,5 +1,6 @@ en: errship: + standard: 'An unknown error has occurred, or you have reached this page by mistake.' '404': title: 'This page does not exist.' description: 'It could have moved, or someone (maybe you!) mistyped the URL.' diff --git a/lib/errship.rb b/lib/errship.rb index 90a4536..7520c6a 100644 --- a/lib/errship.rb +++ b/lib/errship.rb @@ -39,7 +39,7 @@ def render_404_error(exception = nil, errship_scope = false) # A blank page with just the layout and flash message, which can be redirected to when # all else fails. def errship_standard(errship_scope = false) - flash[:error] ||= 'An unknown error has occurred, or you have reached this page by mistake.' + flash[:error] ||= I18n.t('errship.standard') render :template => '/errship/standard.html.erb', :layout => 'application', :locals => { :status_code => 500, :errship_scope => errship_scope },