From 9e8d39e0972c18698b982dae75b0e48d9e9c5e2f Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 9 Jan 2013 22:05:07 -0600 Subject: [PATCH] i18n for pets#load flashes --- app/controllers/pets_controller.rb | 16 +++++----------- config/locales/en-meep.yml | 9 +++++++++ config/locales/en.yml | 9 +++++++++ 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/app/controllers/pets_controller.rb b/app/controllers/pets_controller.rb index c6c5f5e9..6e5fc0aa 100644 --- a/app/controllers/pets_controller.rb +++ b/app/controllers/pets_controller.rb @@ -41,25 +41,19 @@ class PetsController < ApplicationController end def pet_not_found - pet_load_error :long_message => 'Could not find any pet by that name. Did you spell it correctly?', - :short_message => 'Pet not found', - :status => :not_found + pet_load_error :long_message => t('pets.load.not_found'), + :status => :not_found end def asset_download_error(e) Rails.logger.warn e.message - pet_load_error :long_message => "We found the pet all right, but the " + - "Neopets image server didn't respond to our download request. Maybe it's " + - "down, or maybe it's just having trouble. Try again later, maybe. Sorry!", - :short_message => 'Neopets seems down. Try again?', - :status => :gateway_timeout + pet_load_error :long_message => t('pets.load.asset_download_error'), + :status => :gateway_timeout end def pet_download_error(e) Rails.logger.warn e.message - pet_load_error :long_message => "Could not connect to the Neopets server " + - "to look up the pet. Maybe they're down. Try again later, maybe. Sorry!", - :short_message => 'Neopets seems down. Try again?', + pet_load_error :long_message => t('pets.load.pet_download_error'), :status => :gateway_timeout end diff --git a/config/locales/en-meep.yml b/config/locales/en-meep.yml index 662b4f29..b03b5616 100644 --- a/config/locales/en-meep.yml +++ b/config/locales/en-meep.yml @@ -657,6 +657,15 @@ en-meep: waiting: Weeting… loading: Leeding… 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: index: diff --git a/config/locales/en.yml b/config/locales/en.yml index 70cc94a6..dc685f72 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -676,6 +676,15 @@ en: waiting: Waiting… loading: Loading… 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: index: