1
0
Fork 0
forked from OpenNeo/impress

i18n for neopets_users#create flashes

This commit is contained in:
Emi Matchu 2013-01-01 22:45:15 -05:00
parent 42320162f0
commit 4c6b43028b
3 changed files with 27 additions and 9 deletions

View file

@ -12,14 +12,9 @@ class NeopetsUsersController < ApplicationController
@neopets_user.load! @neopets_user.load!
@neopets_user.save_hangers! @neopets_user.save_hangers!
message = "Success! We loaded user \"#{@neopets_user.username}\"" flash[:success] = t('neopets_users.create.success',
unless @neopets_user.hangers.empty? :user_name => @neopets_user.username,
message << " and added #{@neopets_user.hangers.size} items." :count => @neopets_user.hangers.size)
else
message << ", but already had all of this data recorded."
end
flash[:success] = message
redirect_to user_closet_hangers_path(current_user) redirect_to user_closet_hangers_path(current_user)
end end
@ -30,7 +25,8 @@ class NeopetsUsersController < ApplicationController
end end
def not_found def not_found
flash.now[:alert] = "Could not find user \"#{@neopets_user.username}\". Did you spell it correctly?" flash.now[:alert] = t('neopets_users.create.not_found',
:user_name => @neopets_user.username)
render :action => :new render :action => :new
end end
end end

View file

@ -351,6 +351,17 @@ en-meep:
concerned, find a meepit and meep out the source code to be sure. concerned, find a meepit and meep out the source code to be sure.
neopets_users: neopets_users:
create:
success:
zero:
Okay. We meeped %{user_name}'s pets, but already had these items
meeped to your account.
one:
Success! We meeped %{user_name}'s pets, and meeped 1 item.
other:
Success! We meeped %{user_name}'s pets, and meeped %{count} items.
not_found: Could not meep user %{user_name}. Is it meeped correctly?
new: new:
title: Meemport from pets title: Meemport from pets
your_items_link: Back to Your Meeps your_items_link: Back to Your Meeps

View file

@ -352,6 +352,17 @@ en:
be sure. be sure.
neopets_users: neopets_users:
create:
success:
zero:
Okay. We loaded %{user_name}'s pets, but already had these items
recorded to your account.
one:
Success! We loaded %{user_name}'s pets, and added 1 item.
other:
Success! We loaded %{user_name}'s pets, and added %{count} items.
not_found: Could not find user %{user_name}. Is it spelled correctly?
new: new:
title: Import from pets title: Import from pets
your_items_link: Back to Your Items your_items_link: Back to Your Items