diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/info_request.rb | 8 | ||||
-rw-r--r-- | app/models/profile_photo.rb | 12 | ||||
-rw-r--r-- | app/views/admin_public_body/show.html.erb | 5 | ||||
-rw-r--r-- | app/views/general/_localised_datepicker.html.erb | 10 | ||||
-rw-r--r-- | app/views/request/_view_html_prefix.html.erb | 4 | ||||
-rw-r--r-- | app/views/request/_view_html_stylesheet.html.erb | 2 | ||||
-rw-r--r-- | app/views/user/sign.html.erb | 2 |
7 files changed, 27 insertions, 16 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 0a073dc79..4eb64dc13 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -113,8 +113,12 @@ class InfoRequest < ActiveRecord::Base # Possible reasons that a request could be reported for administrator attention def report_reasons - ["Contains defamatory material", "Not a valid request", "Request for personal information", - "Contains personal information", "Vexatious", "Other"] + [_("Contains defamatory material"), + _("Not a valid request"), + _("Request for personal information"), + _("Contains personal information"), + _("Vexatious"), + _("Other")] end def must_be_valid_state diff --git a/app/models/profile_photo.rb b/app/models/profile_photo.rb index 322ebe53c..6c3b2cfa0 100644 --- a/app/models/profile_photo.rb +++ b/app/models/profile_photo.rb @@ -70,21 +70,25 @@ class ProfilePhoto < ActiveRecord::Base def data_and_draft_checks if self.data.nil? - errors.add(:data, N_("Please choose a file containing your photo.")) + errors.add(:data, _("Please choose a file containing your photo.")) return end if self.image.nil? - errors.add(:data, N_("Couldn't understand the image file that you uploaded. PNG, JPEG, GIF and many other common image file formats are supported.")) + errors.add(:data, _("Couldn't understand the image file that you uploaded. PNG, JPEG, GIF and many other common image file formats are supported.")) return end if self.image.format != 'PNG' - errors.add(:data, N_("Failed to convert image to a PNG")) + errors.add(:data, _("Failed to convert image to a PNG")) end if !self.draft && (self.image.columns != WIDTH || self.image.rows != HEIGHT) - errors.add(:data, N_("Failed to convert image to the correct size: at {{cols}}x{{rows}}, need {{width}}x{{height}}", :cols => self.image.columns, :rows => self.image.rows, :width => WIDTH, :height => HEIGHT)) + errors.add(:data, _("Failed to convert image to the correct size: at {{cols}}x{{rows}}, need {{width}}x{{height}}", + :cols => self.image.columns, + :rows => self.image.rows, + :width => WIDTH, + :height => HEIGHT)) end if self.draft && self.user_id diff --git a/app/views/admin_public_body/show.html.erb b/app/views/admin_public_body/show.html.erb index 8262287d5..f8161db26 100644 --- a/app/views/admin_public_body/show.html.erb +++ b/app/views/admin_public_body/show.html.erb @@ -67,7 +67,10 @@ </div> <% if i == versions.length - 1 %> <div class="span6"> - <%=_("This is the first version.")%> + <p>“<%= h(historic_public_body.last_edit_comment) %>”</p> + <ul> + <li><%=_("This is the first version.")%></li> + </ul> </div> <% else %> <div class="span6"> diff --git a/app/views/general/_localised_datepicker.html.erb b/app/views/general/_localised_datepicker.html.erb index ec6593ea0..ee3206957 100644 --- a/app/views/general/_localised_datepicker.html.erb +++ b/app/views/general/_localised_datepicker.html.erb @@ -1,16 +1,16 @@ <script type="text/javascript"> $(function() { $(".use-datepicker").datepicker( - {closeText: '<%= _("Done") %>', - prevText: '<%= _("Prev") %>', - nextText: '<%= _("Next") %>', - currentText: '<%= _("Today") %>', + {closeText: '<%= j _("Done") %>', + prevText: '<%= j _("Prev") %>', + nextText: '<%= j _("Next") %>', + currentText: '<%= j _("Today") %>', monthNames: <%= raw I18n.translate('date.month_names')[1..-1].to_json %>, monthNamesShort: <%= raw I18n.translate('date.abbr_month_names')[1..-1].to_json %>, dayNames: <%= raw I18n.translate('date.day_names').to_json %>, dayNamesShort: <%= raw I18n.translate('date.abbr_day_names').to_json %>, dayNamesMin: <%= raw I18n.translate('date.abbr_day_names').collect{|x| x[0..0]}.to_json %>, - weekHeader: '<%= _("Wk") %>', + weekHeader: '<%= j _("Wk") %>', dateFormat: '<%= I18n.translate('date.formats.default').sub("%Y", "yy").sub("%m", "mm").sub("%d", "dd").gsub("-", "/") %>'} ); }); diff --git a/app/views/request/_view_html_prefix.html.erb b/app/views/request/_view_html_prefix.html.erb index 63caa98d4..63fac7c6d 100644 --- a/app/views/request/_view_html_prefix.html.erb +++ b/app/views/request/_view_html_prefix.html.erb @@ -1,9 +1,9 @@ <div class="view_html_prefix"> <div class="view_html_logo"> - <a href="/"><%= image_tag "navimg/logo-trans-small.png", :alt => site_name %></a> + <a href="/"><img src="/assets/navimg/logo-trans-small.png" alt="<%= site_name %>"></a> </div> <div class="view_html_download_link"> - <%=link_to _("Download original attachment"), @attachment_url %> + <%=link_to _("Download original attachment"), @attachment_url %> <br>(<%=h @attachment.name_of_content_type %>) </div> <%= _('This is an HTML version of an attachment to the Freedom of Information request')%> diff --git a/app/views/request/_view_html_stylesheet.html.erb b/app/views/request/_view_html_stylesheet.html.erb index d6cb932a8..125ce66ec 100644 --- a/app/views/request/_view_html_stylesheet.html.erb +++ b/app/views/request/_view_html_stylesheet.html.erb @@ -1 +1 @@ -<%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet" %> +<link type="text/css" title="Main" rel="stylesheet" media="screen" href="/assets/application.css"> diff --git a/app/views/user/sign.html.erb b/app/views/user/sign.html.erb index 8291cdace..e8c5d5a58 100644 --- a/app/views/user/sign.html.erb +++ b/app/views/user/sign.html.erb @@ -13,7 +13,7 @@ </p> <% if @post_redirect.post_params["controller"] == "admin_general" %> <% unless AlaveteliConfiguration::disable_emergency_user %> - <p id="superuser_message">Don't have a superuser account yet? <%= link_to "Sign in as the emergency user", @post_redirect.uri + "?emergency=1" %></p> + <p id="superuser_message"><%= _("Don't have a superuser account yet?") %> <%= link_to _("Sign in as the emergency user"), @post_redirect.uri + "?emergency=1" %></p> <% end %> <% end %> |