forked from OpenNeo/impress
i18n for users#index, users#update flashes
This commit is contained in:
parent
3c9e37f614
commit
7bc255e9c8
3 changed files with 18 additions and 3 deletions
|
@ -7,7 +7,7 @@ class UsersController < ApplicationController
|
|||
if @user
|
||||
redirect_to user_closet_hangers_path(@user)
|
||||
else
|
||||
flash[:alert] = "We don't have a user named \"#{name}\". Did you spell it correctly?"
|
||||
flash[:alert] = t('users.index.not_found', :name => name)
|
||||
redirect_to root_path
|
||||
end
|
||||
end
|
||||
|
@ -21,10 +21,11 @@ class UsersController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.html {
|
||||
if success
|
||||
flash[:success] = "Settings successfully saved"
|
||||
flash[:success] = t('users.update.success')
|
||||
redirect_back! user_closet_hangers_path(@user)
|
||||
else
|
||||
flash[:alert] = "Error saving user settings: #{@user.errors.full_messages.to_sentence}"
|
||||
flash[:alert] = t('users.update.invalid',
|
||||
:errors => @user.errors.full_messages.to_sentence)
|
||||
end
|
||||
}
|
||||
|
||||
|
|
|
@ -420,8 +420,15 @@ en-meep:
|
|||
submission_success: "%{points} peeps"
|
||||
|
||||
users:
|
||||
index:
|
||||
not_found: We don't have a meepit named %{name}. Is it meeped correctly?
|
||||
|
||||
top_contributors:
|
||||
title: Top Conmeeputors
|
||||
rank: Reep
|
||||
user: Meepit
|
||||
points: Peeps
|
||||
|
||||
update:
|
||||
success: Settings successfully meeped.
|
||||
invalid: "Could not meep settings: %{errors}"
|
||||
|
|
|
@ -422,8 +422,15 @@ en:
|
|||
submission_success: "%{points} points"
|
||||
|
||||
users:
|
||||
index:
|
||||
not_found: We don't have a user named %{name}. Is it spelled correctly?
|
||||
|
||||
top_contributors:
|
||||
title: Top Contributors
|
||||
rank: Rank
|
||||
user: User
|
||||
points: Points
|
||||
|
||||
update:
|
||||
success: Settings successfully saved.
|
||||
invalid: "Could not save settings: %{errors}"
|
||||
|
|
Loading…
Reference in a new issue