forked from OpenNeo/impress
i18n for pet_query.js
This commit is contained in:
parent
6695faccba
commit
f82d3683f5
5 changed files with 19 additions and 13 deletions
|
@ -87,7 +87,13 @@
|
||||||
- @newest_items.each do |item|
|
- @newest_items.each do |item|
|
||||||
= link_to image_tag(item.thumbnail_url), 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
|
- content_for :javascripts do
|
||||||
= include_javascript_libraries :jquery
|
= include_javascript_libraries :jquery, :jquery_tmpl
|
||||||
= include_javascripts :new_outfit_package
|
= include_javascripts :new_outfit_package
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ embed_assets: on
|
||||||
javascripts:
|
javascripts:
|
||||||
bulk_pets_package:
|
bulk_pets_package:
|
||||||
- public/javascripts/ajax_auth.js
|
- public/javascripts/ajax_auth.js
|
||||||
- public/javascripts/pet_query.js
|
|
||||||
- public/javascripts/pets/bulk.js
|
- public/javascripts/pets/bulk.js
|
||||||
|
|
||||||
edit_outfit_package:
|
edit_outfit_package:
|
||||||
|
|
|
@ -627,6 +627,10 @@ en-meep:
|
||||||
link: OpenNeo Meep
|
link: OpenNeo Meep
|
||||||
newest_items:
|
newest_items:
|
||||||
header: New Meeps
|
header: New Meeps
|
||||||
|
pet_query:
|
||||||
|
notice_html:
|
||||||
|
Thanks for meeping us <strong>%{pet_name}</strong>.
|
||||||
|
Meep up the good work!
|
||||||
|
|
||||||
show:
|
show:
|
||||||
default_outfit_name: Meeped outfit
|
default_outfit_name: Meeped outfit
|
||||||
|
|
|
@ -646,6 +646,10 @@ en:
|
||||||
link: OpenNeo Blog
|
link: OpenNeo Blog
|
||||||
newest_items:
|
newest_items:
|
||||||
header: New Items
|
header: New Items
|
||||||
|
pet_query:
|
||||||
|
notice_html:
|
||||||
|
Thanks for showing us <strong>%{pet_name}</strong>.
|
||||||
|
Keep up the good work!
|
||||||
|
|
||||||
show:
|
show:
|
||||||
default_outfit_name: Shared outfit
|
default_outfit_name: Shared outfit
|
||||||
|
|
|
@ -14,16 +14,9 @@ $.each(query_string.substr(1).split('&'), function () {
|
||||||
|
|
||||||
if(PetQuery.name) {
|
if(PetQuery.name) {
|
||||||
if(PetQuery.species && PetQuery.color) {
|
if(PetQuery.species && PetQuery.color) {
|
||||||
var notice = $('<div></div>', {
|
$('#pet-query-notice-template').tmpl({
|
||||||
'class': 'success',
|
pet_name: PetQuery.name,
|
||||||
'html': "Thanks for showing us <strong>" + PetQuery.name + "</strong>! " +
|
pet_image_url: petImage('cpn/' + PetQuery.name, 1)
|
||||||
"Keep up the good work!"
|
}).prependTo('#container');
|
||||||
}),
|
|
||||||
image = $('<img/>', {
|
|
||||||
'class': 'inline-image',
|
|
||||||
'src': petImage('cpn/' + PetQuery.name, 1)
|
|
||||||
});
|
|
||||||
image.prependTo(notice);
|
|
||||||
notice.prependTo('#container');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue