diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/public_body_controller.rb | 12 | ||||
-rw-r--r-- | app/models/public_body.rb | 2 | ||||
-rw-r--r-- | app/views/request/new.rhtml | 4 |
3 files changed, 11 insertions, 7 deletions
diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb index 659433c9e..00d1cc1e0 100644 --- a/app/controllers/public_body_controller.rb +++ b/app/controllers/public_body_controller.rb @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # app/controllers/public_body_controller.rb: # Show information about a public body. # @@ -117,14 +118,17 @@ class PublicBodyController < ApplicationController and has_tag_string_tags.model = \'PublicBody\' and has_tag_string_tags.name = ?) > 0', @query, @query, default_locale, @tag] end + if @tag == "all" @description = "" elsif @tag.size == 1 - @description = _("beginning with") + " '" + @tag + "'" + @description = _("beginning with ‘{{first_letter}}’", :first_letter=>@tag) else - @description = PublicBodyCategories::get().by_tag()[@tag] - if @description.nil? - @description = @tag + category_name = PublicBodyCategories::get().by_tag()[@tag] + if category_name.nil? + @description = _("matching the tag ‘{{tag_name}}’", :tag_name=>@tag) + else + @description = _("in the category ‘{{category_name}}’", :category_name=>category_name) end end PublicBody.with_locale(@locale) do diff --git a/app/models/public_body.rb b/app/models/public_body.rb index 453e3a6cf..9ac668b10 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -275,7 +275,7 @@ class PublicBody < ActiveRecord::Base ret = ret + types[-1] return ret else - return "A public authority" + return _("A public authority") end end diff --git a/app/views/request/new.rhtml b/app/views/request/new.rhtml index 2e554a20b..23212fc0b 100644 --- a/app/views/request/new.rhtml +++ b/app/views/request/new.rhtml @@ -47,12 +47,12 @@ <% end %> </div> - <div id="request_header_text"> <% if @info_request.public_body.has_notes? %> + <div id="request_header_text"> <h3><%= _('Special note for this authority!') %></h3> <p><%= @info_request.public_body.notes_as_html %></p> + </div> <% end %> - </div> <% if @info_request.public_body.eir_only? %> <h3><%= _('Please ask for environmental information only') %></h3> |