i18n for pets#load flashes
This commit is contained in:
parent
7aa49f70be
commit
9e8d39e097
3 changed files with 23 additions and 11 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -658,6 +658,15 @@ en-meep:
|
||||||
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:
|
||||||
not_found: We don't have a meepit named %{name}. Is it meeped correctly?
|
not_found: We don't have a meepit named %{name}. Is it meeped correctly?
|
||||||
|
|
|
@ -677,6 +677,15 @@ en:
|
||||||
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:
|
||||||
not_found: We don't have a user named %{name}. Is it spelled correctly?
|
not_found: We don't have a user named %{name}. Is it spelled correctly?
|
||||||
|
|
Loading…
Reference in a new issue