aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/application_controller.rb13
-rw-r--r--app/controllers/general_controller.rb4
-rw-r--r--app/controllers/request_controller.rb18
-rw-r--r--app/controllers/request_game_controller.rb4
-rw-r--r--app/helpers/application_helper.rb5
-rw-r--r--app/helpers/config_helper.rb5
-rw-r--r--app/models/application_mailer.rb3
-rw-r--r--app/models/incoming_message.rb8
-rw-r--r--app/models/track_mailer.rb2
-rw-r--r--app/models/track_thing.rb36
-rw-r--r--app/models/user_mailer.rb4
-rw-r--r--app/views/comment/new.rhtml2
-rw-r--r--app/views/contact_mailer/message.rhtml2
-rw-r--r--app/views/contact_mailer/user_message.rhtml4
-rw-r--r--app/views/general/search.rhtml40
-rw-r--r--app/views/layouts/admin.rhtml2
-rw-r--r--app/views/public_body/view_email.rhtml2
-rw-r--r--app/views/request/details.rhtml15
-rw-r--r--app/views/request/show.rhtml4
-rw-r--r--app/views/request_mailer/comment_on_alert.rhtml2
-rw-r--r--app/views/request_mailer/comment_on_alert_plural.rhtml2
-rw-r--r--app/views/request_mailer/new_response.rhtml2
-rw-r--r--app/views/request_mailer/new_response_reminder_alert.rhtml2
-rw-r--r--app/views/request_mailer/not_clarified_alert.rhtml2
-rw-r--r--app/views/request_mailer/old_unclassified_updated.rhtml2
-rw-r--r--app/views/request_mailer/overdue_alert.rhtml2
-rw-r--r--app/views/request_mailer/stopped_responses.rhtml2
-rw-r--r--app/views/request_mailer/very_overdue_alert.rhtml2
-rw-r--r--app/views/track_mailer/event_digest.rhtml2
-rw-r--r--app/views/user/_signin.rhtml2
-rw-r--r--app/views/user/_signup.rhtml2
-rw-r--r--app/views/user/set_crop_profile_photo.rhtml2
-rw-r--r--app/views/user/set_draft_profile_photo.rhtml2
-rw-r--r--app/views/user/set_profile_about_me.rhtml6
-rw-r--r--app/views/user/show.rhtml4
-rw-r--r--app/views/user/signchangeemail.rhtml2
-rw-r--r--app/views/user_mailer/already_registered.rhtml6
-rw-r--r--app/views/user_mailer/changeemail_already_used.rhtml7
-rw-r--r--app/views/user_mailer/changeemail_confirm.rhtml7
-rw-r--r--app/views/user_mailer/confirm_login.rhtml2
-rw-r--r--config/alert-tracks-debian.ugly14
-rw-r--r--spec/controllers/user_controller_spec.rb4
42 files changed, 137 insertions, 116 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 0d8c83d6c..0df3e22da 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -53,11 +53,7 @@ class ApplicationController < ActionController::Base
# scrub sensitive parameters from the logs
filter_parameter_logging :password
- helper_method :site_name, :locale_from_params
- def site_name
- site_name = MySociety::Config.get('SITE_NAME', 'Alaveteli')
- return site_name
- end
+ helper_method :locale_from_params
# Help work out which request causes RAM spike.
# http://www.codeweblog.com/rails-to-monitor-the-process-of-memory-leaks-skills/
@@ -280,7 +276,9 @@ class ApplicationController < ActionController::Base
def check_read_only
read_only = MySociety::Config.get('READ_ONLY', '')
if !read_only.empty?
- flash[:notice] = "<p>WhatDoTheyKnow is currently in maintenance. You can only view existing requests. You cannot make new ones, add followups or annotations, or otherwise change the database.</p> <p>" + read_only + "</p>"
+ flash[:notice] = _("<p>{{site_name}} is currently in maintenance. You can only view existing requests. You cannot make new ones, add followups or annotations, or otherwise change the database.</p> <p>{{read_only}}</p>",
+ :site_name => site_name,
+ :read_only => read_only)
redirect_to frontpage_url
end
@@ -355,6 +353,9 @@ class ApplicationController < ActionController::Base
# views (for links) and mailers (for use in emails), so include them into
# all of all.
include LinkToHelper
+
+ # Site-wide access to configuration settings
+ include ConfigHelper
end
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb
index ffc97237a..4fa603aab 100644
--- a/app/controllers/general_controller.rb
+++ b/app/controllers/general_controller.rb
@@ -63,7 +63,7 @@ class GeneralController < ApplicationController
end
end
- # Display WhatDoTheyKnow category from mySociety blog
+ # Display blog entries
def blog
medium_cache
@feed_autodetect = []
@@ -73,7 +73,7 @@ class GeneralController < ApplicationController
@data = XmlSimple.xml_in(content)
@channel = @data['channel'][0]
@blog_items = @channel['item']
- @feed_autodetect = [ { :url => feed_url, :title => "WhatDoTheyKnow blog"} ]
+ @feed_autodetect = [{:url => feed_url, :title => "#{site_name} blog"}]
else
@blog_items = []
end
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index e446854ab..dff03983b 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -398,24 +398,26 @@ class RequestController < ApplicationController
elsif @info_request.calculate_status == 'not_held'
flash[:notice] = _("<p>Thank you! Here are some ideas on what to do next:</p>
<ul>
- <li>To send your request to another authority, first copy the text of your request below, then <a href=\"%s\">find the other authority</a>.</li>
+ <li>To send your request to another authority, first copy the text of your request below, then <a href=\"{{find_authority_url}}\">find the other authority</a>.</li>
<li>If you would like to contest the authority's claim that they do not hold the information, here is
- <a href=\"%s\">how to complain</a>.
+ <a href=\"{{complain_url}}\">how to complain</a>.
</li>
- <li>We have <a href=\"%s\">suggestions</a>
+ <li>We have <a href=\"{{other_means_url}}\">suggestions</a>
on other means to answer your question.
</li>
- </ul>
- ") % ["/new",CGI.escapeHTML(unhappy_url(@info_request)),CGI.escapeHTML(unhappy_url(@info_request)) + "#other_means"]
+ </ul>",
+ :find_authority_url => "/new",
+ :complain_url => CGI.escapeHTML(unhappy_url(@info_request)),
+ :other_means_url => CGI.escapeHTML(unhappy_url(@info_request)) + "#other_means")
redirect_to request_url(@info_request)
elsif @info_request.calculate_status == 'rejected'
flash[:notice] = _("Oh no! Sorry to hear that your request was refused. Here is what to do now.")
redirect_to unhappy_url(@info_request)
elsif @info_request.calculate_status == 'successful'
- flash[:notice] = _("<p>We're glad you got all the information that you wanted. If you write about or make use of the information, please come back and add an annotation below saying what you did.</p><p>If you found WhatDoTheyKnow useful, <a href=\"%s\">make a donation</a> to the charity which runs it.</p>") % ["http://www.mysociety.org/donate/"]
+ flash[:notice] = _("<p>We're glad you got all the information that you wanted. If you write about or make use of the information, please come back and add an annotation below saying what you did.</p><p>If you found {{site_name}} useful, <a href=\"{{donation_url}}\">make a donation</a> to the charity which runs it.</p>", :site_name=>site_name, :donation_url => "http://www.mysociety.org/donate/")
redirect_to request_url(@info_request)
elsif @info_request.calculate_status == 'partially_successful'
- flash[:notice] = _("<p>We're glad you got some of the information that you wanted. If you found WhatDoTheyKnow useful, <a href=\"%s\">make a donation</a> to the charity which runs it.</p><p>If you want to try and get the rest of the information, here's what to do now.</p>") % ["http://www.mysociety.org/donate/"]
+ flash[:notice] = _("<p>We're glad you got some of the information that you wanted. If you found {{site_name}} useful, <a href=\"{{donation_url}}\">make a donation</a> to the charity which runs it.</p><p>If you want to try and get the rest of the information, here's what to do now.</p>", :site_name=>site_name, :donation_url=>"http://www.mysociety.org/donate/")
redirect_to unhappy_url(@info_request)
elsif @info_request.calculate_status == 'waiting_clarification'
flash[:notice] = _("Please write your follow up message containing the necessary clarifications below.")
@@ -423,7 +425,7 @@ class RequestController < ApplicationController
elsif @info_request.calculate_status == 'gone_postal'
redirect_to respond_to_last_url(@info_request) + "?gone_postal=1"
elsif @info_request.calculate_status == 'internal_review'
- flash[:notice] = _("<p>Thank you! Hopefully your wait isn't too long.</p><p>You should get a response within 20 days, or be told if it will take longer (<a href=\"%s\">details</a>).</p>") % [unhappy_url(@info_request) + "#internal_review"]
+ flash[:notice] = _("<p>Thank you! Hopefully your wait isn't too long.</p><p>You should get a response within 20 days, or be told if it will take longer (<a href=\"{{review_url}}\">details</a>).</p>", :review_url => unhappy_url(@info_request) + "#internal_review")
redirect_to request_url(@info_request)
elsif @info_request.calculate_status == 'error_message'
flash[:notice] = _("<p>Thank you! We'll look into what happened and try and fix it up.</p><p>If the error was a delivery failure, and you can find an up to date FOI email address for the authority, please tell us using the form below.</p>")
diff --git a/app/controllers/request_game_controller.rb b/app/controllers/request_game_controller.rb
index b9440a906..8a84575bb 100644
--- a/app/controllers/request_game_controller.rb
+++ b/app/controllers/request_game_controller.rb
@@ -20,7 +20,9 @@ class RequestGameController < ApplicationController
@requests = old.sort_by{ rand }.slice(0..2)
if @missing == 0
- flash[:notice] = _('<p>All done! Thank you very much for your help.</p><p>There are <a href="%s">more things you can do</a> to help WhatDoTheyKnow.</p>') % [help_credits_path+"#helpus"]
+ flash[:notice] = _('<p>All done! Thank you very much for your help.</p><p>There are <a href="{{helpus_url}}">more things you can do</a> to help {{site_name}}.</p>',
+ :helpus_url => help_credits_path+"#helpus",
+ :site_name => site_name)
end
@league_table_28_days = InfoRequestEvent.make_league_table(
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 9bdcb98cd..ec56566a9 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -14,6 +14,9 @@ module ApplicationHelper
# all of all.
include LinkToHelper
+ # Site-wide access to configuration settings
+ include ConfigHelper
+
# Copied from error_messages_for in active_record_helper.rb
def foi_error_messages_for(*params)
options = params.last.is_a?(Hash) ? params.pop.symbolize_keys : {}
@@ -45,7 +48,7 @@ module ApplicationHelper
''
end
end
-
+
# Highlight words, also escapes HTML (other than spans that we add)
def highlight_words(t, words, html = true)
if html
diff --git a/app/helpers/config_helper.rb b/app/helpers/config_helper.rb
new file mode 100644
index 000000000..80f2deed2
--- /dev/null
+++ b/app/helpers/config_helper.rb
@@ -0,0 +1,5 @@
+module ConfigHelper
+ def site_name
+ MySociety::Config.get('SITE_NAME', 'Alaveteli')
+ end
+end \ No newline at end of file
diff --git a/app/models/application_mailer.rb b/app/models/application_mailer.rb
index 508ff2016..9628d7339 100644
--- a/app/models/application_mailer.rb
+++ b/app/models/application_mailer.rb
@@ -28,5 +28,8 @@ class ApplicationMailer < ActionMailer::Base
# views (for links) and mailers (for use in emails), so include them into
# all of all.
include LinkToHelper
+
+ # Site-wide access to configuration settings
+ include ConfigHelper
end
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index 90ab84a8f..ae7d1201e 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -431,7 +431,7 @@ class IncomingMessage < ActiveRecord::Base
text.gsub!(self.info_request.public_body.request_email, "[" + self.info_request.public_body.short_or_long_name + " request email]")
end
text.gsub!(self.info_request.incoming_email, "[FOI #" + self.info_request.id.to_s + " email]")
- text.gsub!(MySociety::Config.get("CONTACT_EMAIL", 'contact@localhost'), "[WhatDoTheyKnow contact email]")
+ text.gsub!(MySociety::Config.get("CONTACT_EMAIL", 'contact@localhost'), "[#{MySociety::Config.get('SITE_NAME', 'Alaveteli')} contact email]")
end
# Replaces all email addresses in (possibly binary data) with equal length alternative ones.
@@ -862,7 +862,9 @@ class IncomingMessage < ActiveRecord::Base
text = Iconv.conv('utf-8', 'windows-1252', text)
rescue Iconv::IllegalSequence
# Text looks like unlabelled nonsense, strip out anything that isn't UTF-8
- text = Iconv.conv('utf-8//IGNORE', 'utf-8', text) + "\n\n[ WhatDoTheyKnow note: The above text was badly encoded, and has had strange characters removed. ]"
+ text = Iconv.conv('utf-8//IGNORE', 'utf-8', text) +
+ _("\n\n[ {{site_name}} note: The above text was badly encoded, and has had strange characters removed. ]",
+ :site_name => MySociety::Config.get('SITE_NAME', 'Alaveteli'))
end
end
end
@@ -1131,7 +1133,7 @@ class IncomingMessage < ActiveRecord::Base
external_command("/usr/bin/catdoc", tempfile.path, :append_to => text)
elsif content_type == 'text/html'
# lynx wordwraps links in its output, which then don't get formatted properly
- # by WhatDoTheyKnow. We use elinks instead, which doesn't do that.
+ # by Alaveteli. We use elinks instead, which doesn't do that.
external_command("/usr/bin/elinks", "-dump-charset", "utf-8", "-force-html", "-dump",
tempfile.path, :append_to => text)
elsif content_type == 'application/vnd.ms-excel'
diff --git a/app/models/track_mailer.rb b/app/models/track_mailer.rb
index 6901a834d..4b7c603a7 100644
--- a/app/models/track_mailer.rb
+++ b/app/models/track_mailer.rb
@@ -22,7 +22,7 @@ class TrackMailer < ApplicationMailer
# etc. don't decide we are spammers.)
@recipients = user.name_and_email
- @subject = "Your WhatDoTheyKnow.com email alert"
+ @subject = _("Your {{site_name}} email alert", :site_name => site_name)
@body = { :user => user, :email_about_things => email_about_things, :unsubscribe_url => unsubscribe_url }
end
diff --git a/app/models/track_thing.rb b/app/models/track_thing.rb
index aee1ed1da..ced63f76f 100644
--- a/app/models/track_thing.rb
+++ b/app/models/track_thing.rb
@@ -172,14 +172,14 @@ class TrackThing < ActiveRecord::Base
# Website
:list_description => "'<a href=\"/body/" + CGI.escapeHTML(self.public_body.url_name) + "\">" + CGI.escapeHTML(self.public_body.name) + "</a>', a public authority", # XXX yeuch, sometimes I just want to call view helpers from the model, sorry! can't work out how
:verb_on_page => _("Track requests to {{public_body_name}} by email",:public_body_name=>CGI.escapeHTML(self.public_body.name)),
- :verb_on_page_already => "You are already tracking requests to " + CGI.escapeHTML(self.public_body.name) + " by email",
+ :verb_on_page_already => _("You are already tracking requests to {{public_body_name}} by email", :public_body_name=>CGI.escapeHTML(self.public_body.name)),
# Email
:title_in_email => self.public_body.law_only_short + " requests to '" + self.public_body.name + "'",
:title_in_rss => self.public_body.law_only_short + " requests to '" + self.public_body.name + "'",
# Authentication
- :web => "To be emailed about requests made using WhatDoTheyKnow to the public authority '" + CGI.escapeHTML(self.public_body.name) + "'",
- :email => "Then you will be emailed whenever someone requests something or gets a response from '" + CGI.escapeHTML(self.public_body.name) + "'.",
- :email_subject => "Confirm you want to be emailed about requests to '" + self.public_body.name + "'",
+ :web => _("To be emailed about requests made using {{site_name}} to the public authority '{{public_body_name}}'", :site_name=>MySociety::Config.get('SITE_NAME', 'Alaveteli'), :public_body_name=>CGI.escapeHTML(self.public_body.name)),
+ :email => _("Then you will be emailed whenever someone requests something or gets a response from '{{public_body_name}}'.", :public_body_name=>CGI.escapeHTML(self.public_body.name)),
+ :email_subject => _("Confirm you want to be emailed about requests to '{{public_body_name}}'", :public_body_name=>self.public_body.name),
# RSS sorting
:feed_sortby => 'newest'
}
@@ -187,15 +187,15 @@ class TrackThing < ActiveRecord::Base
@params = {
# Website
:list_description => "'<a href=\"/user/" + CGI.escapeHTML(self.tracked_user.url_name) + "\">" + CGI.escapeHTML(self.tracked_user.name) + "</a>', a person", # XXX yeuch, sometimes I just want to call view helpers from the model, sorry! can't work out how
- :verb_on_page => "Track this person by email",
- :verb_on_page_already => "You are already tracking this person by email",
+ :verb_on_page => _("Track this person by email"),
+ :verb_on_page_already => _("You are already tracking this person by email"),
# Email
- :title_in_email => "FOI requests by '" + self.tracked_user.name + "'",
- :title_in_rss => "FOI requests by '" + self.tracked_user.name + "'",
+ :title_in_email => _("FOI requests by '{{user_name}}'", :user_name=>self.tracked_user.name),
+ :title_in_rss => _("FOI requests by '{{user_name}}'", :user_name=>self.tracked_user.name),
# Authentication
- :web => "To be emailed about requests by '" + CGI.escapeHTML(self.tracked_user.name) + "'",
- :email => "Then you will be emailed whenever '" + CGI.escapeHTML(self.tracked_user.name) + "' requests something or gets a response.",
- :email_subject => "Confirm you want to be emailed about requests by '" + self.tracked_user.name + "'",
+ :web => _("To be emailed about requests by '{{user_name}}'", :user_name=>CGI.escapeHTML(self.tracked_user.name)),
+ :email => _("Then you will be emailed whenever '{{user_name}}' requests something or gets a response.", :user_name=>CGI.escapeHTML(self.tracked_user.name)),
+ :email_subject => _("Confirm you want to be emailed about requests by '{{user_name}}'", :user_name=>self.tracked_user.name),
# RSS sorting
:feed_sortby => 'newest'
}
@@ -203,15 +203,15 @@ class TrackThing < ActiveRecord::Base
@params = {
# Website
:list_description => "'<a href=\"/search/" + CGI.escapeHTML(self.track_query) + "/newest\">" + CGI.escapeHTML(self.track_query) + "</a>' in new requests/responses", # XXX yeuch, sometimes I just want to call view helpers from the model, sorry! can't work out how
- :verb_on_page => "Track things matching '" + CGI.escapeHTML(self.track_query) + "' by email",
- :verb_on_page_already => "You are already tracking things matching '" + CGI.escapeHTML(self.track_query) + "' by email",
+ :verb_on_page => _("Track things matching '{{query}}' by email", :query=>CGI.escapeHTML(self.track_query)),
+ :verb_on_page_already => _("You are already tracking things matching '{{query}}' by email", :query=>CGI.escapeHTML(self.track_query)),
# Email
- :title_in_email => "Requests or responses matching '" + self.track_query + "'",
- :title_in_rss => "Requests or responses matching '" + self.track_query + "'",
+ :title_in_email => _("Requests or responses matching '{{query}}'", :query=>self.track_query),
+ :title_in_rss => _("Requests or responses matching '{{query}}'", :query=>self.track_query),
# Authentication
- :web => "To follow requests and responses matching '" + CGI.escapeHTML(self.track_query) + "'",
- :email => "Then you will be emailed whenever a new request or response matches '" + CGI.escapeHTML(self.track_query) + "'.",
- :email_subject => "Confirm you want to be emailed about new requests or responses matching '" + self.track_query + "'",
+ :web => _("To follow requests and responses matching '{{query}}'", :query=>CGI.escapeHTML(self.track_query)),
+ :email => _("Then you will be emailed whenever a new request or response matches '{{query}}'.", :query=>CGI.escapeHTML(self.track_query)),
+ :email_subject => _("Confirm you want to be emailed about new requests or responses matching '{{query}}'", :query=>self.track_query),
# RSS sorting - XXX hmmm, we don't really know which to use
# here for sorting. Might be a query term (e.g. 'cctv'), in
# which case newest is good, or might be something like
diff --git a/app/models/user_mailer.rb b/app/models/user_mailer.rb
index f164f684e..0972e167d 100644
--- a/app/models/user_mailer.rb
+++ b/app/models/user_mailer.rb
@@ -31,7 +31,7 @@ class UserMailer < ApplicationMailer
@from = contact_from_name_and_email
headers 'Return-Path' => blackhole_email, 'Reply-To' => @from # we don't care about bounces when people are fiddling with their account
@recipients = new_email
- @subject = _("Confirm your new email address on WhatDoTheyKnow.com")
+ @subject = _("Confirm your new email address on {{site_name}}", :site_name=>site_name)
@body[:name] = user.name
@body[:url] = url
@body[:old_email] = user.email
@@ -42,7 +42,7 @@ class UserMailer < ApplicationMailer
@from = contact_from_name_and_email
headers 'Return-Path' => blackhole_email, 'Reply-To' => @from # we don't care about bounces when people are fiddling with their account
@recipients = new_email
- @subject = _("Unable to change email address on WhatDoTheyKnow.com")
+ @subject = _("Unable to change email address on {{site_name}}", :site_name=>site_name)
@body[:old_email] = old_email
@body[:new_email] = new_email
end
diff --git a/app/views/comment/new.rhtml b/app/views/comment/new.rhtml
index 25380d23f..1a4f2c0dc 100644
--- a/app/views/comment/new.rhtml
+++ b/app/views/comment/new.rhtml
@@ -59,7 +59,7 @@
<li> <%= _('You know what caused the error, and can <strong>suggest a solution</strong>, such as a working email address.')%> </li>
<% end %>
<% if [ 'requires_admin' ].include?(@info_request.described_state) %>
- <li> <%= _('Your thoughts on what the WhatDoTheyKnow <strong>administrators</strong> should do about the request.') %> </li>
+ <li> <%= _('Your thoughts on what the {{site_name}} <strong>administrators</strong> should do about the request.', :site_name=>site_name) %> </li>
<% end %>
diff --git a/app/views/contact_mailer/message.rhtml b/app/views/contact_mailer/message.rhtml
index a28d9603b..9c0a74c02 100644
--- a/app/views/contact_mailer/message.rhtml
+++ b/app/views/contact_mailer/message.rhtml
@@ -1,7 +1,7 @@
<%= @message.strip %>
---------------------------------------------------------------------
-<%= _('Message sent using WhatDoTheyKnow contact form, ')%>
+<%= _('Message sent using {{site_name}} contact form, ', :site_name=>site_name)%>
<%=(@logged_in_user ? ("logged in as user " + main_url(user_url(@logged_in_user))) : "not logged in")%><% if !@last_request.nil? %>
<%= _('Last request viewed: ')%><%= main_url(request_url(@last_request)) %>
diff --git a/app/views/contact_mailer/user_message.rhtml b/app/views/contact_mailer/user_message.rhtml
index 7a685c452..fe1f47518 100644
--- a/app/views/contact_mailer/user_message.rhtml
+++ b/app/views/contact_mailer/user_message.rhtml
@@ -1,5 +1,5 @@
---------------------------------------------------------------------
-<%=@from_user.name%> has used WhatDoTheyKnow to send you the message below.
+<%= _('{{user_name}} has used {{site_name}} to send you the message below.', :user_name=>@from_user.name, :site_name=>site_name) %>
<%= _('Your details have not been given to anyone, unless you choose to reply to this
message, which will then go directly to the person who wrote the message.')%>
---------------------------------------------------------------------
@@ -7,6 +7,6 @@ message, which will then go directly to the person who wrote the message.')%>
<%= @message.strip %>
---------------------------------------------------------------------
-<%= _('View Freedom of Information requests made by')%> <%=@from_user.name %>:
+<%= _('View Freedom of Information requests made by {{user_name}}:', :user_name=>@from_user.name)%>
<%= @from_user_url %>
---------------------------------------------------------------------
diff --git a/app/views/general/search.rhtml b/app/views/general/search.rhtml
index a4680c0f6..ec12b2bf3 100644
--- a/app/views/general/search.rhtml
+++ b/app/views/general/search.rhtml
@@ -123,8 +123,8 @@
<li><%= _("Enter words that you want to find separated by spaces, e.g. <strong>climbing lane</strong>") %></li>
<li><%= _('Use OR (in capital letters) where you don\'t mind which word, e.g. <strong><code>commons OR lords</code></strong>') %>
<li><%= _('Use quotes when you want to find an exact phrase, e.g. <strong><code>"Liverpool City Council"</code></strong>') %></li>
- <li><%= _('<strong><code>status:</code></strong> to select based on the status or historical status of the request, see the <a href="%s">table of statuses</a> below.') % "#statuses" %></li>
- <li><%= _('<strong><code>variety:</code></strong> to select type of thing to search for, see the <a href="%s">table of varieties</a> below.') % "#varieties" %></li>
+ <li><%= _('<strong><code>status:</code></strong> to select based on the status or historical status of the request, see the <a href="{{statuses_url}}">table of statuses</a> below.', :statuses_url => "#statuses") %></li>
+ <li><%= _('<strong><code>variety:</code></strong> to select type of thing to search for, see the <a href="{{varieties_url}}">table of varieties</a> below.', :varieties_url => "#varieties") %></li>
<li><%= _('<strong><code>requested_from:home_office</code></strong> to search requests from the Home Office, typing the name as in the URL.')%></li>
<li><%= _('<strong><code>requested_by:julian_todd</code></strong> to search requests made by Julian Todd, typing the name as in the URL.') %></li>
<li><%= _('<strong><code>commented_by:tony_bowden</code></strong> to search annotations made by Tony Bowden, typing the name as in the URL.')%></li>
@@ -134,33 +134,33 @@
<li><%= _('<strong><code>tag:charity</code></strong> to find all public bodies or requests with a given tag. You can include multiple tags,
and tag values, e.g. <code>tag:openlylocal AND tag:financial_transaction:335633</code>. Note that by default any of the tags
can be present, you have to put <code>AND</code> explicitly if you only want results them all present.')%></li>
- <li><%= _('Read about <a href="%s">advanced search operators</a>, such as proximity and wildcards.') % "http://www.xapian.org/docs/queryparser.html" %></li>
+ <li><%= _('Read about <a href="{{advanced_search_url}}">advanced search operators</a>, such as proximity and wildcards.', :advanced_search_url => "http://www.xapian.org/docs/queryparser.html") %></li>
</ul>
<h2 id="statuses"><%= _('Table of statuses') %></h2>
<table class="status_table">
- <tr><td><strong><%=search_link('status:waiting_response')%></strong></td><td> Waiting for the public authority to reply </td></tr>
- <tr><td><strong><%=search_link('status:not_held')%></strong></td><td> The public authority does not have the information requested </td></tr>
- <tr><td><strong><%=search_link('status:rejected')%></strong></td><td> The request was refused by the public authority </td></tr>
- <tr><td><strong><%=search_link('status:partially_successful')%></strong></td><td> Some of the information requested has been received </td></tr>
- <tr><td><strong><%=search_link('status:successful')%></strong></td><td> All of the information requested has been received </td></tr>
- <tr><td><strong><%=search_link('status:waiting_clarification')%></strong></td><td> The public authority would like part of the request explained </td></tr>
- <tr><td><strong><%=search_link('status:gone_postal')%></strong></td><td> The public authority would like to / has responded by post </td></tr>
- <tr><td><strong><%=search_link('status:internal_review')%></strong></td><td> Waiting for the public authority to complete an internal review of their handling of the request</td></tr>
- <tr><td><strong><%=search_link('status:error_message')%></strong></td><td> Received an error message, such as delivery failure.</td></tr>
- <tr><td><strong><%=search_link('status:requires_admin')%></strong></td><td> A strange reponse, required attention by the WhatDoTheyKnow team </td></tr>
- <tr><td><strong><%=search_link('status:user_withdrawn')%></strong></td><td> The requester has abandoned this request for some reason </td></tr>
+ <tr><td><strong><%=search_link('status:waiting_response')%></strong></td><td><%= _('Waiting for the public authority to reply') %></td></tr>
+ <tr><td><strong><%=search_link('status:not_held')%></strong></td><td><%= _('The public authority does not have the information requested') %></td></tr>
+ <tr><td><strong><%=search_link('status:rejected')%></strong></td><td><%= _('The request was refused by the public authority') %></td></tr>
+ <tr><td><strong><%=search_link('status:partially_successful')%></strong></td><td><%= _('Some of the information requested has been received') %></td></tr>
+ <tr><td><strong><%=search_link('status:successful')%></strong></td><td><%= _('All of the information requested has been received') %></td></tr>
+ <tr><td><strong><%=search_link('status:waiting_clarification')%></strong></td><td><%= _('The public authority would like part of the request explained') %></td></tr>
+ <tr><td><strong><%=search_link('status:gone_postal')%></strong></td><td><%= _('The public authority would like to / has responded by post') %></td></tr>
+ <tr><td><strong><%=search_link('status:internal_review')%></strong></td><td><%= _('Waiting for the public authority to complete an internal review of their handling of the request') %></td></tr>
+ <tr><td><strong><%=search_link('status:error_message')%></strong></td><td><%= _('Received an error message, such as delivery failure.') %></td></tr>
+ <tr><td><strong><%=search_link('status:requires_admin')%></strong></td><td><%= _('A strange reponse, required attention by the {{site_name}} team', :site_name=>site_name) %></td></tr>
+ <tr><td><strong><%=search_link('status:user_withdrawn')%></strong></td><td><%= _('The requester has abandoned this request for some reason') %></td></tr>
</table>
<h2 id="varieties">Table of varieties</h2>
<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: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>
- <tr><td><strong><%=search_link('variety:user')%></strong></td><td> A WhatDoTheyKnow user </td></tr>
+ <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: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>
+ <tr><td><strong><%=search_link('variety:user')%></strong></td><td><%= _('A {{site_name}} user', :site_name=>site_name) %></td></tr>
</table>
<% end %>
diff --git a/app/views/layouts/admin.rhtml b/app/views/layouts/admin.rhtml
index 5fe75fc97..f0e9a7019 100644
--- a/app/views/layouts/admin.rhtml
+++ b/app/views/layouts/admin.rhtml
@@ -2,7 +2,7 @@
<html lang="en-gb">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" >
- <title>WhatDoTheyKnow admin<%= @title ? ":" : "" %> <%=@title%></title>
+ <title><%= site_name %> admin<%= @title ? ":" : "" %> <%=@title%></title>
<%= stylesheet_link_tag 'admin', :title => "Main", :rel => "stylesheet" %>
</head>
<body>
diff --git a/app/views/public_body/view_email.rhtml b/app/views/public_body/view_email.rhtml
index d6c8d85fe..50601069f 100644
--- a/app/views/public_body/view_email.rhtml
+++ b/app/views/public_body/view_email.rhtml
@@ -4,7 +4,7 @@
<p>
<% if @public_body.is_requestable? %>
-<%= _('WhatDoTheyKnow sends new requests to <strong>{{request_email}}</strong> for this authority.',:request_email=> h(@public_body.request_email))%>
+<%= _('{{site_name}} sends new requests to <strong>{{request_email}}</strong> for this authority.', :site_name=>site_name, :request_email=> h(@public_body.request_email))%>
<% else %>
<% if @public_body.not_requestable_reason == 'not_apply' %>
<p><%= _('Freedom of Information law no longer applies to this authority.Follow up messages to existing requests are sent to ')%><strong><%=h @public_body.request_email%></strong>.
diff --git a/app/views/request/details.rhtml b/app/views/request/details.rhtml
index 94d87306d..d4c63902f 100644
--- a/app/views/request/details.rhtml
+++ b/app/views/request/details.rhtml
@@ -4,17 +4,17 @@
<h2><%= _('Event history') %></h2>
<p><%= _('This table shows the technical details of the internal events that happened
-to this request on WhatDoTheyKnow. This could be used to generate information about
+to this request on {{site_name}}. This could be used to generate information about
the speed with which authorities respond to requests, the number of requests
-which require a postal response and much more.') %>
+which require a postal response and much more.', :site_name=>site_name) %>
</p>
<p><%= _('<strong>Caveat emptor!</strong> To use this data in an honourable way, you will need
-a good internal knowledge of user behaviour on WhatDoTheyKnow. How,
+a good internal knowledge of user behaviour on {{site_name}}. How,
why and by whom requests are categorised is not straightforward, and there will
be user error and ambiguity. You will also need to understand FOI law, and the
way authorities use it. Plus you\'ll need to be an elite statistician. Please
-<a href="%s">contact us</a> with questions.') % [help_contact_path] %>
+<a href="{{contact_path}}">contact us</a> with questions.', :site_name=>site_name, :contact_path=>help_contact_path) %>
</p>
<% columns = ['id', 'event_type', 'created_at', 'described_state', 'calculated_state', 'last_described_at' ] %>
@@ -49,11 +49,12 @@ way authorities use it. Plus you\'ll need to be an elite statistician. Please
<p>
<%= _('Here <strong>described</strong> means when a user selected a status for the request, and
the most recent event had its status updated to that value. <strong>calculated</strong> is then inferred by
-WhatDoTheyKnow for intermediate events, which weren\'t given an explicit
-description by a user. See the <a href="%s">search tips</a> for description of the states.') % [search_redirect_path] %>
+{{site_name}} for intermediate events, which weren\'t given an explicit
+description by a user. See the <a href="{{search_path}}">search tips</a> for description of the states.',
+:site_name=>site_name, :search_path=>search_redirect_path) %>
</p>
<p>
<%= _('You can get this page in computer-readable format as part of the main JSON
-page for the request. See the <a href="%s">API documentation</a>.') % [help_api_path] %>
+page for the request. See the <a href="{{api_path}}">API documentation</a>.', :api_path=>help_api_path) %>
</p>
diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml
index 1993ee6b2..2897a3564 100644
--- a/app/views/request/show.rhtml
+++ b/app/views/request/show.rhtml
@@ -110,9 +110,9 @@
<% elsif @status == 'internal_review' %>
<%= _('Waiting for an <strong>internal review</strong> by {{public_body_link}} of their handling of this request.',:public_body_link=>public_body_link(@info_request.public_body)) %>
<% elsif @status == 'error_message' %>
- <%= _('There was a <strong>delivery error</strong> or similar, which needs fixing by the WhatDoTheyKnow team.') %>
+ <%= _('There was a <strong>delivery error</strong> or similar, which needs fixing by the {{site_name}} team.', :site_name=>site_name) %>
<% elsif @status == 'requires_admin' %>
- <%= _('This request has had an unusual response, and <strong>requires attention</strong> from the WhatDoTheyKnow team.') %>
+ <%= _('This request has had an unusual response, and <strong>requires attention</strong> from the {{site_name}} team.', :site_name=>site_name) %>
<% elsif @status == 'user_withdrawn' %>
<%= _('This request has been <strong>withdrawn</strong> by the person who made it.
There may be an explanation in the correspondence below.') %>
diff --git a/app/views/request_mailer/comment_on_alert.rhtml b/app/views/request_mailer/comment_on_alert.rhtml
index 46cee3b1a..691e6f9bb 100644
--- a/app/views/request_mailer/comment_on_alert.rhtml
+++ b/app/views/request_mailer/comment_on_alert.rhtml
@@ -3,4 +3,4 @@ request. Follow this link to see what they wrote.',:user_name=>@comment.user.nam
<%=@url%>
--- <%= _('the WhatDoTheyKnow team') %>
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/request_mailer/comment_on_alert_plural.rhtml b/app/views/request_mailer/comment_on_alert_plural.rhtml
index 3871a9598..a495b8e08 100644
--- a/app/views/request_mailer/comment_on_alert_plural.rhtml
+++ b/app/views/request_mailer/comment_on_alert_plural.rhtml
@@ -2,6 +2,6 @@
<%=@url%>
--- <%= _('the WhatDoTheyKnow team') %>
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/request_mailer/new_response.rhtml b/app/views/request_mailer/new_response.rhtml
index c3e979cd6..083f873b4 100644
--- a/app/views/request_mailer/new_response.rhtml
+++ b/app/views/request_mailer/new_response.rhtml
@@ -12,6 +12,6 @@ contains any useful information.' )%>
<%= _('Although all responses are automatically published, we depend on
you, the original requester, to evaluate them.')%>
--- <%= _('the WhatDoTheyKnow team') %>
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/request_mailer/new_response_reminder_alert.rhtml b/app/views/request_mailer/new_response_reminder_alert.rhtml
index cde7851db..5f07e8559 100644
--- a/app/views/request_mailer/new_response_reminder_alert.rhtml
+++ b/app/views/request_mailer/new_response_reminder_alert.rhtml
@@ -5,6 +5,6 @@
<%= _('Your request was called {{info_request}}. Letting everyone know whether you got the information will help us keep tabs on',:info_request=>@info_request.title)%>
<%= @info_request.public_body.name %>.
--- <%= _('the WhatDoTheyKnow team') %>
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/request_mailer/not_clarified_alert.rhtml b/app/views/request_mailer/not_clarified_alert.rhtml
index 2e6cf6a05..82d15ba76 100644
--- a/app/views/request_mailer/not_clarified_alert.rhtml
+++ b/app/views/request_mailer/not_clarified_alert.rhtml
@@ -6,4 +6,4 @@
<%= _('You will only get an answer to your request if you follow up
with the clarification.')%>
--- <%= _('the WhatDoTheyKnow team') %>
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/request_mailer/old_unclassified_updated.rhtml b/app/views/request_mailer/old_unclassified_updated.rhtml
index afaa0cf1c..5b8534832 100644
--- a/app/views/request_mailer/old_unclassified_updated.rhtml
+++ b/app/views/request_mailer/old_unclassified_updated.rhtml
@@ -5,5 +5,5 @@
<%= @url %>
--- <%= _('the WhatDoTheyKnow team') %>
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/request_mailer/overdue_alert.rhtml b/app/views/request_mailer/overdue_alert.rhtml
index 70b6ffcf1..b8a9ba525 100644
--- a/app/views/request_mailer/overdue_alert.rhtml
+++ b/app/views/request_mailer/overdue_alert.rhtml
@@ -6,6 +6,6 @@
<%=@url%>
--- <%= _('the WhatDoTheyKnow team') %>
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/request_mailer/stopped_responses.rhtml b/app/views/request_mailer/stopped_responses.rhtml
index eb53cee1c..9cd156860 100644
--- a/app/views/request_mailer/stopped_responses.rhtml
+++ b/app/views/request_mailer/stopped_responses.rhtml
@@ -13,7 +13,7 @@ email {{contact_email}} for help.',:user=>@info_request.user.name,:contact_email
<%= _('Your original message is attached.')%>
--- <%= _('the WhatDoTheyKnow team') %>
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/request_mailer/very_overdue_alert.rhtml b/app/views/request_mailer/very_overdue_alert.rhtml
index e61b3a206..6abd198a0 100644
--- a/app/views/request_mailer/very_overdue_alert.rhtml
+++ b/app/views/request_mailer/very_overdue_alert.rhtml
@@ -8,4 +8,4 @@ review, asking them to find out why response to the request has been so slow.',:
<%=@url%>
--- <%= _('the WhatDoTheyKnow team') %>
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/track_mailer/event_digest.rhtml b/app/views/track_mailer/event_digest.rhtml
index df27a5cbd..46f230da1 100644
--- a/app/views/track_mailer/event_digest.rhtml
+++ b/app/views/track_mailer/event_digest.rhtml
@@ -63,4 +63,4 @@
Please click on the link below to cancel or alter these emails.
<%=@unsubscribe_url%>
--- the WhatDoTheyKnow team
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/user/_signin.rhtml b/app/views/user/_signin.rhtml
index c6661696e..79628b3a9 100644
--- a/app/views/user/_signin.rhtml
+++ b/app/views/user/_signin.rhtml
@@ -4,7 +4,7 @@
<%= 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 {{site_name}} before', :site_name=>site_name)%></h2>
<% end %>
<p>
diff --git a/app/views/user/_signup.rhtml b/app/views/user/_signup.rhtml
index 70120bc5f..6b0a1f8c7 100644
--- a/app/views/user/_signup.rhtml
+++ b/app/views/user/_signup.rhtml
@@ -3,7 +3,7 @@
<% 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 {{site_name}}', :site_name=>site_name)%></h2>
<p>
<label class="form_label" for="user_signup_email"><%= _('Your e-mail:')%></label>
diff --git a/app/views/user/set_crop_profile_photo.rhtml b/app/views/user/set_crop_profile_photo.rhtml
index 33b78e193..db18d10a1 100644
--- a/app/views/user/set_crop_profile_photo.rhtml
+++ b/app/views/user/set_crop_profile_photo.rhtml
@@ -33,7 +33,7 @@
<%= 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.')%>
+ wherever you do something on {{site_name}}.', :site_name=>site_name)%>
<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 b6a39df5e..70d27074b 100644
--- a/app/views/user/set_draft_profile_photo.rhtml
+++ b/app/views/user/set_draft_profile_photo.rhtml
@@ -16,7 +16,7 @@
<ul>
<li><%= _('Your photo will be shown in public <strong>on the Internet</strong>,
- wherever you do something on WhatDoTheyKnow.')%>
+ wherever you do something on {{site_name}}.', :site_name=>site_name)%>
</li>
<li><%= _('Please don\'t upload offensive pictures. We will take down images
diff --git a/app/views/user/set_profile_about_me.rhtml b/app/views/user/set_profile_about_me.rhtml
index aa53d6720..af6433e89 100644
--- a/app/views/user/set_profile_about_me.rhtml
+++ b/app/views/user/set_profile_about_me.rhtml
@@ -1,4 +1,4 @@
-<% @title = _('Change the text about you on your profile at WhatDoTheyKnow.com') %>
+<% @title = _('Change the text about you on your profile at {{site_name}}', :site_name=>site_name) %>
<% raise _('internal error') if not @user %>
@@ -11,8 +11,8 @@
<%= _(' 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 {{site_name}} profile, to make it
+ easier for others to get involved with what you\'re doing.', :site_name=>site_name)%>
</p>
</div>
diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml
index 09bf3de5f..5e2c29d84 100644
--- a/app/views/user/show.rhtml
+++ b/app/views/user/show.rhtml
@@ -59,7 +59,7 @@
<h1> <%= h(@display_user.name) + (@is_you ? _(" (you)") : "") %></h1>
<p class="subtitle">
- <%= _('Joined WhatDoTheyKnow in') %> <%= year_from_date(@display_user.created_at) %>
+ <%= _('Joined {{site_name}} in', :site_name=>site_name) %> <%= year_from_date(@display_user.created_at) %>
<% if !@user.nil? && @user.admin_page_links? %>
(<%= link_to "admin", user_admin_url(@display_user) %>)
<% end %>
@@ -76,7 +76,7 @@
<div id="user_public_banned">
<p>
<strong>
- <%= _('This user has been banned from WhatDoTheyKnow.com ')%>
+ <%= _('This user has been banned from {{site_name}} ', :site_name=>site_name)%>
</strong>
</p>
<p>
diff --git a/app/views/user/signchangeemail.rhtml b/app/views/user/signchangeemail.rhtml
index c0c559380..0f8b76bc5 100644
--- a/app/views/user/signchangeemail.rhtml
+++ b/app/views/user/signchangeemail.rhtml
@@ -34,7 +34,7 @@
<div class="form_button">
<%= hidden_field_tag 'submitted_signchangeemail_do', 1 %>
- <%= submit_tag "Change email on WhatDoTheyKnow.com" %>
+ <%= submit_tag _("Change email on {{site_name}}", :site_name=>site_name) %>
</div>
<% end %>
diff --git a/app/views/user_mailer/already_registered.rhtml b/app/views/user_mailer/already_registered.rhtml
index 3bdb3d04b..59ffcbf94 100644
--- a/app/views/user_mailer/already_registered.rhtml
+++ b/app/views/user_mailer/already_registered.rhtml
@@ -1,11 +1,11 @@
<%= @name %>,
-<%= _('You just tried to sign up to WhatDoTheyKnow.com, when you
+<%= _('You just tried to sign up to {{site_name}}, when you
already have an account. Your name and password have been
left as they previously were.
-Please click on the link below.')%> <%=@reasons[:email]%>
+Please click on the link below.', :site_name=>site_name)%> <%=@reasons[:email]%>
<%=@url%>
--- <%= _('the WhatDoTheyKnow team') %>
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/user_mailer/changeemail_already_used.rhtml b/app/views/user_mailer/changeemail_already_used.rhtml
index 011c6ee81..1d74dda35 100644
--- a/app/views/user_mailer/changeemail_already_used.rhtml
+++ b/app/views/user_mailer/changeemail_already_used.rhtml
@@ -1,9 +1,10 @@
<%= _('Someone, perhaps you, just tried to change their email address on
-WhatDoTheyKnow.com from ')%><%=@old_email%> <%= _('to')%> <%=@new_email%>.
+{{site_name}} from {{old_email}} to {{new_email}}.', :site_name=>site_name,
+:old_email=>@old_email, :new_email=>@new_email) %>
<%= _('This was not possible because there is already an account using
-the email address ')%><%=@new_email%>.
+the email address {{email}}.', :email=>@new_email)%>.
<%= _('The accounts have been left as they previously were.')%>
--- <%= _('the WhatDoTheyKnow team') %>
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/user_mailer/changeemail_confirm.rhtml b/app/views/user_mailer/changeemail_confirm.rhtml
index b7eff308d..ffb9737f7 100644
--- a/app/views/user_mailer/changeemail_confirm.rhtml
+++ b/app/views/user_mailer/changeemail_confirm.rhtml
@@ -1,12 +1,13 @@
<%= @name %>,
<%= _('Please click on the link below to confirm that you want to
-change the email address that you use for WhatDoTheyKnow
-from ')%><%=@old_email%> <%= _('to ')%><%=@new_email%>
+change the email address that you use for {{site_name}}
+from {{old_email}} to {{new_email}}',
+:site_name=>site_name, :old_email=>@old_email, :new_email=>@new_email) %>
<%=@url%>
<%= _('We will not reveal your email addresses to anybody unless you
or the law tell us to.')%>
--- <%= _('the WhatDoTheyKnow team') %>
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/user_mailer/confirm_login.rhtml b/app/views/user_mailer/confirm_login.rhtml
index b68e9abb1..6f4feff00 100644
--- a/app/views/user_mailer/confirm_login.rhtml
+++ b/app/views/user_mailer/confirm_login.rhtml
@@ -8,4 +8,4 @@
<%= _('We will not reveal your email address to anybody unless you
or the law tell us to.')%>
--- <%= _('the WhatDoTheyKnow team') %>
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/config/alert-tracks-debian.ugly b/config/alert-tracks-debian.ugly
index e4cc12b38..730a125b4 100644
--- a/config/alert-tracks-debian.ugly
+++ b/config/alert-tracks-debian.ugly
@@ -6,11 +6,11 @@
# Required-Stop: $local_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
-# Short-Description: alert-tracks is a daemon running the WhatDoTheyKnow email alerts
-# Description: alert-tracks send WhatDoTheyKnow email alerts as required
+# Short-Description: alert-tracks is a daemon running the Alaveteli email alerts
+# Description: alert-tracks send Alaveteli email alerts as required
### END INIT INFO
#
-# !!(*= $daemon_name *)!! Start the WhatDoTheyKnow email alert daemon
+# !!(*= $daemon_name *)!! Start the Alaveteli email alert daemon
NAME=!!(*= $daemon_name *)!!
DAEMON=/data/vhost/!!(*= $vhost *)!!/alaveteli/script/runner
@@ -42,7 +42,7 @@ case "$1" in
quietly_start_daemon
if [ $? -ne 1 ]
then
- echo "WhatDoTheyKnow alert daemon was not running; now restarted"
+ echo "Alaveteli alert daemon was not running; now restarted"
exit 1
else
exit 0
@@ -50,17 +50,17 @@ case "$1" in
;;
start)
- echo -n "Starting WhatDoTheyKnow alert daemon: $NAME"
+ echo -n "Starting Alaveteli alert daemon: $NAME"
start_daemon
;;
stop)
- echo -n "Stopping WhatDoTheyKnow alert daemon: $NAME"
+ echo -n "Stopping Alaveteli alert daemon: $NAME"
stop_daemon
;;
restart)
- echo -n "Restarting WhatDoTheyKnow alert daemon: $NAME"
+ echo -n "Restarting Alaveteli alert daemon: $NAME"
stop_daemon
start_daemon
;;
diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb
index 0b5e96711..c974c8a0d 100644
--- a/spec/controllers/user_controller_spec.rb
+++ b/spec/controllers/user_controller_spec.rb
@@ -179,7 +179,7 @@ describe UserController, "when signing up" do
deliveries = ActionMailer::Base.deliveries
deliveries.size.should == 1
- deliveries[0].body.should include("have an account")
+ deliveries[0].body.should include("when you already have an")
end
# XXX need to do bob@localhost signup and check that sends different email
@@ -236,7 +236,7 @@ describe UserController, "when sending another user a message" do
deliveries = ActionMailer::Base.deliveries
deliveries.size.should == 1
mail = deliveries[0]
- mail.body.should include("Bob Smith has used WhatDoTheyKnow to send you the message below")
+ mail.body.should include("Bob Smith has used #{MySociety::Config.get('SITE_NAME')} to send you the message below")
mail.body.should include("Just a test!")
#mail.to_addrs.to_s.should == users(:silly_name_user).name_and_email # XXX fix some nastiness with quoting name_and_email
mail.from_addrs.to_s.should == users(:bob_smith_user).name_and_email