aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/user
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/user')
-rw-r--r--app/views/user/_signin.rhtml14
-rw-r--r--app/views/user/_signup.rhtml23
-rw-r--r--app/views/user/_user_listing_single.rhtml6
-rw-r--r--app/views/user/bad_token.rhtml12
-rw-r--r--app/views/user/banned.rhtml8
-rw-r--r--app/views/user/confirm.rhtml8
-rw-r--r--app/views/user/contact.rhtml8
-rw-r--r--app/views/user/no_cookies.rhtml23
-rw-r--r--app/views/user/set_crop_profile_photo.rhtml4
-rw-r--r--app/views/user/set_draft_profile_photo.rhtml14
-rw-r--r--app/views/user/set_profile_about_me.rhtml20
-rw-r--r--app/views/user/show.rhtml76
-rw-r--r--app/views/user/sign.rhtml10
-rw-r--r--app/views/user/signchangeemail.rhtml16
-rw-r--r--app/views/user/signchangeemail_confirm.rhtml10
-rw-r--r--app/views/user/signchangepassword.rhtml8
-rw-r--r--app/views/user/signchangepassword_confirm.rhtml10
-rw-r--r--app/views/user/signchangepassword_send_confirm.rhtml12
-rw-r--r--app/views/user/wrong_user.rhtml4
-rw-r--r--app/views/user/wrong_user_unknown_email.rhtml6
20 files changed, 147 insertions, 145 deletions
diff --git a/app/views/user/_signin.rhtml b/app/views/user/_signin.rhtml
index 52c2a9e71..879d107bd 100644
--- a/app/views/user/_signin.rhtml
+++ b/app/views/user/_signin.rhtml
@@ -4,31 +4,31 @@
<%= foi_error_messages_for :user_signin %>
<% if not sign_in_as_existing_user %>
- <h2>If you've used WhatDoTheyKnow before</h2>
+ <h2><%= ('If you\'ve used WhatDoTheyKnow before')%></h2>
<% end %>
<p>
- <label class="form_label" for="user_signin_email">Your e-mail:</label>
+ <label class="form_label" for="user_signin_email"><%= ('Your e-mail:')%></label>
<%= text_field 'user_signin', 'email', { :size => 20 } %>
</p>
<p>
- <label class="form_label" for="user_signin_password">Password:</label>
+ <label class="form_label" for="user_signin_password"><%= ('Password:')%></label>
<%= password_field 'user_signin', 'password', { :size => 15 } %>
</p>
<p class="form_note">
- <%= link_to "Forgotten your password?", signchangepassword_url + "?pretoken=" + h(params[:token]) %>
+ <%= link_to _('Forgotten your password?'), signchangepassword_url + "?pretoken=" + h(params[:token]) %>
</p>
<p class="form_checkbox">
<%= check_box_tag 'remember_me', "1" %>
- <label for="remember_me">Remember me</label> (keeps you signed in longer;
- do not use on a public computer) </p>
+ <label for="remember_me"><%= ('Remember me</label> (keeps you signed in longer;
+ do not use on a public computer) ')%></p>
<div class="form_button">
<%= hidden_field_tag 'token', params[:token], { :id => 'signin_token' } %>
- <%= submit_tag "Sign in" %>
+ <%= submit_tag _('Sign in') %>
</div>
<% end %>
diff --git a/app/views/user/_signup.rhtml b/app/views/user/_signup.rhtml
index 65b5ce6f2..70120bc5f 100644
--- a/app/views/user/_signup.rhtml
+++ b/app/views/user/_signup.rhtml
@@ -3,43 +3,42 @@
<% form_tag({:action => "signup"}, {:id => "signup_form"}) do %>
<%= foi_error_messages_for :user_signup %>
- <h2>If you're new to WhatDoTheyKnow</h2>
+ <h2><%= _('If you\'re new to WhatDoTheyKnow')%></h2>
<p>
- <label class="form_label" for="user_signup_email">Your e-mail:</label>
+ <label class="form_label" for="user_signup_email"><%= _('Your e-mail:')%></label>
<%= text_field 'user_signup', 'email', { :size => 20 } %>
</p>
<div class="form_item_note">
- We will not reveal your email address to anybody unless you or
- the law tell us to
- (<a href="/help/privacy">details</a>).
+ <%= ('We will not reveal your email address to anybody unless you or
+ the law tell us to (<a href="%s">_details</a>). ') %[help_privacy_path] %>
</div>
<p>
- <label class="form_label" for="user_signup_name">Your name:</label>
+ <label class="form_label" for="user_signup_name"> <%= _('Your name:')%></label>
<%= text_field 'user_signup', 'name', { :size => 20 } %>
</p>
<div class="form_item_note">
- Your <strong>name will appear publicly</strong>
- (<a href="/help/privacy#public_request">why?</a>)
+ <%= _('Your <strong>name will appear publicly</strong>
+ (<a href="%s">why?</a>)
on this website and in search engines. If you
are thinking of using a pseudonym, please
- <a href="/help/privacy#real_name">read this first</a>.
+ <a href="%s">read this first</a>.') % [help_privacy_path+"#public_request", help_privacy_path+"#real_name"] %>
</div>
<p>
- <label class="form_label" for="user_signup_password">Password:</label>
+ <label class="form_label" for="user_signup_password"> <%= _('Password:')%></label>
<%= password_field 'user_signup', 'password', { :size => 15 } %>
</p>
<p>
- <label class="form_label" for="user_signup_password_confirmation">Password: (again)</label>
+ <label class="form_label" for="user_signup_password_confirmation"> <%= _('Password: (again)')%></label>
<%= password_field 'user_signup', 'password_confirmation', { :size => 15 } %>
</p>
<div class="form_button">
<%= hidden_field_tag 'token', params[:token], { :id => 'signup_token' } %>
- <%= submit_tag "Sign up" %>
+ <%= submit_tag _('Sign up') %>
</div>
<% end %>
diff --git a/app/views/user/_user_listing_single.rhtml b/app/views/user/_user_listing_single.rhtml
index 9fa70c779..53df3a7e8 100644
--- a/app/views/user/_user_listing_single.rhtml
+++ b/app/views/user/_user_listing_single.rhtml
@@ -16,9 +16,9 @@ end %>
</span>
<span class="bottomline">
- <%= pluralize(display_user.info_requests.size, "request") %> made.
- <%= pluralize(display_user.visible_comments.size, "annotation") %> made.
- Joined in <%= year_from_date(display_user.created_at) %>.
+ <%= pluralize(display_user.info_requests.size, "request") %> <%= _('made.')%>
+ <%= pluralize(display_user.visible_comments.size, "annotation") %> <%= _('made.')%>
+ <%= _('Joined in')%> <%= year_from_date(display_user.created_at) %>.
</span>
</div>
diff --git a/app/views/user/bad_token.rhtml b/app/views/user/bad_token.rhtml
index 9855fb546..443835382 100644
--- a/app/views/user/bad_token.rhtml
+++ b/app/views/user/bad_token.rhtml
@@ -1,17 +1,17 @@
<h1>
-Please check the URL (i.e. the long code of letters and numbers) is copied
-correctly from your email.
+<%= _('Please check the URL (i.e. the long code of letters and numbers) is copied
+correctly from your email.'%>
</h1>
<p>
-If you can't click on it in the email, you'll have to <strong>select and copy
+<%= _('If you can\'t click on it in the email, you\'ll have to <strong>select and copy
it</strong> from the email. Then <strong>paste it into your browser</strong>, into the place
-you would type the address of any other webpage.
+you would type the address of any other webpage.')%>
</p>
<p>
-If you got the email <strong>more than six months ago</strong>, then this login link won't work any
-more. Please try doing what you were doing from the beginning.
+<%= _('If you got the email <strong>more than six months ago</strong>, then this login link won\'t work any
+more. Please try doing what you were doing from the beginning.')%>
</p>
diff --git a/app/views/user/banned.rhtml b/app/views/user/banned.rhtml
index 6bbdf4774..475c10977 100644
--- a/app/views/user/banned.rhtml
+++ b/app/views/user/banned.rhtml
@@ -6,14 +6,14 @@
<%=@details%>
</p>
-<p>You will be unable to make new requests, send follow ups, add annotations or
+<p><%= _('You will be unable to make new requests, send follow ups, add annotations or
send messages to other users. You may continue to view other requests, and set
up
-email alerts.</p>
+email alerts.')%></p>
<p>
-If you would like us to lift this ban, then you may politely
+<%= _('If you would like us to lift this ban, then you may politely
<a href="/help/contact">contact us</a> giving reasons.
-</p>
+')%></p>
diff --git a/app/views/user/confirm.rhtml b/app/views/user/confirm.rhtml
index bc9b259cc..bdaf5c8e9 100644
--- a/app/views/user/confirm.rhtml
+++ b/app/views/user/confirm.rhtml
@@ -3,12 +3,12 @@
<h1 class="confirmation_heading">Now check your email!</h1>
<p class="confirmation_message">
-We've sent you an email, and you'll need to click the link in it before you can
-continue.
+<%= _('We\'ve sent you an email, and you\'ll need to click the link in it before you can
+continue.') %>
</p>
<p class="confirmation_message">
-<small>If you use web-based email or have "junk mail" filters, also check your
+<%= _('<small>If you use web-based email or have "junk mail" filters, also check your
bulk/spam mail folders. Sometimes, our messages are marked that way.</small>
-</p>
+</p>') %>
diff --git a/app/views/user/contact.rhtml b/app/views/user/contact.rhtml
index 7069b671a..4bbb15789 100644
--- a/app/views/user/contact.rhtml
+++ b/app/views/user/contact.rhtml
@@ -29,11 +29,11 @@
<p class="form_note">
<% if @user == @recipient_user %>
- <strong>Note:</strong> You're sending a message to yourself, presumably
- to try out how it works.
+ <%= _('<strong>Note:</strong> You\'re sending a message to yourself, presumably
+ to try out how it works.')%>
<% else %>
- <strong>Privacy note:</strong> Your email address will be given to
- <%= user_link(@recipient_user) %> when you send this message.
+ <%= _(' <strong>Privacy note:</strong> Your email address will be given to')%>
+ <%= user_link(@recipient_user) %><%= _(' when you send this message.')%>
<% end %>
</p>
diff --git a/app/views/user/no_cookies.rhtml b/app/views/user/no_cookies.rhtml
index 4681547d3..cf362617a 100644
--- a/app/views/user/no_cookies.rhtml
+++ b/app/views/user/no_cookies.rhtml
@@ -1,19 +1,22 @@
<% @title = "Cookies not enabled" %>
-<h1>Please enable "cookies" to carry on</h1>
+<h1><%= _('Please enable "cookies" to carry on')%></h1>
-<p>To carry on, you need to sign in or make an account. Unfortunately, there
-was a technical problem trying to do this.</p>
+<p><%= _('To carry on, you need to sign in or make an account. Unfortunately, there
+was a technical problem trying to do this.')%></p>
-<p>It may be that your browser is not set to accept a thing called "cookies",
+<p><%= _('It may be that your browser is not set to accept a thing called "cookies",
or cannot do so. If you can, please enable cookies, or try using a different
-browser. Then press refresh to have another go.</p>
+browser. Then press refresh to have another go.')%></p>
-<p>If your browser is set to accept cookies and you are seeing this message,
-then there is probably a fault with our server. Please <a href="/help/contact">get in touch</a>
-with us so we can fix it. Let us know what you were doing when this message
-appeared and your browser and operating system type and version.</p>
+<p><%= _('If your browser is set to accept cookies and you are seeing this message,
+then there is probably a fault with our server.')%>
-<p>If you are still having trouble, please <a href="/help/contact">contact us</a>.
+<% _('Please <a href="%s">get in touch</a> with us so we can fix it.') % [help_contact_path] %>
+
+ <%= _('Let us know what you were doing when this message
+appeared and your browser and operating system type and version.')%></p>
+
+<p><% _('If you are still having trouble, please <a href="%s">contact us</a>.') % [help_contact_path] %>
</p>
diff --git a/app/views/user/set_crop_profile_photo.rhtml b/app/views/user/set_crop_profile_photo.rhtml
index 12ba4eba2..9ca162144 100644
--- a/app/views/user/set_crop_profile_photo.rhtml
+++ b/app/views/user/set_crop_profile_photo.rhtml
@@ -32,8 +32,8 @@
<%= hidden_field_tag 'draft_profile_photo_id', @draft_profile_photo.id %>
- <p><strong>Privacy note:</strong> Your photo will be shown in public on the Internet,
- wherever you do something on WhatDoTheyKnow.
+ <p><%= _('<strong>Privacy note:</strong> Your photo will be shown in public on the Internet,
+ wherever you do something on WhatDoTheyKnow.')%>
<p>
<%= hidden_field_tag 'submitted_crop_profile_photo', 1 %>
diff --git a/app/views/user/set_draft_profile_photo.rhtml b/app/views/user/set_draft_profile_photo.rhtml
index a3d28cf92..b6a39df5e 100644
--- a/app/views/user/set_draft_profile_photo.rhtml
+++ b/app/views/user/set_draft_profile_photo.rhtml
@@ -10,17 +10,17 @@
<% form_tag 'set_photo', :id => 'set_draft_profile_photo_form', :multipart => true do %>
<p>
- <label class="form_label" for="file_1">Photo of you:</label>
+ <label class="form_label" for="file_1"><%= _('Photo of you:')%></label>
<%= file_field_tag :file, :size => 35, :id => 'file_1' %>
</p>
<ul>
- <li>Your photo will be shown in public <strong>on the Internet</strong>,
- wherever you do something on WhatDoTheyKnow.
+ <li><%= _('Your photo will be shown in public <strong>on the Internet</strong>,
+ wherever you do something on WhatDoTheyKnow.')%>
</li>
- <li>Please don't upload offensive pictures. We will take down images
- that we consider inappropriate.
+ <li><%= _('Please don\'t upload offensive pictures. We will take down images
+ that we consider inappropriate.')%>
</li>
</ul>
@@ -29,7 +29,7 @@
<%= hidden_field_tag 'submitted_draft_profile_photo', 1 %>
<script type="text/javascript" charset="utf-8">
- document.write('<%= submit_tag "Next, crop your photo &gt;&gt;" %>');
+ document.write('<%= submit_tag _("Next, crop your photo &gt;&gt;") %>');
</script>
</p>
@@ -43,7 +43,7 @@
<% if @user.profile_photo %>
- <h2>OR remove the existing photo</h2>
+ <h2><%= _('OR remove the existing photo')%></h2>
<% form_tag 'clear_photo', :id => 'clear_profile_photo_form', :multipart => true do %>
<%= submit_tag "Clear photo" %>
diff --git a/app/views/user/set_profile_about_me.rhtml b/app/views/user/set_profile_about_me.rhtml
index 8e83dc870..aa53d6720 100644
--- a/app/views/user/set_profile_about_me.rhtml
+++ b/app/views/user/set_profile_about_me.rhtml
@@ -1,37 +1,37 @@
-<% @title = "Change the text about you on your profile at WhatDoTheyKnow.com" %>
+<% @title = _('Change the text about you on your profile at WhatDoTheyKnow.com') %>
-<% raise "internal error" if not @user %>
+<% raise _('internal error') if not @user %>
<%= foi_error_messages_for :about_me %>
<% form_for :about_me do |f| %>
<div class="form_note">
- <h1>Edit text about you</h1>
+ <h1><%= _('Edit text about you')%></h1>
<p>
- What are you investigating using Freedom of Information?
+ <%= _(' What are you investigating using Freedom of Information? ')%>
</p>
<p>
- This will appear on your WhatDoTheyKnow profile, to make it
- easier for others to get involved with what you're doing.
+ <%= _(' This will appear on your WhatDoTheyKnow profile, to make it
+ easier for others to get involved with what you\'re doing.')%>
</p>
</div>
<p>
- <label class="form_label" for="set_profile_about_me">About you:</label>
+ <label class="form_label" for="set_profile_about_me"><%= _('About you:')%></label>
<%= f.text_area :about_me, :rows => 5, :cols => 55 %>
</p>
<div class="form_note">
<p>
- Include relevant links, such as to a campaign page, your blog or a
+ <%= _(' Include relevant links, such as to a campaign page, your blog or a
twitter account. They will be made clickable.
- e.g.
+ e.g.')%>
<a href="http://www.twitter.com/whatdotheyknow">http://www.twitter.com/whatdotheyknow</a>
</p>
</div>
<div class="form_button">
<%= hidden_field_tag 'submitted_about_me', 1 %>
- <%= submit_tag "Save" %>
+ <%= submit_tag _('Save') %>
</div>
<% end %>
diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml
index 8bd758f78..17c3a77c6 100644
--- a/app/views/user/show.rhtml
+++ b/app/views/user/show.rhtml
@@ -1,39 +1,39 @@
<% @title = h(@display_user.name) + " - Freedom of Information requests" %>
<% if (@same_name_users.size >= 1) %>
- <p>There is <strong>more than one person</strong> who uses this site and has this name.
- One of them is shown below, you may mean a different one: <% for @same_name_user in @same_name_users %>
+ <p><%= _('There is <strong>more than one person</strong> who uses this site and has this name.
+ One of them is shown below, you may mean a different one:')%> <% for @same_name_user in @same_name_users %>
<%= user_link(@same_name_user) %>
<% end %>
<% end%>
<% if @is_you && @undescribed_requests.size > 0 %>
<div class="undescribed_requests">
- <p>Please <strong>go to the following requests</strong>, and let us
- know if there was information in the recent responses to them.</p>
+ <p><%= _('Please <strong>go to the following requests</strong>, and let us
+ know if there was information in the recent responses to them.')%></p>
<ul>
<% for undescribed_request in @undescribed_requests %>
<li><%=request_link(undescribed_request)%></li>
<% end %>
</ul>
<p>
- Thanks very much - this will help others find useful stuff. We'll
+ <%= _('Thanks very much - this will help others find useful stuff. We\'ll
also, if you need it, give advice on what to do next about your
- requests.
+ requests.')%>
</p>
</div>
<% end %>
<div id="request_sidebar">
- <h2>Track this person</h2>
+ <h2><%= _('Track this person')%></h2>
<%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %>
- <h2>On this page</h2>
- <a href="#foi_requests">FOI requests</a>
- <br><a href="#annotations">Annotations</a>
+ <h2><%= _('On this page')%></h2>
+ <a href="#foi_requests"><%= _('FOI requests')%></a>
+ <br><a href="#annotations"><%= _('Annotations')%></a>
<% if @is_you %>
- <br><a href="#email_subscriptions">Email subscriptions</a>
+ <br><a href="#email_subscriptions"><%= _('Email subscriptions')%></a>
<% end %>
</div>
@@ -50,25 +50,25 @@
<% else %>
<% if @is_you %>
<span id="set_photo">
- <%= link_to "Set your profile photo", set_profile_photo_url() %>
+ <%= link_to _('Set your profile photo'), set_profile_photo_url() %>
</span>
<% end %>
<% end %>
</p>
- <h1> <%= h(@display_user.name) + (@is_you ? " (you)" : "") %> </h1>
+ <h1> <%= h(@display_user.name) + (@is_you ? _(" (you)") : "") %></h1>
<p class="subtitle">
- Joined WhatDoTheyKnow in <%= year_from_date(@display_user.created_at) %>
+ <%= _('Joined WhatDoTheyKnow')%>in <%= year_from_date(@display_user.created_at) %>
<% if !@user.nil? && @user.admin_page_links? %>
(<%= link_to "admin", user_admin_url(@display_user) %>)
<% end %>
</p>
<p>
- <%= link_to "Send message to " + h(@display_user.name), contact_user_url(:id => @display_user.id) %>
+ <%= link_to _('Send message to ') + h(@display_user.name), contact_user_url(:id => @display_user.id) %>
<% if @is_you %>
- (just to see how it works)
+ (<%= _('just to see how it works')%>)
<% end %>
</p>
@@ -76,11 +76,11 @@
<div id="user_public_banned">
<p>
<strong>
- This user has been banned from WhatDoTheyKnow.com
+ <%= _('This user has been banned from WhatDoTheyKnow.com ')%>
</strong>
</p>
<p>
- They have been given the following explanation:
+ <%= _('They have been given the following explanation:')%>
</p>
<p class="details">
<%= @display_user.can_fail_html %>
@@ -93,7 +93,7 @@
<img class="comment_quote" src="/images/quote.png" alt="">
<%= @display_user.get_about_me_for_html_display %>
<% if @is_you %>
- (<%= link_to "edit text about you", set_profile_about_me_url() %>)
+ (<%= link_to _("edit text about you"), set_profile_about_me_url() %>)
<% end %>
</div>
<% end %>
@@ -101,31 +101,31 @@
<% if @is_you %>
<p id="user_change_password_email">
<% if @display_user.profile_photo %>
- <%= link_to "Change profile photo", set_profile_photo_url() %> |
+ <%= link_to _('Change profile photo')%>, set_profile_photo_url() %> |
<% end %>
- <%= link_to "Change your password", signchangepassword_url() %> |
- <%= link_to "Change your email", signchangeemail_url() %>
+ <%= link_to _('Change your password'), signchangepassword_url() %> |
+ <%= link_to _('Change your email'), signchangeemail_url() %>
</p>
<% end %>
<% if not @is_you %>
<p id="user_not_logged_in">
- <%= link_to "Sign in", signin_url(:r => request.request_uri) %> to change password,
- subscriptions and more (<%=h @display_user.name %> only)
+ <%= link_to _('Sign in'), signin_url(:r => request.request_uri) %><%= _('to change password,
+ subscriptions and more')%> (<%=h @display_user.name %> <%= _('only')%>)
</p>
<% end %>
<% if !@xapian_requests.nil? %>
<% if @xapian_requests.results.empty? %>
<% if @page == 1 %>
- <h2 id="foi_requests">Freedom of Information requests made by <%= @is_you ? 'you' : 'this person' %> </h2>
- <p><%= @is_you ? 'You have' : 'This person has' %>
- made no Freedom of Information requests using this site.</p>
+ <h2 id="foi_requests"><%= _('Freedom of Information requests made by')%> <%= @is_you ? 'you' : 'this person' %> </h2>
+ <p><%= @is_you ? _('You have') : _('This person has') %>
+ <%= _(' made no Freedom of Information requests using this site.')%></p>
<% end %>
<% else %>
<h2 id="foi_requests">
<%= @is_you ? 'Your ' : "This person's " %>
- <%=pluralize(@display_user.info_requests.size, "Freedom of Information request") %>
+ <%=pluralize(@display_user.info_requests.size, _('Freedom of Information request')) %>
<!-- matches_estimated <%=@xapian_requests.matches_estimated%> -->
<%= @page_desc %>
</h2>
@@ -137,20 +137,20 @@
<%= will_paginate WillPaginate::Collection.new(@page, @per_page, @display_user.info_requests.size) %>
<% end %>
<% else %>
- <h2 id="foi_requests">Freedom of Information requests made by <%= @is_you ? 'you' : 'this person' %> </h2>
- <p>The search index is currently offline, so we can't show the Freedom of Information requests this person has made.</p>
+ <h2 id="foi_requests"><%= _('Freedom of Information requests made by')%> <%= @is_you ? _('you') : _('this person') %> </h2>
+ <p><%= _('The search index is currently offline, so we can\'t show the Freedom of Information requests this person has made.')%></p>
<% end %>
<% if !@xapian_comments.nil? %>
<% if @xapian_comments.results.empty? %>
<% if @page == 1 %>
- <h2><%= @is_you ? 'Your' : 'This person\'s' %> annotations </h2>
+ <h2><%= @is_you ? 'Your' : 'This person\'s' %> <%= _('annotations')%> </h2>
<p>None made.</p>
<% end %>
<% else %>
<h2 id="annotations">
- <%= @is_you ? 'Your ' : "This person's " %>
- <%=pluralize(@display_user.visible_comments.size, "annotation") %>
+ <%= @is_you ? _('Your ') : _('This person\'s') %>
+ <%=pluralize(@display_user.visible_comments.size, _('annotation')) %>
<!-- matches_estimated <%=@xapian_comments.matches_estimated%> -->
<%= @page_desc %>
</h2>
@@ -165,10 +165,10 @@
<% if @is_you %>
<% if @track_things.empty? %>
- <h2 id="email_subscriptions"> Your email subscriptions</h2>
+ <h2 id="email_subscriptions"> <%= _('Your email subscriptions')%></h2>
<p>None made.</p>
<% else %>
- <h2 id="email_subscriptions"> Your <%=pluralize(@track_things.size, "email subscription") %> </h2>
+ <h2 id="email_subscriptions"> Your <%=pluralize(@track_things.size, _('email subscription')) %> </h2>
<% if @track_things_grouped.size == 1 %>
<% form_tag :controller => 'track', :action => 'delete_all_type' do %>
<h3>
@@ -177,7 +177,7 @@
<%= hidden_field_tag 'user', @display_user.id %>
<%= hidden_field_tag 'r', request.request_uri %>
<% if @track_things.size > 1 %>
- <%= submit_tag "unsubscribe all" %>
+ <%= submit_tag _('unsubscribe all') %>
<% end %>
</h3>
<% end %>
@@ -191,7 +191,7 @@
<%= hidden_field_tag 'user', @display_user.id %>
<%= hidden_field_tag 'r', request.request_uri %>
<% if track_things.size > 1 %>
- <%= submit_tag "unsubscribe all" %>
+ <%= submit_tag _('unsubscribe all')%>
<% end %>
</h3>
<% end %>
@@ -205,7 +205,7 @@
<%= track_thing.params[:list_description] %>
<%= hidden_field_tag 'track_medium', "delete", { :id => 'track_medium_' + track_thing.id.to_s } %>
<%= hidden_field_tag 'r', request.request_uri, { :id => 'r_' + track_thing.id.to_s } %>
- <%= submit_tag "unsubscribe" %>
+ <%= submit_tag <%= _('unsubscribe') %>
</div>
<% end %>
</li>
diff --git a/app/views/user/sign.rhtml b/app/views/user/sign.rhtml
index 81dc64cd2..b76edbc64 100644
--- a/app/views/user/sign.rhtml
+++ b/app/views/user/sign.rhtml
@@ -5,10 +5,10 @@
<p id="sign_in_reason">
<% if @post_redirect.reason_params[:web].empty? %>
- Please sign in as <%= link_to h(@post_redirect.reason_params[:user_name]), @post_redirect.reason_params[:user_url] %>.
+ <%= _('Please sign in as ')%><%= link_to h(@post_redirect.reason_params[:user_name]), @post_redirect.reason_params[:user_url] %>.
<% else %>
<%= @post_redirect.reason_params[:web] %>,
- please sign in as <%= link_to h(@post_redirect.reason_params[:user_name]), @post_redirect.reason_params[:user_url] %>.
+ <%= _('please sign in as ')%><%= link_to h(@post_redirect.reason_params[:user_name]), @post_redirect.reason_params[:user_url] %>.
<% end %>
</p>
@@ -17,15 +17,15 @@
</div>
<% else %>
- <% @title = "Sign in or make a new account" %>
+ <% @title = _('Sign in or make a new account') %>
<div id="sign_together">
<p id="sign_in_reason">
<% if @post_redirect.reason_params[:web].empty? %>
- Please sign in or make a new account.
+ <%= _(' Please sign in or make a new account.') %>
<% else %>
- <%= @post_redirect.reason_params[:web] %>, please sign in or make a new account.
+ <%= @post_redirect.reason_params[:web] %>, <%= _('please sign in or make a new account.') %>
<% end %>
</p>
diff --git a/app/views/user/signchangeemail.rhtml b/app/views/user/signchangeemail.rhtml
index b98dc383c..3c567b3dd 100644
--- a/app/views/user/signchangeemail.rhtml
+++ b/app/views/user/signchangeemail.rhtml
@@ -1,6 +1,6 @@
-<% @title = "Change your email address used on WhatDoTheyKnow.com" %>
+<% @title = _('Change your email address used on WhatDoTheyKnow.com') %>
-<% raise "internal error" if not @user %>
+<% raise _('internal error') if not @user %>
<div id="change_email">
@@ -8,28 +8,28 @@
<%= foi_error_messages_for :signchangeemail %>
<div class="form_note">
- <h1>Change your email address used on WhatDoTheyKnow.com</h1>
+ <h1> <%= _('Change your email address used on WhatDoTheyKnow.com')%></h1>
</div>
<p>
- <label class="form_label" for="signchangeemail_old_email">Old e-mail:</label>
+ <label class="form_label" for="signchangeemail_old_email"> <%= _('Old e-mail:')%></label>
<%= text_field 'signchangeemail', 'old_email', { :size => 20 } %>
</p>
<p>
- <label class="form_label" for="signchangeemail_new_email">New e-mail:</label>
+ <label class="form_label" for="signchangeemail_new_email"> <%= _('New e-mail:')%></label>
<%= text_field 'signchangeemail', 'new_email', { :size => 20 } %>
</p>
<p>
- <label class="form_label" for="signchangeemail_password">Your password:</label>
+ <label class="form_label" for="signchangeemail_password"> <%= _('Your password:')%></label>
<%= password_field 'signchangeemail', 'password', { :size => 15 } %>
</p>
<p class="form_note">
- <strong>Note:</strong>
+ <%= _('<strong>Note:</strong>
We will send an email to your new email address. Follow the
- instructions in it to confirm changing your email.
+ instructions in it to confirm changing your email.')%>
</p>
<div class="form_button">
diff --git a/app/views/user/signchangeemail_confirm.rhtml b/app/views/user/signchangeemail_confirm.rhtml
index 96acbf424..bfedbac2d 100644
--- a/app/views/user/signchangeemail_confirm.rhtml
+++ b/app/views/user/signchangeemail_confirm.rhtml
@@ -1,14 +1,14 @@
<% @title = h("Now check your email!") %>
-<h1 class="confirmation_heading">Now check your email!</h1>
+<h1 class="confirmation_heading"> <%= _('Now check your email!')%></h1>
<p class="confirmation_message">
-We've sent an email to your new email address. You'll need to click the link in
-it before your email address will be changed.
+ <%= _('We\'ve sent an email to your new email address. You\'ll need to click the link in
+it before your email address will be changed.')%>
</p>
<p class="confirmation_message">
-<small>If you use web-based email or have "junk mail" filters, also check your
-bulk/spam mail folders. Sometimes, our messages are marked that way.</small>
+<small> <%= _('If you use web-based email or have "junk mail" filters, also check your
+bulk/spam mail folders. Sometimes, our messages are marked that way.')%></small>
</p>
diff --git a/app/views/user/signchangepassword.rhtml b/app/views/user/signchangepassword.rhtml
index 4191344cb..90ca6e62a 100644
--- a/app/views/user/signchangepassword.rhtml
+++ b/app/views/user/signchangepassword.rhtml
@@ -8,23 +8,23 @@
<%= foi_error_messages_for :user %>
<div class="form_note">
- <h1>Change your password on WhatDoTheyKnow.com</h1>
+ <h1><%= ('Change your password on WhatDoTheyKnow.com')%></h1>
</div>
<p>
- <label class="form_label" for="user_password">New password:</label>
+ <label class="form_label" for="user_password"><%= ('New password:')%></label>
<%= password_field 'user', 'password', { :size => 15 } %>
</p>
<p>
- <label class="form_label" for="user_password_confirmation">New password: (again)</label>
+ <label class="form_label" for="user_password_confirmation"><%= ('New password: (again)')%></label>
<%= password_field 'user', 'password_confirmation', { :size => 15 } %>
</p>
<div class="form_button">
<%= hidden_field_tag 'submitted_signchangepassword_do', 1 %>
<%= hidden_field_tag 'pretoken', params[:pretoken] %>
- <%= submit_tag "Change password on WhatDoTheyKnow.com" %>
+ <%= submit_tag _('Change password on WhatDoTheyKnow.com') %>
</div>
<% end %>
diff --git a/app/views/user/signchangepassword_confirm.rhtml b/app/views/user/signchangepassword_confirm.rhtml
index baad6729b..145b56672 100644
--- a/app/views/user/signchangepassword_confirm.rhtml
+++ b/app/views/user/signchangepassword_confirm.rhtml
@@ -1,13 +1,13 @@
-<% @title = h("Now check your email!") %>
+<% @title = h( _('Now check your email!')) %>
-<h1 class="confirmation_heading">Now check your email!</h1>
+<h1 class="confirmation_heading"><%= ('Now check your email!')%></h1>
<p class="confirmation_message">
-We've sent you an email, click the link in it, then you can change your password.
+<%= ('We\'ve sent you an email, click the link in it, then you can change your password.')%>
</p>
<p class="confirmation_message">
-<small>If you use web-based email or have "junk mail" filters, also check your
-bulk/spam mail folders. Sometimes, our messages are marked that way.</small>
+<small><%= ('If you use web-based email or have "junk mail" filters, also check your
+bulk/spam mail folders. Sometimes, our messages are marked that way.')%></small>
</p>
diff --git a/app/views/user/signchangepassword_send_confirm.rhtml b/app/views/user/signchangepassword_send_confirm.rhtml
index 8b2e4fa91..f6341b7e8 100644
--- a/app/views/user/signchangepassword_send_confirm.rhtml
+++ b/app/views/user/signchangepassword_send_confirm.rhtml
@@ -1,4 +1,4 @@
-<% @title = "Change your password on WhatDoTheyKnow.com" %>
+<% @title = _('Change your password on WhatDoTheyKnow.com') %>
<div id="change_password">
@@ -6,24 +6,24 @@
<%= foi_error_messages_for :signchangepassword %>
<div class="form_note">
- <h1>Change your password on WhatDoTheyKnow.com</h1>
+ <h1><%= ('Change your password on WhatDoTheyKnow.com') %></h1>
</div>
<p>
- <label class="form_label" for="signchangepassword_email">Your e-mail:</label>
+ <label class="form_label" for="signchangepassword_email"><%= ('Your e-mail:')%></label>
<%= text_field 'signchangepassword', 'email', { :size => 20 } %>
</p>
<p class="form_note">
- <strong>Note:</strong>
+ <%= (' <strong>Note:</strong>
We will send you an email. Follow the instructions in it to change
- your password.
+ your password.')%>
</p>
<div class="form_button">
<%= hidden_field_tag 'submitted_signchangepassword_send_confirm', 1 %>
<%= hidden_field_tag 'pretoken', params[:pretoken] %>
- <%= submit_tag "Submit" %>
+ <%= submit_tag _('Submit') %>
</div>
<% end %>
diff --git a/app/views/user/wrong_user.rhtml b/app/views/user/wrong_user.rhtml
index cb8eb8eac..9878d08ae 100644
--- a/app/views/user/wrong_user.rhtml
+++ b/app/views/user/wrong_user.rhtml
@@ -1,8 +1,8 @@
<p id="sign_in_reason">
<%= @reason_params[:web] %>, please
-<%= link_to "sign out", signout_url(:r => request.request_uri) %>,
-and sign in as <%= h(@reason_params[:user_name]) %>.
+<%= link_to _('sign out'), signout_url(:r => request.request_uri) %>,
+<%= _('and sign in as ')%><%= h(@reason_params[:user_name]) %>.
</p>
diff --git a/app/views/user/wrong_user_unknown_email.rhtml b/app/views/user/wrong_user_unknown_email.rhtml
index 77a6837f5..77a2ca001 100644
--- a/app/views/user/wrong_user_unknown_email.rhtml
+++ b/app/views/user/wrong_user_unknown_email.rhtml
@@ -1,8 +1,8 @@
<p id="sign_in_reason">
-<%= @reason_params[:web] %>. Unfortunately we don't know the FOI
-email address for that authority, so we can't validate this.
-Please <a href="/help/contact">contact us</a> to sort it out.
+<%= @reason_params[:web] %>. <%= _('Unfortunately we don\'t know the FOI
+email address for that authority, so we can\'t validate this.
+Please <a href="%s">contact us</a> to sort it out.') % [help_contact_path] %>
</p>