1
0
Fork 0
forked from OpenNeo/impress

i18n for pets#load flashes

This commit is contained in:
Emi Matchu 2013-01-09 22:05:07 -06:00
parent 7aa49f70be
commit 9e8d39e097
3 changed files with 23 additions and 11 deletions

View file

@ -41,25 +41,19 @@ class PetsController < ApplicationController
end end
def pet_not_found def pet_not_found
pet_load_error :long_message => 'Could not find any pet by that name. Did you spell it correctly?', pet_load_error :long_message => t('pets.load.not_found'),
:short_message => 'Pet not found', :status => :not_found
:status => :not_found
end end
def asset_download_error(e) def asset_download_error(e)
Rails.logger.warn e.message Rails.logger.warn e.message
pet_load_error :long_message => "We found the pet all right, but the " + pet_load_error :long_message => t('pets.load.asset_download_error'),
"Neopets image server didn't respond to our download request. Maybe it's " + :status => :gateway_timeout
"down, or maybe it's just having trouble. Try again later, maybe. Sorry!",
:short_message => 'Neopets seems down. Try again?',
:status => :gateway_timeout
end end
def pet_download_error(e) def pet_download_error(e)
Rails.logger.warn e.message Rails.logger.warn e.message
pet_load_error :long_message => "Could not connect to the Neopets server " + pet_load_error :long_message => t('pets.load.pet_download_error'),
"to look up the pet. Maybe they're down. Try again later, maybe. Sorry!",
:short_message => 'Neopets seems down. Try again?',
:status => :gateway_timeout :status => :gateway_timeout
end end

View file

@ -657,6 +657,15 @@ en-meep:
waiting: Weeting… waiting: Weeting…
loading: Leeding… loading: Leeding…
submission_success: "%{points} peeps" submission_success: "%{points} peeps"
load:
not_found: We couldn't meep a pet by that name. Is it meeped correctly?
asset_download_error:
We meeped the pet and what it's wearing, but couldn't meep the
associated Flash files. Maybe Neopets is down. Please meep again later!
pet_download_error:
We couldn't meep to Neopets to meep up the pet. Maybe they're down.
Please try meep later!
users: users:
index: index:

View file

@ -676,6 +676,15 @@ en:
waiting: Waiting… waiting: Waiting…
loading: Loading… loading: Loading…
submission_success: "%{points} points" submission_success: "%{points} points"
load:
not_found: We couldn't find a pet by that name. Is it spelled correctly?
asset_download_error:
We found the pet and what it's wearing, but couldn't download the
associated Flash files. Maybe Neopets is down. Please try again later!
pet_download_error:
We couldn't connect to Neopets to look up the pet. Maybe they're down.
Please try again later!
users: users:
index: index: