aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-07-22 12:27:10 +0100
committerLouise Crow <louise.crow@gmail.com>2013-07-22 12:31:29 +0100
commit32c2d29c5251848a20f84563a03c649cacab6aad (patch)
tree07bf924b7f796a8bad3df7e59ce304988c7dc6ab
parent2cee6e1e9cc42a7359d4410b5c0da7f1d356a964 (diff)
Change concatenated header and title strings to full, properly escaped strings that are available for translation. Fixes #1003.
-rw-r--r--app/controllers/request_controller.rb6
-rw-r--r--app/views/request/similar.html.erb15
2 files changed, 13 insertions, 8 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 42693f867..4f6f3ca37 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -150,12 +150,6 @@ class RequestController < ApplicationController
:offset => (@page - 1) * @per_page, :limit => @per_page, :collapse_by_prefix => 'request_collapse')
@matches_estimated = @xapian_object.matches_estimated
@show_no_more_than = (@matches_estimated > MAX_RESULTS) ? MAX_RESULTS : @matches_estimated
-
- if (@page > 1)
- @page_desc = " (page " + @page.to_s + ")"
- else
- @page_desc = ""
- end
end
def list
diff --git a/app/views/request/similar.html.erb b/app/views/request/similar.html.erb
index 0d53f6919..eb7ff636d 100644
--- a/app/views/request/similar.html.erb
+++ b/app/views/request/similar.html.erb
@@ -1,5 +1,16 @@
-<% @title = "Requests similar to '" + h(@info_request.title) + "'" + @page_desc %>
-<h1><%="Requests similar to '" + request_link(@info_request) + "'" + @page_desc %></h1>
+<%- if @page > 1 %>
+ <%- @title = _("Requests similar to '{{request_title}}' (page {{page}})", {:page => @page, :request_title => @info_request.title}) %>
+<%- else %>
+<%- @title = _("Requests similar to '{{request_title}}'", {:request_title => @info_request.title}) %>
+<%- end %>
+
+<h1>
+ <%- if @page > 1 %>
+ <%= _("Requests similar to '{{request_title}}' (page {{page}})", {:page => @page, :request_title => request_link(@info_request)}) %>
+ <%- else %>
+ <%= _("Requests similar to '{{request_title}}'", {:request_title => request_link(@info_request)}) %>
+ <%- end %>
+</h1>
<!-- Important terms: <%= @xapian_object.important_terms.join(" ") %> -->