From 30cdbface5da5a12421722699e550ba9eabe42b1 Mon Sep 17 00:00:00 2001 From: Matchu Date: Tue, 1 Jan 2013 22:10:49 -0500 Subject: [PATCH] i18n for closet_hangers#petpage and items#_item (NC icon) --- app/helpers/items_helper.rb | 4 +-- app/stylesheets/closet_hangers/_petpage.sass | 1 - .../closet_hangers/_petpage_content.html.haml | 7 +++--- .../closet_hangers/_petpage_hanger.html.haml | 3 ++- app/views/closet_hangers/petpage.html.haml | 25 +++++++------------ config/locales/en-meep.yml | 25 ++++++++++++++++++- config/locales/en.yml | 23 +++++++++++++++++ public/stylesheets/compiled/screen.css | 17 ++++++------- 8 files changed, 71 insertions(+), 34 deletions(-) diff --git a/app/helpers/items_helper.rb b/app/helpers/items_helper.rb index 2aeafae4..a8aef737 100644 --- a/app/helpers/items_helper.rb +++ b/app/helpers/items_helper.rb @@ -75,8 +75,8 @@ module ItemsHelper end def nc_icon - image_tag 'nc.png', :title => 'NC Mall Item', :alt => 'NC', - :class => 'nc-icon' + image_tag 'nc.png', :title => t('items.item.nc.description'), + :alt => t('items.item.nc.abbr'), :class => 'nc-icon' end def nc_icon_for(item) diff --git a/app/stylesheets/closet_hangers/_petpage.sass b/app/stylesheets/closet_hangers/_petpage.sass index bd61bf32..fe2dac2c 100644 --- a/app/stylesheets/closet_hangers/_petpage.sass +++ b/app/stylesheets/closet_hangers/_petpage.sass @@ -19,7 +19,6 @@ body.closet_hangers-petpage h4 +inline-block - width: 8em vertical-align: middle &::after diff --git a/app/views/closet_hangers/_petpage_content.html.haml b/app/views/closet_hangers/_petpage_content.html.haml index 0fa65278..a0ab5a8b 100644 --- a/app/views/closet_hangers/_petpage_content.html.haml +++ b/app/views/closet_hangers/_petpage_content.html.haml @@ -77,7 +77,7 @@ - [true, false].each do |owned| - lists = lists_by_owned[owned] - if lists || unlisted_hangers_by_owned[owned] - %h2.dti-item-group-header Items #OWNER #{ClosetHanger.verb(:someone, owned)} + %h2.dti-item-group-header= closet_lists_group_name '#OWNER', true %ul.dti-item-group - if lists - lists.each do |list| @@ -92,10 +92,9 @@ - if unlisted_hangers_by_owned[owned] %li.dti-unlisted-items - unless lists.blank? - %h3 (Not in a list) + %h3= t '.unlisted_header' %div = render_batched_petpage_hangers(unlisted_hangers_by_owned[owned]) -#dti-item-footer - I made this list on Dress to Impress. You can, too! +#dti-item-footer= t '.footer' diff --git a/app/views/closet_hangers/_petpage_hanger.html.haml b/app/views/closet_hangers/_petpage_hanger.html.haml index 683620f1..617d349f 100644 --- a/app/views/closet_hangers/_petpage_hanger.html.haml +++ b/app/views/closet_hangers/_petpage_hanger.html.haml @@ -1,6 +1,7 @@ %div.dti-item = image_tag petpage_item_thumbnail_url(hanger.item), :alt => nil, :class => 'dti-item-thumbnail' - if hanger.item.nc? - = image_tag nc_icon_url, :alt => 'NC', :class => 'dti-item-nc', :title => 'This is an NC Mall item' + = image_tag nc_icon_url, :alt => t('items.item.nc.abbr'), + :class => 'dti-item-nc', :title => t('items.item.nc.description') %span= petpage_item_name hanger.item diff --git a/app/views/closet_hangers/petpage.html.haml b/app/views/closet_hangers/petpage.html.haml index c04b0e06..e2c75267 100644 --- a/app/views/closet_hangers/petpage.html.haml +++ b/app/views/closet_hangers/petpage.html.haml @@ -1,25 +1,18 @@ -- title 'Export to petpage' +- title t('.title') - secondary_nav do - = link_to 'Back to Your Items', user_closet_hangers_path(current_user), :class => 'button' + = link_to t('.your_items_link'), user_closet_hangers_path(current_user), :class => 'button' #intro - %p - We took your public lists and created a nice, simple HTML file for your - Neopet's petpage. By default it's styled as a table, but it doesn't have to - be. The HTML is flexible, so, if you're the artsy type, you're free to mess - with the styles all you want! - - %p - Copy the HTML from the box below, then paste it into - = succeed '.' do - = link_to "your pet's page", 'http://www.neopets.com/edithomepage.phtml' - Then head to the Neoboards to show off! Have fun! + %p= t '.description' + %p= t '.instructions_html', + :edit_petpage_link => link_to(t('.instructions_edit_petpage_link_content'), + 'http://www.neopets.com/edithomepage.phtml') = form_tag petpage_user_closet_hangers_path(@user), :method => :get, :id => 'petpage-closet-lists' do = hidden_field_tag 'filter', '1' - @closet_lists_by_owned.each do |owned, closet_lists| %div - %h4 Items you #{closet_list_verb(owned)} + %h4= closet_lists_group_name(:you, owned) %ul - closet_lists.each do |closet_list| %li @@ -29,8 +22,8 @@ %li.unlisted = label_tag do = check_box_tag "groups[#{owned}]", '1', petpage_group_checked(owned) - Not in a list - = submit_tag 'Export checked lists to petpage' + = t 'closet_lists.unlisted_name' + = submit_tag t('.submit') %textarea#petpage-output = '' + render('petpage_content', diff --git a/config/locales/en-meep.yml b/config/locales/en-meep.yml index 9760028d..6fd9022e 100644 --- a/config/locales/en-meep.yml +++ b/config/locales/en-meep.yml @@ -90,7 +90,25 @@ en-meep: submit: Meep header: (Not in a meepit) empty: There aren't any meepits here. - + + petpage: + title: Export to meeppage + your_items_link: Back to Your Meeps + submit: Export meeped lists to meeppage + description: + We took your public lists and meeped a nice, simple HTML file for your + Neopet's petpage. By default it's meeped as a table, but it doesn't + have to meep. The HTML is flexible, so, if you're the artsy type, you're + free to meep with the styles all you want! + instructions_html: + Meep the HTML from the box below, then paste it into + %{edit_petpage_link}. Then meep to the Neoboards to show off! Have fun! + instructions_edit_petpage_link_content: your meepit's page + + petpage_content: + unlisted_header: (Not in a meep) + footer: I meeped this list on Dreep to Impreep. You can, too! + visibility: private: name: Preevate @@ -202,6 +220,11 @@ en-meep: newest_items_header: New Meeps species_search_header: Can't decide? Meep by species + item: + nc: + abbr: MC + description: This is a MC Meep item + show: rarity: Meepity jn_items: JN Meepits diff --git a/config/locales/en.yml b/config/locales/en.yml index 106b0346..01942ecc 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -92,6 +92,24 @@ en: header: (Not in a list) empty: There aren't any items here. + petpage: + title: Export to petpage + your_items_link: Back to Your Items + submit: Export checked lists to petpage + description: + We took your public lists and created a nice, simple HTML file for your + Neopet's petpage. By default it's styled as a table, but it doesn't + have to be. The HTML is flexible, so, if you're the artsy type, you're + free to mess with the styles all you want! + instructions_html: + Copy the HTML from the box below, then paste it into + %{edit_petpage_link}. Then head to the Neoboards to show off! Have fun! + instructions_edit_petpage_link_content: your pet's page + + petpage_content: + unlisted_header: (Not in a list) + footer: I made this list on Dress to Impress. You can, too! + visibility: private: name: Private @@ -203,6 +221,11 @@ en: newest_items_header: Newest items species_search_header: Can't decide? Search by species + item: + nc: + abbr: NC + description: This is an NC Mall item + show: rarity: Rarity jn_items: JN Items diff --git a/public/stylesheets/compiled/screen.css b/public/stylesheets/compiled/screen.css index f88f89e2..802b109e 100644 --- a/public/stylesheets/compiled/screen.css +++ b/public/stylesheets/compiled/screen.css @@ -1332,24 +1332,23 @@ body.closet_hangers-petpage #petpage-closet-lists h4 { display: inline-block; vertical-align: middle; *vertical-align: auto; - width: 8em; vertical-align: middle; } /* line 7, ../../../../../../.rvm/gems/ruby-1.9.3-p362/gems/compass-0.10.6/frameworks/compass/stylesheets/compass/css3/_inline-block.scss */ body.closet_hangers-petpage #petpage-closet-lists h4 { *display: inline; } -/* line 25, ../../../app/stylesheets/closet_hangers/_petpage.sass */ +/* line 24, ../../../app/stylesheets/closet_hangers/_petpage.sass */ body.closet_hangers-petpage #petpage-closet-lists h4::after { content: ":"; } -/* line 28, ../../../app/stylesheets/closet_hangers/_petpage.sass */ +/* line 27, ../../../app/stylesheets/closet_hangers/_petpage.sass */ body.closet_hangers-petpage #petpage-closet-lists ul { list-style: none; margin: 0; padding: 0; } -/* line 33, ../../../app/stylesheets/closet_hangers/_petpage.sass */ +/* line 32, ../../../app/stylesheets/closet_hangers/_petpage.sass */ body.closet_hangers-petpage #petpage-closet-lists ul li { display: -moz-inline-box; -moz-box-orient: vertical; @@ -1364,11 +1363,11 @@ body.closet_hangers-petpage #petpage-closet-lists ul li { body.closet_hangers-petpage #petpage-closet-lists ul li { *display: inline; } -/* line 39, ../../../app/stylesheets/closet_hangers/_petpage.sass */ +/* line 38, ../../../app/stylesheets/closet_hangers/_petpage.sass */ body.closet_hangers-petpage #petpage-closet-lists ul li label { padding: 0.25em 0.75em 0.25em 0.25em; } -/* line 42, ../../../app/stylesheets/closet_hangers/_petpage.sass */ +/* line 41, ../../../app/stylesheets/closet_hangers/_petpage.sass */ body.closet_hangers-petpage #petpage-closet-lists ul li.checked { background: #eeffee; -moz-border-radius: 3px; @@ -1380,15 +1379,15 @@ body.closet_hangers-petpage #petpage-closet-lists ul li.checked { border: 1px solid #006600; padding: 0; } -/* line 48, ../../../app/stylesheets/closet_hangers/_petpage.sass */ +/* line 47, ../../../app/stylesheets/closet_hangers/_petpage.sass */ body.closet_hangers-petpage #petpage-closet-lists ul li.unlisted { font-style: italic; } -/* line 51, ../../../app/stylesheets/closet_hangers/_petpage.sass */ +/* line 50, ../../../app/stylesheets/closet_hangers/_petpage.sass */ body.closet_hangers-petpage #petpage-closet-lists input[type=submit] { float: right; } -/* line 54, ../../../app/stylesheets/closet_hangers/_petpage.sass */ +/* line 53, ../../../app/stylesheets/closet_hangers/_petpage.sass */ body.closet_hangers-petpage #petpage-output { display: block; height: 30em;