From 6bcc50e27402e447ba0986a0d63706eaddd7e0f6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Wed, 3 Jun 2009 01:31:35 +0000 Subject: [PATCH] * Made the "Confirmed your account/email" messages translatable * Changed "Something went wrong" error to "you've already used that token". From reading the code that's the only time it's displayed --- app/controllers/user_controller.rb | 8 ++++---- config/locales/en.yml | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 2659232cd..cd38dd940 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -186,11 +186,11 @@ class UserController < ApplicationController @user.email_valid = true @user.save! token.destroy - flash[:notice] = 'Confirmed your account, thanks for signing up!' + flash[:notice] = I18n.t('user.confirm.success') session[:user] = @user.id redirect_to :action => 'account', :display_name => @user.display_name else - @notice = 'Something went wrong confirming that user.' + @notice = I18n.t('user.confirm.failure') end end end @@ -206,11 +206,11 @@ class UserController < ApplicationController @user.email_valid = true @user.save! token.destroy - flash[:notice] = 'Confirmed your email address, thanks for signing up!' + flash[:notice] = I18n.t('user.confirm email.success') session[:user] = @user.id redirect_to :action => 'account', :display_name => @user.display_name else - @notice = 'Something went wrong confirming that email address.' + @notice = I18n.t('user.confirm email.failure') end end end diff --git a/config/locales/en.yml b/config/locales/en.yml index 14f97f5fe..f6f48d62e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -599,10 +599,14 @@ en: heading: Confirm a user account press confirm button: "Press the confirm button below to activate your account." button: Confirm + success: "Confirmed your account, thanks for signing up!" + failure: "A user account with this token has already been confirmed." confirm email: heading: Confirm a change of email address press confirm button: "Press the confirm button below to confirm your new email address." button: Confirm + success: "Confirmed your email address, thanks for signing up!" + failure: "An email address has already been confirmed with this token." set_home: flash success: "Home location saved successfully" go_public: -- 2.43.2