diff options
Diffstat (limited to 'app/views/public_body')
-rw-r--r-- | app/views/public_body/_body_listing_single.html.erb | 3 | ||||
-rw-r--r-- | app/views/public_body/_list_sidebar_extra.html.erb | 2 | ||||
-rw-r--r-- | app/views/public_body/list.html.erb | 16 | ||||
-rw-r--r-- | app/views/public_body/show.html.erb | 17 | ||||
-rw-r--r-- | app/views/public_body/view_email.html.erb | 6 |
5 files changed, 30 insertions, 14 deletions
diff --git a/app/views/public_body/_body_listing_single.html.erb b/app/views/public_body/_body_listing_single.html.erb index d0496fbb8..8e0a64df7 100644 --- a/app/views/public_body/_body_listing_single.html.erb +++ b/app/views/public_body/_body_listing_single.html.erb @@ -18,7 +18,8 @@ <% end %> </span> <span class="bottomline"> - <%= n_('%d request made.', '%d requests made.', public_body.info_requests.size) % public_body.info_requests.size %> + <%= n_('{{count}} request made.', '{{count}} requests made.', public_body.info_requests.size, + :count => public_body.info_requests.size) %> <% if !@include_request_link_in_authority_listing.nil? %> <%= link_to _("Make your own request"), public_body_path(public_body) %>. <% end %> diff --git a/app/views/public_body/_list_sidebar_extra.html.erb b/app/views/public_body/_list_sidebar_extra.html.erb index d3d65fec8..290593d6a 100644 --- a/app/views/public_body/_list_sidebar_extra.html.erb +++ b/app/views/public_body/_list_sidebar_extra.html.erb @@ -1,5 +1,5 @@ <p> - <%= raw(_('<a href="%s">Are we missing a public authority?</a>') % [help_requesting_path + '#missing_body']) %> + <%= link_to _('Are we missing a public authority?'), help_requesting_path + '#missing_body' %> </p> <p> <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_path %> diff --git a/app/views/public_body/list.html.erb b/app/views/public_body/list.html.erb index 3d73090d4..ce24daaf9 100644 --- a/app/views/public_body/list.html.erb +++ b/app/views/public_body/list.html.erb @@ -10,7 +10,7 @@ <% for row in PublicBodyCategories::get().with_headings() %> <% if row.instance_of?(Array) %> <li> - <%= link_to_unless (@tag == row[0]), row[1], list_public_bodies_path(:tag => row[0]) %> + <%= link_to_unless (@tag == row[0]), row[1], list_public_bodies_path(:tag => row[0]) %> </li> <% else %> <% if not first_row %> @@ -23,7 +23,7 @@ <% end %> <% end %> <% if not first_row %> - </ul> + </ul> <% end %> <%= render :partial => "list_sidebar_extra" %> </div> @@ -34,14 +34,20 @@ <%= form_tag(list_public_bodies_default_url, :method => "get", :id=>"search_form") do %> <div> - <%= text_field_tag(:public_body_query, params[:public_body_query], { :title => "type your search term here" } ) %> + <%= text_field_tag(:public_body_query, params[:public_body_query], { :title => "type your search term here" } ) %> <%= submit_tag(_("Search")) %> </div> <% end %> -<h2 class="publicbody_results"><%= n_('Found %d public authority %s', 'Found %d public authorities %s', @public_bodies.total_entries) % [@public_bodies.total_entries, @description] %></h2> +<h2 class="publicbody_results"> + <%= n_('Found {{count}} public authority {{description}}', + 'Found {{count}} public authorities {{description}}', + @public_bodies.total_entries, + :count => @public_bodies.total_entries, + :description => @description) %> +</h2> <%= render :partial => 'body_listing', :locals => { :public_bodies => @public_bodies } %> <%= will_paginate(@public_bodies) %><br/> - <%= raw _('<a href="%s">Can\'t find the one you want?</a>') % [help_requesting_path + '#missing_body'] %> + <%= link_to _("Can't find the one you want?"), help_requesting_path + '#missing_body' %> </div> diff --git a/app/views/public_body/show.html.erb b/app/views/public_body/show.html.erb index df6346e4f..fa6243b47 100644 --- a/app/views/public_body/show.html.erb +++ b/app/views/public_body/show.html.erb @@ -4,7 +4,12 @@ <h2><%= _('Follow this authority')%></h2> <% follower_count = TrackThing.count(:all, :conditions => ["public_body_id = ?", @public_body.id]) %> - <p><%= raw(n_("<span id='follow_count'>%d</span> person is following this authority", "<span id='follow_count'>%d</span> people are following this authority", follower_count) % follower_count) %></p> + <p> + <%= n_("{{count}} person is following this authority", + "{{count}} people are following this authority", + follower_count, + :count => content_tag(:span, follower_count, :id => "follow_count")) %> + </p> <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %> <h2><%= _('More about this authority')%></h2> @@ -56,7 +61,7 @@ <% else %> <%= _('Make a new <strong>Freedom of Information</strong> request to {{public_body}}', :public_body => h(@public_body.name))%> <% end %> - <%= _('<a class="link_button_green" href="{{url}}">{{text}}</a>', :url=>new_request_to_body_url(:url_name => @public_body.url_name), :text=>_("Start"))%> + <%= link_to _("Start"), new_request_to_body_url(:url_name => @public_body.url_name), :class => "link_button_green" %> <% elsif @public_body.has_notes? %> <%= @public_body.notes_as_html.html_safe %> <% elsif @public_body.not_requestable_reason == 'not_apply' %> @@ -91,9 +96,13 @@ <%= pluralize(@public_body.info_requests.size, "Environmental Information Regulations request made using this site") %> <% else %> <% if @public_body.info_requests.size > 4 %> - <%= n_('Search within the %d Freedom of Information requests to %s', 'Search within the %d Freedom of Information requests made to %s', @public_body.info_requests.size) % [@public_body.info_requests.size, @public_body.name] %> + <%= n_('Search within the {{count}} Freedom of Information requests to {{public_body_name}}', 'Search within the {{count}} Freedom of Information requests made to {{public_body_name}}', @public_body.info_requests.size, :count => @public_body.info_requests.size, :public_body_name => @public_body.name) %> <% else %> - <%= n_('%d Freedom of Information request to %s', '%d Freedom of Information requests to %s', @public_body.info_requests.size) % [@public_body.info_requests.size, @public_body.name] %> + <%= n_('{{count}} Freedom of Information request to {{public_body_name}}', + '{{count}} Freedom of Information requests to {{public_body_name}}', + @public_body.info_requests.size, + :count => @public_body.info_requests.size, + :public_body_name => @public_body.name) %> <% end %> <% end %> <%= @page_desc %> diff --git a/app/views/public_body/view_email.html.erb b/app/views/public_body/view_email.html.erb index 3799d227b..3f0a558c7 100644 --- a/app/views/public_body/view_email.html.erb +++ b/app/views/public_body/view_email.html.erb @@ -25,10 +25,10 @@ <p> <% if @public_body.is_requestable? || @public_body.not_requestable_reason != 'bad_contact' %> - <%= raw _('If the address is wrong, or you know a better address, please <a href="%s">contact us</a>.')% [help_contact_path]%> + <%= raw(_('If the address is wrong, or you know a better address, please <a href="{{url}}">contact us</a>.', :url => help_contact_path.html_safe)) %> <% else %> - <%= raw _(' If you know the address to use, then please <a href="%s">send it to us</a>. - You may be able to find the address on their website, or by phoning them up and asking.')% [help_contact_path] %> + <%= raw(_(' If you know the address to use, then please <a href="{{url}}">send it to us</a>. + You may be able to find the address on their website, or by phoning them up and asking.', :url =>help_contact_path.html_safe)) %> <% end %> </p> |