app/views/resolve/_background_progress.html.erb in umlaut-3.3.1 vs app/views/resolve/_background_progress.html.erb in umlaut-4.0.0.beta1
- old
+ new
@@ -1,6 +1,6 @@
-<%
+<%#
# Partial to display spinner for background services in progress.
# Also degrades fairly nicely to non-javascript.
#
# Pass in local variables as arguments (:locals param to render method):
#
@@ -20,25 +20,44 @@
# version. Then we immediately use js to over-write it with our
# js version. So js people get js, non get non, everyone is happy.
# Further investigation may need to be done to optimize specifically
# for JAWS (which is neither full js nor non js, but some js--right
# now I think they'll just get the non-js version, but we can do better.)
+%>
+
+<%
svc_types = [] if svc_types.nil?
svc_types.push(svc_type).uniq! if defined?(svc_type) && ! svc_type.nil?
# convert any Strings to ServiceTypeValues.
svc_types = svc_types.collect { |t| t.kind_of?(ServiceTypeValue) ? t : ServiceTypeValue[t] }
div_id = "progress_#{svc_types[0].name}" unless div_id
current_set_empty = false if current_set_empty.nil?
+
item_name ||= svc_types[0].display_name_pluralize
-progress_message ||= "Searching for #{current_set_empty ? "" : "more "} #{item_name}"
-# only display if there are more!
+
+progress_message ||= if current_set_empty
+ I18n.t("umlaut.resolve.background_load.progress_initial", :x => item_name)
+else
+ I18n.t("umlaut.resolve.background_load.progress_more", :x => item_name)
+end
+
+
+load_message ||= if current_set_empty
+ I18n.t("umlaut.resolve.background_load.load_initial", :x => item_name)
+else
+ I18n.t("umlaut.resolve.background_load.load_more", :x => item_name)
+end
+%>
+
+
+<% # only display if there are more!
if service_types_in_progress?(svc_types) %>
<div id="<%= div_id %>" class="background_progress_spinner">
<%= image_tag('spinner.gif', :alt =>"") %>
<span class="message"><%= progress_message %></span>
<noscript>
<div>
- <%= link_to "Load #{current_set_empty ? "" : "more"} #{item_name}.", {:action => "background_status", :"umlaut.request_id" => @user_request.id, :"umlaut.skip_resolve_menu" => params['umlaut.skip_resolve_menu']} %>
+ <%= link_to load_message, {:action => "background_status", :"umlaut.request_id" => @user_request.id, :"umlaut.skip_resolve_menu" => params['umlaut.skip_resolve_menu']} %>
</div>
</noscript>
</div><%
end %>
\ No newline at end of file