fix missing i18n for flash messages

This commit is contained in:
Carl Chenet 2016-11-26 13:58:51 +01:00
parent d36f7184dc
commit 75e4ab4ecf
3 changed files with 10 additions and 4 deletions

View file

@ -3,7 +3,7 @@ class SignupController < ApplicationController
def index
if @user
flash[:error] = "You are already signed up."
flash[:error] = I18n.t 'controllers.signup_controller.signedup'
return redirect_to "/"
end
@ -16,12 +16,12 @@ class SignupController < ApplicationController
def invited
if @user
flash[:error] = "You are already signed up."
flash[:error] = I18n.t 'controllers.signup_controller.invalidinv'
return redirect_to "/"
end
if !(@invitation = Invitation.where(:code => params[:invitation_code].to_s).first)
flash[:error] = "Invalid or expired invitation"
flash[:error] = I18n.t 'controllers.signup_controller.invalidinv'
return redirect_to "/signup"
end
@ -35,7 +35,7 @@ class SignupController < ApplicationController
def signup
if !(@invitation = Invitation.where(:code => params[:invitation_code].to_s).first)
flash[:error] = "Invalid or expired invitation."
flash[:error] = I18n.t 'controllers.signup_controller.invalidinv'
return redirect_to "/signup"
end

View file

@ -412,6 +412,9 @@ en:
tagstitle: "Tags"
users_controller:
usertitle: "Users"
signup_controller:
signedup: "You are already signed up."
invalidinv: "Invalid or expired invitation."
# views.stories.suggest scop, unable to get it, I don't know why
suggeststorychanges: "Suggest Story Changes"
suggestchangesbutton: "Suggest Changes"

View file

@ -425,6 +425,9 @@ fr:
tagstitle: "Marques"
users_controller:
usertitle: "Utilisateurs"
signup_controller:
signedup: "Vous êtes déja inscrit."
invalidinv: "Invitation invalide ou expirée."
# suggest.stories scope, unable to get it so global, I don't know why
suggeststorychanges: "Suggérer des changements à l'info"
suggestchangesbutton: "Suggérer des changements"