aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/public_body_controller.rb4
-rw-r--r--app/models/info_request.rb10
-rw-r--r--app/models/info_request_event.rb3
-rw-r--r--app/models/public_body.rb2
-rw-r--r--app/views/general/_advanced_search_tips.html.erb5
-rw-r--r--app/views/request/_describe_state.html.erb2
-rw-r--r--app/views/request/_followup.html.erb7
-rw-r--r--app/views/request/_sidebar.html.erb1
-rw-r--r--app/views/request/similar.html.erb2
9 files changed, 19 insertions, 17 deletions
diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb
index 02f0ceb19..1f7032eed 100644
--- a/app/controllers/public_body_controller.rb
+++ b/app/controllers/public_body_controller.rb
@@ -113,8 +113,8 @@ class PublicBodyController < ApplicationController
elsif @tag == 'other'
category_list = PublicBodyCategories::get().tags().map{|c| "'"+c+"'"}.join(",")
where_condition += base_tag_condition + " AND has_tag_string_tags.name in (#{category_list})) = 0"
- elsif @tag.size == 1
- @tag.upcase!
+ elsif @tag.scan(/./mu).size == 1
+ @tag = Unicode.upcase @tag
# The first letter queries have to be done on
# translations, so just indicate to add that later:
first_letter = true
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index aaced91a2..eba620f53 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -271,15 +271,9 @@ public
# Subject lines for emails about the request
def email_subject_request
- # XXX pull out this general_register_office specialisation
- # into some sort of separate jurisdiction dependent file
- if self.public_body.url_name == 'general_register_office'
- # without GQ in the subject, you just get an auto response
- _('{{law_used_full}} request GQ - {{title}}',:law_used_full=>self.law_used_full,:title=>self.title.html_safe)
- else
- _('{{law_used_full}} request - {{title}}',:law_used_full=>self.law_used_full,:title=>self.title.html_safe)
- end
+ _('{{law_used_full}} request - {{title}}',:law_used_full=>self.law_used_full,:title=>self.title.html_safe)
end
+
def email_subject_followup(incoming_message = nil)
if incoming_message.nil? || !incoming_message.valid_to_reply_to? || !incoming_message.subject
'Re: ' + self.email_subject_request
diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb
index 67cdda1b4..e268b28ca 100644
--- a/app/models/info_request_event.rb
+++ b/app/models/info_request_event.rb
@@ -339,6 +339,9 @@ class InfoRequestEvent < ActiveRecord::Base
end
raise _("unknown status ") + status
end
+ # TRANSLATORS: "Follow up" in this context means a further
+ # message sent by the requester to the authority after
+ # the initial request
return _("Follow up")
end
diff --git a/app/models/public_body.rb b/app/models/public_body.rb
index 828e8c94a..485a794b0 100644
--- a/app/models/public_body.rb
+++ b/app/models/public_body.rb
@@ -71,7 +71,7 @@ class PublicBody < ActiveRecord::Base
def PublicBody.set_first_letter(instance)
unless instance.name.nil? or instance.name.empty?
# we use a regex to ensure it works with utf-8/multi-byte
- first_letter = instance.name.scan(/^./mu)[0].upcase
+ first_letter = Unicode.upcase instance.name.scan(/^./mu)[0]
if first_letter != instance.first_letter
instance.first_letter = first_letter
end
diff --git a/app/views/general/_advanced_search_tips.html.erb b/app/views/general/_advanced_search_tips.html.erb
index 08ce04439..5e19c41e0 100644
--- a/app/views/general/_advanced_search_tips.html.erb
+++ b/app/views/general/_advanced_search_tips.html.erb
@@ -40,7 +40,10 @@
<p><%= _("All the options below can use <strong>variety</strong> or <strong>latest_variety</strong> before the colon. For example, <strong>variety:sent</strong> will match requests which have <em>ever</em> been sent; <strong>latest_variety:sent</strong> will match only requests that are <em>currently</em> marked as sent.") %></p>
<table class="status_table">
<tr><td><strong><%=search_link('variety:sent')%></strong></td><td><%= _('Original request sent') %></td></tr>
- <tr><td><strong><%=search_link('variety:followup_sent')%></strong></td><td><%= _('Follow up message sent by requester') %></td></tr>
+ <tr><td><strong><%=search_link('variety:followup_sent')%></strong></td><td><%= # TRANSLATORS: "Follow up message" in this context means a
+ # further message sent by the requester to the authority after
+ # the initial request
+ _('Follow up message sent by requester') %></td></tr>
<tr><td><strong><%=search_link('variety:response')%></strong></td><td><%= _('Response from a public authority') %></td></tr>
<tr><td><strong><%=search_link('variety:comment')%></strong></td><td><%= _('Annotation added to request') %></td></tr>
<tr><td><strong><%=search_link('variety:authority')%></strong></td><td><%= _('A public authority') %></td></tr>
diff --git a/app/views/request/_describe_state.html.erb b/app/views/request/_describe_state.html.erb
index 05cce013e..7b6fa9683 100644
--- a/app/views/request/_describe_state.html.erb
+++ b/app/views/request/_describe_state.html.erb
@@ -80,7 +80,7 @@
<% if @update_status %>
<div>
<%= radio_button "incoming_message", "described_state", "requires_admin", :id => 'requires_admin' + id_suffix %>
- <label for="error_message<%=id_suffix%>">
+ <label for="requires_admin<%=id_suffix%>">
<%= _('This request <strong>requires administrator attention</strong>') %>
</label>
</div>
diff --git a/app/views/request/_followup.html.erb b/app/views/request/_followup.html.erb
index bb099ff15..2643b767f 100644
--- a/app/views/request/_followup.html.erb
+++ b/app/views/request/_followup.html.erb
@@ -45,7 +45,12 @@
</div>
<% end %>
<% if @info_request.allow_new_responses_from == 'nobody' %>
- <p><%= _('Follow ups and new responses to this request have been stopped to prevent spam. Please <a href="{{url}}">contact us</a> if you are {{user_link}} and need to send a follow up.',:user_link=>user_link(@info_request.user), :url=>help_contact_path) %></p>
+
+ <p><%=
+ # TRANSLATORS: "Follow ups" in this context means further
+ # messages sent by the requester to the authority after
+ # the initial request
+ _('Follow ups and new responses to this request have been stopped to prevent spam. Please <a href="{{url}}">contact us</a> if you are {{user_link}} and need to send a follow up.',:user_link=>user_link(@info_request.user), :url=>help_contact_path) %></p>
<% else %>
<% if @internal_review %>
<p>
diff --git a/app/views/request/_sidebar.html.erb b/app/views/request/_sidebar.html.erb
index e08f43eaa..8d4a4a2d8 100644
--- a/app/views/request/_sidebar.html.erb
+++ b/app/views/request/_sidebar.html.erb
@@ -60,7 +60,6 @@
<% if @xapian_similar_more %>
<p><%= link_to _("More similar requests"), similar_request_path(@info_request.url_title) %></p>
<% end %>
- <!-- Important terms: <%= @xapian_similar.important_terms.join(" ") %> -->
<% end %>
<p><%= link_to _('Event history details'), request_details_path(@info_request) %></p>
diff --git a/app/views/request/similar.html.erb b/app/views/request/similar.html.erb
index eb7ff636d..5bdefc494 100644
--- a/app/views/request/similar.html.erb
+++ b/app/views/request/similar.html.erb
@@ -12,8 +12,6 @@
<%- end %>
</h1>
-<!-- Important terms: <%= @xapian_object.important_terms.join(" ") %> -->
-
<% if @xapian_object.results.empty? %>
<p><%= _('No similar requests found.')%></p>
<% else %>