From e1a965c2fb5e83743bcf63562b278c1d21b705e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Wilk?= Date: Thu, 25 Nov 2010 23:34:48 +0100 Subject: [PATCH] Added multiple plurals for translations of 'contacts' and 'requests'. - Added multiple plurals handling for .contacts token in views/shared/_aspect_contacts.haml, - Added multiple plurals handling for .new_requests token in views/shared/_aspect_contacts.haml, - Added multiple plurals handling for .contacts token in views/aspects/show.html.haml. --- app/views/aspects/show.html.haml | 8 +------- app/views/shared/_aspect_contacts.haml | 7 ++----- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index 5a2ab2334..e83c91589 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -7,15 +7,9 @@ = @aspect %span.aspect_contact_count{:style=>"color:#999;font-size:14px;"} - = @aspect.contacts.count - - if @aspect.contacts.count == 1 - = t('.contact') - - else - = t('.contacts') - + = t('.contacts', :count=>@aspect_contacts.count) = link_to t('.edit_aspect'), "#", :id => "edit_aspect_trigger" - .span-8.append-1 = render 'shared/aspect_contacts', :contacts => @aspect_contacts, :aspect => @aspect diff --git a/app/views/shared/_aspect_contacts.haml b/app/views/shared/_aspect_contacts.haml index 6979e42a8..49124d85d 100644 --- a/app/views/shared/_aspect_contacts.haml +++ b/app/views/shared/_aspect_contacts.haml @@ -50,10 +50,7 @@ - if (aspect == :all) && @request_count > 0 #new_request_pane{:class => "everyone"} %h1.new_request{:style => 'text-align:center'} - - if @request_count > 1 - = link_to t('.new_requests', :count => @request_count), aspects_manage_path - - else - = link_to t('.new_request', :count => @request_count), aspects_manage_path + = link_to t('.new_requests', :count => @request_count), aspects_manage_path #left_pane{:class => ("everyone" if aspect == :all)} - if aspect == :all @@ -99,7 +96,7 @@ %h4.aspect_title_right{:style => "margin-bottom:0;"} = link_to user_aspect, user_aspect %span{:style=>"font-size:12px;color:#888;"} - = "#{user_aspect.contacts.count} #{t('.contacts')}" + = t('.contacts', :count=>user_aspect.contacts.count) - if user_aspect.contacts.count > 0 - for aspect_contact in user_aspect.contacts[0..8]