i18n for outfits#destroy flashes

This commit is contained in:
Emi Matchu 2013-01-03 20:32:17 -05:00
parent 397c556c50
commit 5eb7842e36
3 changed files with 15 additions and 16 deletions

View file

@ -28,22 +28,15 @@ class OutfitsController < ApplicationController
end
def destroy
if @outfit.destroy
respond_to do |format|
format.html {
flash[:success] = "Outfit #{@outfit.name} successfully deleted"
redirect_to current_user_outfits_path
}
format.json { render :json => true }
end
else
respond_to do |format|
format.html {
flash[:alert] = "Error deleting outfit. Try again?"
redirect_to current_user_outfits_path, :status => :bad_request
}
format.json { render :json => false, :status => :bad_request }
end
@outfit.destroy
respond_to do |format|
format.html {
flash[:success] = t('outfits.destroy.success',
:outfit_name => @outfit.name)
redirect_to current_user_outfits_path
}
format.json { render :json => true }
end
end

View file

@ -438,6 +438,9 @@ en-meep:
submit: Meemport all pets
outfits:
destroy:
success: Outfit "%{outfit_name}" succeessfully demeeped.
new:
tagline: Meeps made meepy!
load_pet_legend: Enter your pet's meep

View file

@ -439,6 +439,9 @@ en:
submit: Import all pets
outfits:
destroy:
success: Outfit "%{outfit_name}" successfully deleted.
new:
tagline: Neopets wearables made easy!
load_pet_legend: Enter your pet's name