i18n for pet_query.js

This commit is contained in:
Emi Matchu 2013-01-10 16:47:46 -06:00
parent 3b3c57f31a
commit 8b15d31639
5 changed files with 19 additions and 13 deletions

View file

@ -87,7 +87,13 @@
- @newest_items.each do |item|
= link_to image_tag(item.thumbnail_url), item
- localized_cache :action_suffix => 'pet_query_notice' do
%script#pet-query-notice-template{:type => 'text/x-jquery-tmpl'}
.success
%img.inline-image{:src => '${pet_image_url}'}
= t '.pet_query.notice_html', :pet_name => '${pet_name}'
- content_for :javascripts do
= include_javascript_libraries :jquery
= include_javascript_libraries :jquery, :jquery_tmpl
= include_javascripts :new_outfit_package

View file

@ -4,7 +4,6 @@ embed_assets: on
javascripts:
bulk_pets_package:
- public/javascripts/ajax_auth.js
- public/javascripts/pet_query.js
- public/javascripts/pets/bulk.js
edit_outfit_package:

View file

@ -627,6 +627,10 @@ en-meep:
link: OpenNeo Meep
newest_items:
header: New Meeps
pet_query:
notice_html:
Thanks for meeping us <strong>%{pet_name}</strong>.
Meep up the good work!
show:
default_outfit_name: Meeped outfit

View file

@ -646,6 +646,10 @@ en:
link: OpenNeo Blog
newest_items:
header: New Items
pet_query:
notice_html:
Thanks for showing us <strong>%{pet_name}</strong>.
Keep up the good work!
show:
default_outfit_name: Shared outfit

View file

@ -14,16 +14,9 @@ $.each(query_string.substr(1).split('&'), function () {
if(PetQuery.name) {
if(PetQuery.species && PetQuery.color) {
var notice = $('<div></div>', {
'class': 'success',
'html': "Thanks for showing us <strong>" + PetQuery.name + "</strong>! " +
"Keep up the good work!"
}),
image = $('<img/>', {
'class': 'inline-image',
'src': petImage('cpn/' + PetQuery.name, 1)
});
image.prependTo(notice);
notice.prependTo('#container');
$('#pet-query-notice-template').tmpl({
pet_name: PetQuery.name,
pet_image_url: petImage('cpn/' + PetQuery.name, 1)
}).prependTo('#container');
}
}