aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/public_body_controller.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-01-30 10:47:13 +0000
committerSeb Bacon <seb.bacon@gmail.com>2012-01-30 10:47:13 +0000
commitfd042ca3c96dcb454eddfdc423f68e233b2b3bab (patch)
tree6626d16cb9856fa3d104af86ee6409387883c20e /app/controllers/public_body_controller.rb
parent2d3524808fa36a26f85ae85403d58f7114630c3e (diff)
Make better wording at the top of the page listing subsets of public bodies. At the same time, cause the tests not to rely on WDTK data. Fixes #396
Diffstat (limited to 'app/controllers/public_body_controller.rb')
-rw-r--r--app/controllers/public_body_controller.rb12
1 files changed, 8 insertions, 4 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