diff options
180 files changed, 4064 insertions, 3432 deletions
diff --git a/.gitignore b/.gitignore index a4ec2380e..994f9a3a1 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ bin/ config/aliases config/httpd.conf config/general*.yml +config/deploy.yml.* .sass-cache alaveteli.sublime* webrat.log diff --git a/.travis.yml b/.travis.yml index 6a6b73e90..3351bed2a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,9 @@ before_install: - gem update --system 2.1.11 - gem install rake --version=0.9.2.2 - git submodule update --init --recursive - - psql -c "create database foi_test template template0 encoding 'SQL_ASCII';" -U postgres + - psql -c "create database template_utf8 template template0 encoding 'UTF-8';" -U postgres + - psql -c "update pg_database set datistemplate=true where datname='template_utf8';" -U postgres + - psql -c "create database foi_test template template_utf8;" -U postgres - cp config/database.yml-test config/database.yml - cp config/general.yml-example config/general.yml - cp config/newrelic.yml-example config/newrelic.yml @@ -1,13 +1,6 @@ -# Work around bug in Debian Squeeze - see https://github.com/mysociety/alaveteli/pull/297#issuecomment-4101012 -if File.exist? "/etc/debian_version" and File.open("/etc/debian_version").read.strip =~ /^(squeeze.*|6\.0\.[45])$/ - if File.exist? "/lib/libuuid.so.1" - require 'dl' - DL::dlopen('/lib/libuuid.so.1') - end -end source 'https://rubygems.org' -gem 'rails', '3.2.18' +gem 'rails', '3.2.19' gem 'pg' @@ -17,7 +10,6 @@ gem 'charlock_holmes' gem 'dynamic_form' gem 'exception_notification' gem 'fancybox-rails' -gem 'fastercsv', '>=1.5.5' gem 'foundation-rails' gem 'jquery-rails', '~> 3.0.4' gem 'jquery-ui-rails' @@ -82,6 +74,7 @@ end group :development do gem 'capistrano' gem 'mailcatcher' + gem 'quiet_assets' gem 'rdoc' end diff --git a/Gemfile.lock b/Gemfile.lock index 32a1e77f5..682bacf8c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -18,12 +18,12 @@ GIT GEM remote: https://rubygems.org/ specs: - actionmailer (3.2.18) - actionpack (= 3.2.18) + actionmailer (3.2.19) + actionpack (= 3.2.19) mail (~> 2.5.4) - actionpack (3.2.18) - activemodel (= 3.2.18) - activesupport (= 3.2.18) + actionpack (3.2.19) + activemodel (= 3.2.19) + activesupport (= 3.2.19) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.4) @@ -31,18 +31,18 @@ GEM rack-cache (~> 1.2) rack-test (~> 0.6.1) sprockets (~> 2.2.1) - activemodel (3.2.18) - activesupport (= 3.2.18) + activemodel (3.2.19) + activesupport (= 3.2.19) builder (~> 3.0.0) - activerecord (3.2.18) - activemodel (= 3.2.18) - activesupport (= 3.2.18) + activerecord (3.2.19) + activemodel (= 3.2.19) + activesupport (= 3.2.19) arel (~> 3.0.2) tzinfo (~> 0.3.29) - activeresource (3.2.18) - activemodel (= 3.2.18) - activesupport (= 3.2.18) - activesupport (3.2.18) + activeresource (3.2.19) + activemodel (= 3.2.19) + activesupport (= 3.2.19) + activesupport (3.2.19) i18n (~> 0.6, >= 0.6.4) multi_json (~> 1.0) annotate (2.5.0) @@ -104,7 +104,6 @@ GEM fancybox-rails (0.2.1) railties (>= 3.1.0) fast_gettext (0.7.0) - fastercsv (1.5.5) foundation-rails (5.2.1.0) railties (>= 3.1.0) sass (>= 3.2.0) @@ -145,7 +144,7 @@ GEM thin (~> 1.5.0) memcache-client (1.8.5) mime-types (1.25.1) - multi_json (1.10.0) + multi_json (1.10.1) net-http-local (0.1.2) net-purge (0.1.0) net-scp (1.1.1) @@ -155,13 +154,15 @@ GEM net-ssh (2.6.7) net-ssh-gateway (1.2.0) net-ssh (>= 2.6.5) - newrelic_rpm (3.8.0.218) + newrelic_rpm (3.9.1.236) nokogiri (1.5.9) paper_trail (2.7.2) activerecord (~> 3.0) railties (~> 3.0) pg (0.15.1) - polyglot (0.3.4) + polyglot (0.3.5) + quiet_assets (1.0.2) + railties (>= 3.1, < 5.0) rack (1.4.5) rack-cache (1.2) rack (>= 0.4) @@ -171,19 +172,19 @@ GEM rack rack-test (0.6.2) rack (>= 1.0) - rails (3.2.18) - actionmailer (= 3.2.18) - actionpack (= 3.2.18) - activerecord (= 3.2.18) - activeresource (= 3.2.18) - activesupport (= 3.2.18) + rails (3.2.19) + actionmailer (= 3.2.19) + actionpack (= 3.2.19) + activerecord (= 3.2.19) + activeresource (= 3.2.19) + activesupport (= 3.2.19) bundler (~> 1.0) - railties (= 3.2.18) + railties (= 3.2.19) rails-i18n (0.7.3) i18n (~> 0.5) - railties (3.2.18) - actionpack (= 3.2.18) - activesupport (= 3.2.18) + railties (3.2.19) + actionpack (= 3.2.19) + activesupport (= 3.2.19) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) @@ -243,7 +244,7 @@ GEM hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) - tilt (!= 1.3.0, ~> 1.1) + tilt (~> 1.1, != 1.3.0) sqlite3 (1.3.7) statistics2 (0.54) syslog_protocol (0.9.2) @@ -295,7 +296,6 @@ DEPENDENCIES fakeweb fancybox-rails fast_gettext - fastercsv (>= 1.5.5) foundation-rails gettext gettext_i18n_rails @@ -312,8 +312,9 @@ DEPENDENCIES newrelic_rpm nokogiri pg + quiet_assets rack - rails (= 3.2.18) + rails (= 3.2.19) rails-i18n rake (= 0.9.2.2) rdoc @@ -1,6 +1,7 @@ # Welcome to Alaveteli! [](http://travis-ci.org/mysociety/alaveteli) [](https://gemnasium.com/mysociety/alaveteli) [](https://coveralls.io/r/mysociety/alaveteli) [](https://codeclimate.com/github/mysociety/alaveteli) +[](http://mysociety.github.io/installation-standards.html) This is an open source project to create a standard, internationalised platform for making Freedom of Information (FOI) requests in different @@ -17,12 +18,12 @@ Please join our mailing list at https://groups.google.com/group/alaveteli-dev and introduce yourself, or drop a line to hello@alaveteli.org to let us know that you're using Alaveteli. -Some documentation can be found in the -[`doc/` folder](https://github.com/mysociety/alaveteli/tree/master/doc). -There's background information and more documentation on -[our wiki](https://github.com/mysociety/alaveteli/wiki/Home/), and lots -of useful information (including a blog) on -[the project website](http://alaveteli.org) +There's lots of useful information and documentation (including a blog) +on [the project website](http://alaveteli.org). There's background +information and notes on [our +wiki](https://github.com/mysociety/alaveteli/wiki/Home/), and upgrade +notes in the [`doc/` +folder](https://github.com/mysociety/alaveteli/tree/master/doc/CHANGES.md) ## How to contribute diff --git a/Vagrantfile b/Vagrantfile index 5d56914a5..0fcf73de0 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -46,17 +46,41 @@ # Both have the same effect, but exporting will retain the variable for the # duration of your shell session. # +# Using Themes +# ------------ +# +# You can also use the built in theme switcher (script/switch-theme.rb). The +# ALAVETELI_THEMES_DIR will be shared in to /home/vagrant/alaveteli-themes so +# that the default location is used on the guest. You can use the env var +# ALAVETELI_THEMES_DIR to change where this Vagrantfile looks for the themes +# directory on the host. +# # Customization Options # ===================== ALAVETELI_FQDN = ENV['ALAVETELI_VAGRANT_FQDN'] || "alaveteli.10.10.10.30.xip.io" ALAVETELI_MEMORY = ENV['ALAVETELI_VAGRANT_MEMORY'] || 1536 ALAVETELI_THEMES_DIR = ENV['ALAVETELI_THEMES_DIR'] || '../alaveteli-themes' +ALAVETELI_OS = ENV['ALAVETELI_VAGRANT_OS'] || 'precise64' + +SUPPORTED_OPERATING_SYSTEMS = { + 'precise64' => 'https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box', + 'squeeze64' => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box', + 'wheezy64' => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box' +} + +def box + ALAVETELI_OS +end + +def box_url + SUPPORTED_OPERATING_SYSTEMS[ALAVETELI_OS] +end VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - config.vm.box = "precise64" - config.vm.box_url = "http://files.vagrantup.com/precise64.box" + config.vm.box = box + config.vm.box_url = box_url config.vm.network :private_network, :ip => "10.10.10.30" config.vm.synced_folder ".", "/home/vagrant/alaveteli", :owner => "vagrant", :group => "vagrant" @@ -77,7 +101,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| end # Fetch and run the install script: - config.vm.provision :shell, :inline => "wget -O install-site.sh https://raw.github.com/mysociety/commonlib/master/bin/install-site.sh" + config.vm.provision :shell, :inline => "apt-get -y install curl" + config.vm.provision :shell, :inline => "curl -O https://raw.githubusercontent.com/mysociety/commonlib/master/bin/install-site.sh" config.vm.provision :shell, :inline => "chmod a+rx install-site.sh" config.vm.provision :shell, :inline => "./install-site.sh " \ "--dev " \ diff --git a/app/assets/stylesheets/responsive/_footer_layout.scss b/app/assets/stylesheets/responsive/_footer_layout.scss index 2b0c956fa..55b6839c2 100644 --- a/app/assets/stylesheets/responsive/_footer_layout.scss +++ b/app/assets/stylesheets/responsive/_footer_layout.scss @@ -45,6 +45,10 @@ img { display: inherit; + @include lte-ie7 { + display: block; + } } + } } diff --git a/app/assets/stylesheets/responsive/_global_style.scss b/app/assets/stylesheets/responsive/_global_style.scss index 5b268f3a6..290591b5f 100644 --- a/app/assets/stylesheets/responsive/_global_style.scss +++ b/app/assets/stylesheets/responsive/_global_style.scss @@ -222,4 +222,7 @@ div.pagination { } - +/* Search result highlighting */ +.highlight { + background:#FF0; +} diff --git a/app/controllers/admin_request_controller.rb b/app/controllers/admin_request_controller.rb index fc291d998..21120e4ad 100644 --- a/app/controllers/admin_request_controller.rb +++ b/app/controllers/admin_request_controller.rb @@ -100,7 +100,8 @@ class AdminRequestController < AdminController @info_request.fully_destroy # expire cached files expire_for_request(@info_request) - flash[:notice] = "Request #{url_title} has been completely destroyed. Email of user who made request: " + user.email + email = user.try(:email) ? user.email : 'This request is external so has no associated user' + flash[:notice] = "Request #{ url_title } has been completely destroyed. Email of user who made request: #{ email }" redirect_to admin_request_list_url end @@ -199,7 +200,7 @@ class AdminRequestController < AdminController end # Bejeeps, look, sometimes a URL is something that belongs in a controller, jesus. - # XXX hammer this square peg into the round MVC hole + # TODO: hammer this square peg into the round MVC hole post_redirect = PostRedirect.new( :uri => upload_response_url(:url_title => info_request.url_title), :user_id => user.id) @@ -253,7 +254,7 @@ class AdminRequestController < AdminController end info_request_event.described_state = 'waiting_clarification' info_request_event.calculated_state = 'waiting_clarification' - # XXX deliberately don't update described_at so doesn't reenter search? + # TODO: deliberately don't update described_at so doesn't reenter search? info_request_event.save! flash[:notice] = "Old response marked as having been a clarification" diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index e6b0c121a..6f83d89d6 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -1,5 +1,9 @@ class ApiController < ApplicationController before_filter :check_api_key + before_filter :check_external_request, + :only => [:add_correspondence, :update_state] + before_filter :check_request_ownership, + :only => [:add_correspondence, :update_state] def show_request @request = InfoRequest.find(params[:id]) @@ -9,16 +13,11 @@ class ApiController < ApplicationController :id => @request.id, :url => make_url("request", @request.url_title), :title => @request.title, - :created_at => @request.created_at, :updated_at => @request.updated_at, - :status => @request.calculate_status, - :public_body_url => make_url("body", @request.public_body.url_name), - :request_email => @request.incoming_email, - :request_text => @request.last_event_forming_initial_request.outgoing_message.body, } if @request.user @@ -73,35 +72,19 @@ class ApiController < ApplicationController 'url' => make_url("request", request.url_title), 'id' => request.id } - end def add_correspondence - request = InfoRequest.find_by_id(params[:id]) - if request.nil? - render :json => { "errors" => ["Could not find request #{params[:id]}"] }, :status => 404 - return - end - json = ActiveSupport::JSON.decode(params[:correspondence_json]) attachments = params[:attachments] direction = json["direction"] body = json["body"] sent_at = json["sent_at"] + new_state = params["state"] errors = [] - if !request.is_external? - render :json => { "errors" => ["Request #{params[:id]} cannot be updated using the API"] }, :status => 500 - return - end - - if request.public_body_id != @public_body.id - render :json => { "errors" => ["You do not own request #{params[:id]}"] }, :status => 500 - return - end - if !["request", "response"].include?(direction) errors << "The direction parameter must be 'request' or 'response'" end @@ -116,6 +99,10 @@ class ApiController < ApplicationController errors << "You cannot attach files to messages in the 'request' direction" end + if new_state && !InfoRequest.allowed_incoming_states.include?(new_state) + errors << "'#{new_state}' is not a valid request state" + end + if !errors.empty? render :json => { "errors" => errors }, :status => 500 return @@ -125,16 +112,16 @@ class ApiController < ApplicationController # In the 'request' direction, i.e. what we (Alaveteli) regard as outgoing outgoing_message = OutgoingMessage.new( - :info_request => request, + :info_request => @request, :status => 'ready', :message_type => 'followup', :body => body, :last_sent_at => sent_at, :what_doing => 'normal_sort' ) - request.outgoing_messages << outgoing_message - request.save! - request.log_event("followup_sent", + @request.outgoing_messages << outgoing_message + @request.save! + @request.log_event("followup_sent", :api => true, :email => nil, :outgoing_message_id => outgoing_message.id, @@ -154,12 +141,48 @@ class ApiController < ApplicationController ) end - mail = RequestMailer.external_response(request, body, sent_at, attachment_hashes) + mail = RequestMailer.external_response(@request, body, sent_at, attachment_hashes) + + @request.receive(mail, mail.encoded, true) - request.receive(mail, mail.encoded, true) + if new_state + # we've already checked above that the status is valid + # so no need to check a second time + event = @request.log_event("status_update", + { :script => "#{@public_body.name} via API", + :old_described_state => @request.described_state, + :described_state => new_state, + }) + @request.set_described_state(new_state) + end end render :json => { - 'url' => make_url("request", request.url_title), + 'url' => make_url("request", @request.url_title), + } + end + + def update_state + new_state = params["state"] + + if InfoRequest.allowed_incoming_states.include?(new_state) + ActiveRecord::Base.transaction do + event = @request.log_event("status_update", + { :script => "#{@public_body.name} on behalf of requester via API", + :old_described_state => @request.described_state, + :described_state => new_state, + }) + @request.set_described_state(new_state) + end + else + render :json => { + "errors" => ["'#{new_state}' is not a valid request state" ] + }, + :status => 500 + return + end + + render :json => { + 'url' => make_url("request", @request.url_title), } end @@ -168,51 +191,48 @@ class ApiController < ApplicationController raise PermissionDenied.new("#{@public_body.id} != #{params[:id]}") if @public_body.id != params[:id].to_i since_date_str = params[:since_date] - if since_date_str.nil? - @events = InfoRequestEvent.find_by_sql([ - %(select info_request_events.* - from info_requests - join info_request_events on info_requests.id = info_request_events.info_request_id - where info_requests.public_body_id = ? - and info_request_events.event_type in ( - 'sent', 'followup_sent', 'resent', 'followup_resent' - ) - order by info_request_events.created_at desc - ), @public_body.id - ]) - else + since_event_id = params[:since_event_id] + + event_type_clause = "event_type in ('sent', 'followup_sent', 'resent', 'followup_resent')" + + @events = InfoRequestEvent.where(event_type_clause) \ + .joins(:info_request) \ + .where("public_body_id = ?", @public_body.id) \ + .includes([{:info_request => :user}, :outgoing_message]) \ + .order('info_request_events.created_at DESC') + + if since_date_str begin - since_date = Date.strptime(since_date_str, "%Y-%m-%d") + since_date = Date.strptime(since_date_str, "%Y-%m-%d") rescue ArgumentError - render :json => {"errors" => [ - "Parameter since_date must be in format yyyy-mm-dd (not '#{since_date_str}')" ] }, - :status => 500 - return + render :json => {"errors" => [ + "Parameter since_date must be in format yyyy-mm-dd (not '#{since_date_str}')" ] }, + :status => 500 + return end - @events = InfoRequestEvent.find_by_sql([ - %(select info_request_events.* - from info_requests - join info_request_events on info_requests.id = info_request_events.info_request_id - where info_requests.public_body_id = ? - and info_request_events.event_type in ( - 'sent', 'followup_sent', 'resent', 'followup_resent' - ) - and info_request_events.created_at >= ? - order by info_request_events.created_at desc - ), @public_body.id, since_date - ]) + @events = @events.where("info_request_events.created_at >= ?", since_date) + end + + # We take a "since" parameter that allows the client + # to restrict to events more recent than a certain other event + if since_event_id + begin + event = InfoRequestEvent.find(since_event_id) + rescue ActiveRecord::RecordNotFound + render :json => {"errors" => [ + "Event ID #{since_event_id} not found" ] }, + :status => 500 + return + end + @events = @events.where("info_request_events.created_at > ?", event.created_at) end + + if feed_type == "atom" render :template => "api/request_events", :formats => ['atom'], :layout => false elsif feed_type == "json" - # For the JSON feed, we take a "since" parameter that allows the client - # to restrict to events more recent than a certain other event - if params[:since_event_id] - @since_event_id = params[:since_event_id].to_i - end @event_data = [] @events.each do |event| - break if event.id == @since_event_id request = event.info_request this_event = { @@ -224,7 +244,6 @@ class ApiController < ApplicationController :request_email => request.incoming_email, :title => request.title, :body => event.outgoing_message.body, - :user_name => request.user_name, } if request.user @@ -246,6 +265,21 @@ class ApiController < ApplicationController raise PermissionDenied if @public_body.nil? end + def check_external_request + @request = InfoRequest.find_by_id(params[:id]) + if @request.nil? + render :json => { "errors" => ["Could not find request #{params[:id]}"] }, :status => 404 + elsif !@request.is_external? + render :json => { "errors" => ["Request #{params[:id]} cannot be updated using the API"] }, :status => 403 + end + end + + def check_request_ownership + if @request.public_body_id != @public_body.id + render :json => { "errors" => ["You do not own request #{params[:id]}"] }, :status => 403 + end + end + private def make_url(*args) "http://" + AlaveteliConfiguration::domain + "/" + args.join("/") diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 78a82316a..0c5f5bd02 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -278,10 +278,10 @@ class ApplicationController < ActionController::Base session[:post_redirect_token] = post_redirect.token - # XXX what is the built in Ruby URI munging function that can do this + # TODO: what is the built in Ruby URI munging function that can do this # choice of & vs. ? more elegantly than this dumb if statement? if uri.include?("?") - # XXX This looks odd. What would a fragment identifier be doing server-side? + # TODO: This looks odd. What would a fragment identifier be doing server-side? # But it also looks harmless, so I’ll leave it just in case. if uri.include?("#") uri.sub!("#", "&post_redirect=1#") diff --git a/app/controllers/comment_controller.rb b/app/controllers/comment_controller.rb index 5e39c3a2c..2c0037577 100644 --- a/app/controllers/comment_controller.rb +++ b/app/controllers/comment_controller.rb @@ -21,7 +21,7 @@ class CommentController < ApplicationController end if params[:comment] - # XXX this check should theoretically be a validation rule in the model + # TODO: this check should theoretically be a validation rule in the model @existing_comment = Comment.find_existing(@info_request.id, params[:comment][:body]) else # Default to subscribing to request when first viewing form diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb index 6f0d29889..158492eb2 100644 --- a/app/controllers/general_controller.rb +++ b/app/controllers/general_controller.rb @@ -59,7 +59,7 @@ class GeneralController < ApplicationController # Actual search def search - # XXX Why is this so complicated with arrays and stuff? Look at the route + # TODO: Why is this so complicated with arrays and stuff? Look at the route # in config/routes.rb for comments. combined = params[:combined].split("/") @sortby = nil @@ -70,7 +70,7 @@ class GeneralController < ApplicationController else @advanced = false end - # XXX currently /described isn't linked to anywhere, just used in RSS and for /list/successful + # TODO: currently /described isn't linked to anywhere, just used in RSS and for /list/successful # This is because it's confusingly different from /newest - but still useful for power users. if combined.size > 0 && (['newest', 'described', 'relevant'].include?(combined[-1])) @sort_postfix = combined.pop @@ -124,7 +124,7 @@ class GeneralController < ApplicationController end end - # Query each type separately for separate display (XXX we are calling + # Query each type separately for separate display (TODO: we are calling # perform_search multiple times and it clobbers per_page for each one, # so set as separate var) requests_per_page = params[:requests_per_page] ? params[:requests_per_page].to_i : 25 @@ -159,7 +159,7 @@ class GeneralController < ApplicationController end # Spelling and highight words are same for all three queries - @highlight_words = @request_for_spelling.words_to_highlight + @highlight_words = @request_for_spelling.words_to_highlight(:regex => true, :include_original => true) if !(@request_for_spelling.spelling_correction =~ /[a-z]+:/) @spelling_correction = @request_for_spelling.spelling_correction end @@ -178,7 +178,9 @@ class GeneralController < ApplicationController format.json { render :json => { :alaveteli_git_commit => alaveteli_git_commit, :alaveteli_version => ALAVETELI_VERSION, - :ruby_version => RUBY_VERSION + :ruby_version => RUBY_VERSION, + :visible_request_count => InfoRequest.visible.count, + :confirmed_user_count => User.where(:email_confirmed => true).count }} end end diff --git a/app/controllers/public_body_change_requests_controller.rb b/app/controllers/public_body_change_requests_controller.rb index 4a6c5f5cb..773308546 100644 --- a/app/controllers/public_body_change_requests_controller.rb +++ b/app/controllers/public_body_change_requests_controller.rb @@ -1,5 +1,7 @@ class PublicBodyChangeRequestsController < ApplicationController + before_filter :catch_spam, :only => [:create] + def create @change_request = PublicBodyChangeRequest.from_params(params[:public_body_change_request], @user) if @change_request.save @@ -23,6 +25,16 @@ class PublicBodyChangeRequestsController < ApplicationController else @title = _('Ask us to add an authority') end + end + + private + def catch_spam + if params[:public_body_change_request].key?(:comment) + unless params[:public_body_change_request][:comment].empty? + redirect_to frontpage_url + end + end end + end diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb index 862f4b318..d2c84d820 100644 --- a/app/controllers/public_body_controller.rb +++ b/app/controllers/public_body_controller.rb @@ -5,12 +5,11 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: hello@mysociety.org; WWW: http://www.mysociety.org/ -require 'fastercsv' require 'confidence_intervals' require 'tempfile' class PublicBodyController < ApplicationController - # XXX tidy this up with better error messages, and a more standard infrastructure for the redirect to canonical URL + # TODO: tidy this up with better error messages, and a more standard infrastructure for the redirect to canonical URL def show long_cache if MySociety::Format.simplify_url_part(params[:url_name], 'body') != params[:url_name] @@ -43,7 +42,7 @@ class PublicBodyController < ApplicationController query = InfoRequestEvent.make_query_from_params(params.merge(:latest_status => @view)) query += " requested_from:#{@public_body.url_name}" # Use search query for this so can collapse and paginate easily - # XXX really should just use SQL query here rather than Xapian. + # TODO: really should just use SQL query here rather than Xapian. sortby = "described" begin @xapian_requests = perform_search([InfoRequestEvent], query, sortby, 'request_collapse') @@ -86,7 +85,7 @@ class PublicBodyController < ApplicationController def list long_cache - # XXX move some of these tag SQL queries into has_tag_string.rb + # TODO: move some of these tag SQL queries into has_tag_string.rb like_query = params[:public_body_query] like_query = "" if like_query.nil? @@ -109,17 +108,17 @@ class PublicBodyController < ApplicationController # Restrict the public bodies shown according to the tag # parameter supplied in the URL: - if @tag.nil? or @tag == "all" - @tag = "all" + if @tag.nil? || @tag == 'all' + @tag = 'all' elsif @tag == 'other' - category_list = PublicBodyCategories::get().tags().map{|c| "'"+c+"'"}.join(",") + category_list = PublicBodyCategories.get.tags.map{ |c| %Q('#{ c }') }.join(",") where_condition += base_tag_condition + " AND has_tag_string_tags.name in (#{category_list})) = 0" elsif @tag.scan(/./mu).size == 1 - @tag = Unicode.upcase @tag + @tag = Unicode.upcase(@tag) # The first letter queries have to be done on # translations, so just indicate to add that later: first_letter = true - elsif @tag.include?(":") + elsif @tag.include?(':') name, value = HasTagString::HasTagStringTag.split_tag_into_name_value(@tag) where_condition += base_tag_condition + " AND has_tag_string_tags.name = ? AND has_tag_string_tags.value = ?) > 0" where_parameters.concat [name, value] @@ -128,16 +127,16 @@ class PublicBodyController < ApplicationController where_parameters.concat [@tag] end - if @tag == "all" - @description = "" + if @tag == 'all' + @description = '' elsif @tag.size == 1 - @description = _("beginning with ‘{{first_letter}}’", :first_letter=>@tag) + @description = _("beginning with ‘{{first_letter}}’", :first_letter => @tag) else - category_name = PublicBodyCategories::get().by_tag()[@tag] + category_name = PublicBodyCategories.get.by_tag[@tag] if category_name.nil? - @description = _("matching the tag ‘{{tag_name}}’", :tag_name=>@tag) + @description = _("matching the tag ‘{{tag_name}}’", :tag_name => @tag) else - @description = _("in the category ‘{{category_name}}’", :category_name=>category_name) + @description = _("in the category ‘{{category_name}}’", :category_name => category_name) end end @@ -151,15 +150,15 @@ class PublicBodyController < ApplicationController FROM public_bodies LEFT OUTER JOIN public_body_translations as current_locale ON (public_bodies.id = current_locale.public_body_id - AND current_locale.locale = ? AND #{get_public_body_list_translated_condition 'current_locale', first_letter}) + AND current_locale.locale = ? AND #{ get_public_body_list_translated_condition('current_locale', first_letter) }) LEFT OUTER JOIN public_body_translations as default_locale ON (public_bodies.id = default_locale.public_body_id - AND default_locale.locale = ? AND #{get_public_body_list_translated_condition 'default_locale', first_letter}) - WHERE #{where_condition} AND COALESCE(current_locale.name, default_locale.name) IS NOT NULL + AND default_locale.locale = ? AND #{ get_public_body_list_translated_condition('default_locale', first_letter) }) + WHERE #{ where_condition } AND COALESCE(current_locale.name, default_locale.name) IS NOT NULL ORDER BY display_name} - sql = [query, underscore_locale, like_query, like_query] + sql = [query, underscore_locale, like_query, like_query, like_query] sql.push @tag if first_letter - sql += [underscore_default_locale, like_query, like_query] + sql += [underscore_default_locale, like_query, like_query, like_query] sql.push @tag if first_letter sql += where_parameters @public_bodies = PublicBody.paginate_by_sql( @@ -170,17 +169,17 @@ class PublicBodyController < ApplicationController # The simpler case where we're just searching in the current locale: where_condition = get_public_body_list_translated_condition('public_body_translations', first_letter, true) + ' AND ' + where_condition - where_sql = [where_condition, like_query, like_query] + where_sql = [where_condition, like_query, like_query, like_query] where_sql.push @tag if first_letter where_sql += [underscore_locale] + where_parameters - @public_bodies = PublicBody.where(where_sql) \ - .joins(:translations) \ - .order("public_body_translations.name") \ - .paginate(:page => params[:page], :per_page => 100) + @public_bodies = PublicBody.where(where_sql). + joins(:translations). + order("public_body_translations.name"). + paginate(:page => params[:page], :per_page => 100) end respond_to do |format| - format.html { render :template => "public_body/list" } + format.html { render :template => 'public_body/list' } end end end @@ -191,6 +190,9 @@ class PublicBodyController < ApplicationController redirect_to list_public_bodies_url(:tag => @tag) end + # GET /body/all-authorities.csv + # + # Returns all public bodies (except for the internal admin authority) as CSV def list_all_csv # FIXME: this is just using the download directory for zip # archives, since we know that is allowed for X-Sendfile and @@ -198,21 +200,29 @@ class PublicBodyController < ApplicationController # used for the zips. However, really there should be a # generically named downloads directory that contains all # kinds of downloadable assets. - download_directory = File.join(InfoRequest.download_zip_dir(), - 'download') - FileUtils.mkdir_p download_directory + download_directory = File.join(InfoRequest.download_zip_dir, 'download') + FileUtils.mkdir_p(download_directory) output_leafname = 'all-authorities.csv' - output_filename = File.join download_directory, output_leafname + output_filename = File.join(download_directory, output_leafname) # Create a temporary file in the same directory, so we can # rename it atomically to the intended filename: - tmp = Tempfile.new output_leafname, download_directory + tmp = Tempfile.new(output_leafname, download_directory) tmp.close - # Export all the public bodies to that temporary path and make - # it readable: - PublicBody.export_csv tmp.path - FileUtils.chmod 0644, tmp.path - # Rename into place and send the file: - File.rename tmp.path, output_filename + + # Create the CSV + csv = PublicBodyCSV.new + PublicBody.visible.find_each(:include => [:translations, :tags]) do |public_body| + next if public_body.site_administration? + csv << public_body + end + + # Export all the public bodies to that temporary path, make it readable, + # and rename it + File.open(tmp.path, 'w') { |file| file.write(csv.generate) } + FileUtils.chmod(0644, tmp.path) + File.rename(tmp.path, output_filename) + + # Send the file send_file(output_filename, :type => 'text/csv; charset=utf-8; header=present', :filename => 'all-authorities.csv', @@ -344,9 +354,11 @@ class PublicBodyController < ApplicationController end private + def get_public_body_list_translated_condition(table, first_letter=false, locale=nil) result = "(upper(#{table}.name) LIKE upper(?)" \ - " OR upper(#{table}.notes) LIKE upper (?))" + " OR upper(#{table}.notes) LIKE upper(?)" \ + " OR upper(#{table}.short_name) LIKE upper(?))" if first_letter result += " AND #{table}.first_letter = ?" end diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index d66c28275..3fa0ef0ce 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -181,7 +181,7 @@ class RequestController < ApplicationController end @filters = params.merge(:latest_status => @view) - @title = _("View and search requests") + @title = _('Browse and search requests') @title = @title + " (page " + @page.to_s + ")" if (@page > 1) @track_thing = TrackThing.create_track_for_search_query(InfoRequestEvent.make_query_from_params(@filters)) @@ -303,8 +303,14 @@ class RequestController < ApplicationController return render_new_compose(batch=false) end + # Check we have :public_body_id - spammers seem to be using :public_body + # erroneously instead + if params[:info_request][:public_body_id].blank? + redirect_to frontpage_path and return + end + # See if the exact same request has already been submitted - # XXX this check should theoretically be a validation rule in the + # TODO: this check should theoretically be a validation rule in the # model, except we really want to pass @existing_request to the view so # it can link to it. @existing_request = InfoRequest.find_existing(params[:info_request][:title], params[:info_request][:public_body_id], params[:outgoing_message][:body]) @@ -359,7 +365,7 @@ class RequestController < ApplicationController end # This automatically saves dependent objects, such as @outgoing_message, in the same transaction @info_request.save! - # XXX send_message needs the database id, so we send after saving, which isn't ideal if the request broke here. + # TODO: send_message needs the database id, so we send after saving, which isn't ideal if the request broke here. @outgoing_message.send_message flash[:notice] = _("<p>Your {{law_used_full}} request has been <strong>sent on its way</strong>!</p> <p><strong>We will email you</strong> when there is a response, or after {{late_number_of_days}} working days if the authority still hasn't @@ -537,7 +543,7 @@ class RequestController < ApplicationController elsif @info_request_event.is_outgoing_message? redirect_to outgoing_message_url(@info_request_event.outgoing_message), :status => :moved_permanently else - # XXX maybe there are better URLs for some events than this + # TODO: maybe there are better URLs for some events than this redirect_to request_url(@info_request_event.info_request), :status => :moved_permanently end end @@ -1006,7 +1012,7 @@ class RequestController < ApplicationController params[:info_request][:public_body] = PublicBody.find(params[:url_name]) else public_body = PublicBody.find_by_url_name_with_historic(params[:url_name]) - raise ActiveRecord::RecordNotFound.new("None found") if public_body.nil? # XXX proper 404 + raise ActiveRecord::RecordNotFound.new("None found") if public_body.nil? # TODO: proper 404 params[:info_request][:public_body] = public_body end elsif params[:public_body_id] diff --git a/app/controllers/services_controller.rb b/app/controllers/services_controller.rb index 97c47c448..dc4f783a6 100644 --- a/app/controllers/services_controller.rb +++ b/app/controllers/services_controller.rb @@ -31,7 +31,7 @@ class ServicesController < ApplicationController FastGettext.locale = old_fgt_locale end end - render :text => text, :content_type => "text/plain" # XXX workaround the HTML validation in test suite + render :text => text, :content_type => "text/plain" # TODO: workaround the HTML validation in test suite end def hidden_user_explanation diff --git a/app/controllers/track_controller.rb b/app/controllers/track_controller.rb index dccc52efc..83700a55b 100644 --- a/app/controllers/track_controller.rb +++ b/app/controllers/track_controller.rb @@ -82,7 +82,7 @@ class TrackController < ApplicationController def track_search_query @query = params[:query_array] - # XXX more hackery to make alternate formats still work with query_array + # TODO: more hackery to make alternate formats still work with query_array if /^(.*)\.json$/.match(@query) @query = $1 params[:format] = "json" @@ -154,7 +154,15 @@ class TrackController < ApplicationController request.format = 'xml' unless params[:format] respond_to do |format| format.json { render :json => @xapian_object.results.map { |r| r[:model].json_for_api(true, - lambda { |t| view_context.highlight_and_excerpt(t, @xapian_object.words_to_highlight, 150) } + lambda do |t| + view_context.highlight_and_excerpt( + t, + @xapian_object.words_to_highlight( + :regex => true, + :include_original => true), + 150 + ) + end ) } } format.any { render :template => 'track/atom_feed', :formats => ['atom'], diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 8d6522923..fcc500e06 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -46,7 +46,7 @@ class UserController < ApplicationController @is_you = !@user.nil? && @user.id == @display_user.id # Use search query for this so can collapse and paginate easily - # XXX really should just use SQL query here rather than Xapian. + # TODO: really should just use SQL query here rather than Xapian. if @show_requests begin requests_query = 'requested_by:' + @display_user.url_name @@ -102,11 +102,11 @@ class UserController < ApplicationController @is_you = !@user.nil? && @user.id == @display_user.id feed_results = Set.new # Use search query for this so can collapse and paginate easily - # XXX really should just use SQL query here rather than Xapian. + # TODO: really should just use SQL query here rather than Xapian. begin requests_query = 'requested_by:' + @display_user.url_name comments_query = 'commented_by:' + @display_user.url_name - # XXX combine these as OR query + # TODO: combine these as OR query @xapian_requests = perform_search([InfoRequestEvent], requests_query, 'newest', 'request_collapse') @xapian_comments = perform_search([InfoRequestEvent], comments_query, 'newest', nil) rescue @@ -121,7 +121,7 @@ class UserController < ApplicationController if @is_you @track_things = TrackThing.find(:all, :conditions => ["tracking_user_id = ? and track_medium = ?", @display_user.id, 'email_daily'], :order => 'created_at desc') for track_thing in @track_things - # XXX factor out of track_mailer.rb + # TODO: factor out of track_mailer.rb xapian_object = ActsAsXapian::Search.new([InfoRequestEvent], track_thing.track_query, :sort_by_prefix => 'described_at', :sort_by_ascending => true, @@ -262,7 +262,7 @@ class UserController < ApplicationController end end - # Change password (XXX and perhaps later email) - requires email authentication + # Change password (TODO: and perhaps later email) - requires email authentication def signchangepassword if @user and ((not session[:user_circumstance]) or (session[:user_circumstance] != "change_password")) # Not logged in via email, so send confirmation @@ -288,7 +288,7 @@ class UserController < ApplicationController :reason_params => { :web => "", :email => _("Then you can change your password on {{site_name}}",:site_name=>site_name), - :email_subject => _("Change your password {{site_name}}",:site_name=>site_name) + :email_subject => _("Change your password on {{site_name}}",:site_name=>site_name) }, :circumstance => "change_password" # special login that lets you change your password ) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 33525cb3d..49ce94951 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -13,12 +13,18 @@ module ApplicationHelper # all of all. include LinkToHelper + # Some extra date and time formatters + include DateTimeHelper + # Site-wide access to configuration settings include ConfigHelper # Useful for sending emails include MailerHelper + # Extra highlight helpers + include HighlightHelper + # 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 : {} @@ -51,25 +57,6 @@ module ApplicationHelper end end - # Highlight words, also escapes HTML (other than spans that we add) - def highlight_words(t, words, html = true) - if html - highlight(h(t), words, :highlighter => '<span class="highlight">\1</span>').html_safe - else - highlight(t, words, :highlighter => '*\1*') - end - end - - def highlight_and_excerpt(t, words, excount, html = true) - newt = excerpt(t, words[0], :radius => excount) - if not newt - newt = excerpt(t, '', :radius => excount) - end - t = newt - t = highlight_words(t, words, html) - return t - end - def locale_name(locale) return LanguageNames::get_language_name(locale) end diff --git a/app/helpers/date_time_helper.rb b/app/helpers/date_time_helper.rb new file mode 100644 index 000000000..5f129e590 --- /dev/null +++ b/app/helpers/date_time_helper.rb @@ -0,0 +1,69 @@ +module DateTimeHelper + # Public: Usually-correct format for a DateTime-ish object + # To define a new new format define the `simple_date_{FORMAT}` method + # + # date - a DateTime, Date or Time + # opts - a Hash of options (default: { format: :html}) + # :format - :html returns a HTML <time> tag + # :text returns a plain String + # + # Examples + # + # simple_date(Time.now) + # # => "<time>..." + # + # simple_date(Time.now, :format => :text) + # # => "March 10, 2014" + # + # Returns a String + # Raises ArgumentError if the format is unrecognized + def simple_date(date, opts = {}) + opts = { :format => :html }.merge(opts) + date_formatter = "simple_date_#{ opts[:format] }" + + if respond_to?(date_formatter) + send(date_formatter, date) + else + raise ArgumentError, "Unrecognized format :#{ opts[:format] }" + end + end + + # Usually-correct HTML formatting of a DateTime-ish object + # Use LinkToHelper#simple_date with desired formatting options + # + # date - a DateTime, Date or Time + # + # Returns a String + def simple_date_html(date) + date = date.in_time_zone unless date.is_a?(Date) + time_tag date, simple_date_text(date), :title => date.to_s + end + + # Usually-correct plain text formatting of a DateTime-ish object + # Use LinkToHelper#simple_date with desired formatting options + # + # date - a DateTime, Date or Time + # + # Returns a String + def simple_date_text(date) + date = date.in_time_zone.to_date unless date.is_a? Date + + date_format = _('simple_date_format') + date_format = :long if date_format == 'simple_date_format' + I18n.l(date, :format => date_format) + end + + # Strips the date from a DateTime + # + # date - a DateTime, Date or Time + # + # Examples + # + # simple_time(Time.now) + # # => "10:46:54" + # + # Returns a String + def simple_time(date) + date.strftime("%H:%M:%S").strip + end +end diff --git a/app/helpers/highlight_helper.rb b/app/helpers/highlight_helper.rb new file mode 100644 index 000000000..a98f6f320 --- /dev/null +++ b/app/helpers/highlight_helper.rb @@ -0,0 +1,98 @@ +module HighlightHelper + include ERB::Util + + # Implementation of rails' highlight that allows regex to be passed to + # the phrases parameter. + # https://github.com/rails/rails/pull/11793 + def highlight_matches(text, phrases, options = {}) + text = ActionController::Base.helpers.sanitize(text).try(:html_safe) if options.fetch(:sanitize, true) + + if text.blank? || phrases.blank? + text + else + match = Array(phrases).map do |p| + Regexp === p ? p.to_s : Regexp.escape(p) + end.join('|') + + if block_given? + text.gsub(/(#{match})(?![^<]*?>)/i) { |found| yield found } + else + highlighter = options.fetch(:highlighter, '<mark>\1</mark>') + text.gsub(/(#{match})(?![^<]*?>)/i, highlighter) + end + end.html_safe + end + + # Highlight words, also escapes HTML (other than spans that we add) + def highlight_words(t, words, html = true) + if html + highlight_matches(h(t), words, :highlighter => '<span class="highlight">\1</span>').html_safe + else + highlight_matches(t, words, :highlighter => '*\1*') + end + end + + def highlight_and_excerpt(t, words, excount, html = true) + newt = excerpt(t, words[0], :radius => excount) + if not newt + newt = excerpt(t, '', :radius => excount) + end + t = newt + t = highlight_words(t, words, html) + return t + end + + def excerpt(text, phrase, options = {}) + return unless text && phrase + + separator = options.fetch(:separator, nil) || "" + case phrase + when Regexp + regex = phrase + else + regex = /#{Regexp.escape(phrase)}/i + end + + return unless matches = text.match(regex) + phrase = matches[0] + + unless separator.empty? + text.split(separator).each do |value| + if value.match(regex) + regex = phrase = value + break + end + end + end + + first_part, second_part = text.split(phrase, 2) + + prefix, first_part = cut_excerpt_part(:first, first_part, separator, options) + postfix, second_part = cut_excerpt_part(:second, second_part, separator, options) + + affix = [first_part, separator, phrase, separator, second_part].join.strip + [prefix, affix, postfix].join + end + + private + + def cut_excerpt_part(part_position, part, separator, options) + return "", "" unless part + + radius = options.fetch(:radius, 100) + omission = options.fetch(:omission, "...") + + part = part.split(separator) + part.delete("") + affix = part.size > radius ? omission : "" + + part = if part_position == :first + drop_index = [part.length - radius, 0].max + part.drop(drop_index) + else + part.first(radius) + end + + return affix, part.join(separator) + end +end diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb index dd6ffa805..3709469cf 100755 --- a/app/helpers/link_to_helper.rb +++ b/app/helpers/link_to_helper.rb @@ -28,19 +28,19 @@ module LinkToHelper # Incoming / outgoing messages def incoming_message_url(incoming_message, options = {}) - return request_url(incoming_message.info_request, options.merge(:anchor => "incoming-#{incoming_message.id}")) + message_url(incoming_message, options) end def incoming_message_path(incoming_message) - incoming_message_url(incoming_message, :only_path => true) + message_path(incoming_message) end def outgoing_message_url(outgoing_message, options = {}) - request_url(outgoing_message.info_request, options.merge(:anchor => "outgoing-#{outgoing_message.id}")) + message_url(outgoing_message, options) end def outgoing_message_path(outgoing_message) - outgoing_message_url(outgoing_message, :only_path => true) + message_path(outgoing_message) end def comment_url(comment, options = {}) @@ -279,73 +279,30 @@ module LinkToHelper end end - # Public: Usually-correct format for a DateTime-ish object - # To define a new new format define the `simple_date_{FORMAT}` method - # - # date - a DateTime, Date or Time - # opts - a Hash of options (default: { format: :html}) - # :format - :html returns a HTML <time> tag - # :text returns a plain String - # - # Examples - # - # simple_date(Time.now) - # # => "<time>..." - # - # simple_date(Time.now, :format => :text) - # # => "March 10, 2014" - # - # Returns a String - # Raises ArgumentError if the format is unrecognized - def simple_date(date, opts = {}) - opts = { :format => :html }.merge(opts) - date_formatter = "simple_date_#{ opts[:format] }" - - if respond_to?(date_formatter) - send(date_formatter, date) - else - raise ArgumentError, "Unrecognised format :#{ opts[:format] }" - end - end + #I18n locale switcher - # Usually-correct HTML formatting of a DateTime-ish object - # Use LinkToHelper#simple_date with desired formatting options - # - # date - a DateTime, Date or Time - # - # Returns a String - def simple_date_html(date) - date = date.in_time_zone unless date.is_a? Date - time_tag date, simple_date_text(date), :title => date.to_s + def locale_switcher(locale, params) + params['locale'] = locale + return url_for(params) end - # Usually-correct plain text formatting of a DateTime-ish object - # Use LinkToHelper#simple_date with desired formatting options - # - # date - a DateTime, Date or Time - # - # Returns a String - def simple_date_text(date) - date = date.in_time_zone.to_date unless date.is_a? Date + private - date_format = _("simple_date_format") - date_format = :long if date_format == "simple_date_format" - I18n.l(date, :format => date_format) - end + # Private: Generate a request_url linking to the new correspondence + def message_url(message, options = {}) + message_type = message.class.to_s.gsub('Message', '').downcase - def simple_time(date) - return date.strftime("%H:%M:%S").strip - end + default_options = { :anchor => "#{ message_type }-#{ message.id }" } - def year_from_date(date) - return date.strftime("%Y").strip - end + if options.delete(:cachebust) + default_options.merge!(:nocache => "#{ message_type }-#{ message.id }") + end - #I18n locale switcher + request_url(message.info_request, options.merge(default_options)) + end - def locale_switcher(locale, params) - params['locale'] = locale - return url_for(params) + def message_path(message) + message_url(message, :only_path => true) end end diff --git a/app/mailers/outgoing_mailer.rb b/app/mailers/outgoing_mailer.rb index 083c05a7c..797bf9fdd 100644 --- a/app/mailers/outgoing_mailer.rb +++ b/app/mailers/outgoing_mailer.rb @@ -8,7 +8,7 @@ # separated) paragraphs, as is the convention for all the other mailers. This # turned out to fit better with user exepectations when formatting messages. # -# XXX The other mail templates are written to use blank line separated +# TODO: The other mail templates are written to use blank line separated # paragraphs. They could be rewritten, and the wrapping method made uniform # throughout the application. @@ -35,10 +35,10 @@ class OutgoingMailer < ApplicationMailer :subject => OutgoingMailer.subject_for_followup(info_request, outgoing_message)) end - # XXX the condition checking valid_to_reply_to? also appears in views/request/_followup.html.erb, + # TODO: the condition checking valid_to_reply_to? also appears in views/request/_followup.html.erb, # it shouldn't really, should call something here. - # XXX also OutgoingMessage.get_salutation - # XXX these look like they should be members of IncomingMessage, but logically they + # TODO: also OutgoingMessage.get_salutation + # TODO: these look like they should be members of IncomingMessage, but logically they # need to work even when IncomingMessage is nil def OutgoingMailer.name_and_email_for_followup(info_request, incoming_message_followup) if incoming_message_followup.nil? || !incoming_message_followup.valid_to_reply_to? diff --git a/app/mailers/request_mailer.rb b/app/mailers/request_mailer.rb index 1fd5b9ba7..768257ba8 100644 --- a/app/mailers/request_mailer.rb +++ b/app/mailers/request_mailer.rb @@ -71,7 +71,7 @@ class RequestMailer < ApplicationMailer def new_response(info_request, incoming_message) # Don't use login link here, just send actual URL. This is # because people tend to forward these emails amongst themselves. - @url = incoming_message_url(incoming_message) + @url = incoming_message_url(incoming_message, :cachebust => true) @incoming_message, @info_request = incoming_message, info_request headers('Return-Path' => blackhole_email, @@ -234,7 +234,7 @@ class RequestMailer < ApplicationMailer def requests_matching_email(email) # We deliberately don't use Envelope-to here, so ones that are BCC # drop into the holding pen for checking. - reply_info_requests = [] # XXX should be set? + reply_info_requests = [] # TODO: should be set? for address in (email.to || []) + (email.cc || []) reply_info_request = InfoRequest.find_by_incoming_email(address) reply_info_requests.push(reply_info_request) if reply_info_request @@ -362,7 +362,7 @@ class RequestMailer < ApplicationMailer store_sent.user = info_request.user store_sent.alert_type = type_code store_sent.info_request_event_id = alert_event_id - # XXX uses same template for reminder 1 and reminder 2 right now. + # TODO: uses same template for reminder 1 and reminder 2 right now. RequestMailer.new_response_reminder_alert(info_request, last_response_message).deliver store_sent.save! end @@ -405,7 +405,7 @@ class RequestMailer < ApplicationMailer # cron jobs broke for more than a month events would be lost, but no # matter. I suspect the performance gain will be needed (with an index on updated_at) - # XXX the :order part info_request_events.created_at is a work around + # TODO: the :order part info_request_events.created_at is a work around # for a very old Rails bug which means eager loading does not respect # association orders. # http://dev.rubyonrails.org/ticket/3438 diff --git a/app/models/comment.rb b/app/models/comment.rb index b4c099123..a62c086d5 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -63,7 +63,7 @@ class Comment < ActiveRecord::Base # When posting a new comment, use this to check user hasn't double submitted. def Comment.find_existing(info_request_id, body) - # XXX can add other databases here which have regexp_replace + # TODO: can add other databases here which have regexp_replace if ActiveRecord::Base.connection.adapter_name == "PostgreSQL" # Exclude spaces from the body comparison using regexp_replace return Comment.find(:first, :conditions => [ "info_request_id = ? and regexp_replace(body, '[[:space:]]', '', 'g') = regexp_replace(?, '[[:space:]]', '', 'g')", info_request_id, body ]) diff --git a/app/models/foi_attachment.rb b/app/models/foi_attachment.rb index 6f198249a..a8d105f52 100644 --- a/app/models/foi_attachment.rb +++ b/app/models/foi_attachment.rb @@ -178,7 +178,7 @@ class FoiAttachment < ActiveRecord::Base return filename end - # XXX changing this will break existing URLs, so have a care - maybe + # TODO: changing this will break existing URLs, so have a care - maybe # make another old_display_filename see above def display_filename filename = self.filename diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 124db8d4a..135a6bdaf 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -150,7 +150,7 @@ class IncomingMessage < ActiveRecord::Base end # The cached fields mentioned in the previous comment - # XXX there must be a nicer way to do this without all that + # TODO: there must be a nicer way to do this without all that # repetition. I tried overriding method_missing but got some # unpredictable results. def valid_to_reply_to @@ -194,7 +194,7 @@ class IncomingMessage < ActiveRecord::Base end # And look up by URL part number and display filename to get an attachment - # XXX relies on extract_attachments calling MailHandler.ensure_parts_counted + # TODO: relies on extract_attachments calling MailHandler.ensure_parts_counted # The filename here is passed from the URL parameter, so it's the # display_filename rather than the real filename. def self.get_attachment_by_url_part_number_and_filename(attachments, found_url_part_number, display_filename) @@ -220,7 +220,7 @@ class IncomingMessage < ActiveRecord::Base # Converts email addresses we know about into textual descriptions of them def mask_special_emails!(text) - # XXX can later display some of these special emails as actual emails, + # TODO: can later display some of these special emails as actual emails, # if they are public anyway. For now just be precautionary and only # put in descriptions of them in square brackets. if self.info_request.public_body.is_followupable? @@ -368,8 +368,8 @@ class IncomingMessage < ActiveRecord::Base # Remove quoted sections from emails (eventually the aim would be for this - # to do as good a job as GMail does) XXX bet it needs a proper parser - # XXX and this FOLDED_QUOTED_SECTION stuff is a mess + # to do as good a job as GMail does) TODO: bet it needs a proper parser + # TODO: and this FOLDED_QUOTED_SECTION stuff is a mess def self.remove_quoted_sections(text, replacement = "FOLDED_QUOTED_SECTION") text = text.dup replacement = "\n" + replacement + "\n" @@ -399,7 +399,7 @@ class IncomingMessage < ActiveRecord::Base ( \s*#{score}\n(?:(?!#{score}\n).)*? # top line (disclaimer:\n|confidential|received\sthis\semail\sin\serror|virus|intended\s+recipient|monitored\s+centrally|intended\s+(for\s+|only\s+for\s+use\s+by\s+)the\s+addressee|routinely\s+monitored|MessageLabs|unauthorised\s+use) - .*?(?:#{score}|\z) # bottom line OR end of whole string (for ones with no terminator XXX risky) + .*?(?:#{score}|\z) # bottom line OR end of whole string (for ones with no terminator TODO: risky) ) /imx, replacement) end @@ -480,7 +480,7 @@ class IncomingMessage < ActiveRecord::Base # Returns body text from main text part of email, converted to UTF-8, with uudecode removed, # emails and privacy sensitive things remove, censored, and folded to remove excess quoted text # (marked with FOLDED_QUOTED_SECTION) - # XXX returns a .dup of the text, so calling functions can in place modify it + # TODO: returns a .dup of the text, so calling functions can in place modify it def get_main_body_text_folded if self.cached_main_body_text_folded.nil? self._cache_main_body_text @@ -511,7 +511,7 @@ class IncomingMessage < ActiveRecord::Base source_charset = part.charset if part.content_type == 'text/html' # e.g. http://www.whatdotheyknow.com/request/35/response/177 - # XXX This is a bit of a hack as it is calling a + # TODO: This is a bit of a hack as it is calling a # convert to text routine. Could instead call a # sanitize HTML one. @@ -627,7 +627,7 @@ class IncomingMessage < ActiveRecord::Base return nil end # otherwise return it assuming it is text (sometimes you get things - # like binary/octet-stream, or the like, which are really text - XXX if + # like binary/octet-stream, or the like, which are really text - TODO: if # you find an example, put URL here - perhaps we should be always returning # nil in this case) return p @@ -722,7 +722,7 @@ class IncomingMessage < ActiveRecord::Base text = get_main_body_text_unfolded folded_quoted_text = get_main_body_text_folded - # Remove quoted sections, adding HTML. XXX The FOLDED_QUOTED_SECTION is + # Remove quoted sections, adding HTML. TODO: The FOLDED_QUOTED_SECTION is # a nasty hack so we can escape other HTML before adding the unfold # links, without escaping them. Rather than using some proper parser # making a tree structure (I don't know of one that is to hand, that diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 47ad435cb..aed651ad3 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -115,6 +115,16 @@ class InfoRequest < ActiveRecord::Base states end + # Subset of states accepted via the API + def self.allowed_incoming_states + [ + 'waiting_response', + 'rejected', + 'successful', + 'partially_successful' + ] + end + # Possible reasons that a request could be reported for administrator attention def report_reasons [_("Contains defamatory material"), @@ -387,16 +397,16 @@ public # When constructing a new request, use this to check user hasn't double submitted. - # XXX could have a date range here, so say only check last month's worth of new requests. If somebody is making + # TODO: could have a date range here, so say only check last month's worth of new requests. If somebody is making # repeated requests, say once a quarter for time information, then might need to do that. - # XXX this *should* also check outgoing message joined to is an initial + # TODO: this *should* also check outgoing message joined to is an initial # request (rather than follow up) def InfoRequest.find_existing(title, public_body_id, body) return InfoRequest.find(:first, :conditions => [ "title = ? and public_body_id = ? and outgoing_messages.body = ?", title, public_body_id, body ], :include => [ :outgoing_messages ] ) end def find_existing_outgoing_message(body) - # XXX can add other databases here which have regexp_replace + # TODO: can add other databases here which have regexp_replace if ActiveRecord::Base.connection.adapter_name == "PostgreSQL" # Exclude spaces from the body comparison using regexp_replace return self.outgoing_messages.find(:first, :conditions => [ "regexp_replace(outgoing_messages.body, '[[:space:]]', '', 'g') = regexp_replace(?, '[[:space:]]', '', 'g')", body ]) @@ -658,7 +668,7 @@ public event.last_described_at = Time.now() event.save! end - if event.last_described_at.nil? # XXX actually maybe this isn't needed + if event.last_described_at.nil? # TODO: actually maybe this isn't needed event.last_described_at = Time.now() event.save! end @@ -713,7 +723,7 @@ public elsif event.event_type == 'resent' last_sent = event elsif expecting_clarification and event.event_type == 'followup_sent' - # XXX this needs to cope with followup_resent, which it doesn't. + # TODO: this needs to cope with followup_resent, which it doesn't. # Not really easy to do, and only affects cases where followups # were resent after a clarification. last_sent = event diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb index 5eed5ba83..9dde3ba80 100644 --- a/app/models/info_request_event.rb +++ b/app/models/info_request_event.rb @@ -75,7 +75,7 @@ class InfoRequestEvent < ActiveRecord::Base :values => [ [ :created_at, 0, "range_search", :date ], # for QueryParser range searches e.g. 01/01/2008..14/01/2008 [ :created_at_numeric, 1, "created_at", :number ], # for sorting - [ :described_at_numeric, 2, "described_at", :number ], # XXX using :number for lack of :datetime support in Xapian values + [ :described_at_numeric, 2, "described_at", :number ], # TODO: using :number for lack of :datetime support in Xapian values [ :request, 3, "request_collapse", :string ], [ :request_title_collapse, 4, "request_title_collapse", :string ], ], @@ -174,7 +174,7 @@ class InfoRequestEvent < ActiveRecord::Base end def get_clipped_response_efficiently - # XXX this ugly code is an attempt to not always load all the + # TODO: this ugly code is an attempt to not always load all the # columns for an incoming message, which can be *very* large # (due to all the cached text). We care particularly in this # case because it's called for every search result on a page @@ -266,7 +266,7 @@ class InfoRequestEvent < ActiveRecord::Base # We store YAML version of parameters in the database def params=(params) - # XXX should really set these explicitly, and stop storing them in + # TODO: should really set these explicitly, and stop storing them in # here, but keep it for compatibility with old way for now if not params[:incoming_message_id].nil? self.incoming_message_id = params[:incoming_message_id] @@ -392,7 +392,7 @@ class InfoRequestEvent < ActiveRecord::Base :outgoing_message_id => self.outgoing_message_id, :comment_id => self.comment_id, - # XXX would be nice to add links here, but alas the + # TODO: would be nice to add links here, but alas the # code to make them is in views only. See views/request/details.html.erb # perhaps can call with @template somehow } diff --git a/app/models/mail_server_log.rb b/app/models/mail_server_log.rb index 0e5b60ff1..07d2fdac0 100644 --- a/app/models/mail_server_log.rb +++ b/app/models/mail_server_log.rb @@ -166,7 +166,7 @@ class MailServerLog < ActiveRecord::Base # lines. Writes any errors to STDERR. This check is really mainly to # check the envelope from is the request address, as Ruby is quite # flaky with regard to that, and it is important for anti-spam reasons. - # XXX does this really check that, as the log just wouldn't pick + # TODO: does this really check that, as the log just wouldn't pick # up at all if the requests weren't sent that way as there would be # no request- email in it? # diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb index a435511d3..160f69d0b 100644 --- a/app/models/outgoing_message.rb +++ b/app/models/outgoing_message.rb @@ -125,7 +125,7 @@ class OutgoingMessage < ActiveRecord::Base get_salutation + "\n\n" + get_default_letter + "\n\n" + get_signoff + "\n\n" end def set_signature_name(name) - # XXX We use raw_body here to get unstripped one + # TODO: We use raw_body here to get unstripped one if self.raw_body == self.get_default_message self.body = self.raw_body + name end diff --git a/app/models/post_redirect.rb b/app/models/post_redirect.rb index 5da3d2742..6f288b471 100644 --- a/app/models/post_redirect.rb +++ b/app/models/post_redirect.rb @@ -65,7 +65,7 @@ class PostRedirect < ActiveRecord::Base # Used by (rspec) test code only def self.get_last_post_redirect - # XXX yeuch - no other easy way of getting the token so we can check + # TODO: yeuch - no other easy way of getting the token so we can check # the redirect URL, as it is by definition opaque to the controller # apart from in the place that it redirects to. post_redirects = PostRedirect.find_by_sql("select * from post_redirects order by id desc limit 1") diff --git a/app/models/profile_photo.rb b/app/models/profile_photo.rb index 6c3b2cfa0..3c0be222c 100644 --- a/app/models/profile_photo.rb +++ b/app/models/profile_photo.rb @@ -115,7 +115,7 @@ class ProfilePhoto < ActiveRecord::Base return end - self.image = image_list[0] # XXX perhaps take largest image or somesuch if there were multiple in the file? + self.image = image_list[0] # TODO: perhaps take largest image or somesuch if there were multiple in the file? self.convert_image end end diff --git a/app/models/public_body.rb b/app/models/public_body.rb index 03ec270ee..b22482541 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -93,7 +93,7 @@ class PublicBody < ActiveRecord::Base self.translations.find_by_locale(locale) end - # XXX - Don't like repeating this! + # TODO: - Don't like repeating this! def calculate_cached_fields(t) PublicBody.set_first_letter(t) short_long_name = t.name @@ -329,7 +329,7 @@ class PublicBody < ActiveRecord::Base first = false end if html - # XXX this should call proper route helpers, but is in model sigh + # TODO: this should call proper route helpers, but is in model sigh desc = '<a href="/body/list/' + tag.name + '">' + desc + '</a>' end types.push(desc) @@ -399,6 +399,9 @@ class PublicBody < ActiveRecord::Base end end + def site_administration? + has_tag?('site_administration') + end class ImportCSVDryRun < StandardError end @@ -569,45 +572,6 @@ class PublicBody < ActiveRecord::Base return [errors, notes] end - # Returns all public bodies (except for the internal admin authority) as csv - def self.export_csv(output_filename) - CSV.open(output_filename, "w") do |csv| - csv << [ - 'Name', - 'Short name', - # deliberately not including 'Request email' - 'URL name', - 'Tags', - 'Home page', - 'Publication scheme', - 'Disclosure log', - 'Notes', - 'Created at', - 'Updated at', - 'Version', - ] - PublicBody.visible.find_each(:include => [:translations, :tags]) do |public_body| - # Skip bodies we use only for site admin - next if public_body.has_tag?('site_administration') - csv << [ - public_body.name, - public_body.short_name, - # DO NOT include request_email (we don't want to make it - # easy to spam all authorities with requests) - public_body.url_name, - public_body.tag_string, - public_body.calculated_home_page, - public_body.publication_scheme, - public_body.disclosure_log, - public_body.notes, - public_body.created_at, - public_body.updated_at, - public_body.version, - ] - end - end - end - # Does this user have the power of FOI officer for this body? def is_foi_officer?(user) user_domain = user.email_domain diff --git a/app/models/track_thing.rb b/app/models/track_thing.rb index 13b6f78dd..10ba28f4a 100644 --- a/app/models/track_thing.rb +++ b/app/models/track_thing.rb @@ -149,7 +149,7 @@ class TrackThing < ActiveRecord::Base end end track_thing.track_query = query - # XXX should extract requested_by:, request:, requested_from: + # TODO: should extract requested_by:, request:, requested_from: # and stick their values into the respective relations. # Should also update "params" to make the list_description # nicer and more generic. It will need to do some clever @@ -271,7 +271,7 @@ class TrackThing < ActiveRecord::Base :web => _("To follow requests and responses matching your search"), :email => _("Then you will be notified whenever a new request or response matches your search."), :email_subject => _("Confirm you want to follow new requests or responses matching your search"), - # RSS sorting - XXX hmmm, we don't really know which to use + # RSS sorting - TODO: 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 # all refused requests in which case want to sort by diff --git a/app/models/user.rb b/app/models/user.rb index d75622b37..4b83d8572 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -99,7 +99,7 @@ class User < ActiveRecord::Base end # Don't display any leading/trailing spaces - # XXX we have strip_attributes! now, so perhaps this can be removed (might + # TODO: we have strip_attributes! now, so perhaps this can be removed (might # be still needed for existing cases) def name name = read_attribute(:name) @@ -222,7 +222,7 @@ class User < ActiveRecord::Base # Can the user make new requests, without having to describe state of (most) existing ones? def can_leave_requests_undescribed? - # XXX should be flag in database really + # TODO: should be flag in database really if self.url_name == "heather_brooke" || self.url_name == "heather_brooke_2" return true end @@ -425,7 +425,7 @@ class User < ActiveRecord::Base ## Class methods def User.encrypted_password(password, salt) - string_to_hash = password + salt # XXX need to add a secret here too? + string_to_hash = password + salt # TODO: need to add a secret here too? Digest::SHA1.hexdigest(string_to_hash) end diff --git a/app/views/admin_general/index.html.erb b/app/views/admin_general/index.html.erb index 2202663be..f29258162 100644 --- a/app/views/admin_general/index.html.erb +++ b/app/views/admin_general/index.html.erb @@ -39,7 +39,7 @@ <% if message.get_body_for_quoting.strip.size == 0 %> <%= link_to "(no body)", admin_request_show_raw_email_path(message.raw_email_id) %> <% else %> - <%= link_to excerpt(message.get_body_for_quoting, "", 60), admin_request_show_raw_email_path(message.raw_email_id) %> + <%= link_to excerpt(message.get_body_for_quoting, "", :radius => 60), admin_request_show_raw_email_path(message.raw_email_id) %> <% end %> </td> <td class="span2"> diff --git a/app/views/admin_request/edit.html.erb b/app/views/admin_request/edit.html.erb index 0e9c68aea..552b31bbb 100644 --- a/app/views/admin_request/edit.html.erb +++ b/app/views/admin_request/edit.html.erb @@ -33,7 +33,7 @@ <p><label for="info_request_tag_string"><strong>Tags</strong> <small>(space separated, can use key:value)</small></label><br/> <%= text_field 'info_request', 'tag_string', :size => 60 %></p> - <p><%= submit_tag 'Save changes', :accesskey => 's' %> + <p><%= submit_tag 'Save changes', :accesskey => 's', :class => 'btn btn-primary' %> </p> <p><strong>Note:</strong> To edit the actual request body text, click edit @@ -49,13 +49,17 @@ <hr> +<div class="well"> + <%= form_tag admin_request_destroy_path(@info_request) do %> <p> - <strong>This is permanent and irreversible!</strong> <%= submit_tag 'Destroy request entirely' %> + <strong>This is permanent and irreversible!</strong> <%= submit_tag 'Destroy request entirely', :class => 'btn btn-danger' %> <br>Use it mainly if someone posts private information, e.g. made a Data Protection request. It destroys all responses and tracks as well. </p> <% end %> +</div> + <hr> diff --git a/app/views/general/_frontpage_bodies_list.html.erb b/app/views/general/_frontpage_bodies_list.html.erb index 44321f14a..1c35c55ad 100644 --- a/app/views/general/_frontpage_bodies_list.html.erb +++ b/app/views/general/_frontpage_bodies_list.html.erb @@ -3,9 +3,10 @@ <div id="examples_0"> <h3><%= _("Who can I request information from?") %></h3> <%= _("{{site_name}} covers requests to {{number_of_authorities}} authorities, including:", - :site_name => site_name, :number_of_authorities => PublicBody.visible.count) %> + :site_name => site_name, + :number_of_authorities => number_with_delimiter(PublicBody.visible.count)) %> <ul> - <% for popular_body in popular_bodies %> + <% popular_bodies.each do |popular_body| %> <li><%=public_body_link(popular_body)%> <%= n_('{{count}} request', '{{count}} requests', popular_body.info_requests_count, :count => popular_body.info_requests_count) %> </li> diff --git a/app/views/general/_frontpage_new_request.html.erb b/app/views/general/_frontpage_new_request.html.erb index 499b60eb5..5b987b320 100644 --- a/app/views/general/_frontpage_new_request.html.erb +++ b/app/views/general/_frontpage_new_request.html.erb @@ -4,4 +4,4 @@ Information<br/> request</strong>") %> </h1> -<a class="link_button_green_large" href="<%= select_authority_path %>"><%= _("Start now »") %></a> +<a class="link_button_green_large" href="<%= select_authority_path %>"><%= _("Make a request »") %></a> diff --git a/app/views/general/_frontpage_requests_list.html.erb b/app/views/general/_frontpage_requests_list.html.erb index d7d9184c4..39187f3f0 100644 --- a/app/views/general/_frontpage_requests_list.html.erb +++ b/app/views/general/_frontpage_requests_list.html.erb @@ -8,9 +8,10 @@ <% end %> </h3> <%= _("{{site_name}} users have made {{number_of_requests}} requests, including:", - :site_name => site_name, :number_of_requests => InfoRequest.visible.count) %> + :site_name => site_name, + :number_of_requests => number_with_delimiter(InfoRequest.visible.count)) %> <ul> - <% for event in @request_events %> + <% @request_events.each do |event| %> <li> <% if @request_events_all_successful %> <%= _("{{public_body_link}} answered a request about", diff --git a/app/views/general/_frontpage_search_box.html.erb b/app/views/general/_frontpage_search_box.html.erb index 890602416..f77bd97fc 100644 --- a/app/views/general/_frontpage_search_box.html.erb +++ b/app/views/general/_frontpage_search_box.html.erb @@ -2,7 +2,8 @@ <%= _("Search over<br/> <strong>{{number_of_requests}} requests</strong> <span>and</span><br/> <strong>{{number_of_authorities}} authorities</strong>", - :number_of_requests => InfoRequest.visible.count, :number_of_authorities => PublicBody.visible.count) %> + :number_of_requests => number_with_delimiter(InfoRequest.visible.count), + :number_of_authorities => number_with_delimiter(PublicBody.visible.count)) %> </h2> <form id="search_form" method="post" action="<%= search_redirect_path %>"> <div> diff --git a/app/views/general/_locale_switcher.html.erb b/app/views/general/_locale_switcher.html.erb index a318f61f3..7b6377665 100644 --- a/app/views/general/_locale_switcher.html.erb +++ b/app/views/general/_locale_switcher.html.erb @@ -1,7 +1,7 @@ <% if FastGettext.default_available_locales.length > 1 && !params.empty? %> <div id="user_locale_switcher"> <div class="btn-group"> - <% for possible_locale in FastGettext.default_available_locales %> + <% FastGettext.default_available_locales.each do |possible_locale| %> <% if possible_locale == FastGettext.locale %> <a href="#" class="btn disabled"><%= locale_name(possible_locale) %></a> <% else %> diff --git a/app/views/general/_responsive_topnav.html.erb b/app/views/general/_responsive_topnav.html.erb index e726c17f4..0ece0da9a 100644 --- a/app/views/general/_responsive_topnav.html.erb +++ b/app/views/general/_responsive_topnav.html.erb @@ -6,7 +6,7 @@ </li> <li class="<%= 'selected' if params[:controller] == 'request' and !['new', 'select_authority'].include?(params[:action]) %>"> - <%= link_to _("View requests"), request_list_successful_path %> + <%= link_to _("Browse requests"), request_list_successful_path %> </li> <li class="<%= 'selected' if params[:controller] == 'public_body' %>"> diff --git a/app/views/general/_topnav.html.erb b/app/views/general/_topnav.html.erb index d37bd97d1..04ca07fa9 100644 --- a/app/views/general/_topnav.html.erb +++ b/app/views/general/_topnav.html.erb @@ -2,7 +2,9 @@ <ul id="navigation"> <li class="<%= 'selected' if params[:controller] == 'general' and params[:action] != 'blog' and params[:action] != 'search' %>"><%= link_to _("Home"), frontpage_path %></li> <li class="<%= 'selected' if params[:controller] == 'request' and ['new', 'select_authority'].include?(params[:action]) %>"><%= link_to _("Make a request"), select_authority_path, :id => 'make-request-link' %></li> - <li class="<%= 'selected' if params[:controller] == 'request' and !['new', 'select_authority'].include?(params[:action]) %>"><%= link_to _("View requests"), request_list_successful_path %></li> + <li class="<%= 'selected' if params[:controller] == 'request' and !['new', 'select_authority'].include?(params[:action]) %>"> + <%= link_to _("Browse requests"), request_list_successful_path %> + </li> <li class="<%= 'selected' if params[:controller] == 'public_body' %>"><%= link_to _("View authorities"), list_public_bodies_default_path %></li> <% unless AlaveteliConfiguration::blog_feed.empty? %> <li class="<%= 'selected' if params[:controller] == 'general' and params[:action] == 'blog' %>"><%= link_to _("Read blog"), blog_path %></li> diff --git a/app/views/public_body/_list_sidebar_extra.html.erb b/app/views/public_body/_list_sidebar_extra.html.erb index 290593d6a..6e683d7a1 100644 --- a/app/views/public_body/_list_sidebar_extra.html.erb +++ b/app/views/public_body/_list_sidebar_extra.html.erb @@ -1,3 +1,8 @@ +<% if AlaveteliConfiguration::public_body_statistics_page %> + <p> + <%= link_to _('Public authority statistics'), public_bodies_statistics_path %> + </p> +<% end %> <p> <%= link_to _('Are we missing a public authority?'), help_requesting_path + '#missing_body' %> </p> diff --git a/app/views/public_body/show.html.erb b/app/views/public_body/show.html.erb index a9c50e657..9352747ea 100644 --- a/app/views/public_body/show.html.erb +++ b/app/views/public_body/show.html.erb @@ -127,7 +127,10 @@ <% if @xapian_requests.results.empty? %> <p><% _('There were no requests matching your query.') %></p> <% else %> - <p> <%= _('Only requests made using {{site_name}} are shown.', :site_name => site_name) %></p> + <p> + <%= _('Only requests made using {{site_name}} are shown.', :site_name => site_name) %> + <%= link_to _('?'), help_about_path %> + </p> <% end %> <% else %> diff --git a/app/views/public_body/statistics.html.erb b/app/views/public_body/statistics.html.erb index d935a9e47..0e7e7424e 100644 --- a/app/views/public_body/statistics.html.erb +++ b/app/views/public_body/statistics.html.erb @@ -1,6 +1,6 @@ <% @title = _("Public Body Statistics") %> <div id="main_content"> - <h1>Public Body Statistics</h1> + <h1><%= @title %></h1> <p><%= _("This page of public body statistics is currently \ experimental, so there are some caveats that should be borne \ @@ -33,6 +33,8 @@ requests to the authority through this site, rather than, \ say, all requests that have been made to the public body by \ any means.") %></li> + <li><%= _("Unclassified or hidden requests are not counted.") %></li> + </ul> <p><%= _("These graphs were partly inspired by \ @@ -47,7 +49,7 @@ are due to him.") %></p> <table border=0> <thead> <tr> - <th>Public Body</th> + <th><%= _('Public Body') %></th> <th><%= graph_data['y_axis'] %></th> </tr> </thead> diff --git a/app/views/public_body_change_requests/new.html.erb b/app/views/public_body_change_requests/new.html.erb index 7079cd868..b52d583be 100644 --- a/app/views/public_body_change_requests/new.html.erb +++ b/app/views/public_body_change_requests/new.html.erb @@ -54,6 +54,11 @@ <%= f.text_area :notes, :rows => 10, :cols => 60 %> </p> + <p style="display:none;"> + <%= label_tag 'public_body_change_request[comment]', _('Do not fill in this field') %> + <%= text_field_tag 'public_body_change_request[comment]' %> + </p> + <div class="form_button"> <%= submit_tag _("Submit request") %> </div> diff --git a/app/views/request/_sidebar_request_listing.html.erb b/app/views/request/_sidebar_request_listing.html.erb index ec5a5813d..64fe39341 100644 --- a/app/views/request/_sidebar_request_listing.html.erb +++ b/app/views/request/_sidebar_request_listing.html.erb @@ -4,7 +4,7 @@ <%= request_link(info_request) %> </span> <span class="desc"> - <%=h excerpt(info_request.initial_request_text, "", 100) %> + <%=h excerpt(info_request.initial_request_text, "", :radius => 100) %> </span> <span class="bottomline"> <strong> diff --git a/app/views/request/_view_html_stylesheet.html.erb b/app/views/request/_view_html_stylesheet.html.erb index f3d8799da..09f295346 100644 --- a/app/views/request/_view_html_stylesheet.html.erb +++ b/app/views/request/_view_html_stylesheet.html.erb @@ -1,17 +1,16 @@ <% if AlaveteliConfiguration::responsive_styling || params[:responsive] %> <!--[if LTE IE 7]> - <link href="/assets/responsive/application-lte-ie7.css" media="all" rel="stylesheet" title="Main" type="text/css" /> + <link href="/assets/responsive/application-lte-ie7.css" media="all" rel="stylesheet" title="Main" type="text/css" charset="UTF-8" /> <![endif]--> <!--[if IE 8]> - <link href="/assets/responsive/application-ie8.css" media="all" rel="stylesheet" title="Main" type="text/css" /> + <link href="/assets/responsive/application-ie8.css" media="all" rel="stylesheet" title="Main" type="text/css" charset="UTF-8" /> <![endif]--> <!--[if GT IE 8]><!--> - <link href="/assets/responsive/application.css" media="all" rel="stylesheet" title="Main" type="text/css" /> + <link href="/assets/responsive/application.css" media="all" rel="stylesheet" title="Main" type="text/css" charset="UTF-8" /> <!--<![endif]--> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <% else %> - <link type="text/css" title="Main" rel="stylesheet" media="screen" href="/assets/application.css"> - + <link type="text/css" title="Main" rel="stylesheet" media="screen" href="/assets/application.css" charset="UTF-8" /> <% end %> diff --git a/app/views/request/upload_response.html.erb b/app/views/request/upload_response.html.erb index f5fd6f000..f07af34d5 100644 --- a/app/views/request/upload_response.html.erb +++ b/app/views/request/upload_response.html.erb @@ -9,7 +9,9 @@ <%= foi_error_messages_for :comment %> - <h1><%= _('Respond to the FOI request')%> '<%=request_link(@info_request)%>'<% _(' made by ')%><%=user_link(@info_request.user) %></h1> + <h1><%= _("Respond to the FOI request '{{request}}' made by {{user}}", + :request => request_link(@info_request), + :user => user_link(@info_request.user)) %></h1> <p> <%= raw(_('Your response will <strong>appear on the Internet</strong>, <a href="{{url}}">read why</a> and answers to other questions.', :url => help_officers_path.html_safe)) %> @@ -48,5 +50,3 @@ </p> <% end %> <% end %> - - diff --git a/app/views/track_mailer/event_digest.text.erb b/app/views/track_mailer/event_digest.text.erb index b83c184f0..f6e699e41 100644 --- a/app/views/track_mailer/event_digest.text.erb +++ b/app/views/track_mailer/event_digest.text.erb @@ -4,7 +4,7 @@ for track_thing, alert_results, xapian_object in @email_about_things main_text += track_thing.params[:title_in_email] + "\n" main_text += ("=" * track_thing.params[:title_in_email].size) + "\n\n" - @highlight_words = xapian_object.words_to_highlight + @highlight_words = xapian_object.words_to_highlight(:regex => true) for result in alert_results.reverse if result[:model].class.to_s == "InfoRequestEvent" event = result[:model] @@ -17,14 +17,14 @@ # e.g. Julian Burgess sent a request to Royal Mail Group (15 May 2008) if event.event_type == 'response' - url = incoming_message_url(event.incoming_message) + url = incoming_message_url(event.incoming_message, :cachebust => true) main_text += _("{{public_body}} sent a response to {{user_name}}", :public_body => event.info_request.public_body.name, :user_name => event.info_request.user_name) elsif event.event_type == 'followup_sent' - url = outgoing_message_url(event.outgoing_message) + url = outgoing_message_url(event.outgoing_message, :cachebust => true) main_text += _("{{user_name}} sent a follow up message to {{public_body}}", :user_name => event.info_request.user_name, :public_body => event.info_request.public_body.name) elsif event.event_type == 'sent' # this is unlikely to happen in real life, but happens in the test code - url = outgoing_message_url(event.outgoing_message) + url = outgoing_message_url(event.outgoing_message, :cachebust => true) main_text += _("{{user_name}} sent a request to {{public_body}}", :user_name => event.info_request.user_name, :public_body => event.info_request.public_body.name) elsif event.event_type == 'comment' url = comment_url(event.comment) diff --git a/app/views/user/_user_listing_single.html.erb b/app/views/user/_user_listing_single.html.erb index ed1b95718..3cb0d283f 100644 --- a/app/views/user/_user_listing_single.html.erb +++ b/app/views/user/_user_listing_single.html.erb @@ -18,7 +18,7 @@ end %> <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) %>. + <%= _('Joined in')%> <%= display_user.created_at.year %>. </span> </div> diff --git a/app/views/user/show.html.erb b/app/views/user/show.html.erb index ce328b46f..7ae577565 100644 --- a/app/views/user/show.html.erb +++ b/app/views/user/show.html.erb @@ -64,7 +64,7 @@ <h1> <%= h(@display_user.name) + (@is_you ? _(" (you)") : "") %></h1> <p class="subtitle"> - <%= _('Joined {{site_name}} in', :site_name=>site_name) %> <%= year_from_date(@display_user.created_at) %> + <%= _('Joined {{site_name}} in', :site_name=>site_name) %> <%= @display_user.created_at.year %> <% if !@user.nil? && @user.admin_page_links? %> (<%= link_to "admin", admin_user_show_path(@display_user) %>) <% end %> diff --git a/commonlib b/commonlib -Subproject 25fbbc5d4c486297e5fbdb85989bdacb1e86756 +Subproject 4d0fd6d01bb34d3d592a2bb4adaa5927a50d892 diff --git a/config/alert-tracks-debian.ugly b/config/alert-tracks-debian.ugly index 29a350a0e..f1ca68b03 100644..100755 --- a/config/alert-tracks-debian.ugly +++ b/config/alert-tracks-debian.ugly @@ -13,10 +13,12 @@ # !!(*= $daemon_name *)!! Start the Alaveteli email alert daemon NAME=!!(*= $daemon_name *)!! -DAEMON=!!(*= $vhost_dir *)!!/alaveteli/script/runner +DAEMON=!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/runner DAEMON_ARGS="--daemon TrackMailer.alert_tracks_loop" -PIDFILE=!!(*= $vhost_dir *)!!/alert-tracks.pid -LOGFILE=!!(*= $vhost_dir *)!!/logs/alert-tracks.log +PIDDIR=!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/tmp/pids +PIDFILE=$PIDDIR/!!(*= $daemon_name *)!!.pid +LOGDIR=!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/log +LOGFILE=$LOGDIR/!!(*= $daemon_name *)!!.log DUSER=!!(*= $user *)!! # Set RAILS_ENV - not needed if using config/rails_env.rb # RAILS_ENV=your_rails_env @@ -27,10 +29,14 @@ trap "" 1 export PIDFILE LOGFILE quietly_start_daemon() { + mkdir -p {$LOGDIR,$PIDDIR} + chown $DUSER:$DUSER {$LOGDIR,$PIDDIR} /sbin/start-stop-daemon --quiet --start --pidfile "$PIDFILE" --chuid "$DUSER" --startas "$DAEMON" -- $DAEMON_ARGS } start_daemon() { + mkdir -p {$LOGDIR,$PIDDIR} + chown $DUSER:$DUSER {$LOGDIR,$PIDDIR} /sbin/start-stop-daemon --start --pidfile "$PIDFILE" --chuid "$DUSER" --startas "$DAEMON" -- $DAEMON_ARGS } @@ -81,4 +87,3 @@ else echo " failed" exit 1 fi - diff --git a/config/crontab-example b/config/crontab-example index 8fe13151b..44e328e4e 100644 --- a/config/crontab-example +++ b/config/crontab-example @@ -5,32 +5,32 @@ # Email: hello@mysociety.org. WWW: http://www.mysociety.org/ PATH=/usr/local/bin:/usr/bin:/bin -MAILTO=cron-!!(*= $site *)!!@mysociety.org +MAILTO=!!(*= $mailto *)!! # Every 5 minutes -*/5 * * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/change-xapian-database.lock "!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/update-xapian-index verbose=true" >> !!(*= $vhost_dir *)!!/logs/update-xapian-index.log || echo "stalled?" +*/5 * * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/change-xapian-database.lock "!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/update-xapian-index verbose=true" >> !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/log/update-xapian-index.log || echo "stalled?" # Every 10 minutes -5,15,25,35,45,55 * * * * !!(*= $user *)!! /etc/init.d/foi-alert-tracks check -5,15,25,35,45,55 * * * * !!(*= $user *)!! /etc/init.d/foi-purge-varnish check -0,10,20,30,40,50 * * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/send-batch-requests.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/send-batch-requests || echo "stalled?" +5,15,25,35,45,55 * * * * !!(*= $user *)!! /etc/init.d/!!(*= $site *)!!-alert-tracks check +5,15,25,35,45,55 * * * * !!(*= $user *)!! /etc/init.d/!!(*= $site *)!!-purge-varnish check +0,10,20,30,40,50 * * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/send-batch-requests.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/send-batch-requests || echo "stalled?" # Once an hour -09 * * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/alert-comment-on-request.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-comment-on-request || echo "stalled?" +09 * * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/alert-comment-on-request.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-comment-on-request || echo "stalled?" # Only root can read the log files -31 * * * * root run-with-lockfile -n !!(*= $vhost_dir *)!!/load-mail-server-logs.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/load-mail-server-logs || echo "stalled?" +31 * * * * root !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/load-mail-server-logs.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/load-mail-server-logs || echo "stalled?" # Once a day, early morning -23 4 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/delete-old-things.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/delete-old-things || echo "stalled?" -0 6 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/alert-overdue-requests.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-overdue-requests || echo "stalled?" -0 7 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/alert-new-response-reminders.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-new-response-reminders || echo "stalled?" -0 8 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/alert-not-clarified-request.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-not-clarified-request || echo "stalled?" -2 4 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/check-recent-requests-sent.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/check-recent-requests-sent || echo "stalled?" -45 3 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/stop-new-responses-on-old-requests.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/stop-new-responses-on-old-requests || echo "stalled?" -55 4 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/update-public-body-stats.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/update-public-body-stats || echo "stalled?" +23 4 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/delete-old-things.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/delete-old-things || echo "stalled?" +0 6 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/alert-overdue-requests.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-overdue-requests || echo "stalled?" +0 7 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/alert-new-response-reminders.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-new-response-reminders || echo "stalled?" +0 8 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/alert-not-clarified-request.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-not-clarified-request || echo "stalled?" +2 4 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/check-recent-requests-sent.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/check-recent-requests-sent || echo "stalled?" +45 3 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/stop-new-responses-on-old-requests.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/stop-new-responses-on-old-requests || echo "stalled?" +55 4 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/update-public-body-stats.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/update-public-body-stats || echo "stalled?" # Only root can restart apache -31 1 * * * root run-with-lockfile -n !!(*= $vhost_dir *)!!/change-xapian-database.lock "!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/compact-xapian-database production" || echo "stalled?" +31 1 * * * root !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/change-xapian-database.lock "!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/compact-xapian-database production" || echo "stalled?" # Once a day on all servers @@ -38,7 +38,7 @@ MAILTO=cron-!!(*= $site *)!!@mysociety.org 48 2 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/user-use-graph # Once a year :) -0 0 1 11 * !!(*= $user *)!! /bin/echo "A year has passed, please update the bank holidays for the Freedom of Information site, thank you." +0 0 1 11 * !!(*= $user *)!! /bin/echo "A year has passed, please update the public holidays for the Freedom of Information site, thank you." diff --git a/config/database.yml-example b/config/database.yml-example index e48577f23..126e5a264 100644 --- a/config/database.yml-example +++ b/config/database.yml-example @@ -3,7 +3,8 @@ development: adapter: postgresql - database: foi_development + template: template_utf8 + database: alaveteli_development username: <username> password: <password> host: localhost @@ -14,7 +15,8 @@ development: # Do not set this db to the same as development or production. test: adapter: postgresql - database: foi_test + template: template_utf8 + database: alaveteli_test username: <username> password: <password> host: localhost @@ -24,9 +26,9 @@ test: production: adapter: postgresql - database: foi_production + template: template_utf8 + database: alaveteli_production username: <username> password: <password> host: localhost port: 5432 - diff --git a/config/database.yml-test b/config/database.yml-test index ff6e2013a..64eafd82d 100644 --- a/config/database.yml-test +++ b/config/database.yml-test @@ -1,4 +1,5 @@ test: adapter: postgresql + template: template_utf8 database: foi_test username: postgres diff --git a/config/deploy.rb b/config/deploy.rb index c73d16f53..c1954d058 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -33,14 +33,12 @@ namespace :xapian do end namespace :deploy do - desc "Restarting mod_rails with restart.txt" - task :restart, :roles => :app, :except => { :no_release => true } do - run "touch #{current_path}/tmp/restart.txt" - end - [:start, :stop].each do |t| - desc "#{t} task is a no-op with mod_rails" - task t, :roles => :app do ; end + [:start, :stop, :restart].each do |t| + desc "#{t.to_s.capitalize} Alaveteli service defined in /etc/init.d/alaveteli" + task t, :roles => :app, :except => { :no_release => true } do + run "/etc/init.d/alaveteli #{t}" + end end desc 'Link configuration after a code update' @@ -56,6 +54,8 @@ namespace :deploy do "#{release_path}/public/foi-user-use.png" => "#{shared_path}/foi-user-use.png", "#{release_path}/files" => "#{shared_path}/files", "#{release_path}/cache" => "#{shared_path}/cache", + "#{release_path}/log" => "#{shared_path}/log", + "#{release_path}/tmp/pids" => "#{shared_path}/tmp/pids", "#{release_path}/lib/acts_as_xapian/xapiandbs" => "#{shared_path}/xapiandbs", } @@ -66,6 +66,8 @@ namespace :deploy do after 'deploy:setup' do run "mkdir -p #{shared_path}/files" run "mkdir -p #{shared_path}/cache" + run "mkdir -p #{shared_path}/log" + run "mkdir -p #{shared_path}/tmp/pids" run "mkdir -p #{shared_path}/xapiandbs" end end diff --git a/config/general.yml-example b/config/general.yml-example index 6e223406e..0f32f6192 100644 --- a/config/general.yml-example +++ b/config/general.yml-example @@ -26,7 +26,7 @@ ISO_COUNTRY_CODE: GB TIME_ZONE: Australia/Sydney # These feeds are displayed accordingly on the Alaveteli "blog" page: -BLOG_FEED: 'http://www.mysociety.org/category/projects/whatdotheyknow/feed/' +BLOG_FEED: 'https://www.mysociety.org/category/projects/whatdotheyknow/feed/' TWITTER_USERNAME: 'whatdotheyknow' # Set the widget_id to get the Twitter sidebar on the blog page. # To get one https://twitter.com/settings/widgets @@ -245,6 +245,8 @@ SHARED_DIRECTORIES: - files/ - cache/ - lib/acts_as_xapian/xapiandbs/ + - log/ + - tmp/pids - vendor/bundle - public/assets @@ -255,4 +257,4 @@ SHARED_DIRECTORIES: ALLOW_BATCH_REQUESTS: false # Should we use the responsive stylesheets? -RESPONSIVE_STYLING: false +RESPONSIVE_STYLING: true diff --git a/config/httpd-force-ssl.conf.example b/config/httpd-force-ssl.conf.example new file mode 100644 index 000000000..0e89afe62 --- /dev/null +++ b/config/httpd-force-ssl.conf.example @@ -0,0 +1,5 @@ +# Rewrite all proxied HTTP requests to HTTPS. +# Only include if FORCE_SSL: true is set in general.yml +# Expected to be found at /etc/apache2/vhost.d/alaveteli +RewriteCond %{HTTP:X-Forwarded-Proto} !https +RewriteRule /(.*) https://www.example.com/$1 [L,R=permanent] diff --git a/config/httpd-ssl.conf.example b/config/httpd-ssl.conf.example new file mode 100644 index 000000000..8f099b8a6 --- /dev/null +++ b/config/httpd-ssl.conf.example @@ -0,0 +1,24 @@ +# VirtualHost for HTTPS requests +<VirtualHost *:443> + ServerName www.example.com + + ErrorLog /var/log/apache2/alaveteli_error.log + CustomLog /var/log/apache2/alaveteli_access.log combined + + ProxyRequests Off + ProxyPreserveHost On + ProxyPass / http://localhost:80/ + ProxyPassReverse / http://localhost:80/ + RequestHeader set X-Forwarded-Proto 'https' + + SSLEngine on + SSLProtocol all -SSLv2 + SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM + + SSLCertificateFile /etc/ssl/certs/www.example.com.cert + SSLCertificateKeyFile /etc/ssl/private/www.example.com.key + # SSLCertificateChainFile /etc/ssl/sub.class2.server.ca.pem + # SSLCACertificateFile /etc/ssl/ca.pem + + SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown +</VirtualHost> diff --git a/config/httpd.conf-example b/config/httpd.conf-example index dc2e4966e..2f6ca9c75 100644 --- a/config/httpd.conf-example +++ b/config/httpd.conf-example @@ -1,81 +1,145 @@ -# Apache configuration for FOI site. -# -# For development ignore this, you can just run ./scripts/server as for any -# Ruby on Rails application. -# -# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. -# Email: hello@mysociety.org; WWW: http://www.mysociety.org - -# This is needed for the PHP spell checker -<Location /fcgi> - Options +ExecCGI - SetHandler fastcgi-script -</Location> - -RewriteEngine On -#RewriteLog /var/log/apache2/rewrite.log -#RewriteLogLevel 9 - -# XXX do we need this now we use Passenger? -# Pass through the HTTP basic authentication to mongrel. See also -# admin_http_auth_user in app/controllers/application.rb -# Note: Apache 2 only. Doesn't work in Apache 1.3, you'll need to live without -# it. -RewriteCond %{LA-U:REMOTE_USER} (.+) -RewriteRule . - [E=RU:%1] -RequestHeader add X-Forwarded-User %{RU}e - -# Old /files URL to new subdomain (as can't use Alias with passenger, -# so we do it on its own domain). This is for custom admin upload -# files for archiving. -RewriteRule /files/(.+) http://files.whatdotheyknow.com/$1 - -# Serve attachments directly from the cache, if possible. -# -# The file names are URL-encoded on disk, and sharded by the first -# three digits of the request id, which is why this is as complicated -# as it is. The RewriteMap directive makes the URL-escaping function -# available to use in the other directives. -# -# The condition means that the rule will fire only if the cached -# file exists. -RewriteMap escape int:escape -RewriteCond %{DOCUMENT_ROOT}/views_cache/request/$2/$1/${escape:$3} -f -RewriteRule ^/request/((\d{1,3})\d*)/(response/\d+/attach/(html/)?\d+/.+) /views_cache/request/$2/$1/${escape:$3} [L] - - -<IfModule mod_passenger.c> - # Set this to something like 100 if you have memory leak issues - PassengerMaxRequests 500 - PassengerResolveSymlinksInDocumentRoot on - # Recommend setting this to 3 or less on servers with 512MB RAM - PassengerMaxPoolSize 6 - # The RackEnv variable applies to Rails 3 applications, while - # the RailsEnv variable applies to applications for earlier - # versions of Rails. There doesn't seem to be any harm in - # setting both, however. - RailsEnv production - RackEnv production -</IfModule> - -# Gzip font resources -<IfModule mod_deflate.c> - <IfModule mod_mime.c> - Addtype font/opentype .otf - Addtype font/opentype .woff - Addtype font/eot .eot - Addtype font/truetype .ttf +# Redirect other domains to canonical domain +<VirtualHost *:80> + ServerName example.com + ServerAlias example.org + ServerAlias www.example.org + RedirectPermanent / http://www.example.com/ +</VirtualHost> + +# Canonical domain vHost +<VirtualHost *:80> + ServerName www.example.com + ServerAdmin webmaster@example.com + DocumentRoot /var/www/alaveteli/public + + # TODO: Remove this and use PassengerUser when supported + # This is the user that runs the rails application processes + SuExecUserGroup alaveteli alaveteli + RewriteEngine On + + ErrorLog /var/log/apache2/alaveteli_error.log + CustomLog /var/log/apache2/alaveteli_access.log combined + + # App server configuration + <IfModule mod_passenger.c> + PassengerAppRoot /var/www/alaveteli + PassengerResolveSymlinksInDocumentRoot on + + # See http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/ + # and http://blog.scoutapp.com/articles/2009/12/08/production-rails-tuning-with-passenger-passengermaxprocesses + # for more information on tuning Passenger + + # Set this to something like 100 if you have memory leak issues + PassengerMaxRequests 2000 + # Passenger's default MaxPoolSize is 6. At the time of writing + # normal instances of Alaveteli seem to take 150-200MB per + # process, so we've set this conservatively at 3. Read the guides + # above to tune this for your system + PassengerMaxPoolSize 3 + + # The RAILS_ENV that the app is running in. This can be any of + # the environments listed in APP_ROOT/config/environments. + RailsEnv production + RackEnv production </IfModule> - AddOutputFilterByType DEFLATE font/opentype font/truetype font/eot - AddOutputFilterByType DEFLATE image/svg+xml -</IFModule> - -# Set the Sendfile header and switch sendfile on - Apache will -# now handle send_file calls from Alaveteli -<Location /> - <IfModule mod_xsendfile.c> - RequestHeader Set X-Sendfile-Type X-Sendfile - XSendFile On - XSendFileAllowAbove On + + # This is your Rails app's public directory + <Directory "/var/www/alaveteli/public"> + Options +ExecCGI -MultiViews + AllowOverride All + </Directory> + + # Maintenance Page + # Make a file down.html in the DocumentRoot to bring down the whole + # site and display itself. + RewriteEngine on + ErrorDocument 503 /down.html + Redirect 503 /down + + # If down.html exists, and that's what's been asked for, + # just hand it over + RewriteCond %{DOCUMENT_ROOT}/down.html -s + RewriteRule /down.html /down.html [L] + + RewriteCond %{DOCUMENT_ROOT}/down.html -s + RewriteRule /(.+).cgi /down [PT] + RewriteCond %{DOCUMENT_ROOT}/down.html -s + RewriteRule /(.+).php /down [PT] + # Mainly for Rails/Django type sites - anything without a . can go down + # TODO: could we just check that it is an HTML content-type? + RewriteCond %{DOCUMENT_ROOT}/down.html -s + RewriteRule /([^.]*)$ /down [PT] + # END Maintenance Page + + # Set the Sendfile header and switch sendfile on - Apache will + # now handle send_file calls from Alaveteli + <Location /> + <IfModule mod_xsendfile.c> + RequestHeader Set X-Sendfile-Type X-Sendfile + XSendFile On + XSendFilePath /var/www/alaveteli/public + </IfModule> + </Location> + + # Commonlib is typically found in alaveteli/commonlib + Alias /jslib/ "/var/www/alaveteli/commonlib/jslib" + <Directory "/var/www/alaveteli/commonlib/jslib"> + Options +ExecCGI + AddHandler fastcgi-script .cgi + </Directory> + + # Serve attachments directly from the cache, if possible. + # + # The file names are URL-encoded on disk, and sharded by the first + # three digits of the request id, which is why this is as complicated + # as it is. The RewriteMap directive makes the URL-escaping function + # available to use in the other directives. + # + # The condition means that the rule will fire only if the cached + # file exists. + RewriteMap escape int:escape + RewriteCond %{DOCUMENT_ROOT}/views_cache/request/$2/$1/${escape:$3} -f + RewriteRule ^/request/((\d{1,3})\d*)/(response/\d+/attach/(html/)?\d+/.+) /views_cache/request/$2/$1/${escape:$3} [L] + RewriteCond %{DOCUMENT_ROOT}/views_cache/cy/request/$2/$1/${escape:$3} -f + RewriteRule ^/cy/request/((\d{1,3})\d*)/(response/\d+/attach/(html/)?\d+/.+) /views_cache/cy/request/$2/$1/${escape:$3} [L] + + # Compress assets + <Location /> + <IfModule mod_deflate.c> + AddOutputFilterByType DEFLATE text/css application/javascript text/plain + </IfModule> + </Location> + + # Cache assets + ExpiresActive On + <LocationMatch "^/(assets).*\.(ico|gif|jpe?g|png|js|css|svg|ttf|otf|eot|woff)$"> + ExpiresDefault "access plus 1 day" + </LocationMatch> + + # Compress font resources + <IfModule mod_deflate.c> + <IfModule mod_mime.c> + Addtype font/opentype .otf + Addtype font/opentype .woff + Addtype font/eot .eot + Addtype font/truetype .ttf + </IfModule> + AddOutputFilterByType DEFLATE font/opentype font/truetype font/eot + AddOutputFilterByType DEFLATE image/svg+xml </IfModule> -</Location> + + # Include optional configuration + Include vhost.d/alaveteli/*.conf + +</VirtualHost> + +# Large / static files for WhatDoTheyKnow. Used for manual sysadmin uploads. +# Is on its own files.example.com subdomain (instead of old /files URL) +# as mod_alias doesn't work with Passenger. +# <VirtualHost *:80> +# ServerName files.example.com +# DocumentRoot /var/www/alaveteli/files +# <Directory "/var/www/alaveteli/files"> +# Options +Indexes +# </Directory> +# </VirtualHost> diff --git a/config/initializers/alaveteli.rb b/config/initializers/alaveteli.rb index 6fb6b1420..9ea6428ba 100644 --- a/config/initializers/alaveteli.rb +++ b/config/initializers/alaveteli.rb @@ -10,7 +10,7 @@ load "debug_helpers.rb" load "util.rb" # Application version -ALAVETELI_VERSION = '0.18' +ALAVETELI_VERSION = '0.19' # Add new inflection rules using the following format # (all these examples are active by default): @@ -53,6 +53,7 @@ require 'message_prominence' require 'theme' require 'xapian_queries' require 'date_quarter' +require 'public_body_csv' AlaveteliLocalization.set_locales(AlaveteliConfiguration::available_locales, AlaveteliConfiguration::default_locale) diff --git a/config/nginx-ssl.conf.example b/config/nginx-ssl.conf.example new file mode 100644 index 000000000..af2e9e4ab --- /dev/null +++ b/config/nginx-ssl.conf.example @@ -0,0 +1,44 @@ +upstream alaveteli { + server 127.0.0.1:3000; +} + +# Redirect any http:// request to https://www.example.com +server { + listen 80; + server_name www.example.com; + rewrite ^(.*) https://www.example.com$request_uri permanent; +} + +server { + listen 443; + server_name www.example.com; + root /var/www/alaveteli/alaveteli/public; + + server_tokens off; + + try_files $uri/index.html $uri @alaveteli; + + access_log /var/log/nginx/alaveteli_ssl_access.log; + error_log /var/log/nginx/alaveteli_ssl_error.log error; + + location /download { + internal; + alias /var/www/alaveteli/alaveteli/cache/zips/production/download; + } + + ssl on; + ssl_certificate /etc/ssl/certs/www.example.com.cert; + ssl_certificate_key /etc/ssl/private/www.example.com.key; + ssl_ciphers ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM; + + location @alaveteli { + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Sendfile-Type X-Accel-Redirect; + proxy_set_header X-Accel-Mapping /var/www/alaveteli/alaveteli/cache/zips/production/download=/download; + proxy_redirect off; + proxy_pass http://alaveteli; + } +} diff --git a/config/nginx.conf.example b/config/nginx.conf.example index 56e720abb..7b8af2bd9 100644 --- a/config/nginx.conf.example +++ b/config/nginx.conf.example @@ -1,29 +1,43 @@ upstream alaveteli { - server 127.0.0.1:3300; + server 127.0.0.1:3000; } +# Example to redirect other domains to the canonical URL. Also redirects the +# unqualified domain to the FQDN www.example.com, which is recommended. +# +# server { +# server_name example.com example.org www.example.org; +# rewrite ^(.*) http://www.example.com$1 permanent; +# } + server { listen 80; + # Set the server name to your domain name if you have multiple nginx servers + # running on your machine + # server_name www.example.com; root /var/www/alaveteli/alaveteli/public; - location / { - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-Proto http; - proxy_redirect off; - try_files $uri @ruby; - } + server_tokens off; + + access_log /var/log/nginx/alaveteli_access.log; + error_log /var/log/nginx/alaveteli_error.log error; + + try_files $uri/index.html $uri @alaveteli; + location /download { internal; - alias /var/www/alaveteli/alaveteli/cache/zips/development/download; + alias /var/www/alaveteli/alaveteli/cache/zips/production/download; } - location @ruby { - proxy_pass http://alaveteli; + location @alaveteli { proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto http; proxy_set_header X-Sendfile-Type X-Accel-Redirect; - proxy_set_header X-Accel-Mapping /var/www/alaveteli/alaveteli/cache/zips/development/download=/download; + proxy_set_header X-Accel-Mapping /var/www/alaveteli/alaveteli/cache/zips/production/download=/download; + proxy_redirect off; + proxy_pass http://alaveteli; } } diff --git a/config/packages b/config/packages index 9a07c5f20..a6eeb8079 100644 --- a/config/packages +++ b/config/packages @@ -1,41 +1,44 @@ # please note that this package list currently forms part of the # mysociety deployment infrastructure -- please discuss on the # alavateli mailing list if you want to change it -ruby1.8 -ruby -rdoc | rdoc1.8 -irb | irb1.8 -wv -poppler-utils -pdftk (>> 1.41+dfsg-1) | pdftk (<< 1.41+dfsg-1) # that version has a non-functionining uncompress option -ghostscript +build-essential +bundler catdoc -links elinks -unrtf -xlhtml -xapian-tools -gnuplot-nox -php5-cli -sharutils -unzip -mutt -tnef (>= 1.4.5) gettext -python-yaml -wkhtmltopdf-static +ghostscript +gnuplot-nox +irb | irb1.8 +libapache2-mod-passenger +libicu-dev libmagic-dev libmagickwand-dev libpq-dev +libsqlite3-dev libxml2-dev libxslt-dev -uuid-dev +links +lockfile-progs +memcached +mutt +pdftk (>> 1.41+dfsg-1) | pdftk (<< 1.41+dfsg-1) # that version has a non-functionining uncompress option +php5-cli +poppler-utils +python-yaml +rake (>= 0.9.2.2) +rdoc | rdoc1.8 +ruby +ruby1.8 ruby1.8-dev rubygems (>= 1.8.15) -rake (>= 0.9.2.2) -build-essential -bundler +sharutils sqlite3 -libsqlite3-dev -libicu-dev -memcached +tnef (>= 1.4.5) +ttf-bitstream-vera +unrtf +unzip +uuid-dev +wkhtmltopdf-static +wv +xapian-tools +xlhtml diff --git a/config/packages.debian-squeeze b/config/packages.debian-squeeze index 6cdf2f9d6..c34abefde 100644 --- a/config/packages.debian-squeeze +++ b/config/packages.debian-squeeze @@ -1,39 +1,42 @@ -ruby1.8 -ruby -libruby1.8 -rdoc1.8 -irb1.8 -wv -poppler-utils -pdftk -ghostscript +build-essential +bundler catdoc -links elinks -unrtf -xlhtml -xapian-tools -gnuplot-nox -php5-cli -sharutils -unzip -mutt -tnef gettext -python-yaml -wkhtmltopdf-static +ghostscript +gnuplot-nox +irb1.8 +libicu-dev libmagic-dev libmagickwand-dev libpq-dev +libruby1.8 +libsqlite3-dev libxml2-dev libxslt-dev -uuid-dev +links +lockfile-progs +mutt +pdftk +php5-cli +poppler-utils +postgresql +postgresql-client +python-yaml +rake +rdoc1.8 +ruby +ruby1.8 ruby1.8-dev rubygems/squeeze-backports -rake -build-essential +sharutils sqlite3 -libsqlite3-dev -libicu-dev -postgresql -postgresql-client +tnef +ttf-bitstream-vera +unrtf +unzip +uuid-dev +wkhtmltopdf-static +wv +xapian-tools +xlhtml diff --git a/config/packages.debian-wheezy b/config/packages.debian-wheezy new file mode 100644 index 000000000..4129aa930 --- /dev/null +++ b/config/packages.debian-wheezy @@ -0,0 +1,37 @@ +build-essential +bundler +catdoc +elinks +gettext +ghostscript +gnuplot-nox +libicu-dev +libmagic-dev +libmagickwand-dev +libpq-dev +libsqlite3-dev +libxml2-dev +libxslt-dev +links +lockfile-progs +mutt +pdftk +php5-cli +poppler-utils +postgresql +postgresql-client +python-yaml +rake +ruby-dev +ruby1.9.3 +rubygems +sharutils +sqlite3 +tnef +unrtf +unzip +uuid-dev +wkhtmltopdf-static +wv +xapian-tools +xlhtml diff --git a/config/packages.ubuntu-precise b/config/packages.ubuntu-precise index 177d504e2..d97579bc1 100644 --- a/config/packages.ubuntu-precise +++ b/config/packages.ubuntu-precise @@ -1,35 +1,37 @@ -ruby1.9.1 -wv -poppler-utils -pdftk -ghostscript +build-essential catdoc -links elinks -unrtf -xlhtml -xapian-tools -gnuplot-nox -sharutils -unzip -mutt -tnef gettext -python-yaml -wkhtmltopdf-static +ghostscript +gnuplot-nox +libicu-dev libmagic-dev libmagickwand-dev libpq-dev +libsqlite3-dev libxml2-dev libxslt1-dev -uuid-dev -ruby1.9.1-dev -rubygems +links +lockfile-progs +mutt +pdftk +poppler-utils +postgresql +postgresql-client +python-yaml rake -build-essential ruby-bundler +ruby1.9.1 +ruby1.9.1-dev +rubygems +sharutils sqlite3 -libsqlite3-dev -libicu-dev -postgresql -postgresql-client +tnef +ttf-bitstream-vera +unrtf +unzip +uuid-dev +wkhtmltopdf-static +wv +xapian-tools +xlhtml diff --git a/config/purge-varnish-debian.ugly b/config/purge-varnish-debian.ugly index 3f11344f2..dc3f74ff6 100644..100755 --- a/config/purge-varnish-debian.ugly +++ b/config/purge-varnish-debian.ugly @@ -13,10 +13,12 @@ # !!(*= $daemon_name *)!! Start the Alaveteli email purge-varnish daemon NAME=!!(*= $daemon_name *)!! -DAEMON=!!(*= $vhost_dir *)!!/alaveteli/script/runner +DAEMON=!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/runner DAEMON_ARGS="--daemon PurgeRequest.purge_all_loop" -PIDFILE=!!(*= $vhost_dir *)!!/purge-varnish.pid -LOGFILE=!!(*= $vhost_dir *)!!/logs/purge-varnish.log +PIDDIR=!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/tmp/pids +PIDFILE=$PIDDIR/!!(*= $daemon_name *)!!.pid +LOGDIR=!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/log +LOGFILE=$LOGDIR/!!(*= $daemon_name *)!!.log DUSER=!!(*= $user *)!! # Set RAILS_ENV - not needed if using config/rails_env.rb # RAILS_ENV=your_rails_env @@ -29,10 +31,14 @@ trap "" 1 export PIDFILE LOGFILE quietly_start_daemon() { + mkdir -p {$LOGDIR,$PIDDIR} + chown $DUSER:$DUSER {$LOGDIR,$PIDDIR} /sbin/start-stop-daemon --quiet --start --pidfile "$PIDFILE" --chuid "$DUSER" --startas "$DAEMON" -- $DAEMON_ARGS } start_daemon() { + mkdir -p {$LOGDIR,$PIDDIR} + chown $DUSER:$DUSER {$LOGDIR,$PIDDIR} /sbin/start-stop-daemon --start --pidfile "$PIDFILE" --chuid "$DUSER" --startas "$DAEMON" -- $DAEMON_ARGS } diff --git a/config/routes.rb b/config/routes.rb index d9d21f0bd..9f426fabf 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -16,7 +16,7 @@ Alaveteli::Application.routes.draw do match '/blog' => 'general#blog', :as => :blog match '/search' => 'general#search_redirect', :as => :search_redirect match '/search/all' => 'general#search_redirect', :as => :search_redirect - # XXX combined is the search query, and then if sorted a "/newest" at the end. + # `combined` is the search query, and then if sorted a "/newest" at the end. # Couldn't find a way to do this in routes which also picked up multiple other slashes # and dots and other characters that can appear in search query. So we sort it all # out in the controller. @@ -130,7 +130,7 @@ Alaveteli::Application.routes.draw do match '/:feed/list/:view' => 'track#track_list', :as => :track_list, :view => nil, :feed => /(track|feed)/ match '/:feed/body/:url_name' => 'track#track_public_body', :as => :track_public_body, :feed => /(track|feed)/ match '/:feed/user/:url_name' => 'track#track_user', :as => :track_user, :feed => /(track|feed)/ - # XXX :format doesn't work. See hacky code in the controller that makes up for this. + # TODO: :format doesn't work. See hacky code in the controller that makes up for this. match '/:feed/search/:query_array' => 'track#track_search_query', :as => :track_search, :feed => /(track|feed)/, @@ -261,6 +261,7 @@ Alaveteli::Application.routes.draw do match '/api/v2/request/:id.json' => 'api#show_request', :as => :api_show_request, :via => :get match '/api/v2/request/:id.json' => 'api#add_correspondence', :as => :api_add_correspondence, :via => :post + match '/api/v2/request/:id/update.json' => 'api#update_state', :as => :api_update_state, :via => :post match '/api/v2/body/:id/request_events.:feed_type' => 'api#body_request_events', :as => :api_body_request_events, :feed_type => '^(json|atom)$' #### diff --git a/config/sysvinit-passenger.ugly b/config/sysvinit-passenger.ugly new file mode 100755 index 000000000..0940a4d63 --- /dev/null +++ b/config/sysvinit-passenger.ugly @@ -0,0 +1,59 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: application-passenger-!!(*= $site *)!! +# Required-Start: $local_fs $network +# Required-Stop: $local_fs $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Starts the Passenger app server for the "!!(*= $site *)!!" site +# Description: The Passenger app server for the "!!(*= $site *)!!" site +### END INIT INFO + +# This example sysvinit script is based on the helpful example here: +# http://richard.wallman.org.uk/2010/02/howto-deploy-a-catalyst-application-using-fastcgi-and-nginx/ + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +NAME=!!(*= $site *)!! +SITE_HOME=!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!! +DESC="Alaveteli app server" +USER=!!(*= $user *)!! + +set -e + +start_daemon() { + echo -n "Starting $DESC: " + rm -f "$SITE_HOME/public/down.html" + echo "$NAME." +} + +stop_daemon() { + echo -n "Stopping $DESC: " + cp "$SITE_HOME/public/down.default.html" "$SITE_HOME/public/down.html" + echo "$NAME." +} + +restart_daemon() { + echo -n "Restarting $DESC: " + rm -f "$SITE_HOME/public/down.html" + touch "$SITE_HOME/tmp/restart.txt" + echo "$NAME." +} + +case "$1" in + start) + start_daemon + ;; + stop) + stop_daemon + ;; + reload|restart|force-reload) + restart_daemon + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|reload|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/config/sysvinit-thin.ugly b/config/sysvinit-thin.ugly new file mode 100755 index 000000000..cc604d994 --- /dev/null +++ b/config/sysvinit-thin.ugly @@ -0,0 +1,68 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: application-thin-!!(*= $site *)!! +# Required-Start: $local_fs $network +# Required-Stop: $local_fs $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Starts the Thin app server for the "!!(*= $site *)!!" site +# Description: The Thin app server for the "!!(*= $site *)!!" site +### END INIT INFO + +# This example sysvinit script is based on the helpful example here: +# http://richard.wallman.org.uk/2010/02/howto-deploy-a-catalyst-application-using-fastcgi-and-nginx/ + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +NAME=!!(*= $site *)!! +SITE_HOME=!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!! +DESC="Alaveteli app server" +USER=!!(*= $user *)!! + +set -e + +# Check that the Daemon can be run +su -l -c "cd $SITE_HOME && bundle exec thin --version &> /dev/null || exit 0" $USER + +start_daemon() { + echo -n "Starting $DESC: " + cd "$SITE_HOME" && bundle exec thin \ + --environment=production \ + --user="$USER" \ + --group="$USER" \ + --address=127.0.0.1 \ + --daemonize \ + --quiet \ + start || true + echo "$NAME." +} + +stop_daemon() { + echo -n "Stopping $DESC: " + cd "$SITE_HOME" && bundle exec thin --quiet stop || true + echo "$NAME." +} + +restart_daemon() { + echo -n "Restarting $DESC: " + cd "$SITE_HOME" && bundle exec thin --onebyone --quiet restart || true + echo "$NAME." +} + +case "$1" in + start) + start_daemon + ;; + stop) + stop_daemon + ;; + reload|restart|force-reload) + restart_daemon + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|reload|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/config/sysvinit.example b/config/sysvinit.example deleted file mode 100755 index 443e7c3fb..000000000 --- a/config/sysvinit.example +++ /dev/null @@ -1,53 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: application-thin-alaveteli -# Required-Start: $local_fs $network -# Required-Stop: $local_fs $network -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Starts the Thin web server for the "Alaveteli" site -# Description: The Thin web server for the "Alaveteli" site -### END INIT INFO - -# This example sysvinit script is based on the helpful example here: -# http://richard.wallman.org.uk/2010/02/howto-deploy-a-catalyst-application-using-fastcgi-and-nginx/ - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -SITE_HOME=/var/www/alaveteli -NAME=alaveteli -DESC="Alaveteli app server" -USER=fms - -echo $DAEMON -test -f $DAEMON || exit 0 - -set -e - -start_daemon() { - su -l -c "cd $SITE_HOME/alaveteli && bundle exec thin -d -p 3300 -e development start" $USER -} - -stop_daemon() { - pkill -f thin -u $USER || true -} - -case "$1" in - start) - start_daemon - ;; - stop) - stop_daemon - ;; - reload|restart|force-reload) - stop_daemon - sleep 5 - start_daemon - ;; - *) - N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|reload|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/config/varnish-alaveteli.vcl b/config/varnish-alaveteli.vcl index 5dd0ac83c..d3726682c 100644 --- a/config/varnish-alaveteli.vcl +++ b/config/varnish-alaveteli.vcl @@ -92,7 +92,7 @@ sub vcl_recv { # ban lists, see # http://kristianlyng.wordpress.com/2010/07/28/smart-bans-with-varnish/ - # XXX in Varnish 2.x, the following would be + # TODO: in Varnish 2.x, the following would be # purge("obj.http.x-url ~ " req.url); ban("obj.http.x-url ~ " + req.url); error 200 "Banned"; diff --git a/db/migrate/028_give_incoming_messages_events.rb b/db/migrate/028_give_incoming_messages_events.rb index 831068562..46acd831e 100644 --- a/db/migrate/028_give_incoming_messages_events.rb +++ b/db/migrate/028_give_incoming_messages_events.rb @@ -1,4 +1,4 @@ -# XXX If this one fails with errors about described_state on save, then you need +# TODO: If this one fails with errors about described_state on save, then you need # to temporarily modify the model for InfoRequestEvents to remove this part: # validates_inclusion_of :described_state, :in => [ # Or do some nice hack in here to make it happen permanently :) diff --git a/db/migrate/036_add_public_body_tags.rb b/db/migrate/036_add_public_body_tags.rb index 99a507f13..f7fefdf48 100644 --- a/db/migrate/036_add_public_body_tags.rb +++ b/db/migrate/036_add_public_body_tags.rb @@ -11,7 +11,7 @@ class AddPublicBodyTags < ActiveRecord::Migration end # MySQL cannot index text blobs like this - # XXX perhaps should change :name to be a :string + # TODO: perhaps should change :name to be a :string if ActiveRecord::Base.connection.adapter_name != "MySQL" add_index :public_body_tags, [:public_body_id, :name], :unique => true end diff --git a/db/migrate/061_include_responses_in_tracks.rb b/db/migrate/061_include_responses_in_tracks.rb index f357e57c2..c7a3b26cf 100644 --- a/db/migrate/061_include_responses_in_tracks.rb +++ b/db/migrate/061_include_responses_in_tracks.rb @@ -4,6 +4,6 @@ class IncludeResponsesInTracks < ActiveRecord::Migration end def self.down - # XXX forget it + # TODO: forget it end end diff --git a/db/migrate/065_add_comments_to_user_track.rb b/db/migrate/065_add_comments_to_user_track.rb index 9c4ff2936..50d1f9d5d 100644 --- a/db/migrate/065_add_comments_to_user_track.rb +++ b/db/migrate/065_add_comments_to_user_track.rb @@ -9,6 +9,6 @@ class AddCommentsToUserTrack < ActiveRecord::Migration end def self.down - # XXX forget it + # TODO: forget it end end diff --git a/db/migrate/088_public_body_machine_tags.rb b/db/migrate/088_public_body_machine_tags.rb index 0089607c6..6a0815568 100644 --- a/db/migrate/088_public_body_machine_tags.rb +++ b/db/migrate/088_public_body_machine_tags.rb @@ -3,7 +3,7 @@ class PublicBodyMachineTags < ActiveRecord::Migration add_column :public_body_tags, :value, :text # MySQL cannot index text blobs like this - # XXX perhaps should change :name/:value to be a :string + # TODO: perhaps should change :name/:value to be a :string if ActiveRecord::Base.connection.adapter_name != "MySQL" add_index :public_body_tags, :name end diff --git a/db/migrate/090_remove_tag_uniqueness.rb b/db/migrate/090_remove_tag_uniqueness.rb index 1c06de439..d1affade3 100644 --- a/db/migrate/090_remove_tag_uniqueness.rb +++ b/db/migrate/090_remove_tag_uniqueness.rb @@ -1,7 +1,7 @@ class RemoveTagUniqueness < ActiveRecord::Migration def self.up # MySQL cannot index text blobs like this - # XXX perhaps should change :name/:value to be a :string + # TODO: perhaps should change :name/:value to be a :string if ActiveRecord::Base.connection.adapter_name != "MySQL" remove_index :public_body_tags, [:public_body_id, :name] # allow the key to repeat, but not the value also diff --git a/db/migrate/20140528110536_update_track_things_index.rb b/db/migrate/20140528110536_update_track_things_index.rb new file mode 100644 index 000000000..55ee0b70b --- /dev/null +++ b/db/migrate/20140528110536_update_track_things_index.rb @@ -0,0 +1,17 @@ +class UpdateTrackThingsIndex < ActiveRecord::Migration + + def up + if ActiveRecord::Base.connection.adapter_name == "PostgreSQL" + execute "ALTER TABLE track_things_sent_emails DROP CONSTRAINT fk_track_request_public_body" + execute "ALTER TABLE track_things_sent_emails ADD CONSTRAINT fk_track_request_public_body FOREIGN KEY (public_body_id) REFERENCES public_bodies(id)" + end + end + + def down + if ActiveRecord::Base.connection.adapter_name == "PostgreSQL" + execute "ALTER TABLE track_things_sent_emails DROP CONSTRAINT fk_track_request_public_body" + execute "ALTER TABLE track_things_sent_emails ADD CONSTRAINT fk_track_request_public_body FOREIGN KEY (user_id) REFERENCES users(id)" + end + end + +end diff --git a/db/migrate/20140801132719_add_index_to_info_request_events.rb b/db/migrate/20140801132719_add_index_to_info_request_events.rb new file mode 100644 index 000000000..5f0a77eac --- /dev/null +++ b/db/migrate/20140801132719_add_index_to_info_request_events.rb @@ -0,0 +1,5 @@ +class AddIndexToInfoRequestEvents < ActiveRecord::Migration + def change + add_index :info_request_events, :event_type + end +end diff --git a/doc/CHANGES.md b/doc/CHANGES.md index 777501ca5..237355c1d 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -1,3 +1,105 @@ +# Version 0.19 + +## Highlighted Features + +* Improved documentation at http://alaveteli.org/docs (Louise Crow, Gareth Rees, + Dave Whiteland) +* Added mySociety Launchpad PPA to supply updated version of pdftk (Louise Crow) +* Made default maintenance page generic (Gareth Rees) +* Support additional Vagrant operating system images (Gareth Rees) +* Add SysVinit for Phusion Passenger (Gareth Rees) +* Eager loading to speed up `body_request_events` API action (Louise Crow) +* Ability to update the status of external requests made via the API (Liz + Conlan) +* Removed more mySociety internal dependencies from install script and example configuration and template files (Gareth Rees) +* Improved example configuration files (Gareth Rees) +* Support Portugese locale (Louise Crow) +* Default to using UTF-8 encoded database for new installs and CI (Gareth Rees) +* Better config file generators in `lib/tasks/config_files.rake` (Gareth Rees) +* Improved search term highlighting (Gareth Rees) +* Added responsive styling (Louise Crow) +* Documentation tidying and redirection (Louise Crow) +* Allow a message with more than one event to be destroyed (Louise Crow) +* Makes public body stats available if configured (Gareth Rees) +* Cache-busting on request response notification emails (Gareth Rees) +* Better error handling on new requests (Louise Crow) +* Rake task for cleaning up holding pen events (`rake cleanup:holding_pen`) + (Louise Crow) +* Added searching of bodies by short_name (Gareth Rees) +* Additional stats on `/version.json` (Gareth Rees) +* Minor tweaks to the homepage (Gareth Rees) +* Translation housekeeping (Louise Crow) +* Minor style updates to admin request edit page (Gareth Rees) + +## Upgrade Notes + +* `HighlightHelper#excerpt` backports the Rails 4 `excerpt` which requires a + Hash for the options parameter rather than globbing the remaining arguments. + +For example: + + - <%=h excerpt(info_request.initial_request_text, "", 100) %> + + <%=h excerpt(info_request.initial_request_text, "", :radius => 100) %> + +You will need to update any use of `excerpt` in your theme to use the Hash args. + +* Ubuntu Precise users can get an updated version of pdftk from mySociety's PPA + +Install the repo and update the sources: + + apt-get install python-software-properties + add-apt-repository ppa:mysociety/alaveteli + apt-get update + +The mySociety pdftk package (`1.44-7~precise1ms1`) should now be the install +candidate: + + apt-cache policy pdftk + +* Install `lockfile-progs` so that the `run-with-lockfile` shell script can be + used instead of the C program +* Use responsive stylesheets in `config/general.yml`: + `RESPONSIVE_STYLING: true`. If you don't currently use responsive styling, + and you don't want to get switched over just set `RESPONSIVE_STYLING: false` + and the fixed-width stylesheets will be used as before. +* Allow access to public body stats page if desired in `config/general/yml`: + `PUBLIC_BODY_STATISTICS_PAGE: true` +* Run migrations to define track_things constraint correctly (Robin Houston) and + add additional index for `event_type` on `info_request_events` (Steven Day) +* The `SHARED_DIRECTORIES` setting now includes `tmp/pids`. The notes below for + updating the log directory should cover the update steps for `tmp/pids`. +* Capistrano now creates `SHARED_PATH/tmp/pids` and links `APP_ROOT/tmp/pids` + here, as the alert tracks daemon writes its pids to the generally expected + location of `APP_ROOT/tmp/pids`. +* rails-post-deploy no longer handles linking `APP_ROOT/log` to a log directory + outside the app. Capistrano users will find that `:symlink_configuration` now + links `APP_ROOT/log` to `SHARED_PATH/log`. Users who aleady use the + `SHARED_FILES` and `SHARED_DIRECTORIES` settings in `config/general.yml` + should add `log/` to the `SHARED_DIRECTORIES` setting. The existing mechanism + for shared directories (in `script/rails-deploy-before-down`) will create the + necessary link to `SHARED_FILES_PATH/log`. If your existing shared log + directory is not at `SHARED_FILES_PATH/log`, move the directory and re-run + `script/rails-post-deploy` to link up the new location. If you don't use + `SHARED_FILES` and `SHARED_DIRECTORIES`, alaveteli will now write it's + application logs to `APP_ROOT/log` rather than `APP_ROOT/../logs` by default. +* `public_body_change_requests/new.html.erb` has a new field for spam prevention + so customisations of this template should be updated with: + + <p style="display:none;"> + <%= label_tag 'public_body_change_request[comment]', _('Do not fill in this field') %> + <%= text_field_tag 'public_body_change_request[comment]' %> + </p> + This is the anti-spam honeypot. +* The workaround for an old [bug](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637239) in libc6 in squeeze has been removed. If you're running on squeeze, please make sure you're using the latest version of libc6 (2.11.3-4) to prevent the risk of segfaults. +* The capistrano `stop`, `start` and `restart` tasks now restart the app + server via the service `/etc/init.d/alaveteli`. If you're using + capistrano for deployment, make sure `/etc/init.d/alaveteli` exists + and is current, and executable by the cap user. You can create it using the template + `config/sysvinit-thin.ugly` or `config/sysvinit-passenger.ugly` as + described in http://alaveteli.org/docs/installing/manual_install/#generate-alaveteli-service +* This release includes an update to the commonlib submodule - you + should be warned about this when running rails-post-deploy. + # Version 0.18 ## Highlighted features diff --git a/doc/DEPLOY.md b/doc/DEPLOY.md deleted file mode 100644 index f2e643ec5..000000000 --- a/doc/DEPLOY.md +++ /dev/null @@ -1,41 +0,0 @@ -# Deployment - -mySociety uses a custom deployment and buildout system however Capistrano is included as part of Alaveteli as a standard deployment system. - -## Capistrano - -### Set up - -First you need to customise your deployment settings, e.g. the name of the server you're deploying to. This is done by copying the example file `config/deploy.yml.example` to `config/deploy.yml` and editing the settings to suit you. - -TODO: The following instructions could be greatly improved - -These are the general steps required to get your staging server up and running: - -* Install packages from `config/packages` -* Install Postgres and configure a user -* Create a directory to deploy to and make sure your deployment user can write to it -* Run `cap deploy:setup` to create directories, etc. -* Run `cap deploy:update_code` so that we've got a copy of the example config on the server. This process will take a long time installing gems, etc. it will also fail on `rake:themes:install` but that's OK -* SSH to the server, change to the `deploy_to` directory -* `cp releases/[SOME_DATE]/config/general.yml-example shared/general.yml` -* `cp releases/[SOME_DATE]/config/database.yml-example shared/database.yml` -* Edit those files to match your required settings -* Back on your machine run `cap deploy` and it should successfully deploy -* Run the DB migrations `cap deploy:migrate` -* Build the Xapian DB `cap xapian:rebuild_index` -* Configure Apache/Passenger with a DocumentRoot of `your_deploy_to/current/public` -* Phew. Time to admire your work by browsing to the server! - -### Usage - -Ensure you've got a `config/deploy.yml` file with the correct settings for your site. You'll need to share this with everyone in your team that deploys so it might be a good idea to keep the latest version in a [Gist](http://gist.github.com/). - -To deploy to staging just run `cap deploy` but if you want to deploy to production you need to run `cap -S stage=production deploy`. - -For additional usage instructions, see the [Capistrano wiki](https://github.com/capistrano/capistrano/wiki/). - -### TODO - -* Get `cap deploy:setup` to do most of the work described above in the *Set up* section -* Use [Whenever](https://github.com/javan/whenever) to set up cronjobs diff --git a/doc/INSTALL-exim4.md b/doc/INSTALL-exim4.md deleted file mode 100644 index 796fb295c..000000000 --- a/doc/INSTALL-exim4.md +++ /dev/null @@ -1,99 +0,0 @@ -As an example of how to set up your MTA, in exim on Ubuntu, you might -add the following to its configuration. - -In `/etc/exim4/conf.d/main/04_alaveteli_options`: - - ALAVETELI_HOME=/path/to/alaveteli/software - ALAVETELI_USER=www-data - log_file_path=/var/log/exim4/exim-%slog-%D - MAIN_LOG_SELECTOR==+all -retry_defer - extract_addresses_remove_arguments=false - -(The user ALAVETELI_USER should have write permissions on ALAVETELI_HOME). - -Note that the name and location of the log files created by Exim must match -what the `load-mail-server-logs` script expects, hence the need for the extra -`log_file_path` setting. And the `check-recent-requests-sent` scripts expects -the logs to contain the `from=<...>` envelope information, so we make the -logs more verbose with `log_selector`. The ALAVETELI_USER may need to also -need to be added to the `trusted_users` list in your Exim config in order to -set the return path on outgoing mail, depending on your setup. - -In `/etc/exim4/conf.d/router/04_alaveteli`: - - alaveteli_request: - debug_print = "R: alaveteli for $local_part@$domain" - driver = redirect - data = ${lookup{$local_part}wildlsearch{ALAVETELI_HOME/config/aliases}} - pipe_transport = alaveteli_mailin_transport - -In `/etc/exim4/conf.d/transport/04_alaveteli`: - - alaveteli_mailin_transport: - driver = pipe - command = $address_pipe ${lc:$local_part} - current_directory = ALAVETELI_HOME - home_directory = ALAVETELI_HOME - user = ALAVETELI_USER - group = ALAVETELI_USER - -And, assuming you set `INCOMING_EMAIL_PREFIX` in your config at -`config/general` to "foi+", create `config/aliases` with the following -content: - - ^foi\\+.*: |/path/to/alaveteli/software/script/mailin - -You should also configure exim to discard any messages sent to the -`BLACKHOLE_PREFIX` address, whose default value is -'do-not-reply-to-this-address'. For example, add the following to -config/aliases: - - # We use this for envelope from for some messages where we don't care about delivery - do-not-reply-to-this-address: :blackhole: - -If you want to make use of the automatic bounce-message handling, then -set the `TRACK_SENDER_EMAIL` address to be filtered through -`script/handle-mail-replies`. Messages that are not bounces or -out-of-office autoreplies will be forwarded to -`FORWARD_NONBOUNCE_RESPONSES_TO`. For example, in WhatDoTheyKnow the -configuration looks like this: - - raw_team: [a list of people on the team] - team: |/path/to/alaveteli/software/script/handle-mail-replies - -with `FORWARD_NONBOUNCE_RESPONSES_TO: 'raw_team@whatdotheyknow.com'` - -Finally, make sure you have `dc_use_split_config='true'` in -`/etc/exim4/update-exim4.conf.conf`, and execute the command -`update-exim4.conf`. - -NB: if the file `/etc/exim4/exim4.conf` exists then `update-exim4.conf` -will silently do nothing. Some distributions include this file. If -yours does, you will need to rename it before running `update-exim4.conf`. - -(You may also want to set `dc_eximconfig_configtype='internet'`, -`dc_local_interfaces='0.0.0.0 ; ::1'`, and -`dc_other_hostnames='<your-host-name>'`) - -# Troubleshooting - -To test mail delivery, run: - - exim -bt foi+request-1234@localhost - -This should tell you which routers are being processed. You should -see something like: - - $ exim -bt foi+request-1234@localhost - R: alaveteli pipe for snafflerequest-234@localhost - snafflerequest-234@localhost -> |/home/alaveteli/alaveteli/script/mailin - transport = alaveteli_mailin_transport - -This tells you that the routing part (making emails to -`foi\+.*@localhost` be forwarded to Alaveteli's `mailin` script) is -working. - -There is a great -[Exim Cheatsheet](http://bradthemad.org/tech/notes/exim_cheatsheet.php) -online that you may find useful. - diff --git a/doc/INSTALL-postfix.md b/doc/INSTALL-postfix.md deleted file mode 100644 index a73d67ce1..000000000 --- a/doc/INSTALL-postfix.md +++ /dev/null @@ -1,68 +0,0 @@ -As an example of how to set up your MTA, in postfix on Ubuntu, you might -add the following to its configuration. - -In /etc/postfix/master.cf: - - alaveteli unix - n n - 50 pipe - flags=R user=ALAVETELI_USER argv=ALAVETELI_HOME/script/mailin - -In /etc/postfix/main.cf - - virtual_alias_maps = regexp:/etc/postfix/regexp - -For example - -ALAVETELI_HOME=/path/to/alaveteli/software -ALAVETELI_USER=www-data - -The user ALAVETELI_USER should have write permissions on ALAVETELI_HOME. - -And, assuming you set `OPTION_INCOMING_EMAIL_PREFIX` in your config at -`config/general` to "foi+", create `/etc/postfix/regexp` with the following -content: - - /^foi.*/ alaveteli - - -You should also configure postfix to discard any messages sent to the `BLACKHOLE_PREFIX` -address, whose default value is 'do-not-reply-to-this-address'. For example, add the -following to /etc/aliases: - - # We use this for envelope from for some messages where we don't care about delivery - do-not-reply-to-this-address: :blackhole: - -# Logging - -For the postfix logs to be read by the script 'load-mail-server-logs' succesfully they need to be log rotated with a date in the filename. Since that will create a lot of rotated log files (one for each day), it's good to have them in their own directory. For example (on Ubuntu) /etc/rsyslog.d/50-default.conf - - mail.* -/var/log/mail/mail.log - -And also edit /etc/logrotate.d/rsyslog: - - /var/log/mail/mail.log - { - rotate 30 - daily - dateext - missingok - notifempty - compress - delaycompress - sharedscripts - postrotate - reload rsyslog >/dev/null 2>&1 || true - endscript - } - -You'll also need to tell Alaveteli where the log files are stored and that they're in postfix format. Update config/general.yml with: - - MTA_LOG_PATH: '/var/log/mail/mail.log-*' - MTA_LOG_TYPE: "postfix" - -# Troubleshooting - -To test mail delivery, run: - - $ /usr/sbin/sendmail -bv foi+requrest-1234@localhost - -This tells you if sending the emails to 'foi\+.*localhost' is working. diff --git a/doc/INSTALL.md b/doc/INSTALL.md deleted file mode 100644 index 04cdb1352..000000000 --- a/doc/INSTALL.md +++ /dev/null @@ -1,651 +0,0 @@ -# Installation Script and AMI - -The easiest options for installating Alaveteli for evaluation -are to use our install script or to use the AMI (Amazon Machine -Image) to create an instance on Amazon EC2. These options are -described below. If you would prefer to install the site -manually, please go to the Manual Installation section below. - -## Installing from an AMI (Amazon Machine Image) - -To help people try out Alaveteli, we have created an AMI (Amazon -Machine Image) with a basic installation of Alaveteli, which you -can use to create a running server on an Amazon EC2 instance. -This creates an instance that runs in development mode, so we -wouldn't recommend you use it for a production system without -changing the configuration. - -Unfortunately, Alaveteli will not run properly on a free Micro -instance due to the low amount of memory available on those -instances; you will need to use at least a Small instance, which -Amazon will charge for. - -The AMI can be found in the EU West (Ireland) region, with the -ID ami-8603f4f1 and name “Basic Alaveteli installation -2014-01-29”. You can launch an instance based on that AMI with -[this link](https://console.aws.amazon.com/ec2/home?region=eu-west-1#launchAmi=ami-8603f4f1). - -When you create an EC2 instance based on that AMI, make sure -that you choose Security Groups that allows at least inbound -HTTP, HTTPS, SSH and, if you want to test incoming mail as well, -SMTP. - -When your EC2 instance is launched, you will be able to log in -as the `ubuntu` user. This user can `sudo` freely to run -commands as root. However, the code is actually owned by (and -runs as) the `alaveteli` user. After creating the instance, you -may want to edit a configuration file to customize the site's -configuration. That configuration file is -`/var/www/alaveteli/alaveteli/config/general.yml`, which can be -edited with: - - ubuntu@ip-10-58-191-98:~$ sudo su - alaveteli - alaveteli@ip-10-58-191-98:~$ cd alaveteli - alaveteli@ip-10-58-191-98:~/alaveteli$ nano config/general.yml - -Then you should restart the Thin webserver with: - - alaveteli@ip-10-58-191-98:~/alaveteli$ logout - ubuntu@ip-10-58-191-98:~$ sudo /etc/init.d/alaveteli restart - -If you find the hostname of your EC2 instance from the AWS -console, you should then be able to see the site at -`http://your-ec2-hostname.eu-west-1.compute.amazonaws.com` - -If you have any problems or questions, please ask on the -[Alaveteli Google Group](https://groups.google.com/forum/#!forum/alaveteli-dev) -or [report an issue](https://github.com/mysociety/alaveteli/issues?state=open). - -## Installing with the Installation Script - -If you have a clean installation of Debian squeeze or Ubuntu -precise, you can use an install script in our commonlib -repository to set up a working instance of Alaveteli. This is -not suitable for production (it runs in development mode, for -example) but should set up a functional installation of the -site. - -**Warning: only use this script on a newly installed server – it -will make significant changes to your server’s setup, including -modifying your nginx setup, creating a user account, creating a -database, installing new packages etc.** - -To download the script, run the following command: - - curl -O https://raw.github.com/mysociety/commonlib/master/bin/install-site.sh - -If you run this script with `sh install-site.sh`, you'll see its -usage message: - - Usage: ./install-site.sh [--default] <SITE-NAME> <UNIX-USER> [HOST] - HOST is only optional if you are running this on an EC2 instance. - --default means to install as the default site for this server, - rather than a virtualhost for HOST. - -In this case `<SITE-NAME>` should be `alaveteli`. `<UNIX-USER>` -is the name of the Unix user that you want to own and run the -code. (This user will be created by the script.) - -The `HOST` parameter is a hostname for the server that will be -usable externally – a virtualhost for this name will be created -by the script, unless you specified the `--default` option. This -parameter is optional if you are on an EC2 instance, in which -case the hostname of that instance will be used. - -For example, if you wish to use a new user called `alaveteli` -and the hostname `alaveteli.127.0.0.1.xip.io`, creating a -virtualhost just for that hostname, you could download and run -the script with: - - sudo sh install-site.sh alaveteli alaveteli alaveteli.127.0.0.1.xip.io - -([xip.io](http://xip.io/) is a helpful domain for development.) - -Or, if you want to set this up as the default site on an EC2 -instance, you could download the script, make it executable and -then invoke it with: - - sudo ./install-site.sh --default alaveteli alaveteli - -When the script has finished, you should have a working copy of -the website, accessible via the hostname you supplied to the -script. - -If you have any problems or questions, please ask on the -[Alaveteli Google Group](https://groups.google.com/forum/#!forum/alaveteli-dev) -or [report an issue](https://github.com/mysociety/alaveteli/issues?state=open). - -# Manual Installation - -These instructions assume Debian Squeeze (64-bit) or Ubuntu 12.04 LTS (precise). -[Install instructions for OS X](https://github.com/mysociety/alaveteli/wiki/OS-X-Quickstart) -are under development. Debian Squeeze is the best supported -deployment platform. - -Commands are intended to be run via the terminal or over ssh. - -As an aid to evaluation, there is an -[Amazon AMI](https://github.com/mysociety/alaveteli/wiki/Alaveteli-ec2-ami) -with all these steps configured. It is *not* production-ready. - -## Get Alaveteli - -To start with, you may need to install git, e.g. with `sudo apt-get -install git-core` - -Next, get hold of the Alaveteli source code from github: - - git clone https://github.com/mysociety/alaveteli.git - cd alaveteli - -This will get the development branch, which has the latest (possibly -buggy) code. If you don't want to add or try new features, swap to the -master branch (which always contains the latest stable release): - - git checkout master - -## Package pinning - -You need to configure [apt-pinning](http://wiki.debian.org/AptPreferences#Pinning-1) preferences in order to prevent packages being pulled from the debian wheezy distribution in preference to the stable distribution once you have added the wheezy repository as described below. - -In order to configure apt-pinning and to keep most packages coming from the Debian stable repository while installing the ones required from wheezy and the mySociety repository you need to run the following commands: - - echo "Package: *" >> /tmp/preferences - echo "Pin: release a=squeeze-backports">> /tmp/preferences - echo "Pin-Priority: 200" >> /tmp/preferences - echo "" >> /tmp/preferences - echo "Package: *" >> /tmp/preferences - echo "Pin: release a=wheezy">> /tmp/preferences - echo "Pin-Priority: 50" >> /tmp/preferences - sudo cp /tmp/preferences /etc/apt/ - rm /tmp/preferences - -## Install system dependencies - -These are packages that the software depends on: third-party software -used to parse documents, host the site, etc. There are also packages -that contain headers necessary to compile some of the gem dependencies -in the next step. - -If you are running Debian, add the following repositories to -`/etc/apt/sources.list` and run `apt-get update`: - - deb http://debian.mysociety.org squeeze main - deb http://ftp.debian.org/debian/ wheezy main non-free contrib - deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free - -The repositories above allow us to install the packages -`wkhtmltopdf-static` and `bundler` using `apt`; so if you're running -Ubuntu, you won't be able to use the above repositories, and you will -need to comment out those two lines in `config/packages` before -following the next step (and install bundler manually). - -Now install the packages that are listed in config/packages using apt-get -e.g.: - - sudo apt-get install `cut -d " " -f 1 config/packages | grep -v "^#"` - -Some of the files also have a version number listed in config/packages -- check that you have appropriate versions installed. Some also list -"|" and offer a choice of packages. - -## Install Ruby dependencies - -To install Alaveteli's Ruby dependencies, we need to install -bundler. In Debian, this is provided as a package (installed as part -of the package install process above). You could also install it as a -gem: - - sudo gem1.8 install bundler - -## Install mySociety libraries - -You will also want to install mySociety's common ruby libraries and the Rails -code. Run: - - git submodule update --init - -to fetch the contents of the submodules. - -### Packages customised by mySociety - -Debian users should add the mySociety debian archive to their -`/etc/apt/sources.list` as described above. Doing this and following -the above instructions should install a couple of custom -dependencies. Users of other platforms can optionally install these -dependencies manually, as follows: - -1. If you would like users to be able to download pretty PDFs as part of -the downloadable zipfile of their request history, you should install -[wkhtmltopdf](http://code.google.com/p/wkhtmltopdf/downloads/list). -We recommend downloading the latest, statically compiled version from -the project website, as this allows running headless (i.e. without a -graphical interface running) on Linux. If you do install -`wkhtmltopdf`, you need to edit a setting in the config file to point -to it (see below). If you don't install it, everything will still -work, but users will get ugly, plain text versions of their requests -when they download them. - -2. Version 1.44 of `pdftk` contains a bug which makes it to loop forever -in certain edge conditions. Until it's incorporated into an official -release, you can either hope you don't encounter the bug (it ties up a -rails process until you kill it) you'll need to patch it yourself or -use the Debian package compiled by mySociety (see link in -[issue 305](https://github.com/mysociety/alaveteli/issues/305)) - - -## Configure Database - -There has been a little work done in trying to make the code work with -other databases (e.g. SQLite), but the currently supported database is -PostgreSQL. - -If you don't have it installed: - - apt-get install postgresql postgresql-client - -Now we need to set up the database config file to contain the name, -username and password of your postgres database. - -* copy `database.yml-example` to `database.yml` in `alaveteli/config` -* edit it to point to your local postgresql database in the development - and test sections and create the databases: - -Make sure that the user specified in database.yml exists, and has full -permissions on these databases. As they need the ability to turn off -constraints whilst running the tests they also need to be a superuser. -If you don't want your database user to be a superuser, you can add a line -`disable_constraints: false` to the test config in database.yml, as seen in database.yml-example - -You can create a `foi` user from the command line, thus: - - # su - postgres - $ createuser -s -P foi - -And you can create a database thus: - - $ createdb -T template0 -E SQL_ASCII -O foi foi_production - $ createdb -T template0 -E SQL_ASCII -O foi foi_test - $ createdb -T template0 -E SQL_ASCII -O foi foi_development - -We create using the ``SQL_ASCII`` encoding, because in postgres this -is means "no encoding"; and because we handle and store all kinds of -data that may not be valid UTF (for example, data originating from -various broken email clients that's not 8-bit clean), it's safer to be -able to store *anything*, than reject data at runtime. - -## Configure email - -You will need to set up an email server (MTA) to send and receive -emails. Full configuration for an MTA is beyond the scope of this -document, though we describe an example configuration for Exim in -`INSTALL-exim4.md`. - -Note that in development mode, mail is handled by default by mailcatcher -so that you can see the mails in a browser - see http://mailcatcher.me/ -for more details. Start mailcatcher by running `bundle exec mailcatcher` -in your application directory. - -### Minimal - -If you just want to get the tests to pass, you will at a minimum need -to allow sending emails via a `sendmail` command (a requirement met, -for example, with `sudo apt-get install exim4`). - -### Detailed - -When an authority receives an email, the email's `reply-to` field is a -magic address which is parsed and consumed by the Rails app. - -To receive such email in a production setup, you will need to -configure your MTA to pipe incoming emails to the Alaveteli script -`script/mailin`. Therefore, you will need to configure your MTA to -accept emails to magic addresses, and to pipe such emails to this -script. - -Magic email addresses are of the form: - - <foi+request-3-691c8388@example.com> - -The respective parts of this address are controlled with options in -config/general.yml, thus: - - INCOMING_EMAIL_PREFIX = 'foi+' - INCOMING_EMAIL_DOMAIN = 'example.com' - -When you set up your MTA, note that if there is some error inside -Rails, the email is returned with an exit code 75, which for Exim at -least means the MTA will try again later. Additionally, a stacktrace -is emailed to `CONTACT_EMAIL`. - -`INSTALL-exim4.md` describes one possible configuration for Exim (>= -1.9). - -A well-configured installation of this code will separately have had -Exim make a backup copy of the email in a separate mailbox, just in -case. - -## Set up configs - -Copy `config/general.yml-example` to `config/general.yml` and edit to -your taste. - -Note that the default settings for frontpage examples are designed to -work with the dummy data shipped with Alaveteli; once you have real -data, you should certainly edit these. - -The default theme is the "Alaveteli" theme. When you run -`rails-post-deploy` (see below), that theme gets installed -automatically. - -Finally, copy `config/newrelic.yml-example` to `config/newrelic.yml`. -This file contains configuration information for the New Relic -performance management system. By default, monitoring is switched off -by the `agent_enabled: false` setting. See https://github.com/newrelic/rpm -for instructions on switching on local and remote performance analysis. - -## Deployment - -In the 'alaveteli' directory, run: - - script/rails-post-deploy - -(This will need execute privs so `chmod 755` if necessary.) This sets -up directory structures, creates logs, installs/updates themes, runs -database migrations, etc. You should run it after each new software -update. - -One of the things the script does is install dependencies (using -`bundle install`). Note that the first time you run it, part of the -`bundle install` that compiles `xapian-full` takes a *long* time! - -If you want some dummy data to play with, you can try loading the -fixtures that the test suite uses into your development database. You -can do this with: - - script/load-sample-data - -Next we need to create the index for the search engine (Xapian): - - script/rebuild-xapian-index - -If this fails, the site should still mostly run, but it's a core -component so you should really try to get this working. - -## Run the Tests - -Make sure everything looks OK: - - bundle exec rake spec - -If there are failures here, something has gone wrong with the -preceding steps (see the next section for a common problem and -workaround). You might be able to move on to the next step, depending -on how serious they are, but ideally you should try to find out what's -gone wrong. - -### glibc bug workaround - -There's a -[bug in glibc](http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637239) -which causes Xapian to segfault when running the tests. Although the -bug report linked to claims it's fixed in the current Debian stable, -it's not as of version `2.11.3-2`. - -Until it's fixed (e.g. `libc6 2.13-26` does work), you can get the -tests to pass by setting `export LD_PRELOAD=/lib/libuuid.so.1`. - -## Run the Server - -Run the following to get the server running: - - bundle exec rails server --environment=development - -By default the server listens on all interfaces. You can restrict it to the -localhost interface by adding ` --binding=127.0.0.1` - -The server should have told you the URL to access in your browser to see -the site in action. - -## Administrator privileges - -The administrative interface is at the URL `/admin`. - -Only users with the `super` admin level can access the admin -interface. Users create their own accounts in the usual way, and then -administrators can give them `super` privileges. - -There is an emergency user account which can be accessed via -`/admin?emergency=1`, using the credentials `ADMIN_USERNAME` and -`ADMIN_PASSWORD`, which are set in `general.yml`. To bootstrap the -first `super` level accounts, you will need to log in as the emergency -user. You can disable the emergency user account by setting `DISABLE_EMERGENCY_USER` to `true` in `general.yml`. - -Users with the superuser role also have extra privileges in the -website frontend, such as being able to categorise any request, being -able to view items that have been hidden from the search, and being -presented with "admin" links next to individual requests and comments -in the front end. - -It is possible completely to override the administrator authentication -by setting `SKIP_ADMIN_AUTH` to `true` in `general.yml`. - -## Cron jobs and init scripts - -`config/crontab-example` contains the cronjobs run on WhatDoTheyKnow. -It's in a strange templating format they use in mySociety. mySociety -render the example file to reference absolute paths, and then drop it -in `/etc/cron.d/` on the server. - -The `ugly` format uses simple variable substitution. A variable looks -like `!!(*= $this *)!!`. The variables are: - -* `vhost`: part of the path to the directory where the software is - served from. In the mySociety files, it usually comes as - `/data/vhost/!!(*= $vhost *)!!` -- you should replace that whole - port with a path to the directory where your Alaveteli software - installation lives, e.g. `/var/www/` -* `vhost_dir`: the entire path to the directory where the software is - served from. -- you should replace this with a path to the - directory where your Alaveteli software installation lives, - e.g. `/var/www/` -* `vcspath`: the name of the alaveteli checkout, e.g. `alaveteli`. - Thus, `/data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!` might be - replaced with `/var/www/alaveteli` in your cron tab -* `user`: the user that the software runs as -* `site`: a string to identify your alaveteli instance - -There is a rake task that will help to rewrite this file into -one that is useful to you, which can be invoked with: - - bundle exec rake config_files:convert_crontab \ - DEPLOY_USER=deploy \ - VHOST_DIR=/dir/above/alaveteli \ - VCSPATH=alaveteli \ - SITE=alaveteli \ - CRONTAB=config/crontab-example > crontab - -You should change the `DEPLOY_USER`, `VHOST_DIR`, `VCSPATH` and -`SITE` environment variables to match your server and -installation. You should also edit the resulting `crontab` file -to customize the `MAILTO` variable. - -One of the cron jobs refers to a script at -`/etc/init.d/foi-alert-tracks`. This is an init script, a copy of -which lives in `config/alert-tracks-debian.ugly`. As with the cron -jobs above, replace the variables (and/or bits near the variables) -with paths to your software. You can use the rake task `rake -config_files:convert_init_script` to do this. -`config/purge-varnish-debian.ugly` is a -similar init script, which is optional and not required if you choose -not to run your site behind Varnish (see below). Either tweak the file -permissions to make the scripts executable by your deploy user, or add the -following line to your sudoers file to allow these to be run by your deploy -user (named `deploy` in this case): - - deploy ALL = NOPASSWD: /etc/init.d/foi-alert-tracks, /etc/init.d/foi-purge-varnish - -The cron jobs refer to a program `run-with-lockfile`. See -[this issue](https://github.com/mysociety/alaveteli/issues/112) for a -discussion of where to find this program, and how you might replace -it. This [one line script](https://gist.github.com/3741194) can install -this program system-wide. - -## Set up production web server - -It is not recommended to run the website using the default Rails web -server. There are various recommendations here: -http://rubyonrails.org/deploy - -We usually use Passenger / mod_rails. The file at `conf/httpd.conf-example` -gives you an example config file for WhatDoTheyKnow. At a minimum, you should -include the following in an Apache configuration file: - - PassengerResolveSymlinksInDocumentRoot on - PassengerMaxPoolSize 6 # Recommend setting this to 3 or less on servers with 512MB RAM - -Under all but light loads, it is strongly recommended to run the -server behind an http accelerator like Varnish. A sample varnish VCL -is supplied in `../conf/varnish-alaveteli.vcl`. - -It's strongly recommended that you run the site over SSL. (Set FORCE_SSL to true in -config/general.yml). For this you will need an SSL certificate for your domain and you will -need to configure an SSL terminator to sit in front of Varnish. If you're already using Apache -as a web server you could simply use Apache as the SSL terminator. A minimal configuration -would look something like this: - -<VirtualHost *:443> - ServerName www.yourdomain - - ProxyRequests Off - ProxyPreserveHost On - ProxyPass / http://localhost:80/ - ProxyPassReverse / http://localhost:80/ - RequestHeader set X-Forwarded-Proto 'https' - - SSLEngine on - SSLProtocol all -SSLv2 - SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM - - SSLCertificateFile /etc/apache2/ssl/ssl.crt - SSLCertificateKeyFile /etc/apache2/ssl/ssl.key - SSLCertificateChainFile /etc/apache2/ssl/sub.class2.server.ca.pem - SSLCACertificateFile /etc/apache2/ssl/ca.pem - SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown -</VirtualHost> - -Notice the line "RequestHeader" that sets the X-Forwarded-Proto header. This is important. This ultimately tells Rails that it's serving a page over https and so it knows to include that in any absolute urls it serves. - -Some -[production server best practice notes](https://github.com/mysociety/alaveteli/wiki/Production-Server-Best-Practices) -are evolving on the wiki. - -## Upgrading Alaveteli - -The developer team policy is that the master branch in git should -always contain the latest stable release. Therefore, in production, -you should usually have your software deployed from the master branch, -and an upgrade can be simply `git pull`. - -Patch version increases (e.g. 1.2.3 -> 1.2.4) should not require any -further action on your part. - -Minor version increases (e.g. 1.2.4 -> 1.3.0) will usually require -further action. You should read the `CHANGES.md` document to see -what's changed since your last deployment, paying special attention to -anything in the "Updgrading" sections. - -Any upgrade may include new translations strings, i.e. new or altered -messages to the user that need translating to your locale. You should -visit Transifex and try to get your translation up to 100% on each new -release. Failure to do so means that any new words added to the -Alaveteli source code will appear in your website in English by -default. If your translations didn't make it to the latest release, -you will need to download the updated `app.po` for your locale from -Transifex and save it in the `locale/` folder. - -You should always run the script `scripts/rails-post-deploy` after -each deployment. This runs any database migrations for you, plus -various other things that can be automated for deployment. - -## Troubleshooting - -* **Incoming emails aren't appearing in my Alaveteli install** - - First, you need to check that your MTA is delivering relevant - incoming emails to the `script/mailin` command. There are various - ways of setting your MTA up to do this; we have documented one way - of doing it in Exim at `doc/INSTALL-exim4.conf`, including a - command you can use to check that the email routing is set up - correctly. - - Second, you need to test that the mailin script itself is working - correctly, by running it from the command line, First, find a - valid "To" address for a request in your system. You can do this - through your site's admin interface, or from the command line, - like so: - - $ ./script/console - Loading development environment (Rails 2.3.14) - >> InfoRequest.find_by_url_title("why_do_you_have_such_a_fancy_dog").incoming_email - => "request-101-50929748@localhost" - - Now take the source of a valid email (there are some sample emails in - `spec/fixtures/files/`); edit the `To:` header to match this address; - and then pipe it through the mailin script. A non-zero exit code - means there was a problem. For example: - - $ cp spec/fixtures/files/incoming-request-plain.email /tmp/ - $ perl -pi -e 's/^To:.*/To: <request-101-50929748@localhost>/' /tmp/incoming-request-plain.email - $ ./script/mailin < /tmp/incoming-request-plain.email - $ echo $? - 75 - - The `mailin` script emails the details of any errors to - `CONTACT_EMAIL` (from your `general.yml` file). A common problem is - for the user that the MTA runs as not to have write access to - `files/raw_emails/`. - -* **Various tests fail with "*Your PostgreSQL connection does not support - unescape_bytea. Try upgrading to pg 0.9.0 or later.*"** - - You have an old version of `pg`, the ruby postgres driver. In - Ubuntu, for example, this is provided by the package `libdbd-pg-ruby`. - - Try upgrading your system's `pg` installation, or installing the pg - gem with `gem install pg` - -* **Some of the tests relating to mail are failing, with messages like - "*when using TMail should load an email with funny MIME settings' - FAILED*"** - - This sounds like the tests are running using the `production` - environment, rather than the `test` environment, for some reason. - -* **Non-ASCII characters are being displayed as asterisks in my incoming messages** - - We rely on `elinks` to convert HTML email to plain text. - Normally, the encoding should just work, but under some - circumstances it appears that `elinks` ignores the parameters - passed to it from Alaveteli. - - To force `elinks` always to treat input as UTF8, add the following - to `/etc/elinks/elinks.conf`: - - set document.codepage.assume = "utf-8" - set document.codepage.force_assumed = 1 - - You should also check that your locale is set up correctly. See - [https://github.com/mysociety/alaveteli/issues/128#issuecomment-1814845](this issue followup) - for further discussion. - -* **I'm seeing `rake: command not found` when running the post install script - - The script uses `rake`. - - It may be that the binaries installed by bundler are not put in the - system `PATH`; therefore, in order to run `rake` (needed for - deployments), you may need to do something like: - - ln -s /usr/lib/ruby/gems/1.8/bin/rake /usr/local/bin/ - diff --git a/doc/README.md b/doc/README.md new file mode 100644 index 000000000..181076f2c --- /dev/null +++ b/doc/README.md @@ -0,0 +1,9 @@ +The main Alaveteli documentation now lives on the [Alaveteli site](http://alaveteli.org/docs/) + +Specifically: + +* [Installation](http://alaveteli.org/docs/installing/) +* [Themes](http://alaveteli.org/docs/customising/themes/) +* [Translation](http://alaveteli.org/docs/customising/translation/) +* [Email](http://alaveteli.org/docs/installing/email/) +* [Deployment](http://alaveteli.org/docs/installing/deploy/) diff --git a/doc/THEMES.md b/doc/THEMES.md deleted file mode 100644 index 8a4828a99..000000000 --- a/doc/THEMES.md +++ /dev/null @@ -1,165 +0,0 @@ -When installing an Alaveteli site, there are a few things that you -might want to do to customise it, beyond the available settings in the -`config/general` file. - -The most common requirement is to brand the site: at a minimum, -inserting your own logo and colour scheme. You may also want to tweak -the different states that a request can go through. You'll also want -to edit the categories that public bodies can appear in (i.e. the -groupings on the left hand side of the -"[View authorities](https://www.whatdotheyknow.com/body/list/all)" page -on WhatDoTheyKnow. - -There may also be other things you want to customise; drop a line on -the developer's mailing list to discuss, if so. We're still working -out the best way of doing these kinds of customisations! - -In any case, the important principle to bear in mind is that the less -you override and customise the code, the easier your site will be to -maintain in the long term. Any customisation is possible, but for -each customisation beyond the simple cases documented here, ask -yourself or your client, "can we possibly live without this?" If the -answer is "no", then consider starting a discussion about a pluggable -way of achieving your goals, rather than overriding any of the core -code. - -# General principles - -We try to encapsulate all site-specific functionality in one of these -places: - -* Site configuration (e.g. the name of your site, the available - languages etc -- all in `config/general`) -* Data (e.g. the public bodies to whom requests should be addressed) -* A rails "plugin", installed in `vendor/plugins/`. We call these - "themes". - -This document is about what you can do in a theme. - -By default, the sample theme ("alavetelitheme") has already been -installed. See the setting `THEME_URLS` in `general.yml` for an -explanation. - -You can also install the sample theme by hand, by running: - - bundle exec rails plugin install git://github.com/mysociety/alavetelitheme.git - -The sample theme contains examples for nearly everything you might -want to customise. You should probably make a copy, rename it, and -use that as the basis for your own theme. - -# Make sure your theme is as lightweight as possible - -The more you put in your theme, the harder it will be to upgrade to -future versions of Alaveteli. Everything you place in your theme -overrides things in the core theme, so if you make a new "main -template", then new widgets that appear in the core theme won't appear -on your website. - -Therefore, you should consider how you can brand your website without -changing much in the core theme. The ideal would be if you are able -to rebrand the site by only changing the CSS. You will also need to -add custom help pages, as described below. - -# Branding the site - -The core templates that comprise the layout and user interface of an -Alaveteli site live in `app/views/`. They use Rails' ERB syntax. -For example, the template for the home page lives at -`app/views/general/frontpage.html.erb`, and the template for the "about -us" page is at `app/views/help/about.html.erb`. - -Obviously, you *could* edit those core files directly, but this would -be a Bad Idea, because you would find it increasingly hard to do -upgrades. Having said that, sometimes you may want to change the core -templates in a way that would benefit everyone, in which case, discuss -the changes on the mailing list, make them in a fork of Alaveteli, and -then issue a pull request. - -Normally, however, you should override these pages **in your own -theme**, by placing them at a corresponding location within your -theme's `lib/` directory. These means that a file at -`vendor/plugins/alavetelitheme/lib/help/about.rhml` will appear -instead of the core "about us" file. - -Rails expects all its stylesheets to live at `<railshome>/public`, -which presents a problem for plugins. Here's how we solve it: the -stylesheet and associated resources for your theme live (by -convention) in `alavetelitheme/public/`. This is symlinked from -the main Rails app -- see `alavetelitheme/install.rb` to see how this -happens. - -The partial at -`alavetelitheme/lib/views/general/_before_head_end.html.erb` includes the -custom CSS in your theme's stylesheet folder (by convention, in -`alavetelitheme/public/stylesheets/`), with: - - <%= stylesheet_link_tag "/alavetelitheme/stylesheets/custom" %> - -...which will, usually, need changing for your theme. - -# Adding your own categories for public bodies - -Categories are implemented in Alaveteli using tags. Specific tags can -be designated to group authorities together as a category. - -There's a file in the sample theme, -`alavetelitheme/lib/public_body_categories_en.rb`, which contains a -nested structure that defines categories. It contains a comment -describing its structure. You should make a copy of this file for each -locale you support. - -# Customising the request states - -As mentioned above, if you can possibly live with the -[default Alaveteli request statuses](https://github.com/mysociety/alaveteli/wiki/Alaveteli's-request-statuses), -it would be good to do so. Note that you can set how many days counts -as "overdue" in the main site config file. - -If you can't live with the states as they are, there's a very basic -way to add to them (which will get improved over time). There's not -currently a way to remove any easily. There is an example of how to -do this in the `alavetelitheme`. - -To do add states, create two modules in your theme, -`InfoRequestCustomStates` and `RequestControllerCustomStates`. The -former must have these methods: - -* `theme_calculate_status`: return a tag to identify the current state of the request -* `theme_extra_states`: return a list of tags which identify the extra states you'd like to support -* `theme_display_status`: return human-readable strings corresponding with these tags - -The latter must have one method: - -* `theme_describe_state`: Return a notice for the user suitable for - displaying after they've categorised a request; and redirect them to - a suitable next page - -When you've added your extra states, you also need to create the following files in your theme: - -* `lib/views/general/_custom_state_descriptions.html.erb`: Descriptions - of your new states, suitable for displaying to end users -* `lib/views/general/_custom_state_transitions_complete.html.erb`: - Descriptions for any new states that you might characterise as - 'completion' states, for displaying on the categorisation form that - we ask requestors to fill out -* `lib/views/general/_custom_state_transitions_pending.html.erb`: As - above, but for new states you might characterise as 'pending' - states. - -You can see examples of these customisations in -[this commit](https://github.com/sebbacon/informatazyrtare-theme/commit/2b240491237bd72415990399904361ce9bfa431d) -for the Kosovan version of Alaveteli, Informata Zyrtare (ignore the -file `lib/views/general/_custom_state_transitions.html.erb`, which is -unused). - -# Adding new pages in the navigation - -`alavetelitheme/lib/config/custom-routes.rb` allows you to extend the base routes in -Alaveteli. The example in `alavetelitheme` adds an extra help page. -You can also use this to override the behaviour of specific pages if -necessary. - -# Adding or overriding models and controllers - -If you need to extend the behaviour of Alaveteli at the controller or model level, see `alavetelitheme/lib/controller_patches.rb` and `alavetelitheme/lib/model_patches.rb` for examples. diff --git a/doc/TRANSLATE.md b/doc/TRANSLATE.md deleted file mode 100644 index aef2cfdc9..000000000 --- a/doc/TRANSLATE.md +++ /dev/null @@ -1,106 +0,0 @@ -The software translations are implemented using GNU gettext, and the -resource files are managed in Transifex. - -The Transifex project is at -https://www.transifex.net/projects/p/alaveteli/; you'll probably want -an account there (ask on the mailing list). It has a fairly easy to -use interface for contributing translations. - -# Translation process: translator's view - -When a developer adds a new feature to the user interface in -Alaveteli, they use some code to mark sentences or words ("strings") -that they think will need to be translated. - -When the Alaveteli release manager is planning a release, they upload -a template containing all the strings to be translated (called a POT) -to Transifex. This causes your own translations in Transifex to be -updated with the latest strings. - -When you visit Transifex, it will prompt you to fill out values for -all new strings, and all strings that have been modified. In the case -where a string has only been slightly modified, such as with -punctuation ("Hello" has become "Hello!"), Transifex will suggest a -suitable translation for you (look for the "suggestions" tab under the -source string). - -In order for this feature to work properly, the release manager has to -download your translations, run a program that inserts the -suggestions, and then upload them again. Therefore, when a release -candidate is announced, make sure you have uploaded any outstanding -translations, or you will lose them. - -When a release candidate has been annouced, there is a **translation -freeze**: during this period, developers must not add any new strings -to the software, so you can be confident that you're translating -everything that will be in the final release. - -The release manager will also give you a **translation deadline**. After -this date, you can continue to contribute new translations, but they -won't make it into the release. - -## General notes on translation in Transifex - -Some bits of text will have comments attached to them from the Alaveteli -application developers about the context in which the text appears in the -application - these comments will appear under the 'Details' tab for the -text in Transifex. - -Some texts will have placeholders in them to indicate that another bit of text generated by Alaveteli will be inserted into them when they're displayed. They will look like `some text with a {{placeholder}}`. For these texts, don't translate the placeholder. It needs to stay exactly the same for the text to be inserted properly. - -Similarly, some texts will have some code in angle brackets in them to turn bits of the text into links, and other small bits of HTML formatting. e.g. `please <a href=\"{{url}}\">send it to us</a>`. Again, don't edit the bits in angle brackets, preserve them in your translation, just edit the text around them. - -Some bits of text are in the form of two bits of text separated by a `|` -character e.g. `IncomingMessage|Subject`. These represent attribute names, so -`IncomingMessage|Subject` is the subject attribute of an incoming message on -the site. You should not prioritise these types of text when translating - -they do not appear on the site anywhere at the moment, and when they do, -they will only be used in the admin interface. If you do translate them, only -translate the text after the `|`. - -# Translation process: release manager's view - -Before the Alaveteli release manager cuts a new release branch, they -must: - -* pick a date for the release branch to be cut ("release candidate date") -* make an announcement to the translators (using the "announcements" - feature in Transifex) that they should ensure they have any pending - translations saved in Transifex before the release candidate date -* make an announcement to the developers that all new strings should - be committed before the release candidate date -* on the release candidate date: - * download (`tx pull -a -f`) and commit all the current translations (important: - there's no revision history in Transifex!) - * you should also commit these translations to a hotfix for the - previous version, so they are preserved against the last known - good msgids - * regenerate the POT file and individual PO files for each - language, using `bundle exec rake - gettext:store_model_attributes`, followed by `bundle exec rake - gettext:find` - * careful of including msgids from themes in `lib/themes`; - you might want to move them out of the way before running - the above commands - * this updates the PO template, but also merges it with the - individual PO files, marking strings that have only changed - slightly as "fuzzy" - * reupload (`tx push -s -t`) the POT and PO files to Transifex from the - current release branch - * The point of uploading the PO files is that Transifex - converts the "fuzzy" suggestions from Transifex into - "suggestions" under each source string - * Note that Transifex *does not* preserve fuzzy strings in the - PO files it makes available for download, on the grounds - that Transifex supports multiple suggestions, whereas - gettext only allows one fuzzy suggestion per msgid. - * remove the fuzzy strings from the local PO files (because they - make Rails very noisy), and then commit the result. You can do - this by re-pulling from Transifex. -* on the release date: - * download and commit all the current translations to the current - release branch - -# Translations: developers' view - -See the [I18n guide](https://github.com/mysociety/alaveteli/wiki/I18n-guide) on the wiki. diff --git a/lib/acts_as_xapian/acts_as_xapian.rb b/lib/acts_as_xapian/acts_as_xapian.rb index b30bb4d10..6520a20a4 100644 --- a/lib/acts_as_xapian/acts_as_xapian.rb +++ b/lib/acts_as_xapian/acts_as_xapian.rb @@ -21,10 +21,24 @@ rescue LoadError $acts_as_xapian_bindings_available = false end +module Xapian + class QueryParser + def unstem(term) + words = [] + + Xapian._safelyIterate(unstem_begin(term), unstem_end(term)) do |item| + words << item.term + end + + words + end + end +end + module ActsAsXapian ###################################################################### # Module level variables - # XXX must be some kind of cattr_accessor that can do this better + # TODO: must be some kind of cattr_accessor that can do this better def ActsAsXapian.bindings_available $acts_as_xapian_bindings_available end @@ -109,12 +123,12 @@ module ActsAsXapian @@db_path = File.join(db_parent_path, environment) # make some things that don't depend on the db - # XXX this gets made once for each acts_as_xapian. Oh well. + # TODO: this gets made once for each acts_as_xapian. Oh well. @@stemmer = Xapian::Stem.new('english') end # Opens / reopens the db for reading - # XXX we perhaps don't need to rebuild database and enquire and queryparser - + # TODO: we perhaps don't need to rebuild database and enquire and queryparser - # but db.reopen wasn't enough by itself, so just do everything it's easier. def ActsAsXapian.readable_init raise NoXapianRubyBindingsError.new("Xapian Ruby bindings not installed") unless ActsAsXapian.bindings_available @@ -188,7 +202,7 @@ module ActsAsXapian raise "Z is reserved for stemming terms" if term[1] == "Z" raise "Already have code '" + term[1] + "' in another model but with different prefix '" + @@terms_by_capital[term[1]] + "'" if @@terms_by_capital.include?(term[1]) && @@terms_by_capital[term[1]] != term[2] @@terms_by_capital[term[1]] = term[2] - # XXX use boolean here so doesn't stem our URL names in WhatDoTheyKnow + # TODO: use boolean here so doesn't stem our URL names in WhatDoTheyKnow # If making acts_as_xapian generic, would really need to make the :terms have # another option that lets people choose non-boolean for terms that need it # (i.e. searching explicitly within a free text field) @@ -231,7 +245,7 @@ module ActsAsXapian raise "acts_as_xapian hasn't been called in any models" if @@init_values.empty? # if DB is not nil, then we're already initialised, so don't do it - # again XXX reopen it each time, xapian_spec.rb needs this so database + # again TODO: reopen it each time, xapian_spec.rb needs this so database # gets written twice correctly. # return unless @@writable_db.nil? @@ -472,16 +486,42 @@ module ActsAsXapian # Return just normal words in the query i.e. Not operators, ones in # date ranges or similar. Use this for cheap highlighting with # TextHelper::highlight, and excerpt. - def words_to_highlight - # TODO: In Ruby 1.9 we can do matching of any unicode letter with \p{L} - # But we still need to support ruby 1.8 for the time being so... - query_nopunc = self.query_string.gsub(/[^ёЁа-яА-Яa-zA-Zà-üÀ-Ü0-9:\.\/_]/iu, " ") - query_nopunc = query_nopunc.gsub(/\s+/, " ") - words = query_nopunc.split(" ") - # Remove anything with a :, . or / in it - words = words.find_all {|o| !o.match(/(:|\.|\/)/) } - words = words.find_all {|o| !o.match(/^(AND|NOT|OR|XOR)$/) } - return words + def words_to_highlight(opts = {}) + default_opts = { :include_original => false, :regex => false } + opts = default_opts.merge(opts) + + # Reject all prefixes other than Z, which we know is reserved for stems + terms = query.terms.reject { |t| t.term.first.match(/^[A-Y]$/) } + # Collect the stems including the Z prefix + raw_stems = terms.map { |t| t.term if t.term.start_with?('Z') }.compact.uniq.sort + # Collect stems, chopping the Z prefix off + stems = raw_stems.map { |t| t[1..-1] }.compact.sort + # Collect the non-stem terms + words = terms.map { |t| t.term unless t.term.start_with?('Z') }.compact.sort + + # Add the unstemmed words from the original query + # Sometimes stems can be unhelpful with the :regex option, for example + # stemming 'boring' results in us trying to highlight 'bore'. + if opts[:include_original] + raw_stems.each do |raw_stem| + words << ActsAsXapian.query_parser.unstem(raw_stem).uniq + end + + words = words.any? ? words.flatten.uniq : [] + end + + if opts[:regex] + stems.map! { |w| /\b(#{ w })\w*\b/iu } + words.map! { |w| /\b(#{ w })\b/iu } + end + + if RUBY_VERSION.to_f >= 1.9 + (stems + words).map! do |term| + term.is_a?(String) ? term.force_encoding('UTF-8') : term + end + else + stems + words + end end # Text for lines in log file @@ -510,7 +550,7 @@ module ActsAsXapian # Find the documents by their unique term input_models_query = Xapian::Query.new(Xapian::Query::OP_OR, query_models.map{|m| "I" + m.xapian_document_term}) ActsAsXapian.enquire.query = input_models_query - matches = ActsAsXapian.enquire.mset(0, 100, 100) # XXX so this whole method will only work with 100 docs + matches = ActsAsXapian.enquire.mset(0, 100, 100) # TODO: so this whole method will only work with 100 docs # Get set of relevant terms for those documents selection = Xapian::RSet.new() @@ -601,7 +641,7 @@ module ActsAsXapian begin if job.action == 'update' - # XXX Index functions may reference other models, so we could eager load here too? + # TODO: Index functions may reference other models, so we could eager load here too? model = job.model.constantize.find(job.model_id) # :include => cls.constantize.xapian_options[:include] model.xapian_index elsif job.action == 'destroy' @@ -717,7 +757,7 @@ module ActsAsXapian ActiveRecord::Base.connection.disconnect! - pid = Process.fork # XXX this will only work on Unix, tough + pid = Process.fork # TODO: this will only work on Unix, tough if pid Process.waitpid(pid) if not $?.success? @@ -898,7 +938,7 @@ module ActsAsXapian ActsAsXapian.term_generator.document = doc for text in texts_to_index ActsAsXapian.term_generator.increase_termpos # stop phrases spanning different text fields - # XXX the "1" here is a weight that could be varied for a boost function + # TODO: the "1" here is a weight that could be varied for a boost function ActsAsXapian.term_generator.index_text(xapian_value(text, nil, true), 1) end end @@ -975,5 +1015,3 @@ end # Reopen ActiveRecord and include the acts_as_xapian method ActiveRecord::Base.extend ActsAsXapian::ActsMethods - - diff --git a/lib/alaveteli_file_types.rb b/lib/alaveteli_file_types.rb index e89bc0c78..617048c05 100644 --- a/lib/alaveteli_file_types.rb +++ b/lib/alaveteli_file_types.rb @@ -16,15 +16,15 @@ class AlaveteliFileTypes "tnef" => 'application/ms-tnef', "tif" => 'image/tiff', "gif" => 'image/gif', - "jpg" => 'image/jpeg', # XXX add jpeg + "jpg" => 'image/jpeg', # TODO: add jpeg "png" => 'image/png', "bmp" => 'image/bmp', - "html" => 'text/html', # XXX add htm + "html" => 'text/html', # TODO: add htm "vcf" => 'text/x-vcard', "zip" => 'application/zip', "delivery-status" => 'message/delivery-status' } - # XXX doesn't have way of choosing default for inverse map - might want to add + # TODO: doesn't have way of choosing default for inverse map - might want to add # one when you need it FileExtensionToMimeTypeRev = FileExtensionToMimeType.invert @@ -46,7 +46,7 @@ class AlaveteliFileTypes m = Mahoro.new(Mahoro::MIME) mahoro_type = m.buffer(content) mahoro_type.strip! - # XXX we shouldn't have to check empty? here, but Mahoro sometimes returns a blank line :( + # TODO: we shouldn't have to check empty? here, but Mahoro sometimes returns a blank line :( # e.g. for InfoRequestEvent 17930 if mahoro_type.nil? || mahoro_type.empty? return nil diff --git a/lib/attachment_to_html/template.html.erb b/lib/attachment_to_html/template.html.erb index 38286a5f9..b898b1750 100644 --- a/lib/attachment_to_html/template.html.erb +++ b/lib/attachment_to_html/template.html.erb @@ -1,6 +1,7 @@ <!DOCTYPE html> <html> <head> + <meta charset="UTF-8"> <title><%= title %></title> <%= content_for(:head_suffix) %> </head> diff --git a/lib/configuration.rb b/lib/configuration.rb index d525bf712..bd2d31ac2 100644 --- a/lib/configuration.rb +++ b/lib/configuration.rb @@ -58,7 +58,7 @@ module AlaveteliConfiguration :RECAPTCHA_PUBLIC_KEY => 'x', :REPLY_LATE_AFTER_DAYS => 20, :REPLY_VERY_LATE_AFTER_DAYS => 40, - :RESPONSIVE_STYLING => false, + :RESPONSIVE_STYLING => true, :SITE_NAME => 'Alaveteli', :SKIP_ADMIN_AUTH => false, :SPECIAL_REPLY_VERY_LATE_AFTER_DAYS => 60, diff --git a/lib/has_tag_string/has_tag_string.rb b/lib/has_tag_string/has_tag_string.rb index 4022faaac..c28720f04 100644 --- a/lib/has_tag_string/has_tag_string.rb +++ b/lib/has_tag_string/has_tag_string.rb @@ -10,7 +10,7 @@ module HasTagString # Represents one tag of one model. # The migration to make this is currently only in WDTK code. class HasTagStringTag < ActiveRecord::Base - # XXX strip_attributes! + # TODO: strip_attributes! validates_presence_of :name @@ -46,7 +46,7 @@ module HasTagString # Methods which are added to the model instances being tagged module InstanceMethods # Given an input string of tags, sets all tags to that string. - # XXX This immediately saves the new tags. + # TODO: This immediately saves the new tags. def tag_string=(tag_string) if tag_string.nil? tag_string = "" diff --git a/lib/mail_handler/backends/mail_backend.rb b/lib/mail_handler/backends/mail_backend.rb index e019eba97..190e79e97 100644 --- a/lib/mail_handler/backends/mail_backend.rb +++ b/lib/mail_handler/backends/mail_backend.rb @@ -323,7 +323,7 @@ module MailHandler end end end - # XXX call _convert_part_body_to_text here, but need to get charset somehow + # TODO: call _convert_part_body_to_text here, but need to get charset somehow # e.g. http://www.whatdotheyknow.com/request/1593/response/3088/attach/4/Freedom%20of%20Information%20request%20-%20car%20oval%20sticker:%20Article%2020,%20Convention%20on%20Road%20Traffic%201949.txt body = headers + "\n" + body end diff --git a/lib/mail_handler/mail_handler.rb b/lib/mail_handler/mail_handler.rb index 53033d440..47015f207 100644 --- a/lib/mail_handler/mail_handler.rb +++ b/lib/mail_handler/mail_handler.rb @@ -70,7 +70,7 @@ module MailHandler # note re. charset: TMail always tries to convert email bodies # to UTF8 by default, so normally it should already be that. text = '' - # XXX - tell all these command line tools to return utf-8 + # TODO: - tell all these command line tools to return utf-8 if content_type == 'text/plain' text += body + "\n\n" else @@ -151,7 +151,7 @@ module MailHandler body = entry.get_input_stream.read rescue # move to next attachment silently if there were problems - # XXX really should reduce this to specific exceptions? + # TODO: really should reduce this to specific exceptions? # e.g. password protected next end diff --git a/lib/public_body_csv.rb b/lib/public_body_csv.rb new file mode 100644 index 000000000..afb5d9043 --- /dev/null +++ b/lib/public_body_csv.rb @@ -0,0 +1,95 @@ +require 'csv' + +# Public: Generate a CSV representation of PublicBody instances +# +# Examples +# +# bodies = PublicBody.search('useless') +# +# csv = PublicBodyCSV.new(:fields => [:name, :calculated_home_page], +# :headers => ['Name', 'Home Page']) +# +# bodies.each { |body| csv << body } +# +# csv.generate +# # => Name,Home Page +# Department for Humpadinking,http://localhost +# Ministry of Silly Walks,http://www.localhost +# Department of Loneliness,http://localhost +class PublicBodyCSV + + def self.default_fields + [:name, + :short_name, + :url_name, + :tag_string, + :calculated_home_page, + :publication_scheme, + :disclosure_log, + :notes, + :created_at, + :updated_at, + :version] + end + + # TODO: Generate headers from fields + def self.default_headers + ['Name', + 'Short name', + 'URL name', + 'Tags', + 'Home page', + 'Publication scheme', + 'Disclosure log', + 'Notes', + 'Created at', + 'Updated at', + 'Version'] + end + + attr_reader :fields, :headers, :rows + + def initialize(args = {}) + @fields = args.fetch(:fields, self.class.default_fields) + @headers = args.fetch(:headers, self.class.default_headers) + @rows = [] + end + + def <<(public_body) + # Allow join_rows to handle newlines because of differences between + # CSV.generate_line in 1.8 / 1.9+ + if RUBY_VERSION.to_f >= 1.9 + rows << CSV.generate_line(collect_public_body_attributes(public_body), :row_sep => '') + else + rows << CSV.generate_line(collect_public_body_attributes(public_body)) + end + end + + # TODO: Just use CSV.generate when Ruby 1.8.7 support is dropped + def generate + csv = generate_header_row + csv << join_rows + csv << "\n" + end + + private + + def join_rows + rows.join("\n") + end + + def generate_header_row + # Add a newline because of differences between + # CSV.generate_line in 1.8 / 1.9+ + row = CSV.generate_line(headers) + row += "\n" unless RUBY_VERSION.to_f >= 1.9 + row + end + + def collect_public_body_attributes(public_body) + fields.map do |field| + public_body.respond_to?(field) ? public_body.send(field) : '' + end + end + +end diff --git a/lib/strip_attributes/strip_attributes.rb b/lib/strip_attributes/strip_attributes.rb index 130d10185..12350277d 100644 --- a/lib/strip_attributes/strip_attributes.rb +++ b/lib/strip_attributes/strip_attributes.rb @@ -1,6 +1,6 @@ module StripAttributes # Strips whitespace from model fields and leaves nil values as nil. - # XXX this differs from official StripAttributes, as it doesn't make blank cells null. + # TODO: this differs from official StripAttributes, as it doesn't make blank cells null. def strip_attributes!(options = nil) before_validation do |record| attribute_names = StripAttributes.narrow(record.attribute_names, options) diff --git a/lib/tasks/cleanup.rake b/lib/tasks/cleanup.rake new file mode 100644 index 000000000..9a8be9521 --- /dev/null +++ b/lib/tasks/cleanup.rake @@ -0,0 +1,20 @@ +namespace :cleanup do + + desc 'Clean up all message redelivery and destroy actions from the holding pen to make admin actions there faster' + task :holding_pen => :environment do + dryrun = ENV['DRYRUN'] != '0' + if dryrun + $stderr.puts "This is a dryrun - nothing will be deleted" + end + holding_pen = InfoRequest.find_by_url_title('holding_pen') + old_events = holding_pen.info_request_events.find_each(:conditions => ['event_type in (?)', + ['redeliver_incoming', + 'destroy_incoming']]) do |event| + puts event.inspect + if ! dryrun + event.destroy + end + end + end + +end diff --git a/lib/tasks/config_files.rake b/lib/tasks/config_files.rake index d0e4001f0..5dda64a04 100644 --- a/lib/tasks/config_files.rake +++ b/lib/tasks/config_files.rake @@ -23,26 +23,34 @@ namespace :config_files do desc 'Convert Debian .ugly init script in config to a form suitable for installing in /etc/init.d' task :convert_init_script => :environment do - example = 'rake config_files:convert_init_script DEPLOY_USER=deploy VHOST_DIR=/dir/above/alaveteli SCRIPT_FILE=config/alert-tracks-debian.ugly ' - check_for_env_vars(['DEPLOY_USER', 'VHOST_DIR', 'SCRIPT_FILE'], example) + example = 'rake config_files:convert_init_script DEPLOY_USER=deploy VHOST_DIR=/dir/above/alaveteli VCSPATH=alaveteli SITE=alaveteli SCRIPT_FILE=config/alert-tracks-debian.ugly' + check_for_env_vars(['DEPLOY_USER', + 'VHOST_DIR', + 'SCRIPT_FILE'], example) + + replacements = { + :user => ENV['DEPLOY_USER'], + :vhost_dir => ENV['VHOST_DIR'], + :vcspath => ENV.fetch('VCSPATH') { 'alaveteli' }, + :site => ENV.fetch('SITE') { 'foi' } + } - deploy_user = ENV['DEPLOY_USER'] - vhost_dir = ENV['VHOST_DIR'] - script_file = ENV['SCRIPT_FILE'] + # Use the filename for the $daemon_name ugly variable + daemon_name = File.basename(ENV['SCRIPT_FILE'], '-debian.ugly') + replacements.update(:daemon_name => "#{ replacements[:site] }-#{ daemon_name }") - replacements = { :user => deploy_user, - :vhost_dir => vhost_dir } + # Generate the template for potential further processing + converted = convert_ugly(ENV['SCRIPT_FILE'], replacements) - daemon_name = File.basename(script_file, '-debian.ugly') - replacements.update(:daemon_name => "foi-#{daemon_name}") - converted = convert_ugly(script_file, replacements) - rails_env_file = File.expand_path(File.join(Rails.root, 'config', 'rails_env.rb')) - if !File.exists?(rails_env_file) + # gsub the RAILS_ENV in to the generated template if its not set by the + # hard coded config file + unless File.exists?("#{ Rails.root }/config/rails_env.rb") converted.each do |line| line.gsub!(/^#\s*RAILS_ENV=your_rails_env/, "RAILS_ENV=#{Rails.env}") line.gsub!(/^#\s*export RAILS_ENV/, "export RAILS_ENV") end end + converted.each do |line| puts line end @@ -50,7 +58,7 @@ namespace :config_files do desc 'Convert Debian .ugly crontab file in config to a form suitable for installing in /etc/cron.d' task :convert_crontab => :environment do - example = 'rake config_files:convert_crontab DEPLOY_USER=deploy VHOST_DIR=/dir/above/alaveteli VCSPATH=alaveteli SITE=alaveteli CRONTAB=config/crontab-example' + example = 'rake config_files:convert_crontab DEPLOY_USER=deploy VHOST_DIR=/dir/above/alaveteli VCSPATH=alaveteli SITE=alaveteli CRONTAB=config/crontab-example MAILTO=cron-alaveteli@example.org' check_for_env_vars(['DEPLOY_USER', 'VHOST_DIR', 'VCSPATH', @@ -60,7 +68,8 @@ namespace :config_files do :user => ENV['DEPLOY_USER'], :vhost_dir => ENV['VHOST_DIR'], :vcspath => ENV['VCSPATH'], - :site => ENV['SITE'] + :site => ENV['SITE'], + :mailto => ENV.fetch('MAILTO') { "cron-#{ ENV['SITE'] }@mysociety.org" } } convert_ugly(ENV['CRONTAB'], replacements).each do |line| puts line diff --git a/lib/tasks/stats.rake b/lib/tasks/stats.rake index f09594529..46a645b4d 100644 --- a/lib/tasks/stats.rake +++ b/lib/tasks/stats.rake @@ -119,7 +119,7 @@ DESC count ? count : 0 end - row = [body.name] + stats + row = [%Q("#{ body.name }")] + stats puts row.join(",") end end @@ -147,7 +147,7 @@ DESC count ? count : 0 end - row = [body.name] + stats + row = [%Q("#{ body.name }")] + stats puts row.join(",") end end diff --git a/lib/world_foi_websites.rb b/lib/world_foi_websites.rb index eb707a103..fc2395986 100644 --- a/lib/world_foi_websites.rb +++ b/lib/world_foi_websites.rb @@ -62,11 +62,22 @@ class WorldFOIWebsites :country_name => "România", :country_iso_code => "RO", :url => "http://nuvasuparati.info/"}, - {:name => "Marsoum41", + {:name => "Marsoum41", :country_name => "تونس", :country_iso_code => "TN", - :url => "http://www.marsoum41.org"} - + :url => "http://www.marsoum41.org"}, + {:name => "Доступ до правди", + :country_name => "Україна", + :country_iso_code => "UA", + :url => "https://dostup.pravda.com.ua/"}, + {:name => "Ask Data", + :country_name => "מְדִינַת יִשְׂרָאֵל", + :country_iso_code => "IL", + :url => "http://askdata.org.il/"}, + {:name => "Слободен пристап", + :country_name => "Република Македонија", + :country_iso_code => "MK", + :url => "http://www.slobodenpristap.mk/"} ] return world_foi_websites end diff --git a/locale/aln/app.po b/locale/aln/app.po index a91046d8f..3deb81775 100644 --- a/locale/aln/app.po +++ b/locale/aln/app.po @@ -9,9 +9,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:46+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Albanian Gheg (http://www.transifex.com/projects/p/alaveteli/language/aln/)\n" "Language: aln\n" "MIME-Version: 1.0\n" @@ -91,9 +91,6 @@ msgstr "" msgid " You will also be emailed updates about the request." msgstr "" -msgid " made by " -msgstr "" - msgid " when you send this message." msgstr "" @@ -283,6 +280,9 @@ msgstr "" msgid "<strong>did not have</strong> the information requested." msgstr "" +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -475,6 +475,12 @@ msgstr "" msgid "Browse all authorities..." msgstr "" +msgid "Browse and search requests" +msgstr "" + +msgid "Browse requests" +msgstr "" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "" @@ -538,9 +544,6 @@ msgstr "" msgid "Change your password on {{site_name}}" msgstr "" -msgid "Change your password {{site_name}}" -msgstr "" - msgid "Charity registration" msgstr "" @@ -715,6 +718,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1374,6 +1380,9 @@ msgstr "" msgid "Make a request" msgstr "" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1875,6 +1884,9 @@ msgstr "" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1887,6 +1899,9 @@ msgstr "" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2112,7 +2127,7 @@ msgstr "" msgid "Respond to request" msgstr "" -msgid "Respond to the FOI request" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" msgstr "" msgid "Respond using the web" @@ -2317,9 +2332,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "" -msgid "Start now »" -msgstr "" - msgid "Start your own blog" msgstr "" @@ -2917,6 +2929,9 @@ msgstr "" msgid "Unable to send follow up message to {{username}}" msgstr "" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "" @@ -2977,9 +2992,6 @@ msgstr "" msgid "User|About me" msgstr "" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "" @@ -2989,9 +3001,6 @@ msgstr "" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "" @@ -3046,18 +3055,12 @@ msgstr "" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "" -msgid "View and search requests" -msgstr "" - msgid "View authorities" msgstr "" msgid "View email" msgstr "" -msgid "View requests" -msgstr "" - msgid "Waiting clarification." msgstr "" diff --git a/locale/app.pot b/locale/app.pot index 21d301c2e..0f81bd168 100644 --- a/locale/app.pot +++ b/locale/app.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: version 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" "PO-Revision-Date: 2011-10-09 01:10+0200\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -88,9 +88,6 @@ msgstr "" msgid " You will also be emailed updates about the request." msgstr "" -msgid " made by " -msgstr "" - msgid " when you send this message." msgstr "" @@ -280,6 +277,9 @@ msgstr "" msgid "<strong>did not have</strong> the information requested." msgstr "" +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -472,6 +472,12 @@ msgstr "" msgid "Browse all authorities..." msgstr "" +msgid "Browse and search requests" +msgstr "" + +msgid "Browse requests" +msgstr "" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "" @@ -535,9 +541,6 @@ msgstr "" msgid "Change your password on {{site_name}}" msgstr "" -msgid "Change your password {{site_name}}" -msgstr "" - msgid "Charity registration" msgstr "" @@ -712,6 +715,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1371,6 +1377,9 @@ msgstr "" msgid "Make a request" msgstr "" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1872,6 +1881,9 @@ msgstr "" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1884,6 +1896,9 @@ msgstr "" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2109,7 +2124,7 @@ msgstr "" msgid "Respond to request" msgstr "" -msgid "Respond to the FOI request" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" msgstr "" msgid "Respond using the web" @@ -2314,9 +2329,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "" -msgid "Start now »" -msgstr "" - msgid "Start your own blog" msgstr "" @@ -2914,6 +2926,9 @@ msgstr "" msgid "Unable to send follow up message to {{username}}" msgstr "" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "" @@ -2974,9 +2989,6 @@ msgstr "" msgid "User|About me" msgstr "" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "" @@ -2986,9 +2998,6 @@ msgstr "" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "" @@ -3043,18 +3052,12 @@ msgstr "" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "" -msgid "View and search requests" -msgstr "" - msgid "View authorities" msgstr "" msgid "View email" msgstr "" -msgid "View requests" -msgstr "" - msgid "Waiting clarification." msgstr "" diff --git a/locale/ar/app.po b/locale/ar/app.po index 28fa4ecc5..a725ee886 100644 --- a/locale/ar/app.po +++ b/locale/ar/app.po @@ -5,6 +5,7 @@ # Translators: # Aladdin El-Haraty <aelharaty@gmail.com>, 2012 # Aladdin El-Haraty <aelharaty@gmail.com>, 2012 +# Aladdin El-Haraty <aelharaty@gmail.com>, 2012 # radhouane fazai <radhouanef@gmail.com>, 2013-2014 # radhouane fazai <radhouanef@gmail.com>, 2013 # radhouane fazai <radhouanef@gmail.com>, 2013 @@ -14,9 +15,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:48+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Arabic (http://www.transifex.com/projects/p/alaveteli/language/ar/)\n" "Language: ar\n" "MIME-Version: 1.0\n" @@ -96,9 +97,6 @@ msgstr " يجري حصولكم على رسالةٍ إلكترونية تتضم msgid " You will also be emailed updates about the request." msgstr "سنمدكم أيضاً برسالةٍ إلكترونية تتضمن مستجدات متعلقة بطلبكم." -msgid " made by " -msgstr "قام به" - msgid " when you send this message." msgstr " عندما تقومون ببعث هذه الرسالة ." @@ -288,6 +286,9 @@ msgstr "<strong>شكر</strong> السلطة العامة أو " msgid "<strong>did not have</strong> the information requested." msgstr "<strong>لم تكن لدينا</strong>المعلومات المطلوبة." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "A <a href=\"{{request_url}}\">المتابعة</a> الى <em>{{request_title}}</em> وقع ارسالها {{public_body_name}} من قبل {{info_request_user}} بتاريخ {{date}}." @@ -480,6 +481,12 @@ msgstr "تصفح <a href='{{url}}'>طلبات اخرى</a>ل '{{public_body_name msgid "Browse all authorities..." msgstr "تصفح كل السلطات " +msgid "Browse and search requests" +msgstr "عرض والبحث عن الطلبات" + +msgid "Browse requests" +msgstr "عرض الطلبات" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "حسب مايمليه القانون ومهما كانت الظروف يجب أن يكون, {{public_body_link}} قد قام بالرد الآن" @@ -543,9 +550,6 @@ msgstr "تغيير كلمة السر" msgid "Change your password on {{site_name}}" msgstr "تغيير كلمة السر على{{site_name}}" -msgid "Change your password {{site_name}}" -msgstr " تغيير كلمة السر {{site_name}}" - msgid "Charity registration" msgstr "تسجيل خيري" @@ -720,6 +724,9 @@ msgstr "سجل الكشف" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1383,6 +1390,9 @@ msgstr "اضف<br/>\\n <strong>لحرية<span>of</span><br/>\\n النفاذ msgid "Make a request" msgstr "قدم مطلبا" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1884,6 +1894,9 @@ msgstr "صورة الحساب|مسودة" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1896,6 +1909,9 @@ msgstr "سلطات عامة - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "السلطات العمومية {{start_count}} الى {{end_count}} من {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2121,8 +2137,8 @@ msgstr "الرد عبر البريد الإلكتروني" msgid "Respond to request" msgstr "الرد على المطلب " -msgid "Respond to the FOI request" -msgstr "رد على مطالب حرية المعلومة " +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "الرد عن طريق الشبكة العنكبوتية " @@ -2334,9 +2350,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "ملاحظة خاصة بهذه السلطة." -msgid "Start now »" -msgstr "ابدأ الان »" - msgid "Start your own blog" msgstr "اطلق مدونتك الخاصة" @@ -2946,6 +2959,9 @@ msgstr "غير قادر على ارسال رد ل {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "غير قادر على بعث رسالة متابعة ل {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "نوع نتيجة البحث غير متوقع " @@ -3006,9 +3022,6 @@ msgstr "" msgid "User|About me" msgstr "مستخدم|معلومات عني" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "مستخدم|مستوى المشرف" @@ -3018,9 +3031,6 @@ msgstr "مستخدم|منع النص" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "المستخدم|البريد الالكتروني" @@ -3075,18 +3085,12 @@ msgstr "رؤية البريد الالكتروني لحرية النفاذ ال msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "الاطلاع على طلبات حرية النفاذ الى المعلومة المقدمة من قبل {{user_name}}:" -msgid "View and search requests" -msgstr "عرض والبحث عن الطلبات" - msgid "View authorities" msgstr "عرض السلطات" msgid "View email" msgstr "عرض البريد الالكتروني" -msgid "View requests" -msgstr "عرض الطلبات" - msgid "Waiting clarification." msgstr "انتظار التوضيحات" diff --git a/locale/bg/app.po b/locale/bg/app.po index 17a1898b8..915fa9e08 100644 --- a/locale/bg/app.po +++ b/locale/bg/app.po @@ -12,9 +12,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-19 10:59+0000\n" -"Last-Translator: Valentin Laskov <laskov@festa.bg>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:46+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Bulgarian (http://www.transifex.com/projects/p/alaveteli/language/bg/)\n" "Language: bg\n" "MIME-Version: 1.0\n" @@ -94,9 +94,6 @@ msgstr " Вие вече получавате имейли с новостите msgid " You will also be emailed updates about the request." msgstr " Вие също ще получавате имейли с новостите относно заявлението." -msgid " made by " -msgstr " направен от " - msgid " when you send this message." msgstr " когато изпратите това съобщение." @@ -286,6 +283,9 @@ msgstr "Да <strong>благодарите</strong> на публичния о msgid "<strong>did not have</strong> the information requested." msgstr "<strong>не са имали</strong> исканата информация." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "<a href=\"{{request_url}}\">Пояснително съобщение</a> към <em>{{request_title}}</em> беше изпратено до {{public_body_name}} от {{info_request_user}} на {{date}}." @@ -478,6 +478,12 @@ msgstr "Разгледайте <a href='{{url}}'>други запитвания msgid "Browse all authorities..." msgstr "Списък на всички органи..." +msgid "Browse and search requests" +msgstr "Преглед и търсене на заявления" + +msgid "Browse requests" +msgstr "Преглед на заявления" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "По закон, при всички обстоятелства, {{public_body_link}} трябваше да отговорят досега" @@ -541,9 +547,6 @@ msgstr "Промяна на паролата Ви" msgid "Change your password on {{site_name}}" msgstr "Промяна на паролата Ви в {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Промяна на паролата Ви {{site_name}}" - msgid "Charity registration" msgstr "Регистрация на фондацията" @@ -718,6 +721,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "Все още нямате акаунт на суперпотребител?" @@ -1377,6 +1383,9 @@ msgstr "Създаване на ново<br/>\\n <strong>Заявление <sp msgid "Make a request" msgstr "Създаване на заявление" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "Направете заявление до тези органи" @@ -1878,6 +1887,9 @@ msgstr "" msgid "Public Bodies" msgstr "Публични органи" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "Статистика за Публичен Огран" @@ -1890,6 +1902,9 @@ msgstr "Публични органи - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Публични органи от {{start_count}} до {{end_count}}, от общо{{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "Публичен орган – {{name}}" @@ -2115,8 +2130,8 @@ msgstr "Отговорете с имейл" msgid "Respond to request" msgstr "Отговаряне на заявлението" -msgid "Respond to the FOI request" -msgstr "Отговор на заявлението за ДдИ" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Отговаряне чрез уеб сайта" @@ -2320,9 +2335,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "Специална забележка за този орган!" -msgid "Start now »" -msgstr "Начало »" - msgid "Start your own blog" msgstr "Започнете собствен блог" @@ -2920,6 +2932,9 @@ msgstr "Не е възможно изпращане на отговор до {{u msgid "Unable to send follow up message to {{username}}" msgstr "Не бе възможно да се изпрати пояснително съобщение до {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Неочакван тип резултат на търсене " @@ -2980,9 +2995,6 @@ msgstr "Нормално потребителите не могат да пра msgid "User|About me" msgstr "" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "" @@ -2992,9 +3004,6 @@ msgstr "" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "" @@ -3049,18 +3058,12 @@ msgstr "Показване ДдИ имейл адрес за {{public_body_name} msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Преглед на Заявленията за Достъп до информация, направени от {{user_name}}:" -msgid "View and search requests" -msgstr "Преглед и търсене на заявления" - msgid "View authorities" msgstr "Преглед на органите" msgid "View email" msgstr "Преглед на имейл" -msgid "View requests" -msgstr "Преглед на заявления" - msgid "Waiting clarification." msgstr "Очаква пояснение." diff --git a/locale/bs/app.po b/locale/bs/app.po index 710d8dc87..8fa7f75e5 100644 --- a/locale/bs/app.po +++ b/locale/bs/app.po @@ -13,9 +13,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:48+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Bosnian (http://www.transifex.com/projects/p/alaveteli/language/bs/)\n" "Language: bs\n" "MIME-Version: 1.0\n" @@ -105,9 +105,6 @@ msgstr " Ažuriranja zahtjeva već su Vam poslana putem e-maila." msgid " You will also be emailed updates about the request." msgstr " Ažuriranja zahtjeva će Vam takođe biti poslana putem e-maila." -msgid " made by " -msgstr " načinjeno od strane " - msgid " when you send this message." msgstr " kada pošaljete ovu poruku." @@ -319,6 +316,9 @@ msgstr "" msgid "<strong>did not have</strong> the information requested." msgstr "<strong>nije sadržavao</strong> traženu informaciju." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -521,6 +521,12 @@ msgstr "Pretražite <a href='{{url}}'>druge zahtjeve</a> za '{{public_body_name} msgid "Browse all authorities..." msgstr "Pretražite sve ustanove" +msgid "Browse and search requests" +msgstr "Pregledaj i pretraži zahtjeve" + +msgid "Browse requests" +msgstr "Vidjeti zahtjeve" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Po zakonu, pod svim uvjetima, {{public_body_link}} je trebala odgovoriti do sada" @@ -584,9 +590,6 @@ msgstr "Promijeniti Vaš password" msgid "Change your password on {{site_name}}" msgstr "Promijeniti password na {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Promjenite Vaš password {{site_name}}" - msgid "Charity registration" msgstr "Registracija nevladine organizacije" @@ -763,6 +766,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1471,6 +1477,9 @@ msgstr "" msgid "Make a request" msgstr "Podnesi zahtjev" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1983,6 +1992,9 @@ msgstr "Slika na profilu|Skica" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1995,6 +2007,9 @@ msgstr "Javne ustanove - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2222,8 +2237,8 @@ msgstr "Odgovoriti e-mailom" msgid "Respond to request" msgstr "Odgovoriti na zahtjev" -msgid "Respond to the FOI request" -msgstr "Odgovoriti na Zahtjev za slobodan pristup informacijama" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Odgovoriti preko web-a" @@ -2435,9 +2450,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "Posebna napomena za ovu ustanovu!" -msgid "Start now »" -msgstr "Počni sada »" - msgid "Start your own blog" msgstr "Započnite Vaš blog" @@ -3069,6 +3081,9 @@ msgstr "Ne možemo poslati poruku za {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "Ne možemo poslati popratnu pokuku za {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "" @@ -3134,9 +3149,6 @@ msgstr "" msgid "User|About me" msgstr "Korisnik|O meni" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "Korisnik|Administratorski nivo" @@ -3146,9 +3158,6 @@ msgstr "Korisnik|tekst isključenja" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "Korisnik|E-mail" @@ -3203,18 +3212,12 @@ msgstr "Pogledati ZOSPI e-mail adrese za {{public_body_name}}" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Pegledati Zahjeve za slobodan pristup informacijama napravljene od strane {{user_name}}:" -msgid "View and search requests" -msgstr "Pregledaj i pretraži zahtjeve" - msgid "View authorities" msgstr "Vidjeti ustanove" msgid "View email" msgstr "Pogledati e-mail" -msgid "View requests" -msgstr "Vidjeti zahtjeve" - msgid "Waiting clarification." msgstr "Čekamo na objašnjenje." diff --git a/locale/ca/app.po b/locale/ca/app.po index e33acf5cd..6f794dfd9 100644 --- a/locale/ca/app.po +++ b/locale/ca/app.po @@ -12,9 +12,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-07-23 14:23+0000\n" -"Last-Translator: David Cabo <david.cabo@gmail.com>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:47+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Catalan (http://www.transifex.com/projects/p/alaveteli/language/ca/)\n" "Language: ca\n" "MIME-Version: 1.0\n" @@ -101,9 +101,6 @@ msgstr " Ja està rebent actualitzacions per correu sobre la sol·licitud." msgid " You will also be emailed updates about the request." msgstr " Rebrà actualitzacions per correu sobre aquesta sol·licitud." -msgid " made by " -msgstr " feta per " - msgid " when you send this message." msgstr " quan enviares aquest missatge." @@ -331,6 +328,9 @@ msgstr "<strong>Dóna les gràcies</strong> a l'organisme públic o " msgid "<strong>did not have</strong> the information requested." msgstr "<strong>no tenia</strong> la informació sol·licitada." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -533,6 +533,12 @@ msgstr "Explora <a href='{{url}}'>otras solicitudes</a> a '{{public_body_name}}' msgid "Browse all authorities..." msgstr "Explore otros organismos públicos..." +msgid "Browse and search requests" +msgstr "Ver y buscar solicitudes" + +msgid "Browse requests" +msgstr "Ver solicitudes" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Por ley, bajo cualquier circunstancia, {{public_body_link}} ya debería haber respondido" @@ -596,9 +602,6 @@ msgstr "Canvia la teva contrassenya" msgid "Change your password on {{site_name}}" msgstr "Canvia la teva contrassenya a {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Canvia la teva contrassenya a {{site_name}}" - msgid "Charity registration" msgstr "Registro de la ONG" @@ -777,6 +780,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1488,6 +1494,9 @@ msgstr "" msgid "Make a request" msgstr "Enviar solicitud" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -2000,6 +2009,9 @@ msgstr "ProfilePhoto|Draft" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -2012,6 +2024,9 @@ msgstr "Organismes públics - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Organismes públics {{start_count}} a {{end_count}} de {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "Organismo público - {{name}}" @@ -2237,8 +2252,8 @@ msgstr "Contestar por correo" msgid "Respond to request" msgstr "Contestar la solicitud" -msgid "Respond to the FOI request" -msgstr "Contestar la solicitud" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Contestar vía web" @@ -2451,9 +2466,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "¡Notas especiales sobre este organismo!" -msgid "Start now »" -msgstr "Comience ahora »" - msgid "Start your own blog" msgstr "Crea tu propio blog" @@ -3094,6 +3106,9 @@ msgstr "No se pudo enviar la respuesta a {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "No se pudo enviar la respuesta a {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Se encontró un tipo de resultado inesperado " @@ -3157,9 +3172,6 @@ msgstr "" msgid "User|About me" msgstr "User|About me" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "User|Admin level" @@ -3169,9 +3181,6 @@ msgstr "User|Ban text" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "User|Email" @@ -3226,18 +3235,12 @@ msgstr "Veure l'adreça de correu de '{{public_body_name}}'" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Ver solicitudes de acceso a información hechas por {{user_name}}:" -msgid "View and search requests" -msgstr "Ver y buscar solicitudes" - msgid "View authorities" msgstr "Ver organismos públicos" msgid "View email" msgstr "Veure el correu" -msgid "View requests" -msgstr "Ver solicitudes" - msgid "Waiting clarification." msgstr "Esperando aclaración." diff --git a/locale/cs/app.po b/locale/cs/app.po index ea9329754..99b1425bf 100644 --- a/locale/cs/app.po +++ b/locale/cs/app.po @@ -9,6 +9,7 @@ # janakneschke <jana.kneschke@gmail.com>, 2013 # janakneschke <jana.kneschke@gmail.com>, 2012-2013 # janakneschke <jana.kneschke@gmail.com>, 2013 +# Jiří Vírava <appukonrad@gmail.com>, 2012 # josefpospisil <josef.pospisil@laststar.eu>, 2012 # josefpospisil <josef.pospisil@laststar.eu>, 2012 # Jiří Vírava <appukonrad@gmail.com>, 2012 @@ -19,9 +20,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-06-12 13:59+0000\n" -"Last-Translator: Hana Huntova <>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:47+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Czech (http://www.transifex.com/projects/p/alaveteli/language/cs/)\n" "Language: cs\n" "MIME-Version: 1.0\n" @@ -105,9 +106,6 @@ msgstr "Aktualizace týkající se tohoto dotazu vám již byly zaslány e-maile msgid " You will also be emailed updates about the request." msgstr " Aktualizace týkající se tohoto dotazu vám budou také zaslány e-mailem." -msgid " made by " -msgstr "vytvořeno" - msgid " when you send this message." msgstr " když tuto zprávu pošlete." @@ -332,6 +330,9 @@ msgstr "<strong>Poděkujte</strong> instituci, nebo" msgid "<strong>did not have</strong> the information requested." msgstr "<strong>neměli</strong> požadované informace." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "<a href=\"{{request_url}}\">Odpověď</a> v konverzaci týkající se <em>{{request_title}}</em> byla odeslána instituci {{public_body_name}} uživatelem {{info_request_user}} dne {{date}}." @@ -532,6 +533,12 @@ msgstr "Přečtěte si <a href='{{url}}'>dříve vznesené dotazy</a> na '{{publ msgid "Browse all authorities..." msgstr "Procházejte všechny instituce" +msgid "Browse and search requests" +msgstr "Prohledávejte a prohlížejte dotazy" + +msgid "Browse requests" +msgstr "Zobrazit dotazy" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Podle zákona by instituce {{public_body_link}} měla v každém případě odpovědět." @@ -595,9 +602,6 @@ msgstr "Změňte své heslo" msgid "Change your password on {{site_name}}" msgstr "Změňte své heslo na stránkách {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Změňte heslo na stránkách {{site_name}}" - msgid "Charity registration" msgstr "Registrace dobročinné společnosti" @@ -782,6 +786,9 @@ msgstr "Disclosure log" msgid "Disclosure log URL" msgstr "Disclosure log URL" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "Nemáte ještě vytvořen \"superuser\" přístup?" @@ -1478,6 +1485,9 @@ msgstr "" msgid "Make a request" msgstr "Vzneste dotaz" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "Vzneste dotaz na tyto instituce" @@ -1986,6 +1996,9 @@ msgstr "Profilové foto | Koncept" msgid "Public Bodies" msgstr "Veřejné instituce" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "Statistika veřejných institucí" @@ -1998,6 +2011,9 @@ msgstr "Veřejná instituce - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Instituce od {{start_count}} do {{end_count}} z {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "Veřejná instituce – {{name}}" @@ -2225,8 +2241,8 @@ msgstr "Odpovězte e-mailem" msgid "Respond to request" msgstr "Odpovědět na dotaz" -msgid "Respond to the FOI request" -msgstr "Odpovědět na dotaz" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Odpovězte na internetových stránkách" @@ -2440,9 +2456,6 @@ msgstr "SpamAdresa|Email" msgid "Special note for this authority!" msgstr "Speciální poznámka k této instituci!" -msgid "Start now »" -msgstr "Začněte zde »" - msgid "Start your own blog" msgstr "Začněte psát vlastní blg" @@ -3074,6 +3087,9 @@ msgstr "Nelze poslat odpověď uživateli {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "Nelze poslat odpověď uživateli {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Neočekávané výsledky vyhledávání " @@ -3137,9 +3153,6 @@ msgstr "Uživatelé nemohou obvykle vznášet hromadné dotazy na více instituc msgid "User|About me" msgstr "User | O mně" -msgid "User|Address" -msgstr "Uživatel|Adresa" - msgid "User|Admin level" msgstr "User | Úroveň admin" @@ -3149,9 +3162,6 @@ msgstr "User | Zakázat text" msgid "User|Can make batch requests" msgstr "Uživatel|Může vznášet hromadné dotazy" -msgid "User|Dob" -msgstr "Uživatel|Dob" - msgid "User|Email" msgstr "User | E-mail" @@ -3206,18 +3216,12 @@ msgstr "Zobrazit e-mailovou adresu pro dotazy vznesené na {{public_body_name}}" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Prohlédněte si dotazy vznesené uživatelem {{user_name}}:" -msgid "View and search requests" -msgstr "Prohledávejte a prohlížejte dotazy" - msgid "View authorities" msgstr "Zobrazit instituce" msgid "View email" msgstr "Zobrazit e-mail" -msgid "View requests" -msgstr "Zobrazit dotazy" - msgid "Waiting clarification." msgstr "Čeká se na vysvětlení. " diff --git a/locale/cy/app.po b/locale/cy/app.po index 95163f107..d52f342fb 100644 --- a/locale/cy/app.po +++ b/locale/cy/app.po @@ -12,6 +12,7 @@ # Huw Waters <huwwaters@gmail.com>, 2013 # hywelm <hywelm.jones@talk21.com>, 2013 # hywelm <hywelm.jones@talk21.com>, 2013 +# hywelm <hywelm.jones@talk21.com>, 2013 # louisecrow <louise@mysociety.org>, 2013 # louisecrow <louise@mysociety.org>, 2013-2014 # PerryX <wyeboy@gmail.com>, 2013 @@ -20,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-08-12 11:36+0000\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-28 14:21+0000\n" "Last-Translator: louisecrow <louise@mysociety.org>\n" "Language-Team: Welsh (http://www.transifex.com/projects/p/alaveteli/language/cy/)\n" "Language: cy\n" @@ -61,7 +62,7 @@ msgid " <strong>Privacy note:</strong> Your email address will be given to" msgstr " <strong>Nodyn Preifatrwydd:</strong> Bydd eich cyfeiriad e-bost yn cael ei roi i" msgid " <strong>Summarise</strong> the content of any information returned. " -msgstr " <strong>Crynhoi</strong> cynnwys unrhyw wybodaeth a gafwyd. " +msgstr " <strong>Crynhowch</strong> gynnwys unrhyw wybodaeth a gafwyd. " msgid " > " msgstr " > " @@ -70,7 +71,7 @@ msgid " >> " msgstr " >> " msgid " Advise on how to <strong>best clarify</strong> the request." -msgstr " Rhoi cyngor ar sut <strong>orau i egluro</strong> y cais." +msgstr " Rhowch gyngor ar sut <strong>orau i egluro</strong> y cais." msgid " Ideas on what <strong>other documents to request</strong> which the authority may hold. " msgstr " Syniadau ar ba <strong>ddogfennau eraill i ofyn amdanynt</strong> y gall yr awdurdod fod yn eu cadw. " @@ -79,7 +80,7 @@ msgid " If you know the address to use, then please <a href=\"{{url}}\">send it msgstr " Os ydych yn gwybod pa gyfeiriad i'w ddefnyddio, yna os gwelwch yn dda <a href=\"{{url}}\">anfonwch ef atom</a>. Efallai y byddwch yn gallu dod o hyd i'r cyfeiriad ar eu gwefan, neu drwy eu ffonio nhw a gofyn." msgid " Include relevant links, such as to a campaign page, your blog or a\\n twitter account. They will be made clickable. \\n e.g." -msgstr " Cynhwyswch gysylltiadau perthnasol, megis i dudalen yr ymgyrch, eich blog neu gyfrif Twitter. Byddant yn cael eu gwneud cliciadwy. ee" +msgstr " Cynhwyswch gysylltiadau perthnasol, megis i dudalen yr ymgyrch, eich blog neu gyfrif Twitter. Byddant yn cael eu gwneud yn gliciadwy. ee" msgid " Link to the information requested, if it is <strong>already available</strong> on the Internet. " msgstr " Rhowch ddolen at yr wybodaeth y gofynnwyd amdani, <strong>os yw ar gael yn barod</strong> ar y Rhyngrwyd. " @@ -102,14 +103,11 @@ msgstr "Rydych chi eisoes yn derbyn diweddariadau am y cais drwy ebost." msgid " You will also be emailed updates about the request." msgstr "Byddwch chi'n derbyn diweddariadau am y cais drwy ebost hefyd." -msgid " made by " -msgstr " a wnaed gan " - msgid " when you send this message." msgstr " pan fyddwch chi'n anfon y neges hon" msgid "'Crime statistics by ward level for Wales'" -msgstr "'Ystadegau troseddu yn ôl lefel ardal etholiadol ar gyfer Cymru'" +msgstr "'Ystadegau troseddu ar lefel ward ar gyfer Cymru'" msgid "'Pollution levels over time for the River Tyne'" msgstr "'Lefelau llygredd dros amser ar gyfer Afon Tyne'" @@ -294,6 +292,9 @@ msgstr "<strong>Diolch</strong> i'r awdurdod cyhoeddus neu" msgid "<strong>did not have</strong> the information requested." msgstr "Nid oedd gan y wybodaeth y gofynnwyd amdani." +msgid "?" +msgstr "?" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "Mae <a href=\"{{request_url}}\">cais dilynol</a> i <em>{{request_title}}</em> wedi ei anfon i {{public_body_name}} gan {{info_request_user}} ar {{date}}." @@ -472,7 +473,7 @@ msgid "Awaiting response." msgstr "Yn aros am ymateb." msgid "Batch created by {{info_request_user}} on {{date}}." -msgstr "" +msgstr "Swp a grëwyd gan {{info_request_user}} ar {{date}}." msgid "Beginning with" msgstr "Yn dechrau gyda" @@ -486,6 +487,12 @@ msgstr "Porwch <a href='{{url}}'>geisiadau eraill</a> i '{{public_body_name}}' a msgid "Browse all authorities..." msgstr "Mwy o awdurdodau..." +msgid "Browse and search requests" +msgstr "Gweld a chwilio ceisiadau" + +msgid "Browse requests" +msgstr "Gweld ceisiadau" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Yn ôl y gyfraith, ym mhob amgylchiad, dylai {{public_body_link}} fod wedi ymateb erbyn hyn." @@ -549,9 +556,6 @@ msgstr "Newid eich cyfrinair" msgid "Change your password on {{site_name}}" msgstr "Newid eich cyfrinair ar {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Newid eich cyfrinair {{site_name}}" - msgid "Charity registration" msgstr "Elusen gofrestredig" @@ -571,7 +575,7 @@ msgid "Clarification" msgstr "Eglurhad" msgid "Clarification sent to {{public_body_name}} by {{info_request_user}} on {{date}}." -msgstr "" +msgstr "Eglurhad a anfonwyd at {{public_body_name}} gan {{info_request_user}} ar {{date}}." msgid "Clarify your FOI request - " msgstr "Eglurwch eich cais Rhyddid Gwybodaeth - " @@ -726,8 +730,11 @@ msgstr "Log datgelu" msgid "Disclosure log URL" msgstr "URL log datgelu" +msgid "Do not fill in this field" +msgstr "Peidiwch â llenwi'r maes hwn" + msgid "Don't have a superuser account yet?" -msgstr "" +msgstr "Heb gyfrif defnyddiwr uwch eto?" msgid "Don't want to address your message to {{person_or_body}}? You can also write to:" msgstr "Ddim eisiau cyfeirio'ch neges i {{person_or_body}}? Gallwch hefyd ysgrifennu at:" @@ -913,7 +920,7 @@ msgid "Follow up messages to existing requests are sent to " msgstr "Anfonir negeseuon dilynol i geisiadau presennol at " msgid "Follow up sent to {{public_body_name}} by {{info_request_user}} on {{date}}." -msgstr "" +msgstr "Dilynol a anfonwyd at {{public_body_name}} gan {{info_request_user}} ar {{date}}." #. "Follow ups" in this context means further #. messages sent by the requester to the authority after @@ -1001,7 +1008,7 @@ msgid "Hello! We have an <a href=\"{{url}}\">important message</a> for visitors msgstr "Helo! Mae gennym <a href=\"{{url}}\">neges bwysig</a> i ymwelwyr y tu allan i {{country_name}}" msgid "Hello! We have an <a href=\"{{url}}\">important message</a> for visitors in other countries" -msgstr "" +msgstr "Helo! Mae gennym neges bwysig href=\"{{url}}\"> <a </a> i ymwelwyr mewn gwledydd eraill" msgid "Hello! You can make Freedom of Information requests within {{country_name}} at {{link_to_website}}" msgstr "Helo! Rydych chi'n gallu gwneud ceisiadau Rhyddid Gwybodaeth o fewn {{country_name}} yma:{{link_to_website}}" @@ -1205,19 +1212,19 @@ msgid "Info request" msgstr "Cais Gwybodaeth" msgid "Info request batch" -msgstr "" +msgstr "Info cais swp" msgid "Info request event" msgstr "Digwyddiad Cais Gwybodaeth" msgid "InfoRequestBatch|Body" -msgstr "" +msgstr "InfoRequestBatch | Corff" msgid "InfoRequestBatch|Sent at" -msgstr "" +msgstr "InfoRequestBatch | Anfonwyd yn" msgid "InfoRequestBatch|Title" -msgstr "" +msgstr "InfoRequestBatch | Teitl" msgid "InfoRequestEvent|Calculated state" msgstr "InfoRequestEvent|Cyflwr a gyfrifwyd" @@ -1283,7 +1290,7 @@ msgid "Internal review request" msgstr "Cais am adolygiad mewnol" msgid "Internal review request sent to {{public_body_name}} by {{info_request_user}} on {{date}}." -msgstr "" +msgstr "Cais am adolygiad mewnol a anfonwyd at {{public_body_name}} gan {{info_request_user}} ar {{date}}." msgid "Is {{email_address}} the wrong address for {{type_of_request}} requests to {{public_body_name}}? If so, please contact us using this form:" msgstr "A yw {{email_address}} y cyfeiriad anghywir ar gyfer ceisiadau {{type_of_request}} i {{public_body_name}}? Os felly, cysylltwch â ni gan ddefnyddio'r ffurflen hon:" @@ -1373,13 +1380,13 @@ msgid "MailServerLog|Order" msgstr "MailServerLog|Archeb" msgid "Make a batch request" -msgstr "" +msgstr "Gwneud cais swp" msgid "Make a new EIR request" -msgstr "" +msgstr "Gwneud cais EIR newydd" msgid "Make a new FOI request" -msgstr "" +msgstr "Gwneud cais Rhyddid Gwybodaeth newydd" msgid "Make a new<br/>\\n <strong>Freedom <span>of</span><br/>\\n Information<br/>\\n request</strong>" msgstr "Gwnewch <strong>Cais<br/>Rhyddid<br/>Gwybodaeth</strong><br/>newydd" @@ -1387,6 +1394,9 @@ msgstr "Gwnewch <strong>Cais<br/>Rhyddid<br/>Gwybodaeth</strong><br/>newydd" msgid "Make a request" msgstr "Gwneud cais" +msgid "Make a request »" +msgstr "Gwneud cais »" + msgid "Make a request to these authorities" msgstr "Gwneud cais i'r awdurdodau hyn" @@ -1526,7 +1536,7 @@ msgid "Notes:" msgstr "Nodiadau:" msgid "Now check your email!" -msgstr "Nawr sieciwch eich ebost!" +msgstr "Nawr edrychwch yn eich ebost!" msgid "Now preview your annotation" msgstr "Nawr rhagolygwch eich anodi" @@ -1583,7 +1593,7 @@ msgid "Only the authority can reply to this request, but there is no \"From\" ad msgstr "Dim ond yr awdurdod a all ymateb i'r cais hwn, ond nid oes cyfeiriad \"O\" i wirio yn ei erbyn" msgid "Or make a <a href=\"{{url}}\">batch request</a> to <strong>multiple authorities</strong> at once." -msgstr "" +msgstr "Neu wneud <a href=\"{{url}}\"> swp </a> cais i <strong> lluosog awdurdodau </ strong> ar unwaith." msgid "Or search in their website for this information." msgstr "Neu chwilio yn eu gwefan am y wybodaeth hon." @@ -1850,7 +1860,7 @@ msgid "Powered by <a href=\"http://www.alaveteli.org/\">Alaveteli</a>" msgstr "Wedi ei yrru gan <a href=\"http://www.alaveteli.org/\">Alaveteli</a>" msgid "Prefer not to receive emails?" -msgstr "" +msgstr "Well gen i beidio â derbyn negeseuon e-bost?" msgid "Prev" msgstr "Blaenorol" @@ -1888,6 +1898,9 @@ msgstr "ProfilePhoto|Drafft" msgid "Public Bodies" msgstr "Cyrff Cyhoeddus" +msgid "Public Body" +msgstr "Corff Cyhoeddus" + msgid "Public Body Statistics" msgstr "Ystadegau Cyrff Cyhoeddus" @@ -1900,6 +1913,9 @@ msgstr "Awdurdodau cyhoeddus - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Awdurdodau cyhoeddus {{start_count}} i {{end_count}} o {{total_count}}" +msgid "Public authority statistics" +msgstr "Ystadegau awdurdodau cyhoeddus" + msgid "Public authority – {{name}}" msgstr "Awdurdod cyhoeddus – {{name}}" @@ -1922,7 +1938,7 @@ msgid "Public body" msgstr "Corff cyhoeddus" msgid "Public body change request" -msgstr "" +msgstr "Cais am newid y corff cyhoeddus" msgid "Public notes" msgstr "Nodiadau cyhoeddus" @@ -1934,25 +1950,25 @@ msgid "Public page not available" msgstr "Tudalen gyhoeddus ddim ar gael" msgid "PublicBodyChangeRequest|Is open" -msgstr "" +msgstr "PublicBodyChangeRequest | Yn agored" msgid "PublicBodyChangeRequest|Notes" -msgstr "" +msgstr "PublicBodyChangeRequest |Nodiadau" msgid "PublicBodyChangeRequest|Public body email" -msgstr "" +msgstr "PublicBodyChangeRequest |ebost Corff cyhoeddus" msgid "PublicBodyChangeRequest|Public body name" -msgstr "" +msgstr "PublicBodyChangeRequest |Enw Corff cyhoeddus" msgid "PublicBodyChangeRequest|Source url" -msgstr "" +msgstr "PublicBodyChangeRequest |url Ffynhonnell" msgid "PublicBodyChangeRequest|User email" -msgstr "" +msgstr "PublicBodyChangeRequest |ebost Defnyddiwr" msgid "PublicBodyChangeRequest|User name" -msgstr "" +msgstr "PublicBodyChangeRequest |Enw Defnyddiwr" msgid "PublicBody|Api key" msgstr "PublicBody|Allwedd api" @@ -2069,7 +2085,7 @@ msgid "Reported for administrator attention." msgstr "Adroddwyd am sylw gweinyddwr." msgid "Reporting a request notifies the site administrators. They will respond as soon as possible." -msgstr "" +msgstr "Rhoi gwybod cais hysbysu'r gweinyddwyr safle. Byddant yn ymateb cyn gynted ag y bo modd." msgid "Request an internal review" msgstr "Gofyn am adolygiad mewnol" @@ -2125,8 +2141,8 @@ msgstr "Ymateb drwy e-bost" msgid "Respond to request" msgstr "Ymateb i gais" -msgid "Respond to the FOI request" -msgstr "Ymateb i'r cais Rhyddid Gwybodaeth" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "Ymateb i'r cais rhyddid gwybodaeth '{{cais}}' a wnaed gan {{defnyddiwr}}" msgid "Respond using the web" msgstr "Ymateb trwy ddefnyddio'r we" @@ -2135,7 +2151,7 @@ msgid "Response" msgstr "Ymateb" msgid "Response by {{public_body_name}} to {{info_request_user}} on {{date}}." -msgstr "" +msgstr "Ymateb gan {{public_body_name}} i {{info_request_user}} ar {{date}}." msgid "Response from a public authority" msgstr "Ymateb gan awdurdod cyhoeddus" @@ -2326,17 +2342,14 @@ msgid "Source:" msgstr "Ffynhonell:" msgid "Spam address" -msgstr "" +msgstr "Cyfeiriad sbam" msgid "SpamAddress|Email" -msgstr "" +msgstr "SpamAddress |Ebost" msgid "Special note for this authority!" msgstr "Nodyn arbennig ar gyfer yr awdurdod hwn!" -msgid "Start now »" -msgstr "Dechrau nawr »" - msgid "Start your own blog" msgstr "Dechreuwch eich blog eich hun" @@ -2554,7 +2567,7 @@ msgid "Then you can log into the administrative interface" msgstr "Yna gallwch logio i mewn i'r rhyngwyneb gweinyddol" msgid "Then you can make a batch request" -msgstr "" +msgstr "Yna gallwch wneud cais swp" msgid "Then you can play the request categorisation game." msgstr "Yna gallwch chi chwarae y gêm categoreiddio cais." @@ -2845,7 +2858,7 @@ msgid "To log into the administrative interface" msgstr "I fewngofnodi i'r rhyngwyneb gweinyddol" msgid "To make a batch request" -msgstr "" +msgstr "I wneud cais swp" msgid "To play the request categorisation game" msgstr "I chwarae'r gêm categoreiddio cais" @@ -2929,7 +2942,7 @@ msgid "URL name can't be blank" msgstr "Ni all enw URL fod yn wag" msgid "URL name is already taken" -msgstr "" +msgstr "Enw URL eisoes yn cael eu cymryd" msgid "Unable to change email address on {{site_name}}" msgstr "Yn methu newid cyfeiriad e-bost ar {{site_name}}" @@ -2940,6 +2953,9 @@ msgstr "Yn methu anfon ateb i {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "Yn methu anfon neges ddilynol i {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "Nid yw ceisiadau di-ddosbarth neu cudd yn cael eu cyfrif." + msgid "Unexpected search result type " msgstr "Canlyniad chwiliad o fath annisgwyl " @@ -2995,14 +3011,11 @@ msgid "UserInfoRequestSentAlert|Alert type" msgstr "UserInfoRequestSentAlert|Math o rybudd" msgid "Users cannot usually make batch requests to multiple authorities at once because we don’t want public authorities to be bombarded with large numbers of inappropriate requests. Please <a href=\"{{url}}\">contact us</a> if you think you have good reason to send the same request to multiple authorities at once." -msgstr "" +msgstr "Ni all defnyddwyr fel arfer wneud ceisiadau swp i awdurdodau lluosog yr un pryd oherwydd nad ydym am i awdurdodau cyhoeddus gael eu peledu â niferoedd mawr o geisiadau amhriodol. Cysylltwch <a href=\"{{url}}\">â ni</a> os ydych yn meddwl bod gennych reswm da i anfon yr un cais i lawer o awdurdodau lluosog ar yr un pryd." msgid "User|About me" msgstr "User|Amdanaf i" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "User|Lefel weinyddu" @@ -3010,10 +3023,7 @@ msgid "User|Ban text" msgstr "User|Gwahardd testun" msgid "User|Can make batch requests" -msgstr "" - -msgid "User|Dob" -msgstr "" +msgstr "Defnyddiwr | A all wneud ceisiadau swp" msgid "User|Email" msgstr "User|E-bost" @@ -3055,7 +3065,7 @@ msgid "Version {{version}}" msgstr "Fersiwn {{version}}" msgid "Vexatious" -msgstr "" +msgstr "Blinderus" msgid "View FOI email address" msgstr "Gweld cyfeiriad e-bost i gais Rhyddid Gwybodaeth " @@ -3069,18 +3079,12 @@ msgstr "Gweld cyfeiriad e-bost Rhyddid Gwybodaeth ar gyfer '{{public_body_name}} msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Gweld ceisiadau Rhyddid Gwybodaeth a wnaed gan {{user_name}}:" -msgid "View and search requests" -msgstr "Gweld a chwilio ceisiadau" - msgid "View authorities" msgstr "Gweld yr awdurdodau" msgid "View email" msgstr "Gweld e-bost" -msgid "View requests" -msgstr "Gweld ceisiadau" - msgid "Waiting clarification." msgstr "Yn disgwyl eglurhad." @@ -3190,7 +3194,7 @@ msgid "You" msgstr "Chi" msgid "You already created the same batch of requests on {{date}}. You can either view the <a href=\"{{existing_batch}}\">existing batch</a>, or edit the details below to make a new but similar batch of requests." -msgstr "" +msgstr "Creuoch yr un swp o geisiadau ar {{date}}. Gallwch naill ai weld y <a href=\"{{existing_batch}}\"> </a> swp presennol, neu newid y manylion isod i wneud swp newydd ond tebyg o geisiadau." msgid "You are already following new requests" msgstr "Rydych eisoes yn dilyn ceisiadau newydd" @@ -3208,22 +3212,22 @@ msgid "You are already following this request" msgstr "Rydych eisoes yn dilyn cais hwn" msgid "You are already subscribed to '{{link_to_authority}}', a public authority." -msgstr "" +msgstr "Yr ydych eisoes yn tanysgrifio i '{{link_to_authority}}', awdurdod cyhoeddus." msgid "You are already subscribed to '{{link_to_request}}', a request." -msgstr "" +msgstr "Yr ydych eisoes yn tanysgrifio i '{{link_to_request}}', cais." msgid "You are already subscribed to '{{link_to_user}}', a person." -msgstr "" +msgstr "Yr ydych eisoes yn tanysgrifio i '{{link_to_user}}', person." msgid "You are already subscribed to <a href=\"{{search_url}}\">this search</a>." -msgstr "" +msgstr "Yr ydych eisoes yn tanysgrifio i'r chwiliad <a href=\"{{search_url}}\"> hwn </a>." msgid "You are already subscribed to any <a href=\"{{new_requests_url}}\">new requests</a>." -msgstr "" +msgstr "Yr ydych eisoes yn tanysgrifio i unrhyw <a href=\"{{new_requests_url}}\"> geisiadau newydd </a>." msgid "You are already subscribed to any <a href=\"{{successful_requests_url}}\">successful requests</a>." -msgstr "" +msgstr "Yr ydych eisoes yn tanysgrifio i unrhyw <a href=\"{{successful_requests_url}}\"> geisiadau llwyddiannus </a>." msgid "You are currently receiving notification of new activity on your wall by email." msgstr "Ar hyn o bryd yr ydych yn derbyn hysbysiad o weithgarwch newydd ar eich wal drwy e-bost." @@ -3232,40 +3236,40 @@ msgid "You are following all new successful responses" msgstr "Rydych yn dilyn yr holl ymatebion llwyddiannus newydd " msgid "You are no longer following '{{link_to_authority}}', a public authority." -msgstr "" +msgstr "Dydych chi ddim bellach yn dilyn '{{link_to_authority}}', awdurdod cyhoeddus." msgid "You are no longer following '{{link_to_request}}', a request." -msgstr "" +msgstr "Dydych chi ddim bellach yn dilyn '{{link_to_request}}', cais." msgid "You are no longer following '{{link_to_user}}', a person." -msgstr "" +msgstr "Dydych chi ddim bellach yn dilyn '{{link_to_user}}', person." msgid "You are no longer following <a href=\"{{new_requests_url}}\">new requests</a>." -msgstr "" +msgstr "Dydych chi ddim bellach yn dilyn <a href=\"{{new_requests_url}}\"> ceisiadau newydd </a>." msgid "You are no longer following <a href=\"{{search_url}}\">this search</a>." -msgstr "" +msgstr "Dydych chi ddim bellach yn dilyn <a href=\"{{search_url}}\">y chwiliad hwn</a>." msgid "You are no longer following <a href=\"{{successful_requests_url}}\">successful requests</a>." -msgstr "" +msgstr "Dydych chi ddim bellach yn dilyn <a href=\"{{successful_requests_url}}\">ceisiadau llwyddiannus</a>." msgid "You are now <a href=\"{{wall_url_user}}\">following</a> updates about '{{link_to_authority}}', a public authority." -msgstr "" +msgstr "Rydych yn awr <a href=\"{{wall_url_user}}\">yn dilyn</a> diweddariadau am '{{link_to_authority}}', awdurdod cyhoeddus." msgid "You are now <a href=\"{{wall_url_user}}\">following</a> updates about '{{link_to_request}}', a request." -msgstr "" +msgstr "Rydych yn awr <a href=\"{{wall_url_user}}\">yn dilyn diweddariadau am </a> '{{link_to_request}}', cais." msgid "You are now <a href=\"{{wall_url_user}}\">following</a> updates about '{{link_to_user}}', a person." -msgstr "" +msgstr "Rydych yn awr <a href=\"{{wall_url_user}}\">yn dilyn</a> diweddariadau am '{{link_to_user}}', person." msgid "You are now <a href=\"{{wall_url_user}}\">following</a> updates about <a href=\"{{new_requests_url}}\">new requests</a>." -msgstr "" +msgstr "Rydych yn awr <a href=\"{{wall_url_user}}\">yn dilyn diweddariadau am</a> am <a href=\"{{new_requests_url}}\"> geisiadau newydd</a>." msgid "You are now <a href=\"{{wall_url_user}}\">following</a> updates about <a href=\"{{search_url}}\">this search</a>." -msgstr "" +msgstr "Rydych yn awr <a href=\"{{wall_url_user}}\">yn dilyn</a> diweddariadau am<a href=\"{{search_url}}\">y chwiliad hwn</a>." msgid "You are now <a href=\"{{wall_url_user}}\">following</a> updates about <a href=\"{{successful_requests_url}}\">successful requests</a>." -msgstr "" +msgstr "Rydych yn awr <a href=\"{{wall_url_user}}\">yn dilyn</a> diweddariadau am <a href=\"{{successful_requests_url}}\"> geisiadau llwyddiannus</a>." msgid "You can <strong>complain</strong> by" msgstr "Gallwch <strong>gwyno</strong> drwy" @@ -3307,7 +3311,7 @@ msgid "You may <strong>include attachments</strong>. If you would like to attach msgstr "Gallwch <strong>gynnwys atodiadau</ strong>. Os hoffech chi atodi ffeil sy'n rhy fawr ar gyfer e-bost, defnyddiwch y ffurflen isod." msgid "You may be able to find one on their website, or by phoning them up and asking. If you manage to find one, then please send it to us:" -msgstr "" +msgstr "Efallai y byddwch yn gallu dod o hyd i un ar eu gwefan, neu drwy ffonio nhw i fyny ac yn gofyn. Os ydych yn llwyddo i ddod o hyd i un, yna anfonwch hi atom:" msgid "You may be able to find\\n one on their website, or by phoning them up and asking. If you manage\\n to find one, then please <a href=\"{{url}}\">send it to us</a>." msgstr "Efallai y byddwch yn gallu dod o hyd i un ar eu gwefan, neu drwy eu ffonio nhw a gofyn. Os llwyddwch i ddod o hyd i un, <a href=\"{{url}}\"> anfonwch e atom</a>." @@ -3346,22 +3350,22 @@ msgid "You will no longer be emailed updates for those alerts" msgstr "Ni fydd diweddariadau am y rhybuddion hynny'n cael eu e-bostio atoch mwyach " msgid "You will now be emailed updates about '{{link_to_authority}}', a public authority." -msgstr "" +msgstr "Byddwch yn awr yn derbyn diweddariadau e-bost am '{{link_to_authority}}', awdurdod cyhoeddus." msgid "You will now be emailed updates about '{{link_to_request}}', a request." -msgstr "" +msgstr "Byddwch yn awr yn derbyn diweddariadau e-bost am '{{link_to_request}}', cais." msgid "You will now be emailed updates about '{{link_to_user}}', a person." -msgstr "" +msgstr "Byddwch yn awr yn derbyn diweddariadau e-bost am '{{link_to_user}}', person." msgid "You will now be emailed updates about <a href=\"{{search_url}}\">this search</a>." -msgstr "" +msgstr "Byddwch yn awr yn derbyn diweddariadau e-bost am <a href=\"{{search_url}}\">y chwiliad hwn</a>." msgid "You will now be emailed updates about <a href=\"{{successful_requests_url}}\">successful requests</a>." -msgstr "" +msgstr "Byddwch yn awr yn derbyn diweddariadau e-bost am <a href=\"{{successful_requests_url}}\">geisiadau llwyddiannus</a>." msgid "You will now be emailed updates about any <a href=\"{{new_requests_url}}\">new requests</a>." -msgstr "" +msgstr "Byddwch yn awr yn derbyn diweddariadau e-bost am unrhyw <a href=\"{{new_requests_url}}\">geisiadau newydd</a>." msgid "You will only get an answer to your request if you follow up\\nwith the clarification." msgstr "Byddwch ond yn cael ateb i'ch cais os byddwch yn ymateb gyda'r eglurhad." @@ -3388,7 +3392,7 @@ msgid "Your annotations" msgstr "Eich anodiadau" msgid "Your batch request \"{{title}}\" has been sent" -msgstr "" +msgstr "Mae eich cais swp {{title}} wedi ei yrru" msgid "Your details, including your email address, have not been given to anyone." msgstr "Nid yw eich manylion, gan gynnwys eich cyfeiriad e-bost, wedi cael eu rhoi i neb." @@ -3493,10 +3497,10 @@ msgstr[3] "Eich {{count}} anodiad" msgid "Your {{count}} batch requests" msgid_plural "Your {{count}} batch requests" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" -msgstr[3] "" +msgstr[0] "Eich {{count}} swp o geisiadau" +msgstr[1] "Eich {{count}} swp o geisiadau" +msgstr[2] "Eich {{count}} swp o geisiadau" +msgstr[3] "Eich {{count}} swp o geisiadau" msgid "Your {{site_name}} email alert" msgstr "Rhybudd e-bost {{site_name}} i chi" @@ -3538,10 +3542,10 @@ msgid "all requests" msgstr "pob cais" msgid "all requests or comments" -msgstr "" +msgstr "pob cais neu sylwadau" msgid "all requests or comments matching text '{{query}}'" -msgstr "" +msgstr "pob cais neu sylw sy'n matsio testun '{{ymholiad}}'" msgid "also called {{public_body_short_name}}" msgstr "a elwir hefyd yn {{public_body_short_name}} " @@ -3562,7 +3566,7 @@ msgid "and we'll suggest <strong>what to do next</strong>" msgstr "a byddwn yn awgrymu <strong>beth i'w wneud nesaf</strong>" msgid "anything matching text '{{query}}'" -msgstr "" +msgstr "testun yn cyfateb unrhyw beth '{{ymholiad}}'" msgid "are long overdue." msgstr "yn ddyledus ers tro" @@ -3661,7 +3665,7 @@ msgid "move..." msgstr "symud ..." msgid "new requests" -msgstr "" +msgstr "ceisiadau newydd" msgid "no later than" msgstr "heb fod yn hwyrach na" @@ -3685,10 +3689,10 @@ msgid "requests" msgstr "ceisiadau" msgid "requests which are successful" -msgstr "" +msgstr "ceisiadau sy'n llwyddiannus" msgid "requests which are successful matching text '{{query}}'" -msgstr "" +msgstr "ceisiadau sy'n destun paru llwyddiannus '{{ymholiad}}'" msgid "response as needing administrator attention. Take a look, and reply to this\\nemail to let them know what you are going to do about it." msgstr "ymateb sydd angen sylw gweinyddwr. Cymerwch olwg, ac ymatebwch i'r e-bost hwn i roi gwybod iddynt beth yr ydych yn mynd i'w wneud am y peth." @@ -3802,7 +3806,7 @@ msgid "{{existing_request_user}} already\\n created the same request on {{d msgstr "Creodd {{existing_request_user}} yr un cais eisoes ar {{date}}. Gallwch naill ai weld y <a href=\"{{existing_request}}\">cais presennol</a>, neu newid y manylion isod i wneud cais newydd ond tebyg." msgid "{{foi_law}} requests to '{{public_body_name}}'" -msgstr "" +msgstr "{{foi_law}} yn gofyn i '{{public_body_name}}'" msgid "{{info_request_user_name}} only:" msgstr "{{info_request_user_name}} yn unig:" @@ -3859,7 +3863,7 @@ msgid "{{title}} - a Freedom of Information request to {{public_body}}" msgstr "{{title}} - cais Rhyddid Gwybodaeth i {{public_body}} " msgid "{{title}} - a batch request" -msgstr "" +msgstr "{{Title}} - cais swp" msgid "{{user_name}} (Account suspended)" msgstr "{{user_name}} (Ataliwyd y cyfrif)" diff --git a/locale/de/app.po b/locale/de/app.po index 6ef110223..de1a77f22 100644 --- a/locale/de/app.po +++ b/locale/de/app.po @@ -8,14 +8,15 @@ # KerstiRu <kersti@access-info.org>, 2011 # KerstiRu <kersti@access-info.org>, 2011 # louisecrow <louise@mysociety.org>, 2014 +# louisecrow <louise@mysociety.org>, 2014 # stefanw <stefanwehrmeyer@gmail.com>, 2011 msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-28 15:17+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:47+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: German (http://www.transifex.com/projects/p/alaveteli/language/de/)\n" "Language: de\n" "MIME-Version: 1.0\n" @@ -97,9 +98,6 @@ msgstr "Sie haben bereits Aktualisierungen zu dieser Anfrage per Email erhalten. msgid " You will also be emailed updates about the request." msgstr "Aktualisierungen zu dieser Anfrage werden Ihnen auch per Email übermittelt. " -msgid " made by " -msgstr "erstellt durch" - msgid " when you send this message." msgstr "wenn Sie diese Nachricht senden. " @@ -313,6 +311,9 @@ msgstr "<strong>Danken Sie</strong> der Behörde oder " msgid "<strong>did not have</strong> the information requested." msgstr "Die angefragten Informationen waren <strong>nicht vorhanden</strong>." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -509,6 +510,12 @@ msgstr "Schauen Sie <a href='{{url}}'>andere Anfragen</a> an '{{public_body_name msgid "Browse all authorities..." msgstr "Durchsuchen Sie alle Behörden" +msgid "Browse and search requests" +msgstr "Ansehen und Suchen von Anfragen" + +msgid "Browse requests" +msgstr "Anfragen ansehen" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Nach gesetzlicher Vorschrift sollte {{public_body_link}} Ihnen inzwischen unter allen Umständen geantwortet haben. " @@ -572,9 +579,6 @@ msgstr "Passwort ändern" msgid "Change your password on {{site_name}}" msgstr "Ändern Sie Ihr Passwort: {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Passwort ändern{{site_name}}" - msgid "Charity registration" msgstr "Charity Registrierung" @@ -751,6 +755,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1428,6 +1435,9 @@ msgstr "" msgid "Make a request" msgstr "Anfrage stellen" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1932,6 +1942,9 @@ msgstr "ProfilePhoto|Draft" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1944,6 +1957,9 @@ msgstr "Behörden - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Behörde {{start_count}} bis {{end_count}} von {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2169,8 +2185,8 @@ msgstr "Email-Antwort senden" msgid "Respond to request" msgstr "Auf Anfrage reagieren" -msgid "Respond to the FOI request" -msgstr "IFG-Anfrage beantworten" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Online antworten" @@ -2379,9 +2395,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "Spezielle Nachricht and diese Behörde!" -msgid "Start now »" -msgstr "" - msgid "Start your own blog" msgstr "Starten Sie Ihren eigenen Blog" @@ -2990,6 +3003,9 @@ msgstr "Antwort an {{username}} kann nicht gesendet werden" msgid "Unable to send follow up message to {{username}}" msgstr "Nachfrage an {{username}} kann nicht gesendet werden" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Unerwartetes Suchergebnis" @@ -3052,9 +3068,6 @@ msgstr "" msgid "User|About me" msgstr "BenutzerIÜber mich" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "User|Admin level" @@ -3064,9 +3077,6 @@ msgstr "User|Ban text" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "BenutzerIEmail" @@ -3121,18 +3131,12 @@ msgstr "IFG-Emailadresse für {{public_body_name}} ansehen" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Sehen Sie die durch {{user_name}} gestellten IFG-Anfragen an:" -msgid "View and search requests" -msgstr "Ansehen und Suchen von Anfragen" - msgid "View authorities" msgstr "Behörden ansehen" msgid "View email" msgstr "Email ansehen" -msgid "View requests" -msgstr "Anfragen ansehen" - msgid "Waiting clarification." msgstr "Klärung wird erwartet. " diff --git a/locale/en/app.po b/locale/en/app.po index a547138ba..381568d55 100644 --- a/locale/en/app.po +++ b/locale/en/app.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" "PO-Revision-Date: 2011-02-24 07:11-0000\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -89,9 +89,6 @@ msgstr "" msgid " You will also be emailed updates about the request." msgstr "" -msgid " made by " -msgstr "" - msgid " when you send this message." msgstr "" @@ -281,6 +278,9 @@ msgstr "" msgid "<strong>did not have</strong> the information requested." msgstr "" +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -473,6 +473,12 @@ msgstr "" msgid "Browse all authorities..." msgstr "" +msgid "Browse and search requests" +msgstr "" + +msgid "Browse requests" +msgstr "" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "" @@ -536,9 +542,6 @@ msgstr "" msgid "Change your password on {{site_name}}" msgstr "" -msgid "Change your password {{site_name}}" -msgstr "" - msgid "Charity registration" msgstr "" @@ -713,6 +716,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1372,6 +1378,9 @@ msgstr "" msgid "Make a request" msgstr "" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1873,6 +1882,9 @@ msgstr "" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1885,6 +1897,9 @@ msgstr "" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2110,7 +2125,7 @@ msgstr "" msgid "Respond to request" msgstr "" -msgid "Respond to the FOI request" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" msgstr "" msgid "Respond using the web" @@ -2315,9 +2330,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "" -msgid "Start now »" -msgstr "" - msgid "Start your own blog" msgstr "" @@ -2915,6 +2927,9 @@ msgstr "" msgid "Unable to send follow up message to {{username}}" msgstr "" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "" @@ -2975,9 +2990,6 @@ msgstr "" msgid "User|About me" msgstr "" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "" @@ -2987,9 +2999,6 @@ msgstr "" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "" @@ -3044,18 +3053,12 @@ msgstr "" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "" -msgid "View and search requests" -msgstr "" - msgid "View authorities" msgstr "" msgid "View email" msgstr "" -msgid "View requests" -msgstr "" - msgid "Waiting clarification." msgstr "" diff --git a/locale/en_IE/app.po b/locale/en_IE/app.po index dabeffd92..2e94b0706 100644 --- a/locale/en_IE/app.po +++ b/locale/en_IE/app.po @@ -5,15 +5,16 @@ # Translators: # John Cross <mrjohncross@googlemail.com>, 2012 # handelaar <john@handelaar.org>, 2011 +# John Cross <mrjohncross@googlemail.com>, 2012 # handelaar <john@handelaar.org>, 2011 # John Cross <mrjohncross@googlemail.com>, 2012 msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:46+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: English (Ireland) (http://www.transifex.com/projects/p/alaveteli/language/en_IE/)\n" "Language: en_IE\n" "MIME-Version: 1.0\n" @@ -93,9 +94,6 @@ msgstr "" msgid " You will also be emailed updates about the request." msgstr "" -msgid " made by " -msgstr "" - msgid " when you send this message." msgstr "" @@ -285,6 +283,9 @@ msgstr "" msgid "<strong>did not have</strong> the information requested." msgstr "" +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -477,6 +478,12 @@ msgstr "" msgid "Browse all authorities..." msgstr "" +msgid "Browse and search requests" +msgstr "" + +msgid "Browse requests" +msgstr "" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "" @@ -540,9 +547,6 @@ msgstr "" msgid "Change your password on {{site_name}}" msgstr "" -msgid "Change your password {{site_name}}" -msgstr "" - msgid "Charity registration" msgstr "" @@ -717,6 +721,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1376,6 +1383,9 @@ msgstr "" msgid "Make a request" msgstr "" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1877,6 +1887,9 @@ msgstr "" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1889,6 +1902,9 @@ msgstr "" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2114,7 +2130,7 @@ msgstr "" msgid "Respond to request" msgstr "" -msgid "Respond to the FOI request" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" msgstr "" msgid "Respond using the web" @@ -2319,9 +2335,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "" -msgid "Start now »" -msgstr "" - msgid "Start your own blog" msgstr "" @@ -2919,6 +2932,9 @@ msgstr "" msgid "Unable to send follow up message to {{username}}" msgstr "" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "" @@ -2979,9 +2995,6 @@ msgstr "" msgid "User|About me" msgstr "" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "" @@ -2991,9 +3004,6 @@ msgstr "" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "" @@ -3048,18 +3058,12 @@ msgstr "" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "" -msgid "View and search requests" -msgstr "" - msgid "View authorities" msgstr "" msgid "View email" msgstr "" -msgid "View requests" -msgstr "" - msgid "Waiting clarification." msgstr "" diff --git a/locale/en_UG/app.po b/locale/en_UG/app.po index 18e293dc7..735607402 100644 --- a/locale/en_UG/app.po +++ b/locale/en_UG/app.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" "PO-Revision-Date: 2014-01-31 09:14+0000\n" "Last-Translator: Louise Crow <louise@mysociety.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -89,9 +89,6 @@ msgstr "" msgid " You will also be emailed updates about the request." msgstr "" -msgid " made by " -msgstr "" - msgid " when you send this message." msgstr "" @@ -281,6 +278,9 @@ msgstr "<strong>Thank</strong> the public agency or " msgid "<strong>did not have</strong> the information requested." msgstr "" +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -473,6 +473,12 @@ msgstr "Browse <a href='{{url}}' target='_blank'>other requests</a> to '{{public msgid "Browse all authorities..." msgstr "Browse all agencies…" +msgid "Browse and search requests" +msgstr "" + +msgid "Browse requests" +msgstr "" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "" @@ -536,9 +542,6 @@ msgstr "" msgid "Change your password on {{site_name}}" msgstr "" -msgid "Change your password {{site_name}}" -msgstr "" - msgid "Charity registration" msgstr "" @@ -713,6 +716,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1372,6 +1378,9 @@ msgstr "Make a new<br/>\\n <strong>Access <span>to</span><br/>\\n Information< msgid "Make a request" msgstr "" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1873,6 +1882,9 @@ msgstr "" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1885,6 +1897,9 @@ msgstr "Public agencies - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Public agencies {{start_count}} to {{end_count}} of {{total_count}}" +msgid "Public authority statistics" +msgstr "Public agency statistics" + msgid "Public authority – {{name}}" msgstr "Public agency – {{name}}" @@ -2110,8 +2125,8 @@ msgstr "" msgid "Respond to request" msgstr "" -msgid "Respond to the FOI request" -msgstr "Respond to the ATI request" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "Respond to the ATI request '{{request}}' made by {{user}}" msgid "Respond using the web" msgstr "" @@ -2315,9 +2330,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "Special note for this agency!" -msgid "Start now »" -msgstr "" - msgid "Start your own blog" msgstr "" @@ -2915,6 +2927,9 @@ msgstr "" msgid "Unable to send follow up message to {{username}}" msgstr "" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "" @@ -2975,9 +2990,6 @@ msgstr "" msgid "User|About me" msgstr "" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "" @@ -2987,9 +2999,6 @@ msgstr "" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "" @@ -3044,18 +3053,12 @@ msgstr "View ATI email address for {{public_body_name}}" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "View Access to Information requests made by {{user_name}}:" -msgid "View and search requests" -msgstr "" - msgid "View authorities" msgstr "View agencies" msgid "View email" msgstr "" -msgid "View requests" -msgstr "" - msgid "Waiting clarification." msgstr "" diff --git a/locale/es/app.po b/locale/es/app.po index a0d874caa..4fe8d295d 100644 --- a/locale/es/app.po +++ b/locale/es/app.po @@ -15,9 +15,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:49+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Spanish (http://www.transifex.com/projects/p/alaveteli/language/es/)\n" "Language: es\n" "MIME-Version: 1.0\n" @@ -107,9 +107,6 @@ msgstr " Ya está recibiendo actualizaciones por correo sobre la solicitud." msgid " You will also be emailed updates about the request." msgstr " Recibirá actualizaciones por correo sobre esta solicitud." -msgid " made by " -msgstr " hecha por " - msgid " when you send this message." msgstr " cuando envió este mensaje." @@ -353,6 +350,9 @@ msgstr "<strong>Dé las gracias</strong> al organismo público o " msgid "<strong>did not have</strong> the information requested." msgstr "<strong>no tenía</strong> la información solicitada." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "Un <a href=\"{{request_url}}\">seguimiento</a> de <em>{{request_title}}</em> ha sido enviado a {{public_body_name}} por {{info_request_user}} el {{date}}." @@ -555,6 +555,12 @@ msgstr "Explora <a href='{{url}}'>otras solicitudes</a> a '{{public_body_name}}' msgid "Browse all authorities..." msgstr "Explore otros organismos públicos..." +msgid "Browse and search requests" +msgstr "Ver y buscar solicitudes" + +msgid "Browse requests" +msgstr "Ver solicitudes" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "{{public_body_link}} ya debería haber respondido" @@ -618,9 +624,6 @@ msgstr "Cambia tu contraseña" msgid "Change your password on {{site_name}}" msgstr "Cambia tu contraseña en {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Cambia tu contraseña en {{site_name}}" - msgid "Charity registration" msgstr "Registro de la ONG" @@ -799,6 +802,9 @@ msgstr "Registro de declaraciones" msgid "Disclosure log URL" msgstr "URL del registro de declaraciones" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1512,6 +1518,9 @@ msgstr "" msgid "Make a request" msgstr "Enviar solicitud" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -2024,6 +2033,9 @@ msgstr "ProfilePhoto|Draft" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -2036,6 +2048,9 @@ msgstr "Organismos públicos - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Organismos públicos {{start_count}} a {{end_count}} de {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "Organismo público - {{name}}" @@ -2263,8 +2278,8 @@ msgstr "Contestar por correo" msgid "Respond to request" msgstr "Contestar la solicitud" -msgid "Respond to the FOI request" -msgstr "Contestar la solicitud" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Contestar vía web" @@ -2477,9 +2492,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "¡Notas especiales sobre este organismo!" -msgid "Start now »" -msgstr "Comience ahora »" - msgid "Start your own blog" msgstr "Crea tu propio blog" @@ -3121,6 +3133,9 @@ msgstr "No se pudo enviar la respuesta a {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "No se pudo enviar la respuesta a {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Se encontró un tipo de resultado inesperado " @@ -3184,9 +3199,6 @@ msgstr "" msgid "User|About me" msgstr "User|About me" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "User|Admin level" @@ -3196,9 +3208,6 @@ msgstr "User|Ban text" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "User|Email" @@ -3253,18 +3262,12 @@ msgstr "Ver dirección de correo para '{{public_body_name}}'" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Ver solicitudes de acceso a información hechas por {{user_name}}:" -msgid "View and search requests" -msgstr "Ver y buscar solicitudes" - msgid "View authorities" msgstr "Ver organismos públicos" msgid "View email" msgstr "Ver correo" -msgid "View requests" -msgstr "Ver solicitudes" - msgid "Waiting clarification." msgstr "Esperando aclaración." diff --git a/locale/eu/app.po b/locale/eu/app.po index bb7448b98..b7d21987d 100644 --- a/locale/eu/app.po +++ b/locale/eu/app.po @@ -10,9 +10,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:48+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Basque (http://www.transifex.com/projects/p/alaveteli/language/eu/)\n" "Language: eu\n" "MIME-Version: 1.0\n" @@ -96,9 +96,6 @@ msgstr " Eskabideari buruzko gaurkotzeak jasotzen ari zara posta elektronikoan." msgid " You will also be emailed updates about the request." msgstr "Eskabide honi buruzko gaurkotzeak jasoko dituzu posta elektronikoan." -msgid " made by " -msgstr " _____-k egina. " - msgid " when you send this message." msgstr " Mezu hau bidali duzunean." @@ -311,6 +308,9 @@ msgstr "<strong>Eman eskerrak</strong> erakunde publikoari edo " msgid "<strong>did not have</strong> the information requested." msgstr "<strong>ez zeukan</strong> eskatutako informazioa." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -505,6 +505,12 @@ msgstr "Araka itzazu<a href='{{url}}'>beste eskabideak</a>, '{{public_body_name} msgid "Browse all authorities..." msgstr "Arakatu beste erakunde publikoak..." +msgid "Browse and search requests" +msgstr "Ikusi eta bilatu eskabideak" + +msgid "Browse requests" +msgstr "Ikusi eskabideak" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Legearen arabera, edozein zirkunstantzia dela, {{public_body_link}}k jada erantzun behar izango zukeen" @@ -568,9 +574,6 @@ msgstr "Aldatu zure pasahitza" msgid "Change your password on {{site_name}}" msgstr "Aldatu zure pasahitza {{site_name}}-an" -msgid "Change your password {{site_name}}" -msgstr "Aldatu zure pasahitza {{site_name}}-an" - msgid "Charity registration" msgstr "GKEren erregistroa" @@ -745,6 +748,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1417,6 +1423,9 @@ msgstr "" msgid "Make a request" msgstr "Bidali eskabidea" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1920,6 +1929,9 @@ msgstr "ProfilePhoto|Draft" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1932,6 +1944,9 @@ msgstr "Erakunde publikoak - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Erakunde publikoak {{start_count}}-etik {{end_count}}-era, guztira {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2159,8 +2174,8 @@ msgstr "Emailez erantzun" msgid "Respond to request" msgstr "Eskabideari erantzun" -msgid "Respond to the FOI request" -msgstr "Eskabideari erantzun" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Web orrialdearen bidez erantzun" @@ -2369,9 +2384,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "Erakunde horri buruzko ohar berezia!" -msgid "Start now »" -msgstr "Has zaitez orain »" - msgid "Start your own blog" msgstr "Sortu zeure bloga" @@ -2983,6 +2995,9 @@ msgstr "Ezin izan zaio {{username}}-ri erantzuna bidali." msgid "Unable to send follow up message to {{username}}" msgstr "Ezin izan zaio {{username}}-ri erantzuna bidali." +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Ustegabeko emaitza aurkitu da " @@ -3043,9 +3058,6 @@ msgstr "" msgid "User|About me" msgstr "User|About me" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "User|Admin level" @@ -3055,9 +3067,6 @@ msgstr "User|Ban text" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "User|Email" @@ -3112,18 +3121,12 @@ msgstr "Ikusi '{{public_body_name}}'-ren posta helbidea" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Ikusi {{user_name}}-k egin dituen informaziorako sarbidearen eskabideak:" -msgid "View and search requests" -msgstr "Ikusi eta bilatu eskabideak" - msgid "View authorities" msgstr "Ikusi erakunde publikoak" msgid "View email" msgstr "Ikusi posta" -msgid "View requests" -msgstr "Ikusi eskabideak" - msgid "Waiting clarification." msgstr "Azalpenaren zain." diff --git a/locale/fi/app.po b/locale/fi/app.po index ab7d3cd88..d9e061c2a 100644 --- a/locale/fi/app.po +++ b/locale/fi/app.po @@ -11,9 +11,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:46+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Finnish (http://www.transifex.com/projects/p/alaveteli/language/fi/)\n" "Language: fi\n" "MIME-Version: 1.0\n" @@ -93,9 +93,6 @@ msgstr "" msgid " You will also be emailed updates about the request." msgstr "" -msgid " made by " -msgstr "" - msgid " when you send this message." msgstr "kun lähetät tämän viestin." @@ -285,6 +282,9 @@ msgstr "" msgid "<strong>did not have</strong> the information requested." msgstr "" +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -477,6 +477,12 @@ msgstr "" msgid "Browse all authorities..." msgstr "" +msgid "Browse and search requests" +msgstr "" + +msgid "Browse requests" +msgstr "" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "" @@ -540,9 +546,6 @@ msgstr "" msgid "Change your password on {{site_name}}" msgstr "" -msgid "Change your password {{site_name}}" -msgstr "" - msgid "Charity registration" msgstr "" @@ -717,6 +720,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1376,6 +1382,9 @@ msgstr "" msgid "Make a request" msgstr "" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1877,6 +1886,9 @@ msgstr "" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1889,6 +1901,9 @@ msgstr "" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2114,7 +2129,7 @@ msgstr "" msgid "Respond to request" msgstr "" -msgid "Respond to the FOI request" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" msgstr "" msgid "Respond using the web" @@ -2319,9 +2334,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "" -msgid "Start now »" -msgstr "" - msgid "Start your own blog" msgstr "" @@ -2919,6 +2931,9 @@ msgstr "" msgid "Unable to send follow up message to {{username}}" msgstr "" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "" @@ -2979,9 +2994,6 @@ msgstr "" msgid "User|About me" msgstr "" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "" @@ -2991,9 +3003,6 @@ msgstr "" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "" @@ -3048,18 +3057,12 @@ msgstr "" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "" -msgid "View and search requests" -msgstr "" - msgid "View authorities" msgstr "" msgid "View email" msgstr "" -msgid "View requests" -msgstr "" - msgid "Waiting clarification." msgstr "" diff --git a/locale/fr/app.po b/locale/fr/app.po index 6ca4056ee..2c6e579a8 100644 --- a/locale/fr/app.po +++ b/locale/fr/app.po @@ -12,6 +12,7 @@ # Bbear <borisjf@post.harvard.edu>, 2011 # cegall, 2013 # Claire, 2013 +# Claire, 2013 # David Cabo <david.cabo@gmail.com>, 2013 # louisecrow <louise@mysociety.org>, 2013 # louisecrow <louise@mysociety.org>, 2013 @@ -33,9 +34,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:46+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: French (http://www.transifex.com/projects/p/alaveteli/language/fr/)\n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -119,9 +120,6 @@ msgstr "Un courriel vous a déjà été envoyé au sujet de cette demande." msgid " You will also be emailed updates about the request." msgstr "Vous recevrez également des courriels d'avancées liées à votre demande." -msgid " made by " -msgstr "réalisé par" - msgid " when you send this message." msgstr "quand vous envoyez ce message." @@ -311,6 +309,9 @@ msgstr "<strong>Remerciez</strong> l'autorité publique ou" msgid "<strong>did not have</strong> the information requested." msgstr "<strong>n'avait pas </strong> les informations demandées." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "Un <a href=\"{{request_url}}\">suivi</a> à <em>{{request_title}}</em> a été envoyé à {{public_body_name}} par {{info_request_user}} le {{date}}." @@ -503,6 +504,12 @@ msgstr "Parcourir <a href='{{url}}'>les autres demandes</a> to '{{public_body_na msgid "Browse all authorities..." msgstr "Parcourir toutes les autorités publiques..." +msgid "Browse and search requests" +msgstr "Visualiser et parcourir les demandes d'information" + +msgid "Browse requests" +msgstr "Voir les demandes" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Selon la loi, {{public_body_link}} aurait déjà dû répondre à la demande " @@ -566,9 +573,6 @@ msgstr "Modifier votre mot de passe" msgid "Change your password on {{site_name}}" msgstr "Modifier votre mot de passe pour le site {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Changer votre mot de passe {{site_name}}" - msgid "Charity registration" msgstr "Organisme de bienfaisance" @@ -743,6 +747,9 @@ msgstr "Journal d'information" msgid "Disclosure log URL" msgstr "adresse du journal d'information" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1402,6 +1409,9 @@ msgstr "Faire une<br/>\\n <strong>Nouvelle <span>demande</span><br/>\\n d'acc msgid "Make a request" msgstr "Demander l'accès à une information" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1903,6 +1913,9 @@ msgstr "ProfilePhoto|Draft" msgid "Public Bodies" msgstr "Organismes publics" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "Statistiques de l'organisme public" @@ -1915,6 +1928,9 @@ msgstr "Organismes publics - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Organismes publics {{start_count}} à {{end_count}} de {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "Organisme public – {{name}}" @@ -2140,8 +2156,8 @@ msgstr "Répondre par e-mail " msgid "Respond to request" msgstr "Répondre à la demande" -msgid "Respond to the FOI request" -msgstr "Répondre a la demande d'accès à l'information" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Répondre en utilisant le web" @@ -2345,9 +2361,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "Remarque spéciale pour cette autorité!" -msgid "Start now »" -msgstr "Commencez dès maintenant »" - msgid "Start your own blog" msgstr "Commencez votre blog" @@ -2945,6 +2958,9 @@ msgstr "Impossible d'envoyer une réponse à {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "Impossible d'envoyer un message de suivi à {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Type de résultat de recherche inattendu" @@ -3005,9 +3021,6 @@ msgstr "" msgid "User|About me" msgstr "User|About me" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "User|Admin level" @@ -3017,9 +3030,6 @@ msgstr "User|Ban text" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "User|Email" @@ -3074,18 +3084,12 @@ msgstr "Voir l'adresse mail des demandes d'accès à l'information pour {{publi msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Voir les demandes faites par {{user_name}}:" -msgid "View and search requests" -msgstr "Visualiser et parcourir les demandes d'information" - msgid "View authorities" msgstr "Voir les institutions publiques" msgid "View email" msgstr "Voir l'email " -msgid "View requests" -msgstr "Voir les demandes" - msgid "Waiting clarification." msgstr "En attente de clarification" diff --git a/locale/fr_CA/app.po b/locale/fr_CA/app.po index 0f071ed8c..dcd4bad72 100644 --- a/locale/fr_CA/app.po +++ b/locale/fr_CA/app.po @@ -5,8 +5,11 @@ # Translators: # andreas.pavlou <andreas@access-info.org>, 2013 # Bbear <borisjf@post.harvard.edu>, 2011 +# Benoît Simard <contact@bsimard.com>, 2013 # David Cabo <david.cabo@gmail.com>, 2013 # pierre chrzanowski <pierre.chrzanowski@gmail.com>, 2013 +# pierre chrzanowski <pierre.chrzanowski@gmail.com>, 2013 +# radhouane fazai <radhouanef@gmail.com>, 2013 # radhouane fazai <radhouanef@gmail.com>, 2013 # rrobert <rrobertpolson@gmail.com>, 2013 # sebbacon <seb.bacon@gmail.com>, 2012 @@ -18,9 +21,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:49+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: French (Canada) (http://www.transifex.com/projects/p/alaveteli/language/fr_CA/)\n" "Language: fr_CA\n" "MIME-Version: 1.0\n" @@ -102,9 +105,6 @@ msgstr "Il est déjà prévu que vous receviez des mises à jour par courriel co msgid " You will also be emailed updates about the request." msgstr "Vous recevrez aussi des mises à jour par courriel concernant cette demande." -msgid " made by " -msgstr "faite par" - msgid " when you send this message." msgstr "quand vous envoyez ce message." @@ -294,6 +294,9 @@ msgstr "<strong>Remerciez</strong> l'organisme ou " msgid "<strong>did not have</strong> the information requested." msgstr "<strong>n'avait pas </strong> les informations demandées." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "Un <a href=\"{{request_url}}\">suivi</a> à <em>{{request_title}}</em> a été envoyé à {{public_body_name}} par {{info_request_user}} le {{date}}." @@ -486,6 +489,12 @@ msgstr "Prenez connaissance <a href='{{url}}'>des autres demandes</a> faites au msgid "Browse all authorities..." msgstr "Parcourir tous les organismes gouvernementaux…" +msgid "Browse and search requests" +msgstr "Parcourir les demandes passées" + +msgid "Browse requests" +msgstr "Voir les demandes" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Selon la loi, en toutes circonstances, {{public_body_link}} devrait avoir déjà répondu" @@ -549,9 +558,6 @@ msgstr "Changer votre mot de passe" msgid "Change your password on {{site_name}}" msgstr "Changer votre mot de passe sur {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Changer votre mot de passe {{site_name}}" - msgid "Charity registration" msgstr "Organisme de bienfaisance" @@ -726,6 +732,9 @@ msgstr "Disclosure log" msgid "Disclosure log URL" msgstr "Disclosure log URL" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1385,6 +1394,9 @@ msgstr "Faire une nouvelle<br/>\\n <strong>demande <span>d'accès</span><br/>\\ msgid "Make a request" msgstr "Faire une demande" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1886,6 +1898,9 @@ msgstr "ProfilePhoto|Draft" msgid "Public Bodies" msgstr "Organismes publics" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "Statistiques de l'organisme" @@ -1898,6 +1913,9 @@ msgstr "Organismes publics - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Organismes publics {{start_count}} à {{end_count}} de {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "Organisme public – {{name}}" @@ -2123,8 +2141,8 @@ msgstr "Répondre par courriel" msgid "Respond to request" msgstr "Répondre à la demande" -msgid "Respond to the FOI request" -msgstr "Répondre à la demande d'accès aux documents" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Répondre en utilisant le web" @@ -2328,9 +2346,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "Remarque spéciale pour cet organisme!" -msgid "Start now »" -msgstr "C'est ici! »" - msgid "Start your own blog" msgstr "Commencez votre blog" @@ -2928,6 +2943,9 @@ msgstr "Impossible d'envoyer une réponse à {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "Impossible d'envoyer un message de suivi à {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Type de résultat de recherche inattendu" @@ -2988,9 +3006,6 @@ msgstr "" msgid "User|About me" msgstr "User|About me" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "User|Admin level" @@ -3000,9 +3015,6 @@ msgstr "User|Ban text" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "User|Email" @@ -3057,18 +3069,12 @@ msgstr "Voir l'adresse courriel pour {{public_body_name}}" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Voir les demandes faites par {{user_name}}:" -msgid "View and search requests" -msgstr "Parcourir les demandes passées" - msgid "View authorities" msgstr "Voir les organismes" msgid "View email" msgstr "Voir le courriel" -msgid "View requests" -msgstr "Voir les demandes" - msgid "Waiting clarification." msgstr "En attente de clarification" diff --git a/locale/gl/app.po b/locale/gl/app.po index 35fbfad62..b307ee426 100644 --- a/locale/gl/app.po +++ b/locale/gl/app.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:48+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Galician (http://www.transifex.com/projects/p/alaveteli/language/gl/)\n" "Language: gl\n" "MIME-Version: 1.0\n" @@ -100,9 +100,6 @@ msgstr " Ya está recibiendo actualizaciones por correo sobre la solicitud." msgid " You will also be emailed updates about the request." msgstr " Recibirá actualizaciones por correo sobre esta solicitud." -msgid " made by " -msgstr " hecha por " - msgid " when you send this message." msgstr " cuando envió este mensaje." @@ -331,6 +328,9 @@ msgstr "<strong>Dé las gracias</strong> al organismo público o " msgid "<strong>did not have</strong> the information requested." msgstr "<strong>no tenía</strong> la información solicitada." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -533,6 +533,12 @@ msgstr "Explora <a href='{{url}}'>otras solicitudes</a> a '{{public_body_name}}' msgid "Browse all authorities..." msgstr "Explore otros organismos públicos..." +msgid "Browse and search requests" +msgstr "Ver y buscar solicitudes" + +msgid "Browse requests" +msgstr "Ver solicitudes" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Por ley, bajo cualquier circunstancia, {{public_body_link}} ya debería haber respondido" @@ -596,9 +602,6 @@ msgstr "Cambia tu contraseña" msgid "Change your password on {{site_name}}" msgstr "Cambia tu contraseña en {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Cambia tu contraseña en {{site_name}}" - msgid "Charity registration" msgstr "Registro de la ONG" @@ -777,6 +780,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1490,6 +1496,9 @@ msgstr "" msgid "Make a request" msgstr "Enviar solicitud" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -2002,6 +2011,9 @@ msgstr "ProfilePhoto|Draft" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -2014,6 +2026,9 @@ msgstr "Organismos públicos - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Organismos públicos {{start_count}} a {{end_count}} de {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2241,8 +2256,8 @@ msgstr "Contestar por correo" msgid "Respond to request" msgstr "Contestar la solicitud" -msgid "Respond to the FOI request" -msgstr "Contestar la solicitud" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Contestar vía web" @@ -2455,9 +2470,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "¡Notas especiales sobre este organismo!" -msgid "Start now »" -msgstr "Comience ahora »" - msgid "Start your own blog" msgstr "Crea tu propio blog" @@ -3099,6 +3111,9 @@ msgstr "No se pudo enviar la respuesta a {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "No se pudo enviar la respuesta a {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Se encontró un tipo de resultado inesperado " @@ -3162,9 +3177,6 @@ msgstr "" msgid "User|About me" msgstr "User|About me" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "User|Admin level" @@ -3174,9 +3186,6 @@ msgstr "User|Ban text" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "User|Email" @@ -3231,18 +3240,12 @@ msgstr "Ver dirección de correo para '{{public_body_name}}'" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Ver solicitudes de acceso a información hechas por {{user_name}}:" -msgid "View and search requests" -msgstr "Ver y buscar solicitudes" - msgid "View authorities" msgstr "Ver organismos públicos" msgid "View email" msgstr "Ver correo" -msgid "View requests" -msgstr "Ver solicitudes" - msgid "Waiting clarification." msgstr "Esperando aclaración." diff --git a/locale/he_IL/app.po b/locale/he_IL/app.po index f5c54583c..6e2ae3deb 100644 --- a/locale/he_IL/app.po +++ b/locale/he_IL/app.po @@ -14,15 +14,16 @@ # yehuda <yehudab@gmail.com>, 2013 # yoniYalovitsky <yoni@yalovitsky.com>, 2013 # yoniYalovitsky <yoni@yalovitsky.com>, 2013 +# yoniYalovitsky <yoni@yalovitsky.com>, 2013 # Z.D <zdevir@gmail.com>, 2013 # Z.D <zdevir@gmail.com>, 2013 msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:50+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Hebrew (Israel) (http://www.transifex.com/projects/p/alaveteli/language/he_IL/)\n" "Language: he_IL\n" "MIME-Version: 1.0\n" @@ -102,9 +103,6 @@ msgstr "כתובת הדוא\"ל רשומה לקבלת עדכונים על הבק msgid " You will also be emailed updates about the request." msgstr "תקבלו גם עדכונים בדוא\"ל על הבקשה." -msgid " made by " -msgstr "נוצר על-ידי" - msgid " when you send this message." msgstr "כאשר אתם שולחים הודעה זו." @@ -296,6 +294,9 @@ msgstr "<strong>הודו</strong> לרשות הציבורית או " msgid "<strong>did not have</strong> the information requested." msgstr "<strong>אין</strong> את המידע המבוקש." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "<a href=\"{{request_url}}\">מעקב</a> ל- <em>{{request_title}}</em> נשלחה ל- {{public_body_name}} על-ידי {{info_request_user}} בתאריך {{date}}." @@ -488,6 +489,12 @@ msgstr "הקליקו על <a href='{{url}}'>בקשות אחרות</a> אל '{{pu msgid "Browse all authorities..." msgstr "עיון בכל הרשויות..." +msgid "Browse and search requests" +msgstr "צפו וחפשו בקשות מידע" + +msgid "Browse requests" +msgstr "בקשות מידע" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "לפי החוק, בכפוף לנסיבות, {{public_body_link}} היו צרכים להשיב עד עתה" @@ -551,9 +558,6 @@ msgstr "שינוי סיסמה" msgid "Change your password on {{site_name}}" msgstr "שנה סיסמתך ב {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "שנה סיסמתך {{site_name}}" - msgid "Charity registration" msgstr "רישום צדקה" @@ -731,6 +735,9 @@ msgstr "יומן גילוי נאות" msgid "Disclosure log URL" msgstr "כתובת יומן גילוי נאות" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1390,6 +1397,9 @@ msgstr "הגישו<br><strong>בקשה</strong><br><span>לפתיחת</span> <br msgid "Make a request" msgstr "בקשה חדשה" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1891,6 +1901,9 @@ msgstr "ProfilePhoto|Draft" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1903,6 +1916,9 @@ msgstr "רשויות ציבוריות - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "רשויות ציבוריות {{start_count}} עד {{end_count}} מתוך {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "רשות ציבורית – {{name}}" @@ -2128,8 +2144,8 @@ msgstr "הגיבו בדוא\"ל" msgid "Respond to request" msgstr "להגיב לבקשה" -msgid "Respond to the FOI request" -msgstr "הגיבו לבקשה" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "הגיבו דרך הרשת" @@ -2333,9 +2349,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "הערה מיוחדת לרשות זו" -msgid "Start now »" -msgstr "התחילו עכשיו »" - msgid "Start your own blog" msgstr "צרו את הבלוג שלכם" @@ -2933,6 +2946,9 @@ msgstr "לא ניתן לשלוח תגובה ל- {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "לא ניתן לשלוח הודעת מעקב ל- {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "תוצאת חיפוש לא צפויה" @@ -2993,9 +3009,6 @@ msgstr "" msgid "User|About me" msgstr "User|About me" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "User|Admin level" @@ -3005,9 +3018,6 @@ msgstr "User|Ban text" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "User|Email" @@ -3062,18 +3072,12 @@ msgstr "צפו בדוא\"ל של בקשות מידע ל- '{{public_body_name}}'" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "צפו בבקשות מידע שהוגשו על-ידי {{user_name}}:" -msgid "View and search requests" -msgstr "צפו וחפשו בקשות מידע" - msgid "View authorities" msgstr "רשויות" msgid "View email" msgstr "צפו בדואר האלקטרוני" -msgid "View requests" -msgstr "בקשות מידע" - msgid "Waiting clarification." msgstr "ממתין להבהרות" diff --git a/locale/hr/app.po b/locale/hr/app.po index 06e6f01c0..c18948ce6 100644 --- a/locale/hr/app.po +++ b/locale/hr/app.po @@ -11,9 +11,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:47+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Croatian (http://www.transifex.com/projects/p/alaveteli/language/hr/)\n" "Language: hr\n" "MIME-Version: 1.0\n" @@ -103,9 +103,6 @@ msgstr " Ažuriranja zahtjeva već su Vam poslana putem e-maila." msgid " You will also be emailed updates about the request." msgstr " Ažuriranja zahtjeva će Vam takođe biti poslana putem e-maila." -msgid " made by " -msgstr " načinjeno od strane " - msgid " when you send this message." msgstr " kada pošaljete ovu poruku." @@ -317,6 +314,9 @@ msgstr "" msgid "<strong>did not have</strong> the information requested." msgstr "<strong>nije sadržavao</strong> traženu informaciju." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -519,6 +519,12 @@ msgstr "Pretražite <a href='{{url}}'>druge zahtjeve</a> za '{{public_body_name} msgid "Browse all authorities..." msgstr "Pretražite sve ustanove" +msgid "Browse and search requests" +msgstr "Pregledaj i pretraži zahtjeve" + +msgid "Browse requests" +msgstr "Vidjeti zahtjeve" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Po zakonu, pod svim uvjetima, {{public_body_link}} je trebala odgovoriti do sada" @@ -582,9 +588,6 @@ msgstr "Promijeniti Vaš password" msgid "Change your password on {{site_name}}" msgstr "Promijeniti password na {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Promjenite Vaš password {{site_name}}" - msgid "Charity registration" msgstr "Registracija nevladine organizacije" @@ -761,6 +764,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1469,6 +1475,9 @@ msgstr "" msgid "Make a request" msgstr "Podnesi zahtjev" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1981,6 +1990,9 @@ msgstr "Slika na profilu|Skica" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1993,6 +2005,9 @@ msgstr "Javne ustanove - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2220,8 +2235,8 @@ msgstr "Odgovoriti e-mailom" msgid "Respond to request" msgstr "Odgovoriti na zahtjev" -msgid "Respond to the FOI request" -msgstr "Odgovoriti na Zahtjev za slobodan pristup informacijama" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Odgovoriti preko web-a" @@ -2433,9 +2448,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "Posebna napomena za ovu ustanovu!" -msgid "Start now »" -msgstr "Počni sada »" - msgid "Start your own blog" msgstr "Započnite Vaš blog" @@ -3067,6 +3079,9 @@ msgstr "Ne možemo poslati poruku za {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "Ne možemo poslati popratnu pokuku za {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "" @@ -3132,9 +3147,6 @@ msgstr "" msgid "User|About me" msgstr "Korisnik|O meni" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "Korisnik|Administratorski nivo" @@ -3144,9 +3156,6 @@ msgstr "Korisnik|tekst isključenja" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "Korisnik|E-mail" @@ -3201,18 +3210,12 @@ msgstr "Pogledati ZOSPI e-mail adrese za {{public_body_name}}" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Pegledati Zahjeve za slobodan pristup informacijama napravljene od strane {{user_name}}:" -msgid "View and search requests" -msgstr "Pregledaj i pretraži zahtjeve" - msgid "View authorities" msgstr "Vidjeti ustanove" msgid "View email" msgstr "Pogledati e-mail" -msgid "View requests" -msgstr "Vidjeti zahtjeve" - msgid "Waiting clarification." msgstr "Čekamo na objašnjenje." diff --git a/locale/hr_HR/app.po b/locale/hr_HR/app.po index ec7200c50..6707f42a4 100644 --- a/locale/hr_HR/app.po +++ b/locale/hr_HR/app.po @@ -11,9 +11,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:46+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Croatian (Croatia) (http://www.transifex.com/projects/p/alaveteli/language/hr_HR/)\n" "Language: hr_HR\n" "MIME-Version: 1.0\n" @@ -93,9 +93,6 @@ msgstr "" msgid " You will also be emailed updates about the request." msgstr "" -msgid " made by " -msgstr "" - msgid " when you send this message." msgstr "" @@ -285,6 +282,9 @@ msgstr "" msgid "<strong>did not have</strong> the information requested." msgstr "" +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -477,6 +477,12 @@ msgstr "" msgid "Browse all authorities..." msgstr "" +msgid "Browse and search requests" +msgstr "" + +msgid "Browse requests" +msgstr "" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "" @@ -540,9 +546,6 @@ msgstr "" msgid "Change your password on {{site_name}}" msgstr "" -msgid "Change your password {{site_name}}" -msgstr "" - msgid "Charity registration" msgstr "" @@ -717,6 +720,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1377,6 +1383,9 @@ msgstr "Napravite novi <br/>\\n <strong>Sloboda><br/> informacije<br/>\\n zahtij msgid "Make a request" msgstr "" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1878,6 +1887,9 @@ msgstr "" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1890,6 +1902,9 @@ msgstr "" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2115,7 +2130,7 @@ msgstr "" msgid "Respond to request" msgstr "" -msgid "Respond to the FOI request" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" msgstr "" msgid "Respond using the web" @@ -2322,9 +2337,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "" -msgid "Start now »" -msgstr "" - msgid "Start your own blog" msgstr "" @@ -2925,6 +2937,9 @@ msgstr "" msgid "Unable to send follow up message to {{username}}" msgstr "" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "" @@ -2985,9 +3000,6 @@ msgstr "" msgid "User|About me" msgstr "" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "" @@ -2997,9 +3009,6 @@ msgstr "" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "" @@ -3054,18 +3063,12 @@ msgstr "" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "" -msgid "View and search requests" -msgstr "" - msgid "View authorities" msgstr "" msgid "View email" msgstr "" -msgid "View requests" -msgstr "" - msgid "Waiting clarification." msgstr "" diff --git a/locale/hu_HU/app.po b/locale/hu_HU/app.po index 765de6706..588857fdc 100644 --- a/locale/hu_HU/app.po +++ b/locale/hu_HU/app.po @@ -11,9 +11,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:49+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Hungarian (Hungary) (http://www.transifex.com/projects/p/alaveteli/language/hu_HU/)\n" "Language: hu_HU\n" "MIME-Version: 1.0\n" @@ -99,9 +99,6 @@ msgstr " E-mailben már tájékoztattuk az igényléssel kapcsolatos fejleménye msgid " You will also be emailed updates about the request." msgstr " E-mailben is tájékoztatjuk az igényléssel kapcsolatos fejleményekről. " -msgid " made by " -msgstr "készítette: " - msgid " when you send this message." msgstr " részére, így a címzett megismerheti azt." @@ -327,6 +324,9 @@ msgstr "<strong>Köszönje meg</strong> a közintézménynek vagy" msgid "<strong>did not have</strong> the information requested." msgstr "<strong>nem kapta meg</strong> a kért információt. " +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "A(z) <em>{{request_title}}</em> adatigénylésre vonatkozóan {{info_request_user}} <a href=\"{{request_url}}\">emlékeztetőt</a> küldött a(z) {{public_body_name}} részére {{date}} napon." @@ -525,6 +525,12 @@ msgstr "Igénylése megfogalmazásához az adatgazdának küldött <a href='{{ur msgid "Browse all authorities..." msgstr "Az összes adatgazda böngészése... " +msgid "Browse and search requests" +msgstr "Böngészés az adatigénylések között" + +msgid "Browse requests" +msgstr "Adatigénylések" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "A vonatkozó jogszabály értelmében a(z) {{public_body_link}} munkatársainak már ki kellett volna adniuk a kért adatokat." @@ -588,9 +594,6 @@ msgstr "Jelszavam módosítása " msgid "Change your password on {{site_name}}" msgstr "{{site_name}} jelszó módosítása" -msgid "Change your password {{site_name}}" -msgstr "{{site_name}} jelszó módosítása" - msgid "Charity registration" msgstr "Jótékonysági szervezet regisztrációja " @@ -769,6 +772,9 @@ msgstr "Közzétételi napló" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1489,6 +1495,9 @@ msgstr "" msgid "Make a request" msgstr "Új igénylés" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -2003,6 +2012,9 @@ msgstr "ProfilePhoto|Draft" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -2015,6 +2027,9 @@ msgstr "Adatgazdák - {{description}} " msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Adatgazdák: {{start_count}} - {{end_count}}, összesen: {{total_count}} " +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2242,8 +2257,8 @@ msgstr "Válasz küldése e-mailben " msgid "Respond to request" msgstr "Válasz az adatigénylésre" -msgid "Respond to the FOI request" -msgstr "Válasz a közérdekűadat-igénylésre" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Válasz a weben " @@ -2456,9 +2471,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "Egyéb megállapítások az adatgazdával kapcsolatban:" -msgid "Start now »" -msgstr "Máris kezdhetjük »" - msgid "Start your own blog" msgstr "Saját blog indítása " @@ -3100,6 +3112,9 @@ msgstr "Nem sikerült választ küldeni {{username}} részére " msgid "Unable to send follow up message to {{username}}" msgstr "Nem sikerült nyomon követési üzenetet küldeni {{username}} részére " +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Váratlan keresésieredmény-típus " @@ -3165,9 +3180,6 @@ msgstr "" msgid "User|About me" msgstr "User|About me" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "User|Admin level" @@ -3177,9 +3189,6 @@ msgstr "User|Ban text" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "User|Email" @@ -3234,18 +3243,12 @@ msgstr "{{public_body_name}} közérdekűadat-igényléshez használt e-mail cí msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "{{user_name}} által benyújtott közérdekűadat-igénylések megtekintése " -msgid "View and search requests" -msgstr "Böngészés az adatigénylések között" - msgid "View authorities" msgstr "Adatgazdák " msgid "View email" msgstr "E-mail megtekintése " -msgid "View requests" -msgstr "Adatigénylések" - msgid "Waiting clarification." msgstr "Pontosításra vár." diff --git a/locale/id/app.po b/locale/id/app.po index 99600da24..857c55628 100644 --- a/locale/id/app.po +++ b/locale/id/app.po @@ -4,9 +4,11 @@ # # Translators: # Agung Riyadi <ariadi01@gmail.com>, 2013 +# Agung Riyadi <ariadi01@gmail.com>, 2012-2013 # agustriwanto <agus.triwanto@gmail.com>, 2012 # agustriwanto <agus.triwanto@gmail.com>, 2012 -# <ariadi01@gmail.com>, 2012 +# agustriwanto <agus.triwanto@gmail.com>, 2012 +# Agung Riyadi <ariadi01@gmail.com>, 2012 # bobo7e836b32124642a5 <bobo@airputih.org>, 2012 # bobo7e836b32124642a5 <bobo@airputih.org>, 2012 # Agung Riyadi <ariadi01@gmail.com>, 2013 @@ -14,9 +16,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:48+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Indonesian (http://www.transifex.com/projects/p/alaveteli/language/id/)\n" "Language: id\n" "MIME-Version: 1.0\n" @@ -106,9 +108,6 @@ msgstr " Update tentang permintaan tersebut sudah dikirimkan ke email Anda." msgid " You will also be emailed updates about the request." msgstr " Anda juga akan dikirimkan email berisi update tentang permintaan." -msgid " made by " -msgstr " dibuat oleh " - msgid " when you send this message." msgstr " saat Anda mengirim pesan ini." @@ -351,6 +350,9 @@ msgstr "<strong>Berterima kasih kepada</strong> otoritas publik atau " msgid "<strong>did not have</strong> the information requested." msgstr "<strong>tidak memiliki</strong> informasi yang diminta." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "Sebuah <a href=\"{{request_url}}\">tindak lanjut</a> untuk <em>{{request_title}}</em> telah terkirim kepada {{public_body_name}} oleh {{info_request_user}} pada {{date}}." @@ -553,6 +555,12 @@ msgstr "Melihat <a href='{{url}}'>permintaan lain</a> untuk'{{public_body_name}} msgid "Browse all authorities..." msgstr "Melihat semua otoritas..." +msgid "Browse and search requests" +msgstr "Tampilkan dan cari permintaan" + +msgid "Browse requests" +msgstr "Tampilkan permintaan" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Berdasarkan undang-undang, dalam semua keadaan, {{public_body_link}} sekarang seharusnya sudah ditanggapi" @@ -616,9 +624,6 @@ msgstr "Mengubah kode sandi Anda" msgid "Change your password on {{site_name}}" msgstr "Mengubah kode sandi Anda di{{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Mengubah kode sandi Anda {{site_name}}" - msgid "Charity registration" msgstr "Pendaftaran Amal" @@ -797,6 +802,9 @@ msgstr "Pembukaan log" msgid "Disclosure log URL" msgstr "Pembukaan riwayat URL" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1514,6 +1522,9 @@ msgstr "" msgid "Make a request" msgstr "Buat permintaan" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -2026,6 +2037,9 @@ msgstr "ProfilePhoto|Draft" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -2038,6 +2052,9 @@ msgstr "Otoritas publik - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Ptoritas publik {{start_count}} ke{{end_count}} dari {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "Otoritas publik - {{name}}" @@ -2265,8 +2282,8 @@ msgstr "Merespon lewat email" msgid "Respond to request" msgstr "Merespon permintaan" -msgid "Respond to the FOI request" -msgstr "Merespon pemintaan FOI" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Merespon lewat web" @@ -2477,9 +2494,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "Catatan khusus untuk otoritas ini!" -msgid "Start now »" -msgstr "Mulai sekarang »" - msgid "Start your own blog" msgstr "Mulai blog Anda sendiri" @@ -3118,6 +3132,9 @@ msgstr "Tidak dapat mengirimkan balasan kepada {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "Tidak dapat mengirimkan pesan tindak lanjut kepada {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Jenis hasil pencarian yang tidak terduga " @@ -3183,9 +3200,6 @@ msgstr "" msgid "User|About me" msgstr "User|About me" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "User|Admin level" @@ -3195,9 +3209,6 @@ msgstr "User|Ban text" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "User|Email" @@ -3252,18 +3263,12 @@ msgstr "Tampilkan alamat email FOI untuk {{public_body_name}}" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Tampilkan permintaan Freedom of Information yang dibuat oleh {{user_name}}:" -msgid "View and search requests" -msgstr "Tampilkan dan cari permintaan" - msgid "View authorities" msgstr "Tampilkan otoritas" msgid "View email" msgstr "Tampilkan email" -msgid "View requests" -msgstr "Tampilkan permintaan" - msgid "Waiting clarification." msgstr "Menunggu klarifikasi." diff --git a/locale/it/app.po b/locale/it/app.po index bebfe1b75..02cd05622 100644 --- a/locale/it/app.po +++ b/locale/it/app.po @@ -9,9 +9,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:47+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Italian (http://www.transifex.com/projects/p/alaveteli/language/it/)\n" "Language: it\n" "MIME-Version: 1.0\n" @@ -91,9 +91,6 @@ msgstr " Il tuo nominativo è già stato inserito nelle notifiche via email rela msgid " You will also be emailed updates about the request." msgstr " Sarai anche aggiornato via email sullo stato della tua richiesta." -msgid " made by " -msgstr "fatto da " - msgid " when you send this message." msgstr "quando invii questo messaggio." @@ -283,6 +280,9 @@ msgstr "<strong>Ringrazia</strong> la pubblica autorità o " msgid "<strong>did not have</strong> the information requested." msgstr "<strong>non otterrai</strong> l'informazione richiesta." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -477,6 +477,12 @@ msgstr "Guarda le <a href='{{url}}'>altre richieste</a> all'autorità pubblica ' msgid "Browse all authorities..." msgstr "Guarda tutte le autorità disponibili..." +msgid "Browse and search requests" +msgstr "Guarda e cerca richieste" + +msgid "Browse requests" +msgstr "Guarda richieste" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Di regola, in ogni caso, l'autorità pubblica {{public_body_link}} dovrebbe aver risposto ora" @@ -540,9 +546,6 @@ msgstr "Cambia la tua password" msgid "Change your password on {{site_name}}" msgstr "Cambia la tua password" -msgid "Change your password {{site_name}}" -msgstr "Cambia la tua password su {{site_name}}" - msgid "Charity registration" msgstr "Registrazione NoProfit" @@ -717,6 +720,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1376,6 +1382,9 @@ msgstr "" msgid "Make a request" msgstr "Inserisci richiesta" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1877,6 +1886,9 @@ msgstr "" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1889,6 +1901,9 @@ msgstr "" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2114,7 +2129,7 @@ msgstr "Rispondi via email" msgid "Respond to request" msgstr "" -msgid "Respond to the FOI request" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" msgstr "" msgid "Respond using the web" @@ -2319,9 +2334,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "" -msgid "Start now »" -msgstr "" - msgid "Start your own blog" msgstr "" @@ -2919,6 +2931,9 @@ msgstr "" msgid "Unable to send follow up message to {{username}}" msgstr "" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "" @@ -2979,9 +2994,6 @@ msgstr "" msgid "User|About me" msgstr "" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "" @@ -2991,9 +3003,6 @@ msgstr "" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "" @@ -3048,18 +3057,12 @@ msgstr "" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "" -msgid "View and search requests" -msgstr "Guarda e cerca richieste" - msgid "View authorities" msgstr "Guarda autorità" msgid "View email" msgstr "" -msgid "View requests" -msgstr "Guarda richieste" - msgid "Waiting clarification." msgstr "" diff --git a/locale/mk_MK/app.po b/locale/mk_MK/app.po index c059275db..d652cb00b 100644 --- a/locale/mk_MK/app.po +++ b/locale/mk_MK/app.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:46+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Macedonian (Macedonia) (http://www.transifex.com/projects/p/alaveteli/language/mk_MK/)\n" "Language: mk_MK\n" "MIME-Version: 1.0\n" @@ -89,9 +89,6 @@ msgstr " Веќе ви се испратени новости за барање msgid " You will also be emailed updates about the request." msgstr " Исто така ќе ви бидат испратени новости за барањето по е-пошта." -msgid " made by " -msgstr " креирано од " - msgid " when you send this message." msgstr " кога ќе ја испратите оваа порака." @@ -281,6 +278,9 @@ msgstr "<strong>Заблагодарете</strong> му се ја имател msgid "<strong>did not have</strong> the information requested." msgstr "<strong>ја немаше</strong> бараната информација." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "<a href=\"{{request_url}}\">Реакција</a> на <em>{{request_title}}</em> беше испратена на {{public_body_name}} од {{info_request_user}} на {{date}}." @@ -473,6 +473,12 @@ msgstr "Прелистајте <a href='{{url}}'>други барања</a> о msgid "Browse all authorities..." msgstr "Прелистајте ги сите иматели..." +msgid "Browse and search requests" +msgstr "Видете и пребарајте барања" + +msgid "Browse requests" +msgstr "Видете барања" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Според законот, под сите околности, {{public_body_link}} требаше да одговори до сега" @@ -536,9 +542,6 @@ msgstr "Променете ја лозинката" msgid "Change your password on {{site_name}}" msgstr "Променете ја лозинката на {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Променете ја лозинката {{site_name}}" - msgid "Charity registration" msgstr "Регистрација на добротворна органзиација" @@ -713,6 +716,9 @@ msgstr "Дневник на објави" msgid "Disclosure log URL" msgstr "URL на дневник на објави" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1372,6 +1378,9 @@ msgstr "Направи ново<br/>\\n <strong>Барање за Слобод msgid "Make a request" msgstr "Поднесете барање" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1873,6 +1882,9 @@ msgstr "ProfilePhoto|Draft" msgid "Public Bodies" msgstr "Јавни институции" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "Статистика за јавни институции" @@ -1885,6 +1897,9 @@ msgstr "Јавни надлежни органи - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Јавни надлежни органи {{start_count}} до {{end_count}} од {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "Јавен надлежен орган – {{name}}" @@ -2110,8 +2125,8 @@ msgstr "Одговорете по е-пошта" msgid "Respond to request" msgstr "Одговорете на барање" -msgid "Respond to the FOI request" -msgstr "Одговорете на барањето за слободен пристап до информации од јавен карактер" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Одговорете преку веб" @@ -2315,9 +2330,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "Специјална белешка за овој имател!" -msgid "Start now »" -msgstr "Почнете сега »" - msgid "Start your own blog" msgstr "Почнете сопствен блог" @@ -2915,6 +2927,9 @@ msgstr "Не може да се испрати одговор на {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "Не може да се испрати порака за реакција до {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Неочекуван тип на резултат од пребарување " @@ -2980,9 +2995,6 @@ msgstr "" msgid "User|About me" msgstr "User|За мене" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "User|Администраторско ниво" @@ -2992,9 +3004,6 @@ msgstr "User|Текст за исклучување" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "User|Е-пошта" @@ -3049,18 +3058,12 @@ msgstr "Видете ја адресата за е-пошта за слобод msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Видете ги барањата за слободен пристап до информации од јавен карактер направени од {{user_name}}:" -msgid "View and search requests" -msgstr "Видете и пребарајте барања" - msgid "View authorities" msgstr "Видете ги имателите" msgid "View email" msgstr "Видете е-пошта" -msgid "View requests" -msgstr "Видете барања" - msgid "Waiting clarification." msgstr "Се чека појаснување." diff --git a/locale/model_attributes.rb b/locale/model_attributes.rb index 8cbe8528f..41b07e052 100644 --- a/locale/model_attributes.rb +++ b/locale/model_attributes.rb @@ -126,11 +126,9 @@ _('TrackThing|Track query') _('TrackThing|Track type') _('User') _('User|About me') -_('User|Address') _('User|Admin level') _('User|Ban text') _('User|Can make batch requests') -_('User|Dob') _('User|Email') _('User|Email bounce message') _('User|Email bounced at') diff --git a/locale/nb_NO/app.po b/locale/nb_NO/app.po index 79041f21f..1e5001a70 100644 --- a/locale/nb_NO/app.po +++ b/locale/nb_NO/app.po @@ -6,6 +6,7 @@ # andreli <andre@lindhjem.net>, 2013 # andreli <andre@lindhjem.net>, 2013 # atluxity <atluxity@1kb.no>, 2014 +# atluxity <atluxity@1kb.no>, 2014 # gorm <gormer@gmail.com>, 2013-2014 # gorm <gormer@gmail.com>, 2013 # atluxity <atluxity@1kb.no>, 2014 @@ -17,9 +18,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-06-13 21:03+0000\n" -"Last-Translator: pere <pere-transifex@hungry.com>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:50+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Norwegian Bokmål (Norway) (http://www.transifex.com/projects/p/alaveteli/language/nb_NO/)\n" "Language: nb_NO\n" "MIME-Version: 1.0\n" @@ -46,10 +47,10 @@ msgid " - wall" msgstr " - vegg" msgid " < " -msgstr "" +msgstr "<" msgid " << " -msgstr "" +msgstr "<<" msgid " <strong>Note:</strong>\\n We will send you an email. Follow the instructions in it to change\\n your password." msgstr " <strong>Merk:</strong>\\n Vi kommer til å sende deg en e-post. følg instruksjonene i den for å bytte\\n passordet ditt." @@ -61,10 +62,10 @@ msgid " <strong>Summarise</strong> the content of any information returned. " msgstr "<stong>Oppsummer</strong> innholdet av informasjon som ble returnert." msgid " > " -msgstr "" +msgstr ">" msgid " >> " -msgstr "" +msgstr ">>" msgid " Advise on how to <strong>best clarify</strong> the request." msgstr "Råd om hvordan <strong>best klargjøre</strong> forespørselen." @@ -101,9 +102,6 @@ msgstr "Du mottar allerede oppdateringer om denne forespørselen på e-post." msgid " You will also be emailed updates about the request." msgstr "Vi vil også motta oppdateringer om denne forespørselen på e-post." -msgid " made by " -msgstr " laget av " - msgid " when you send this message." msgstr " når du sender denne meldinen." @@ -296,6 +294,9 @@ msgstr "<strong>Takk</strong> myndigheten eller " msgid "<strong>did not have</strong> the information requested." msgstr "<strong>hadde ikke</strong> informasjonen du ba om." +msgid "?" +msgstr "?" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "En <a href=\"{{request_url}}\">oppfølging</a> til <em>{{request_title}}</em> ble sendt til {{public_body_name}} fra {{info_request_user}} den {{date}}." @@ -309,7 +310,7 @@ msgid "A Freedom of Information request" msgstr "En innsynsbegjæring" msgid "A full history of my FOI request and all correspondence is available on the Internet at this address: {{url}}" -msgstr "" +msgstr "Komplett historie for min innsynsforespørsel og all korrespondanse er tilgjengelig på Internettet fra denne adressen: {{url}}" msgid "A new request, <em><a href=\"{{request_url}}\">{{request_title}}</a></em>, was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "En ny henvendelse, <em><a href=\"{{request_url}}\">{{request_title}}</a></em>, ble sendt til {{public_body_name}} av {{info_request_user}} den {{date}}." @@ -488,6 +489,12 @@ msgstr "Se på <a href='{{url}}'>andre henvendelser</a> til '{{public_body_name} msgid "Browse all authorities..." msgstr "Vis alle myndighetene..." +msgid "Browse and search requests" +msgstr "Vis og søk i henvendelser" + +msgid "Browse requests" +msgstr "Vis henvendelser" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "I følge loven så burde {{public_body_link}}, under enhver omstendighet ha svart på dette tidspunkt" @@ -551,9 +558,6 @@ msgstr "Bytt passordet ditt" msgid "Change your password on {{site_name}}" msgstr "Bytt passordet ditt på {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Bytt passordet ditt hos {{site_name}}" - msgid "Charity registration" msgstr "Veledighetsregistrering" @@ -720,7 +724,9 @@ msgid "Did you mean: {{correction}}" msgstr "Mente du: " msgid "Disclaimer: This message and any reply that you make will be published on the internet. Our privacy and copyright policies:" -msgstr "Ansvarsfraskrivelse: Denne meldingen og alle dine svar vil automatisk bli publisert offentlig på Internettet. Våre personvern og åndsverksregler: " +msgstr "" +"Til orientering: Denne meldingen og alle dine svar vil automatisk bli publiset offentlig på Internett.\n" +"Våre regler for personvern og åndsverk:" msgid "Disclosure log" msgstr "Utleveringslogg" @@ -728,6 +734,9 @@ msgstr "Utleveringslogg" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -807,7 +816,7 @@ msgid "Everything that you enter on this page\\n will be <strong> msgstr "Alt du skriver inn på denne sida\\n vil bli <strong>vist offentlig</strong> på\\n denne tjenesten for all framtid (<a href=\"{{url}}\">hvorfor?</a>)." msgid "FOI" -msgstr "Innsynshenvendelse" +msgstr "Innsynsforespørsel (Offentlighetslova)" msgid "FOI email address for {{public_body}}" msgstr "postmottaket hos {{public_body}}" @@ -941,7 +950,7 @@ msgstr[0] "Fant {{count}} offentlig myndighet {{description}}" msgstr[1] "Fant {{count}} offentlige myndigheter {{description}}" msgid "Freedom of Information" -msgstr "innsynsbegjæring" +msgstr "Innsynsforespørsel (Offentlighetslova)" msgid "Freedom of Information Act" msgstr "Offentlighetsloven" @@ -1119,6 +1128,8 @@ msgstr "" msgid "If you are thinking of using a pseudonym,\\n please <a href=\"{{url}}\">read this first</a>." msgstr "" +"Hvis du vurderer å bruke et pseudonym,\\n er det fint om du\n" +"<a href=\"{{url}}\">leser dette først</a>." msgid "If you are {{user_link}}, please" msgstr "Hvis du er {{user_link}}, vennligst" @@ -1133,7 +1144,7 @@ msgid "If you can, scan in or photograph the response, and <strong>send us\\n msgstr "Hvis du kan, skann eller fotografer responsen og <strong>send oss\\n en kopi for opplasting</strong>." msgid "If you find this service useful as an FOI officer, please ask your web manager to link to us from your organisation's FOI page." -msgstr "Om du som offentlig saksbehandler finner denne tjenesten nyttig, vennligst spør om din kommunikasjonsavdeling kan lenke til oss fra din innsyns-side." +msgstr "Hvis du som offentlig saksbehandler finner denne tjenesten nyttig, er det fint om spør kommunikasjonsavdelingen din om de kan lenke til oss fra deres innsyns-side." msgid "If you got the email <strong>more than six months ago</strong>, then this login link won't work any\\nmore. Please try doing what you were doing from the beginning." msgstr "Hvis du fikk eposten <strong>mer enn seks måneder siden</strong>, så vil ikke denne innloggings-lenken virke lenger.\\n Forsøk igjen det du holdt på med fra starten." @@ -1387,6 +1398,9 @@ msgstr "Lag en ny<br/>\\n <strong>forespørsel <span>om</span><br/>\\n innsyn</ msgid "Make a request" msgstr "Lag henvendelse" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1888,6 +1902,9 @@ msgstr "" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1900,6 +1917,9 @@ msgstr "Offentlige myndigheter - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Offentlige myndigheter {{start_count}} til {{end_count}} av totalt {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "Offentlig myndighet – {{name}}" @@ -2125,8 +2145,8 @@ msgstr "Svar med epost" msgid "Respond to request" msgstr "Svar på henvendelsen" -msgid "Respond to the FOI request" -msgstr "Svar på en innsynsbegjæring" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Svar på nett" @@ -2330,9 +2350,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "Spesiell merknad for denne myndigheten!" -msgid "Start now »" -msgstr "Start nå »" - msgid "Start your own blog" msgstr "Start din egen blogg" @@ -2790,7 +2807,7 @@ msgid "To cancel this alert" msgstr "For å avbryte dette varselet" msgid "To carry on, you need to sign in or make an account. Unfortunately, there\\nwas a technical problem trying to do this." -msgstr "" +msgstr "For å fortsette må du logge inn eller lage en konto. Beklageligvis var\\ndet et teknisk problem idet du forsøkte å gjøre dette." msgid "To change your email address used on {{site_name}}" msgstr "For å endre din e-postadresse brukt på {{site_name}}" @@ -2838,7 +2855,7 @@ msgid "To make a batch request" msgstr "" msgid "To play the request categorisation game" -msgstr "" +msgstr "For å spille forespørselskategoriseringsspillet" msgid "To post your annotation" msgstr "For å poste din kommentar" @@ -2930,6 +2947,9 @@ msgstr "Klarte ikke sende svar til {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "Klarte ikke sende oppfølgningsmelding til {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "Skjulte og uklassifiserte forespørsler blir ikke talt med." + msgid "Unexpected search result type " msgstr "Uventet type søke resultat " @@ -2952,7 +2972,7 @@ msgid "Unusual response." msgstr "Uvanlig svar." msgid "Update email address - {{public_body_name}}" -msgstr "" +msgstr "Oppdater epostadresse - {{" msgid "Update the address:" msgstr "Oppdater adressen:" @@ -2990,9 +3010,6 @@ msgstr "" msgid "User|About me" msgstr "Bruker|Om meg" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "Bruker|Admin nivå" @@ -3002,9 +3019,6 @@ msgstr "Bruker|Ban tekst" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "Bruker|E-post" @@ -3059,18 +3073,12 @@ msgstr "Vis e-post adresse for innsyn mot {{public_body_name}}" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Vis innsynsbegjæringer som er opprettet av {{user_name}}:" -msgid "View and search requests" -msgstr "Vis og søk i henvendelser" - msgid "View authorities" msgstr "Vis myndigheter" msgid "View email" msgstr "Les epost" -msgid "View requests" -msgstr "Vis henvendelser" - msgid "Waiting clarification." msgstr "Venter avklaring" @@ -3291,7 +3299,7 @@ msgid "You have now changed your email address used on {{site_name}}" msgstr "Du har nå endret e-øost adressen brukt på {{site_name}}" msgid "You just tried to sign up to {{site_name}}, when you\\nalready have an account. Your name and password have been\\nleft as they previously were.\\n\\nPlease click on the link below." -msgstr "Du forsøkte å registrere deg på {{site_name}}, når du\\nallerede har en konto. Ditt navn og passord har ikke blitt endret.\\m\\mVennligst klikk på lenken nedenfor." +msgstr "Du forsøkte å registrere deg på {{site_name}}, når du allerede\\nhar en konto. Ditt navn og passord har ikke blitt endret.\\n\\nVennligst klikk på lenken nedenfor." msgid "You know what caused the error, and can <strong>suggest a solution</strong>, such as a working email address." msgstr "Du vet hva som forårsaket feilen, og kan <strong>foreslå en løsning</strong>, som en fungerende e-post adresse." @@ -3375,7 +3383,7 @@ msgid "You've now cleared your profile photo" msgstr "Du har nå slettet profil-bildet ditt" msgid "Your <strong>name will appear publicly</strong>\\n (<a href=\"{{why_url}}\">why?</a>)\\n on this website and in search engines. If you\\n are thinking of using a pseudonym, please\\n <a href=\"{{help_url}}\">read this first</a>." -msgstr "<strong>Navnet ditt vil vises offentlig</strong>\\n (<a href=\"{{why_url}}\">hvorfor?</a>)\\n på denne nettsiden og i søkemotorer. Om du\\n tenker å bruke et pseudonym,\\n <a href=\"{{help_url}}\">les dette først</a>." +msgstr "<strong>Navnet ditt vil vises offentlig</strong>\\n (<a href=\"{{why_url}}\">hvorfor?</a>)\\n på denne nettsiden og i søkemotorer. Om du\\n vurderer å bruke et pseudonym,\\n er det fint om du <a href=\"{{help_url}}\">leser dette først</a>." msgid "Your annotations" msgstr "Dine merknader" @@ -3787,10 +3795,10 @@ msgid "{{info_request_user_name}} only:" msgstr "Bare {{info_request_user_name}} (henvender):" msgid "{{law_used_full}} request - {{title}}" -msgstr "{{law_used_full}} henvendelse - {{title}}" +msgstr "{{law_used_full}} - {{title}}" msgid "{{law_used}} requests at {{public_body}}" -msgstr "{{law_used}} henvendelse til {{public_body}}" +msgstr "{{law_used}} til {{public_body}}" msgid "{{length_of_time}} ago" msgstr "{{length_of_time}} siden" diff --git a/locale/nl/app.po b/locale/nl/app.po index 8957cb1e8..8d2764dcb 100644 --- a/locale/nl/app.po +++ b/locale/nl/app.po @@ -10,9 +10,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:46+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Dutch (http://www.transifex.com/projects/p/alaveteli/language/nl/)\n" "Language: nl\n" "MIME-Version: 1.0\n" @@ -92,9 +92,6 @@ msgstr "U bent reeds gemaild met updates over het verzoek." msgid " You will also be emailed updates about the request." msgstr "U zult via de email op de hoogte gehouden worden over het verzoek." -msgid " made by " -msgstr "gemaakt door" - msgid " when you send this message." msgstr "wanneer u dit bericht verzend." @@ -284,6 +281,9 @@ msgstr "" msgid "<strong>did not have</strong> the information requested." msgstr "" +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -476,6 +476,12 @@ msgstr "" msgid "Browse all authorities..." msgstr "Blader door alle instanties ..." +msgid "Browse and search requests" +msgstr "" + +msgid "Browse requests" +msgstr "" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Volgens de wet, onder alle omstandigheden, {{public_body_link}} zou na al moeten hebben gereageerd" @@ -539,9 +545,6 @@ msgstr "Wijzig uw wachtwoord" msgid "Change your password on {{site_name}}" msgstr "Wijzig uw wachtwoord op {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Wijzig uw wachtwoord {{site_name}}" - msgid "Charity registration" msgstr "goede doel registratie" @@ -716,6 +719,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1375,6 +1381,9 @@ msgstr "" msgid "Make a request" msgstr "" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1876,6 +1885,9 @@ msgstr "" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1888,6 +1900,9 @@ msgstr "Overheidsinstanties - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2113,7 +2128,7 @@ msgstr "" msgid "Respond to request" msgstr "" -msgid "Respond to the FOI request" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" msgstr "" msgid "Respond using the web" @@ -2318,9 +2333,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "" -msgid "Start now »" -msgstr "" - msgid "Start your own blog" msgstr "" @@ -2918,6 +2930,9 @@ msgstr "" msgid "Unable to send follow up message to {{username}}" msgstr "" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "" @@ -2978,9 +2993,6 @@ msgstr "" msgid "User|About me" msgstr "" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "" @@ -2990,9 +3002,6 @@ msgstr "" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "" @@ -3047,18 +3056,12 @@ msgstr "" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Bekijk de Wet Openbaarheid Bestuur verzoeken van {{gebruikersnaam}}:" -msgid "View and search requests" -msgstr "" - msgid "View authorities" msgstr "" msgid "View email" msgstr "" -msgid "View requests" -msgstr "" - msgid "Waiting clarification." msgstr "" diff --git a/locale/nn/app.po b/locale/nn/app.po index 8c75e4e81..8a488c2a8 100644 --- a/locale/nn/app.po +++ b/locale/nn/app.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:46+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Norwegian Nynorsk (http://www.transifex.com/projects/p/alaveteli/language/nn/)\n" "Language: nn\n" "MIME-Version: 1.0\n" @@ -89,9 +89,6 @@ msgstr "" msgid " You will also be emailed updates about the request." msgstr "" -msgid " made by " -msgstr "" - msgid " when you send this message." msgstr "" @@ -281,6 +278,9 @@ msgstr "" msgid "<strong>did not have</strong> the information requested." msgstr "" +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -473,6 +473,12 @@ msgstr "" msgid "Browse all authorities..." msgstr "" +msgid "Browse and search requests" +msgstr "" + +msgid "Browse requests" +msgstr "" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "" @@ -536,9 +542,6 @@ msgstr "" msgid "Change your password on {{site_name}}" msgstr "" -msgid "Change your password {{site_name}}" -msgstr "" - msgid "Charity registration" msgstr "" @@ -713,6 +716,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1372,6 +1378,9 @@ msgstr "" msgid "Make a request" msgstr "" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1873,6 +1882,9 @@ msgstr "" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1885,6 +1897,9 @@ msgstr "" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2110,7 +2125,7 @@ msgstr "" msgid "Respond to request" msgstr "" -msgid "Respond to the FOI request" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" msgstr "" msgid "Respond using the web" @@ -2315,9 +2330,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "" -msgid "Start now »" -msgstr "" - msgid "Start your own blog" msgstr "" @@ -2915,6 +2927,9 @@ msgstr "" msgid "Unable to send follow up message to {{username}}" msgstr "" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "" @@ -2975,9 +2990,6 @@ msgstr "" msgid "User|About me" msgstr "" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "" @@ -2987,9 +2999,6 @@ msgstr "" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "" @@ -3044,18 +3053,12 @@ msgstr "" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "" -msgid "View and search requests" -msgstr "" - msgid "View authorities" msgstr "" msgid "View email" msgstr "" -msgid "View requests" -msgstr "" - msgid "Waiting clarification." msgstr "" diff --git a/locale/pl/app.po b/locale/pl/app.po index c4acd40e2..dcc63d7b1 100644 --- a/locale/pl/app.po +++ b/locale/pl/app.po @@ -9,9 +9,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:46+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Polish (http://www.transifex.com/projects/p/alaveteli/language/pl/)\n" "Language: pl\n" "MIME-Version: 1.0\n" @@ -91,9 +91,6 @@ msgstr "" msgid " You will also be emailed updates about the request." msgstr "" -msgid " made by " -msgstr "" - msgid " when you send this message." msgstr "" @@ -283,6 +280,9 @@ msgstr "" msgid "<strong>did not have</strong> the information requested." msgstr "" +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -475,6 +475,12 @@ msgstr "" msgid "Browse all authorities..." msgstr "" +msgid "Browse and search requests" +msgstr "" + +msgid "Browse requests" +msgstr "" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "" @@ -538,9 +544,6 @@ msgstr "" msgid "Change your password on {{site_name}}" msgstr "" -msgid "Change your password {{site_name}}" -msgstr "Zmień hasło {{site_name}}" - msgid "Charity registration" msgstr "" @@ -715,6 +718,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1375,6 +1381,9 @@ msgstr "" msgid "Make a request" msgstr "" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1876,6 +1885,9 @@ msgstr "" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1888,6 +1900,9 @@ msgstr "" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2113,7 +2128,7 @@ msgstr "" msgid "Respond to request" msgstr "" -msgid "Respond to the FOI request" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" msgstr "" msgid "Respond using the web" @@ -2320,9 +2335,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "" -msgid "Start now »" -msgstr "" - msgid "Start your own blog" msgstr "" @@ -2923,6 +2935,9 @@ msgstr "" msgid "Unable to send follow up message to {{username}}" msgstr "" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "" @@ -2983,9 +2998,6 @@ msgstr "" msgid "User|About me" msgstr "" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "" @@ -2995,9 +3007,6 @@ msgstr "" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "" @@ -3052,18 +3061,12 @@ msgstr "" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "" -msgid "View and search requests" -msgstr "" - msgid "View authorities" msgstr "" msgid "View email" msgstr "" -msgid "View requests" -msgstr "" - msgid "Waiting clarification." msgstr "" diff --git a/locale/pt_BR/app.po b/locale/pt_BR/app.po index bd4a159d1..713dca950 100644 --- a/locale/pt_BR/app.po +++ b/locale/pt_BR/app.po @@ -43,9 +43,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:47+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/alaveteli/language/pt_BR/)\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" @@ -125,9 +125,6 @@ msgstr " Você já está recebendo e-mails de atualização sobre o pedido." msgid " You will also be emailed updates about the request." msgstr "Você também receberá atualizações por e-mail sobre esse pedido." -msgid " made by " -msgstr "feito por" - msgid " when you send this message." msgstr "quando você enviar esta mensagem." @@ -335,6 +332,9 @@ msgstr "<strong>Agradeça</strong> o órgão público ou" msgid "<strong>did not have</strong> the information requested." msgstr "<strong>não tem</strong> as informações solicitadas." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." @@ -527,6 +527,12 @@ msgstr "Busque <a href='{{url}}'>outros pedidos</a> para '{{public_body_name}}' msgid "Browse all authorities..." msgstr "Listar todos os órgãos..." +msgid "Browse and search requests" +msgstr "Visualizar ou buscar pedidos" + +msgid "Browse requests" +msgstr "Ver pedidos" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "De acordo com a lei, em qualquer circunstância, {{public_body_link}} já deveria ter respondido seu pedido." @@ -590,9 +596,6 @@ msgstr "Alterar a sua senha" msgid "Change your password on {{site_name}}" msgstr "Alterar a sua senha em {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Mude sua senha do {{site_name}}" - msgid "Charity registration" msgstr "Registro de ONG" @@ -767,6 +770,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1437,6 +1443,9 @@ msgstr "" msgid "Make a request" msgstr "Criar uma solicitação" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1938,6 +1947,9 @@ msgstr "ProfilePhoto | Rascunho" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1950,6 +1962,9 @@ msgstr "Orgãos públicos - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Órgão público {{start_count}} para {{end_count}} de {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2175,8 +2190,8 @@ msgstr "Resposta por e-mail" msgid "Respond to request" msgstr "Responder a este pedido" -msgid "Respond to the FOI request" -msgstr "Responder ao pedido de acesso à informação" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Responder através do site" @@ -2380,9 +2395,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "Recado especial para esta autoridade!" -msgid "Start now »" -msgstr "Começar agora »" - msgid "Start your own blog" msgstr "Fazer seu próprio blog" @@ -2988,6 +3000,9 @@ msgstr "Não foi possível enviar uma mensagem para {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "Não foi possível mandar uma mensagem de acompanhamento para {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Tipo inesperado de resultado da busca " @@ -3050,9 +3065,6 @@ msgstr "" msgid "User|About me" msgstr "Usuário | Sobre mim" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "Usuário | Nível de administrador" @@ -3062,9 +3074,6 @@ msgstr "Usuário | Banir texto" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "Usuário | E-mail" @@ -3119,18 +3128,12 @@ msgstr "Veja o e-mail de {{public_body_name}}" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Ver os pedidos de acesso a informação feitos por {{user_name}}:" -msgid "View and search requests" -msgstr "Visualizar ou buscar pedidos" - msgid "View authorities" msgstr "Ver órgãos públicos" msgid "View email" msgstr "Ver e-mail" -msgid "View requests" -msgstr "Ver pedidos" - msgid "Waiting clarification." msgstr "Esperando esclarecimento." diff --git a/locale/pt_PT/app.po b/locale/pt_PT/app.po index be6269a1b..2a740ebc9 100644 --- a/locale/pt_PT/app.po +++ b/locale/pt_PT/app.po @@ -27,9 +27,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-06-27 14:00+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:50+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Portuguese (Portugal) (http://www.transifex.com/projects/p/alaveteli/language/pt_PT/)\n" "Language: pt_PT\n" "MIME-Version: 1.0\n" @@ -109,9 +109,6 @@ msgstr " Você já está recebendo e-mails de atualização sobre o pedido." msgid " You will also be emailed updates about the request." msgstr "Você também receberá atualizações por e-mail sobre esse pedido." -msgid " made by " -msgstr "feito por" - msgid " when you send this message." msgstr "quando você enviar esta mensagem." @@ -319,6 +316,9 @@ msgstr "<strong>Agradeça</strong> o órgão público ou" msgid "<strong>did not have</strong> the information requested." msgstr "<strong>não tem</strong> as informações solicitadas." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." @@ -511,6 +511,12 @@ msgstr "Busque <a href='{{url}}'>outros pedidos</a> para '{{public_body_name}}' msgid "Browse all authorities..." msgstr "Listar todos os órgãos..." +msgid "Browse and search requests" +msgstr "Visualizar ou buscar pedidos" + +msgid "Browse requests" +msgstr "Ver pedidos" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "De acordo com a lei, em qualquer circunstância, {{public_body_link}} já deveria ter respondido seu pedido." @@ -574,9 +580,6 @@ msgstr "Alterar a sua senha" msgid "Change your password on {{site_name}}" msgstr "Alterar a sua senha em {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Mude sua senha do {{site_name}}" - msgid "Charity registration" msgstr "Registro de ONG" @@ -751,6 +754,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1421,6 +1427,9 @@ msgstr "" msgid "Make a request" msgstr "Criar uma solicitação" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1922,6 +1931,9 @@ msgstr "ProfilePhoto | Rascunho" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1934,6 +1946,9 @@ msgstr "Orgãos públicos - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Órgão público {{start_count}} para {{end_count}} de {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2159,8 +2174,8 @@ msgstr "Resposta por e-mail" msgid "Respond to request" msgstr "Responder a este pedido" -msgid "Respond to the FOI request" -msgstr "Responder ao pedido de acesso à informação" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Responder através do site" @@ -2364,9 +2379,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "Recado especial para esta autoridade!" -msgid "Start now »" -msgstr "Começar agora »" - msgid "Start your own blog" msgstr "Fazer seu próprio blog" @@ -2972,6 +2984,9 @@ msgstr "Não foi possível enviar uma mensagem para {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "Não foi possível mandar uma mensagem de acompanhamento para {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Tipo inesperado de resultado da busca " @@ -3034,9 +3049,6 @@ msgstr "" msgid "User|About me" msgstr "Usuário | Sobre mim" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "Usuário | Nível de administrador" @@ -3046,9 +3058,6 @@ msgstr "Usuário | Banir texto" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "Usuário | E-mail" @@ -3103,18 +3112,12 @@ msgstr "Veja o e-mail de {{public_body_name}}" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Ver os pedidos de acesso a informação feitos por {{user_name}}:" -msgid "View and search requests" -msgstr "Visualizar ou buscar pedidos" - msgid "View authorities" msgstr "Ver órgãos públicos" msgid "View email" msgstr "Ver e-mail" -msgid "View requests" -msgstr "Ver pedidos" - msgid "Waiting clarification." msgstr "Esperando esclarecimento." diff --git a/locale/ro_RO/app.po b/locale/ro_RO/app.po index d8fa1e641..01706ec34 100644 --- a/locale/ro_RO/app.po +++ b/locale/ro_RO/app.po @@ -4,15 +4,17 @@ # # Translators: # Andrei Cristian Petcu <andreicristianpetcu@gmail.com>, 2012-2013 -# Andrei Cristian Petcu <andreicristianpetcu@gmail.com>, 2013 +# Andrei Cristian Petcu <andreicristianpetcu@gmail.com>, 2012-2013 # Andrei Cristian Petcu <andreicristianpetcu@gmail.com>, 2012 # Claudiu Marginean <copyratul@gmail.com>, 2012 # Claudiu Marginean <copyratul@gmail.com>, 2012 +# Claudiu Marginean <copyratul@gmail.com>, 2012 # Cosmin Pojoranu <cosmin@funkycitizens.org>, 2013 # Elena Calistru <calistru.elena@gmail.com>, 2013 # Elena Calistru <calistru.elena@gmail.com>, 2013 # paul.chioveanu <paul_kimmy@yahoo.com>, 2013 # paul.chioveanu <paul_kimmy@yahoo.com>, 2013 +# paul.chioveanu <paul_kimmy@yahoo.com>, 2013 # Rodica Ardelean <rodxy@yahoo.com>, 2013 # Rodica Ardelean <rodxy@yahoo.com>, 2013 # Rodica Ardelean <rodxy@yahoo.com>, 2013 @@ -21,9 +23,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:49+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Romanian (Romania) (http://www.transifex.com/projects/p/alaveteli/language/ro_RO/)\n" "Language: ro_RO\n" "MIME-Version: 1.0\n" @@ -103,9 +105,6 @@ msgstr "Ţi s-au trimis deja prin e-mail actualizări referitoare la solicitare. msgid " You will also be emailed updates about the request." msgstr "Vei primi prin email noutăți legate de cererea ta." -msgid " made by " -msgstr "făcut de" - msgid " when you send this message." msgstr "când trimiți acest mesaj." @@ -295,6 +294,9 @@ msgstr "<strong>Mulţumiri </strong> autorităţii publice sau " msgid "<strong>did not have</strong> the information requested." msgstr "<strong>nu au avut</strong> informaţia solicitată." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "O <a href=\"{{request_url}}\">urmărire </a> către <em>{{request_title}}</em> a fost trimisă către {{public_body_name}} de către {{info_request_user}} la {{date}}." @@ -487,6 +489,12 @@ msgstr "Consultaţi <a href='{{url}}'> şi alte cereri </a> catre '{{public_bod msgid "Browse all authorities..." msgstr "Consultaţi toate autoritaţile ..." +msgid "Browse and search requests" +msgstr "Vezi şi caută cereri" + +msgid "Browse requests" +msgstr "Vezi cereri" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Conform legii, în oricare circumstanţe, {{public_body_link}} ar fi trebuit să vă răspundă până acum" @@ -550,9 +558,6 @@ msgstr "Modificaţi parola" msgid "Change your password on {{site_name}}" msgstr "Modifică-ţi parola pe {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Modifică parola ta pe {{site_name}}" - msgid "Charity registration" msgstr "Înregistrare ONG" @@ -727,6 +732,9 @@ msgstr "Disclosure log" msgid "Disclosure log URL" msgstr "Disclosure log URL" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1389,6 +1397,9 @@ msgstr "Faceți o nouă<br/>\\n <strong>solicitare <span>de</span><br/>\\n infor msgid "Make a request" msgstr "Faceţi o cerere" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1890,6 +1901,9 @@ msgstr "Poza de profil|Ciornă" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1902,6 +1916,9 @@ msgstr "Autorităţi publice - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Instituții publice de la {{start_count}} la {{end_count}} din {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "Autoritatea publică – {{name}}" @@ -2127,8 +2144,8 @@ msgstr "Răspuns prin email" msgid "Respond to request" msgstr "Răspuns la cerere" -msgid "Respond to the FOI request" -msgstr "Răspunde la solicitarea de acces la informații" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Răspuns utilizând Internetul" @@ -2334,9 +2351,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "O notă specială pentru această autoritate!" -msgid "Start now »" -msgstr "Start acum »" - msgid "Start your own blog" msgstr "Incepeţi propriul jurnal" @@ -2937,6 +2951,9 @@ msgstr "Nu se poate trimite un răspuns către {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "Nu se poate trimite un mesaj de urmărire către {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Tip neaşteptat de rezultat la căutare" @@ -2997,9 +3014,6 @@ msgstr "" msgid "User|About me" msgstr "Utilizator|Despre mine" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "Utilizator|Nivel administrator" @@ -3009,9 +3023,6 @@ msgstr "Utilizator|Text interzis" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "Utilizator|Email" @@ -3066,18 +3077,12 @@ msgstr "Vezi adresa de email pentru '{{public_body_name}}'" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Vezi cererile solicitările de acces la informații făcute de {{user_name}}:" -msgid "View and search requests" -msgstr "Vezi şi caută cereri" - msgid "View authorities" msgstr "Vezi autorităţi" msgid "View email" msgstr "Vezi email" -msgid "View requests" -msgstr "Vezi cereri" - msgid "Waiting clarification." msgstr "Aşteaptă clarificare" diff --git a/locale/sl/app.po b/locale/sl/app.po index fa7219fb6..b86225400 100644 --- a/locale/sl/app.po +++ b/locale/sl/app.po @@ -9,9 +9,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:49+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Slovenian (http://www.transifex.com/projects/p/alaveteli/language/sl/)\n" "Language: sl\n" "MIME-Version: 1.0\n" @@ -91,9 +91,6 @@ msgstr "Že prejemate e-poštna obvestila o tem zahtevku." msgid " You will also be emailed updates about the request." msgstr "Prejeli boste tudi e-poštna obvestila o zahtevku." -msgid " made by " -msgstr "ustvaril" - msgid " when you send this message." msgstr "ko pošljete to sporočilo." @@ -283,6 +280,9 @@ msgstr "<strong>Zahvalite se</strong> javnemu organu ali" msgid "<strong>did not have</strong> the information requested." msgstr "<strong>ni imel</strong> zahtevanih informacij" +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "<a href=\"{{request_url}}\">Odziv</a> na <em>{{request_title}}</em> je {{info_request_user}} poslal {{public_body_name}} dne {{date}}." @@ -475,6 +475,12 @@ msgstr "Prebrskajte <a href='{{url}}'>za drugimi zahtevki</a> za '{{public_body_ msgid "Browse all authorities..." msgstr "Prebrskajte vse organe..." +msgid "Browse and search requests" +msgstr "Preglejte in iščite po zahtevkih" + +msgid "Browse requests" +msgstr "Poglejte zahtevke" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Po zakonu in po vseh možnih scenarijih bi {{public_body_link}} do sedaj že moral odgovoriti" @@ -538,9 +544,6 @@ msgstr "Spremenite vaše geslo" msgid "Change your password on {{site_name}}" msgstr "Spremenite vaše geslo na {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Spremenite vaše geslo {{site_name}}" - msgid "Charity registration" msgstr "Prijava dobrodelne organizacije" @@ -715,6 +718,9 @@ msgstr "Dnevnik razkritij" msgid "Disclosure log URL" msgstr "URL za dnevnik razkritij" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1376,6 +1382,9 @@ msgstr "Ustvarite nov<br/>\\n <strong>Zahtevek <span>za</span><br/>\\n informaci msgid "Make a request" msgstr "Naredite zahtevek" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1877,6 +1886,9 @@ msgstr "ProfilnaSlika|Osnutek" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1889,6 +1901,9 @@ msgstr "Javni organi - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Javni organi od {{start_count}} do {{end_count}} od skupno {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "Javni organ - {{name}}" @@ -2114,8 +2129,8 @@ msgstr "Odgovorite prek e-pošte" msgid "Respond to request" msgstr "Odgovorite na zahtevek" -msgid "Respond to the FOI request" -msgstr "Odgovorite na zahtevek po IJZ" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Odgovorite z uporabo spletnega vmesnika" @@ -2323,9 +2338,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "Posebna opomba za ta organ!" -msgid "Start now »" -msgstr "Začnite zdaj »" - msgid "Start your own blog" msgstr "Začnite svoj blog" @@ -2929,6 +2941,9 @@ msgstr "Ni bilo možno poslati odgovora osebi {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "Ni bilo možno poslati odziva osebi {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Nepričakovan tip rezultata pri iskanju" @@ -2989,9 +3004,6 @@ msgstr "" msgid "User|About me" msgstr "User|About me" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "User|Admin level" @@ -3001,9 +3013,6 @@ msgstr "User|Ban text" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "User|Email" @@ -3058,18 +3067,12 @@ msgstr "Poglejte e-poštni naslov za zahtevke za IJZ za {{public_body_name}}" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Poglejte zahtevke za informacije javnega značaja, ki jih je naredil {{user_name}}:" -msgid "View and search requests" -msgstr "Preglejte in iščite po zahtevkih" - msgid "View authorities" msgstr "Poglejte organe" msgid "View email" msgstr "Poglejte e-poštni naslov" -msgid "View requests" -msgstr "Poglejte zahtevke" - msgid "Waiting clarification." msgstr "Čaka pojasnilo." diff --git a/locale/sq/app.po b/locale/sq/app.po index f85e2aade..e9cd89cfd 100644 --- a/locale/sq/app.po +++ b/locale/sq/app.po @@ -17,9 +17,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:49+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Albanian (http://www.transifex.com/projects/p/alaveteli/language/sq/)\n" "Language: sq\n" "MIME-Version: 1.0\n" @@ -109,9 +109,6 @@ msgstr " Ti tashmë je duke i pranuar me email aktualizimet në lidhje me këtë msgid " You will also be emailed updates about the request." msgstr " Ti gjithashtu do të pranon email me aktualizimet e reja në lidhje me kërkesën." -msgid " made by " -msgstr " bërë nga " - msgid " when you send this message." msgstr " kur e dërgoni këtë mesazh." @@ -329,6 +326,9 @@ msgstr "<strong>Falënderoju</strong> autoritet publik ose " msgid "<strong>did not have</strong> the information requested." msgstr "<strong>nuk e kanë</strong> informacionin e kërkuar." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -529,6 +529,12 @@ msgstr "Shfleto <a href='{{url}}'>kërkesa të tjera</a> të drejtuara te '{{pub msgid "Browse all authorities..." msgstr "Shfleto të gjitha autoritetet ..." +msgid "Browse and search requests" +msgstr "Shiko dhe kërko kërkesat" + +msgid "Browse requests" +msgstr "Shiko kërkesat" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Sipas ligjit, në të gjitha rrethanat, {{public_body_link}} është duhur të përgjigjet deri tani" @@ -592,9 +598,6 @@ msgstr "Ndrysho fjalëkalimin tënd" msgid "Change your password on {{site_name}}" msgstr "Ndrysho fjalëkalimin tënd në {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Ndrysho fjalëkalimin tënd {{site_name}}" - msgid "Charity registration" msgstr "Regjistrimi i organizatës" @@ -769,6 +772,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1468,6 +1474,9 @@ msgstr "" msgid "Make a request" msgstr "Bëj një kërkesë" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1978,6 +1987,9 @@ msgstr "ProfilePhoto|Draft" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1990,6 +2002,9 @@ msgstr "Autoritetet publike - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Autoritetet publike {{start_count}} deri {{end_count}} prej {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2217,8 +2232,8 @@ msgstr "Përgjigju me email" msgid "Respond to request" msgstr "Përgjigju kërkesës" -msgid "Respond to the FOI request" -msgstr "Përgjigju kërkesës për Informata Zyrtare" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Përgjigju duke përdorur ueb faqen" @@ -2427,9 +2442,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "Shënim i veçantë për këtë autoritet!" -msgid "Start now »" -msgstr "Fillo tash »" - msgid "Start your own blog" msgstr "Nis blogun tënd" @@ -3047,6 +3059,9 @@ msgstr "Nuk munda të dërgoj përgjigje te {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "Nuk munda të dërgoj një përcjellje te {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Lloji i papritur i rezultatit të kërkuar " @@ -3107,9 +3122,6 @@ msgstr "" msgid "User|About me" msgstr "Përdoruesi|Rreth meje" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "Përdoruesi | Niveli i Administrimit" @@ -3119,9 +3131,6 @@ msgstr "Përdoruesi|Tekst i ndaluar" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "Përdoruesi |Email" @@ -3176,18 +3185,12 @@ msgstr "Shiko adresën e emailit për Informatë Zyrtare {{public_body_name}}" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Shiko kërkesat për informata zyrtare të bëra nga {{user_name}}: " -msgid "View and search requests" -msgstr "Shiko dhe kërko kërkesat" - msgid "View authorities" msgstr "Shiko autoritetet" msgid "View email" msgstr "Shiko adresën e emailit" -msgid "View requests" -msgstr "Shiko kërkesat" - msgid "Waiting clarification." msgstr "Duke pritur sqarim." diff --git a/locale/sr@latin/app.po b/locale/sr@latin/app.po index f773248ba..432eb113f 100644 --- a/locale/sr@latin/app.po +++ b/locale/sr@latin/app.po @@ -15,9 +15,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:47+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Serbian (Latin) (http://www.transifex.com/projects/p/alaveteli/language/sr@latin/)\n" "Language: sr@latin\n" "MIME-Version: 1.0\n" @@ -101,9 +101,6 @@ msgstr "Već ste se prijavili da primate novosti u vezi zahteva." msgid " You will also be emailed updates about the request." msgstr "Novosti u vezi zahteva će Vam takođe biti poslate i putem e-pošte." -msgid " made by " -msgstr " načinjeno od strane " - msgid " when you send this message." msgstr " kada pošaljete ovu poruku." @@ -297,6 +294,9 @@ msgstr "<strong>Zahvalite</strong> javnoj ustanovi ili " msgid "<strong>did not have</strong> the information requested." msgstr "<strong>nije imao</strong> traženu informaciju." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "<a href=\"{{request_url}}\">Reakcija</a> na <em>{{request_title}}</em> je poslata za {{public_body_name}} od strane korisnika {{info_request_user}} na dan {{date}}." @@ -491,6 +491,12 @@ msgstr "Listajte <a href='{{url}}'>druge zahteve</a> od '{{public_body_name}}' z msgid "Browse all authorities..." msgstr "Listajte sve ustanove..." +msgid "Browse and search requests" +msgstr "Pregledaj i pretraži zahteve" + +msgid "Browse requests" +msgstr "Pregled zahteva" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Po zakonu je, u svakoj varijanti, {{public_body_link}} trebalo da odgovori do sada" @@ -554,9 +560,6 @@ msgstr "Promenite Vašu lozinku" msgid "Change your password on {{site_name}}" msgstr "Promenite Vašu lozinku na {{site_name}}" -msgid "Change your password {{site_name}}" -msgstr "Promenite Vašu lozinku {{site_name}}" - msgid "Charity registration" msgstr "Registracija fondacije" @@ -731,6 +734,9 @@ msgstr "Dnevnik objava" msgid "Disclosure log URL" msgstr "URL za dnevnik objava" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1402,6 +1408,9 @@ msgstr "Podnesi novi<br/>\\n<strong>Zahtev<span> za</span><br/>\\nslobodan<br/>\ msgid "Make a request" msgstr "Podnesi zahtev" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1914,6 +1923,9 @@ msgstr "ProfilePhoto|Skica" msgid "Public Bodies" msgstr "Javne ustanove" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "Statistike javnih ustanova" @@ -1926,6 +1938,9 @@ msgstr "Javne ustanove - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "Javne ustanove {{start_count}} do {{end_count}} od ukupno {{total_count}}" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "Ustanova – {{name}}" @@ -2153,8 +2168,8 @@ msgstr "Odgovoriti e-mailom" msgid "Respond to request" msgstr "Odgovoriti na zahtev" -msgid "Respond to the FOI request" -msgstr "Odgovoriti na zahtev po ZOSPIOJ" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Odgovoriti preko web-a" @@ -2366,9 +2381,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "Posebna napomena za ovu ustanovu!" -msgid "Start now »" -msgstr "Počni sada »" - msgid "Start your own blog" msgstr "Započnite Vaš blog" @@ -2999,6 +3011,9 @@ msgstr "Ne možemo poslati odgovor za {{username}}" msgid "Unable to send follow up message to {{username}}" msgstr "Ne možemo poslati reakciju za {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Neočekivani tip rezultata pretrage" @@ -3064,9 +3079,6 @@ msgstr "" msgid "User|About me" msgstr "User|O meni" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "User|Administratorski nivo" @@ -3076,9 +3088,6 @@ msgstr "User|Tekst isključenja" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "User|E-mail" @@ -3133,18 +3142,12 @@ msgstr "Pogledati ZOSPI e-mail adresu za {{public_body_name}}" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Videti Zahteve za slobodan pristup informacijama od javnog značaja napravljene od strane {{user_name}}:" -msgid "View and search requests" -msgstr "Pregledaj i pretraži zahteve" - msgid "View authorities" msgstr "Pregledaj ustanove" msgid "View email" msgstr "Prikaži e-mail" -msgid "View requests" -msgstr "Pregled zahteva" - msgid "Waiting clarification." msgstr "Čeka na razjašnjenje." diff --git a/locale/sv/app.po b/locale/sv/app.po index a352e00c8..30308abfc 100644 --- a/locale/sv/app.po +++ b/locale/sv/app.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:46+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Swedish (http://www.transifex.com/projects/p/alaveteli/language/sv/)\n" "Language: sv\n" "MIME-Version: 1.0\n" @@ -89,9 +89,6 @@ msgstr "" msgid " You will also be emailed updates about the request." msgstr "" -msgid " made by " -msgstr "" - msgid " when you send this message." msgstr "" @@ -281,6 +278,9 @@ msgstr "" msgid "<strong>did not have</strong> the information requested." msgstr "" +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -473,6 +473,12 @@ msgstr "" msgid "Browse all authorities..." msgstr "" +msgid "Browse and search requests" +msgstr "" + +msgid "Browse requests" +msgstr "" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "" @@ -536,9 +542,6 @@ msgstr "" msgid "Change your password on {{site_name}}" msgstr "" -msgid "Change your password {{site_name}}" -msgstr "" - msgid "Charity registration" msgstr "" @@ -713,6 +716,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1372,6 +1378,9 @@ msgstr "" msgid "Make a request" msgstr "" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1873,6 +1882,9 @@ msgstr "" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1885,6 +1897,9 @@ msgstr "" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2110,7 +2125,7 @@ msgstr "" msgid "Respond to request" msgstr "" -msgid "Respond to the FOI request" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" msgstr "" msgid "Respond using the web" @@ -2315,9 +2330,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "" -msgid "Start now »" -msgstr "" - msgid "Start your own blog" msgstr "" @@ -2915,6 +2927,9 @@ msgstr "" msgid "Unable to send follow up message to {{username}}" msgstr "" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "" @@ -2975,9 +2990,6 @@ msgstr "" msgid "User|About me" msgstr "" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "" @@ -2987,9 +2999,6 @@ msgstr "" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "" @@ -3044,18 +3053,12 @@ msgstr "" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "" -msgid "View and search requests" -msgstr "" - msgid "View authorities" msgstr "" msgid "View email" msgstr "" -msgid "View requests" -msgstr "" - msgid "Waiting clarification." msgstr "" diff --git a/locale/sw_KE/app.po b/locale/sw_KE/app.po index 0c7e62fb5..07a72b46b 100644 --- a/locale/sw_KE/app.po +++ b/locale/sw_KE/app.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:46+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Swahili (Kenya) (http://www.transifex.com/projects/p/alaveteli/language/sw_KE/)\n" "Language: sw_KE\n" "MIME-Version: 1.0\n" @@ -89,9 +89,6 @@ msgstr "" msgid " You will also be emailed updates about the request." msgstr "" -msgid " made by " -msgstr "" - msgid " when you send this message." msgstr "" @@ -281,6 +278,9 @@ msgstr "" msgid "<strong>did not have</strong> the information requested." msgstr "" +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -473,6 +473,12 @@ msgstr "" msgid "Browse all authorities..." msgstr "" +msgid "Browse and search requests" +msgstr "" + +msgid "Browse requests" +msgstr "" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "" @@ -536,9 +542,6 @@ msgstr "" msgid "Change your password on {{site_name}}" msgstr "" -msgid "Change your password {{site_name}}" -msgstr "" - msgid "Charity registration" msgstr "" @@ -713,6 +716,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1372,6 +1378,9 @@ msgstr "" msgid "Make a request" msgstr "" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1873,6 +1882,9 @@ msgstr "" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1885,6 +1897,9 @@ msgstr "" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2110,7 +2125,7 @@ msgstr "" msgid "Respond to request" msgstr "" -msgid "Respond to the FOI request" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" msgstr "" msgid "Respond using the web" @@ -2315,9 +2330,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "" -msgid "Start now »" -msgstr "" - msgid "Start your own blog" msgstr "" @@ -2915,6 +2927,9 @@ msgstr "" msgid "Unable to send follow up message to {{username}}" msgstr "" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "" @@ -2975,9 +2990,6 @@ msgstr "" msgid "User|About me" msgstr "" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "" @@ -2987,9 +2999,6 @@ msgstr "" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "" @@ -3044,18 +3053,12 @@ msgstr "" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "" -msgid "View and search requests" -msgstr "" - msgid "View authorities" msgstr "" msgid "View email" msgstr "" -msgid "View requests" -msgstr "" - msgid "Waiting clarification." msgstr "" diff --git a/locale/tr/app.po b/locale/tr/app.po index c7470b1d4..fb7d2f31c 100644 --- a/locale/tr/app.po +++ b/locale/tr/app.po @@ -5,13 +5,14 @@ # Translators: # Baran Ozgul <baran@ozgul.net>, 2012 # Baran Ozgul <baran@ozgul.net>, 2012 +# Baran Ozgul <baran@ozgul.net>, 2012 msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:46+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Turkish (http://www.transifex.com/projects/p/alaveteli/language/tr/)\n" "Language: tr\n" "MIME-Version: 1.0\n" @@ -91,9 +92,6 @@ msgstr "" msgid " You will also be emailed updates about the request." msgstr "" -msgid " made by " -msgstr "" - msgid " when you send this message." msgstr "" @@ -283,6 +281,9 @@ msgstr "" msgid "<strong>did not have</strong> the information requested." msgstr "" +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -475,6 +476,12 @@ msgstr "" msgid "Browse all authorities..." msgstr "" +msgid "Browse and search requests" +msgstr "" + +msgid "Browse requests" +msgstr "" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "" @@ -538,9 +545,6 @@ msgstr "" msgid "Change your password on {{site_name}}" msgstr "" -msgid "Change your password {{site_name}}" -msgstr "" - msgid "Charity registration" msgstr "" @@ -715,6 +719,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1374,6 +1381,9 @@ msgstr "" msgid "Make a request" msgstr "" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1875,6 +1885,9 @@ msgstr "" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1887,6 +1900,9 @@ msgstr "" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2112,7 +2128,7 @@ msgstr "" msgid "Respond to request" msgstr "" -msgid "Respond to the FOI request" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" msgstr "" msgid "Respond using the web" @@ -2317,9 +2333,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "" -msgid "Start now »" -msgstr "" - msgid "Start your own blog" msgstr "" @@ -2917,6 +2930,9 @@ msgstr "" msgid "Unable to send follow up message to {{username}}" msgstr "" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "" @@ -2977,9 +2993,6 @@ msgstr "" msgid "User|About me" msgstr "" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "" @@ -2989,9 +3002,6 @@ msgstr "" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "" @@ -3046,18 +3056,12 @@ msgstr "" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "" -msgid "View and search requests" -msgstr "" - msgid "View authorities" msgstr "" msgid "View email" msgstr "" -msgid "View requests" -msgstr "" - msgid "Waiting clarification." msgstr "" diff --git a/locale/uk/app.po b/locale/uk/app.po index 31def22fc..4dcf442c1 100644 --- a/locale/uk/app.po +++ b/locale/uk/app.po @@ -15,9 +15,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:46+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Ukrainian (http://www.transifex.com/projects/p/alaveteli/language/uk/)\n" "Language: uk\n" "MIME-Version: 1.0\n" @@ -99,9 +99,6 @@ msgstr " Оновлення щодо запиту вже відправлені msgid " You will also be emailed updates about the request." msgstr " Вам також надійдуть оновлення щодо запиту." -msgid " made by " -msgstr " зроблено" - msgid " when you send this message." msgstr " коли ви відправите повідомлення." @@ -327,6 +324,9 @@ msgstr "<strong>Подякуйте</strong> розпоряднику інфор msgid "<strong>did not have</strong> the information requested." msgstr "<strong>не володіють</strong> запитаною інформацією." +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "<a href=\"{{request_url}}\">Додатковий запит</a> щодо <em>{{request_title}}</em> було надіслано {{public_body_name}} користувачем {{info_request_user}}. Дата: {{date}}." @@ -523,6 +523,12 @@ msgstr "Прогляньте <a href='{{url}}'>інші запити</a> до '{ msgid "Browse all authorities..." msgstr "Проглянути всіх розпорядників..." +msgid "Browse and search requests" +msgstr "Переглядати та шукати запити" + +msgid "Browse requests" +msgstr "Показати запити" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "Згідно з законодавством, за будь-яких умов {{public_body_link}} мав би вже відповісти" @@ -586,9 +592,6 @@ msgstr "Змініть свій пароль" msgid "Change your password on {{site_name}}" msgstr "Змініть свій пароль на сайті" -msgid "Change your password {{site_name}}" -msgstr "Змініть свій пароль" - msgid "Charity registration" msgstr "Реєстрація благодійної організації" @@ -767,6 +770,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1475,6 +1481,9 @@ msgstr "" msgid "Make a request" msgstr "Зробити запит" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1979,6 +1988,9 @@ msgstr "" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1991,6 +2003,9 @@ msgstr "Розпорядники інформації - {{description}}" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "Розпорядник інформації – {{name}}" @@ -2218,8 +2233,8 @@ msgstr "Відповісти електронною поштою" msgid "Respond to request" msgstr "Відповісти на запит" -msgid "Respond to the FOI request" -msgstr "Відповісти на запит" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" +msgstr "" msgid "Respond using the web" msgstr "Відповісти через інтернет" @@ -2425,9 +2440,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "Примітка:" -msgid "Start now »" -msgstr "Почати зараз »" - msgid "Start your own blog" msgstr "" @@ -3036,6 +3048,9 @@ msgstr "Неможливо надіслати відповідь користу msgid "Unable to send follow up message to {{username}}" msgstr "Неможливо надіслати повідомленя користувачу {{username}}" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "Неочікуваний результат пошуку" @@ -3096,9 +3111,6 @@ msgstr "" msgid "User|About me" msgstr "Користувач|Про мене" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "" @@ -3108,9 +3120,6 @@ msgstr "" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "Користувач|Мейл" @@ -3165,18 +3174,12 @@ msgstr "Електронна адреса розпорядника інформ msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "Переглянути запити, зроблені користувачем {{user_name}}:" -msgid "View and search requests" -msgstr "Переглядати та шукати запити" - msgid "View authorities" msgstr "Показати розпорядників інформації" msgid "View email" msgstr "Показати емейли" -msgid "View requests" -msgstr "Показати запити" - msgid "Waiting clarification." msgstr "Очікує на уточнення" diff --git a/locale/vi/app.po b/locale/vi/app.po index 24b2e0d46..e51d14307 100644 --- a/locale/vi/app.po +++ b/locale/vi/app.po @@ -5,15 +5,16 @@ # Translators: # Anh Phan <ppanhh@gmail.com>, 2013 # Anh Phan <vietnamesel10n@gmail.com>, 2013 +# Anh Phan <vietnamesel10n@gmail.com>, 2013 # ppanhh <ppanhh@gmail.com>, 2013 # Anh Phan <vietnamesel10n@gmail.com>, 2013 msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:46+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Vietnamese (http://www.transifex.com/projects/p/alaveteli/language/vi/)\n" "Language: vi\n" "MIME-Version: 1.0\n" @@ -93,9 +94,6 @@ msgstr "" msgid " You will also be emailed updates about the request." msgstr "" -msgid " made by " -msgstr "được tạo bởi" - msgid " when you send this message." msgstr "khi bạn gửi đi tin nhắn này" @@ -285,6 +283,9 @@ msgstr "" msgid "<strong>did not have</strong> the information requested." msgstr "" +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -477,6 +478,12 @@ msgstr "" msgid "Browse all authorities..." msgstr "" +msgid "Browse and search requests" +msgstr "" + +msgid "Browse requests" +msgstr "" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "" @@ -540,9 +547,6 @@ msgstr "" msgid "Change your password on {{site_name}}" msgstr "" -msgid "Change your password {{site_name}}" -msgstr "" - msgid "Charity registration" msgstr "" @@ -717,6 +721,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1375,6 +1382,9 @@ msgstr "" msgid "Make a request" msgstr "" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1876,6 +1886,9 @@ msgstr "" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1888,6 +1901,9 @@ msgstr "" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2113,7 +2129,7 @@ msgstr "" msgid "Respond to request" msgstr "" -msgid "Respond to the FOI request" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" msgstr "" msgid "Respond using the web" @@ -2316,9 +2332,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "" -msgid "Start now »" -msgstr "" - msgid "Start your own blog" msgstr "" @@ -2913,6 +2926,9 @@ msgstr "" msgid "Unable to send follow up message to {{username}}" msgstr "" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "" @@ -2973,9 +2989,6 @@ msgstr "" msgid "User|About me" msgstr "" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "" @@ -2985,9 +2998,6 @@ msgstr "" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "" @@ -3042,18 +3052,12 @@ msgstr "" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "" -msgid "View and search requests" -msgstr "" - msgid "View authorities" msgstr "" msgid "View email" msgstr "" -msgid "View requests" -msgstr "" - msgid "Waiting clarification." msgstr "" diff --git a/locale/zh_HK/app.po b/locale/zh_HK/app.po index 0a0991de4..5d0286be6 100644 --- a/locale/zh_HK/app.po +++ b/locale/zh_HK/app.po @@ -9,9 +9,9 @@ msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-15 12:46+0100\n" -"PO-Revision-Date: 2014-05-15 11:56+0000\n" -"Last-Translator: louisecrow <louise@mysociety.org>\n" +"POT-Creation-Date: 2014-08-26 14:45+0000\n" +"PO-Revision-Date: 2014-08-26 14:46+0000\n" +"Last-Translator: Gareth Rees <gareth@mysociety.org>\n" "Language-Team: Chinese (Hong Kong) (http://www.transifex.com/projects/p/alaveteli/language/zh_HK/)\n" "Language: zh_HK\n" "MIME-Version: 1.0\n" @@ -91,9 +91,6 @@ msgstr "" msgid " You will also be emailed updates about the request." msgstr "" -msgid " made by " -msgstr " 由 " - msgid " when you send this message." msgstr "當您傳送此訊息時。" @@ -283,6 +280,9 @@ msgstr "" msgid "<strong>did not have</strong> the information requested." msgstr "" +msgid "?" +msgstr "" + msgid "A <a href=\"{{request_url}}\">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}." msgstr "" @@ -475,6 +475,12 @@ msgstr "" msgid "Browse all authorities..." msgstr "列出所有部門及機構" +msgid "Browse and search requests" +msgstr "" + +msgid "Browse requests" +msgstr "" + msgid "By law, under all circumstances, {{public_body_link}} should have responded by now" msgstr "" @@ -538,9 +544,6 @@ msgstr "" msgid "Change your password on {{site_name}}" msgstr "" -msgid "Change your password {{site_name}}" -msgstr "" - msgid "Charity registration" msgstr "" @@ -715,6 +718,9 @@ msgstr "" msgid "Disclosure log URL" msgstr "" +msgid "Do not fill in this field" +msgstr "" + msgid "Don't have a superuser account yet?" msgstr "" @@ -1373,6 +1379,9 @@ msgstr "" msgid "Make a request" msgstr "" +msgid "Make a request »" +msgstr "" + msgid "Make a request to these authorities" msgstr "" @@ -1874,6 +1883,9 @@ msgstr "" msgid "Public Bodies" msgstr "" +msgid "Public Body" +msgstr "" + msgid "Public Body Statistics" msgstr "" @@ -1886,6 +1898,9 @@ msgstr "" msgid "Public authorities {{start_count}} to {{end_count}} of {{total_count}}" msgstr "" +msgid "Public authority statistics" +msgstr "" + msgid "Public authority – {{name}}" msgstr "" @@ -2111,7 +2126,7 @@ msgstr "" msgid "Respond to request" msgstr "" -msgid "Respond to the FOI request" +msgid "Respond to the FOI request '{{request}}' made by {{user}}" msgstr "" msgid "Respond using the web" @@ -2314,9 +2329,6 @@ msgstr "" msgid "Special note for this authority!" msgstr "" -msgid "Start now »" -msgstr "" - msgid "Start your own blog" msgstr "" @@ -2911,6 +2923,9 @@ msgstr "" msgid "Unable to send follow up message to {{username}}" msgstr "" +msgid "Unclassified or hidden requests are not counted." +msgstr "" + msgid "Unexpected search result type " msgstr "" @@ -2971,9 +2986,6 @@ msgstr "" msgid "User|About me" msgstr "" -msgid "User|Address" -msgstr "" - msgid "User|Admin level" msgstr "" @@ -2983,9 +2995,6 @@ msgstr "" msgid "User|Can make batch requests" msgstr "" -msgid "User|Dob" -msgstr "" - msgid "User|Email" msgstr "" @@ -3040,18 +3049,12 @@ msgstr "" msgid "View Freedom of Information requests made by {{user_name}}:" msgstr "" -msgid "View and search requests" -msgstr "" - msgid "View authorities" msgstr "" msgid "View email" msgstr "" -msgid "View requests" -msgstr "" - msgid "Waiting clarification." msgstr "" diff --git a/public/down.default.html b/public/down.default.html index 0440f91f9..d6291a74a 100644 --- a/public/down.default.html +++ b/public/down.default.html @@ -3,12 +3,12 @@ <head> <meta charset="utf-8"> <title> - WhatDoTheyKnow - make and browse Freedom of Information (FOI) requests + Alaveteli - make and browse Freedom of Information (FOI) requests </title> - <link href="/assets/main.css" media="screen" rel="stylesheet" title="Main" type="text/css"> + <link href="/assets/application.css" media="screen" rel="stylesheet" title="Main" type="text/css"> <!--[if LT IE 7]> - <style type="text/css">@import url("/stylesheets/ie6.css");</style> + <style type="text/css">@import url("/assets/ie6.css");</style> <![endif]--> </head> @@ -17,15 +17,12 @@ <div id="banner"> </div> <div id="header"> - <h1> - <a href="/">WhatDoTheyKnow?</a> - </h1> <div id="tagline"> Make and explore Freedom of Information requests </div> </div> <div id="mysoclogo"> - <a href="http://www.mysociety.org">a site by mysociety.org</a> + <a href="http://www.alaveteli.org">powered by Alaveteli</a> </div> <div id="topnav"> <ul id="navigation"></ul> @@ -35,7 +32,7 @@ <div id="content"> <div id="general_frontpage"> <div id="frontpage_search"> - <h1>Sorry. WhatDoTheyKnow is down for maintenance. Please come back in a few minutes.</h1> + <h1>Sorry. We’re down for maintenance. Please come back in a few minutes.</h1> </div> </div> </div> diff --git a/public/fcgi/php-basic b/public/fcgi/php-basic deleted file mode 100755 index f3034d9e2..000000000 --- a/public/fcgi/php-basic +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -PHP_FCGI_CHILDREN=1 PHPRC=/etc/php5/fcgi exec /usr/bin/php5-cgi - diff --git a/public/fcgi/php-bitter b/public/fcgi/php-bitter deleted file mode 100755 index bf58b9e23..000000000 --- a/public/fcgi/php-bitter +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -PHP_FCGI_CHILDREN=1 PHPRC=/etc/php4/fcgi exec /usr/bin/php4-cgi - diff --git a/script/mysociety-switch-to-shared b/script/mysociety-switch-to-shared index f82e77706..801532e57 100755 --- a/script/mysociety-switch-to-shared +++ b/script/mysociety-switch-to-shared @@ -23,6 +23,7 @@ mkdir -p "$SHARED_DIR" for F in \ cache \ + log \ public/foi-live-creation.png \ public/foi-user-use.png \ config/aliases \ diff --git a/script/rails-deploy-before-down b/script/rails-deploy-before-down index 42284b00d..c44bfe552 100755 --- a/script/rails-deploy-before-down +++ b/script/rails-deploy-before-down @@ -32,31 +32,6 @@ else OPTION_STAGING_SITE=1 fi -# create initial log files -if [ -e $TOP_DIR/../logs ] -then - # mySociety servers have logs dir in level above - if ! [ -h log ] && [ -d log ] - then - # If log is a directory rather than a symlink, move that - # directory out of the way: - mv log log.original - fi - ln -sfn $TOP_DIR/../logs log -else - # otherwise just make the directory - if [ -h log ] - then - # remove any old-style symlink first - rm -f log - fi - mkdir -p log -fi - -cd log -touch development.log fastcgi.crash.log production.log test.log -cd .. - # Returns 0 if an element is present in a bash array, and 1 otherwise # Taken from: http://stackoverflow.com/a/8574392/223092 contains () { diff --git a/script/request-creation-graph b/script/request-creation-graph index ef1d2cf73..7d347a7d2 100755 --- a/script/request-creation-graph +++ b/script/request-creation-graph @@ -17,7 +17,7 @@ cd `dirname $0` cd ../ source commonlib/shlib/deployfns -# XXX this is nasty :) +# TODO: this is nasty :) OPTION_FOI_DB_HOST=`grep "host:" config/database.yml | head --lines=1 | cut -d ":" -f 2` OPTION_FOI_DB_PORT=`grep "port:" config/database.yml | head --lines=1 | cut -d ":" -f 2` OPTION_FOI_DB_NAME=`grep "database:" config/database.yml | head --lines=1 | cut -d ":" -f 2` diff --git a/script/site-specific-install.sh b/script/site-specific-install.sh index 7d47a5990..59b714fb7 100755 --- a/script/site-specific-install.sh +++ b/script/site-specific-install.sh @@ -32,6 +32,65 @@ misuse() { update_mysociety_apt_sources +# Debian Squeeze Fixes +if [ x"$DISTRIBUTION" = x"debian" ] && [ x"$DISTVERSION" = x"squeeze" ] +then + # Add wheezy repo to get bundler + cat > /etc/apt/sources.list.d/debian-wheezy.list <<EOF +deb http://the.earth.li/debian/ wheezy main contrib non-free +EOF + + # Get bundler from wheezy repo and de-prioritise all other + # wheezy packages + cat >> /etc/apt/preferences <<EOF + +Package: bundler +Pin: release n=wheezy +Pin-Priority: 990 + +Package: * +Pin: release n=wheezy +Pin-Priority: 50 +EOF + +apt-get -qq update +fi + +# Ubuntu Precise Fixes +if [ x"$DISTRIBUTION" = x"ubuntu" ] && [ x"$DISTVERSION" = x"precise" ] +then + cat > /etc/apt/sources.list.d/ubuntu-trusty.list <<EOF +deb http://archive.ubuntu.com/ubuntu/ trusty universe +deb-src http://archive.ubuntu.com/ubuntu/ trusty universe +EOF + + cat > /etc/apt/sources.list.d/mysociety-launchpad.list <<EOF +deb http://ppa.launchpad.net/mysociety/alaveteli/ubuntu precise main +deb-src http://ppa.launchpad.net/mysociety/alaveteli/ubuntu precise main +EOF + + # Get bundler from trusty and de-prioritise all other + # trusty packages + cat >> /etc/apt/preferences <<EOF + +Package: ruby-bundler +Pin: release n=trusty +Pin-Priority: 990 + +Package: * +Pin: release n=trusty +Pin-Priority: 50 +EOF + +# Get the key for the mysociety ubuntu alaveteli repo +apt-get install -y python-software-properties +add-apt-repository -y ppa:mysociety/alaveteli + +apt-get -qq update +fi + +apt-get -y update + if [ ! "$DEVELOPMENT_INSTALL" = true ]; then install_nginx add_website_to_nginx @@ -134,10 +193,6 @@ su -l -c "$BIN_DIRECTORY/install-as-user '$UNIX_USER' '$HOST' '$DIRECTORY'" "$UN # no longer need the PostgreSQL user to be a superuser: echo "ALTER USER \"$UNIX_USER\" WITH NOSUPERUSER;" | su -l -c 'psql' postgres -if [ ! "$DEVELOPMENT_INSTALL" = true ]; then - install_sysvinit_script -fi - # Set up root's crontab: cd "$REPOSITORY" @@ -146,15 +201,21 @@ echo -n "Creating /etc/cron.d/alaveteli... " (su -l -c "cd '$REPOSITORY' && bundle exec rake config_files:convert_crontab DEPLOY_USER='$UNIX_USER' VHOST_DIR='$DIRECTORY' VCSPATH='$SITE' SITE='$SITE' CRONTAB=config/crontab-example" "$UNIX_USER") > /etc/cron.d/alaveteli # There are some other parts to rewrite, so just do them with sed: sed -r \ - -e "/foi-purge-varnish/d" \ + -e "/$SITE-purge-varnish/d" \ -e "s,^(MAILTO=).*,\1root@$HOST," \ - -e "s,run-with-lockfile,$REPOSITORY/commonlib/bin/run-with-lockfile.sh,g" \ -i /etc/cron.d/alaveteli echo $DONE_MSG -echo -n "Creating /etc/init.d/foi-alert-tracks... " -(su -l -c "cd '$REPOSITORY' && bundle exec rake config_files:convert_init_script DEPLOY_USER='$UNIX_USER' VHOST_DIR='$DIRECTORY' SCRIPT_FILE=config/alert-tracks-debian.ugly" "$UNIX_USER") > /etc/init.d/foi-alert-tracks -chmod a+rx /etc/init.d/foi-alert-tracks +if [ ! "$DEVELOPMENT_INSTALL" = true ]; then + echo -n "Creating /etc/init.d/$SITE... " + (su -l -c "cd '$REPOSITORY' && bundle exec rake config_files:convert_init_script DEPLOY_USER='$UNIX_USER' VHOST_DIR='$DIRECTORY' VCSPATH='$SITE' SITE='$SITE' SCRIPT_FILE=config/sysvinit-thin.ugly" "$UNIX_USER") > /etc/init.d/"$SITE" + chmod a+rx /etc/init.d/"$SITE" + echo $DONE_MSG +fi + +echo -n "Creating /etc/init.d/$SITE-alert-tracks... " +(su -l -c "cd '$REPOSITORY' && bundle exec rake config_files:convert_init_script DEPLOY_USER='$UNIX_USER' VHOST_DIR='$DIRECTORY' SCRIPT_FILE=config/alert-tracks-debian.ugly" "$UNIX_USER") > /etc/init.d/$SITE-alert-tracks +chmod a+rx /etc/init.d/$SITE-alert-tracks echo $DONE_MSG if [ $DEFAULT_SERVER = true ] && [ x != x$EC2_HOSTNAME ] diff --git a/script/test-vagrant-provisioning b/script/test-vagrant-provisioning new file mode 100755 index 000000000..62862f3df --- /dev/null +++ b/script/test-vagrant-provisioning @@ -0,0 +1,19 @@ +#!/bin/bash + +OS=$1 + +vagrant destroy + +ALAVETELI_VAGRANT_OS="$OS" vagrant up && + vagrant ssh -c "cd /home/vagrant/alaveteli && bundle exec rails s --daemon" && + sleep 10 && + curl -I http://10.10.10.30:3000 + +if [[ $? -ne 0 ]] +then + echo "Failed with exit code $?" + exit 1 +else + echo "Success!" + exit 0 +fi diff --git a/script/user-use-graph b/script/user-use-graph index f508c9cb6..00eeb36f8 100755 --- a/script/user-use-graph +++ b/script/user-use-graph @@ -16,7 +16,7 @@ cd `dirname $0` cd ../ source commonlib/shlib/deployfns -# XXX this is nasty :) +# TODO: this is nasty :) OPTION_FOI_DB_HOST=`grep "host:" config/database.yml | head --lines=1 | cut -d ":" -f 2` OPTION_FOI_DB_PORT=`grep "port:" config/database.yml | head --lines=1 | cut -d ":" -f 2` OPTION_FOI_DB_NAME=`grep "database:" config/database.yml | head --lines=1 | cut -d ":" -f 2` diff --git a/spec/controllers/admin_request_controller_spec.rb b/spec/controllers/admin_request_controller_spec.rb index 63b219c88..7c5253f49 100644 --- a/spec/controllers/admin_request_controller_spec.rb +++ b/spec/controllers/admin_request_controller_spec.rb @@ -60,6 +60,12 @@ describe AdminRequestController, "when administering requests" do get :fully_destroy, { :id => info_request } end + it 'uses a different flash message to avoid trying to fetch a non existent user record' do + info_request = info_requests(:external_request) + post :fully_destroy, { :id => info_request.id } + request.flash[:notice].should include('external') + end + end end diff --git a/spec/controllers/api_controller_spec.rb b/spec/controllers/api_controller_spec.rb index 6b02bd5b4..323ef4cd4 100644 --- a/spec/controllers/api_controller_spec.rb +++ b/spec/controllers/api_controller_spec.rb @@ -4,382 +4,538 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe ApiController, "when using the API" do describe 'checking API keys' do - before do - @number_of_requests = InfoRequest.count - @request_data = { - "title" => "Tell me about your chickens", - "body" => "Dear Sir,\n\nI should like to know about your chickens.\n\nYours in faith,\nBob\n", - - "external_url" => "http://www.example.gov.uk/foi/chickens_23", - "external_user_name" => "Bob Smith", - } - end - - it 'should check that an API key is given as a param' do - expect { - post :create_request, :request_json => @request_data.to_json - }.to raise_error ApplicationController::PermissionDenied - InfoRequest.count.should == @number_of_requests - end - - it "should check the API key" do - expect { - post :create_request, - :k => "This is not really an API key", - :request_json => @request_data.to_json - }.to raise_error ApplicationController::PermissionDenied - InfoRequest.count.should == @number_of_requests - end + before do + @number_of_requests = InfoRequest.count + @request_data = { + 'title' => 'Tell me about your chickens', + 'body' => "Dear Sir,\n\nI should like to know about your chickens.\n\nYours in faith,\nBob\n", + 'external_url' => 'http://www.example.gov.uk/foi/chickens_23', + 'external_user_name' => 'Bob Smith' + } + end + + it 'should check that an API key is given as a param' do + expect { + post :create_request, :request_json => @request_data.to_json + }.to raise_error ApplicationController::PermissionDenied + InfoRequest.count.should == @number_of_requests + end + + it 'should check the API key' do + expect { + post :create_request, + :k => 'This is not really an API key', + :request_json => @request_data.to_json + }.to raise_error ApplicationController::PermissionDenied + InfoRequest.count.should == @number_of_requests + end + end + + def _create_request + post :create_request, + :k => public_bodies(:geraldine_public_body).api_key, + :request_json => { + 'title' => 'Tell me about your chickens', + 'body' => "Dear Sir,\n\nI should like to know about your chickens.\n\nYours in faith,\nBob\n", + 'external_url' => 'http://www.example.gov.uk/foi/chickens_23', + 'external_user_name' => 'Bob Smith' + }.to_json + response.content_type.should == 'application/json' + ActiveSupport::JSON.decode(response.body)['id'] end - it "should create a new request from a POST" do - number_of_requests = InfoRequest.count( + # POST /api/v2/request.json + describe 'creating a request' do + it 'should create a new request from a POST' do + number_of_requests = InfoRequest.count( :conditions => [ - "public_body_id = ?", - public_bodies(:geraldine_public_body).id + "public_body_id = ?", + public_bodies(:geraldine_public_body).id ] - ) - - request_data = { - "title" => "Tell me about your chickens", - "body" => "Dear Sir,\n\nI should like to know about your chickens.\n\nYours in faith,\nBob\n", + ) + + request_data = { + 'title' => 'Tell me about your chickens', + 'body' => "Dear Sir,\n\nI should like to know about your chickens.\n\nYours in faith,\nBob\n", + 'external_url' => 'http://www.example.gov.uk/foi/chickens_23', + 'external_user_name' => 'Bob Smith', + } + + post :create_request, + :k => public_bodies(:geraldine_public_body).api_key, + :request_json => request_data.to_json + response.should be_success + + response.content_type.should == 'application/json' + response_body = ActiveSupport::JSON.decode(response.body) + response_body['errors'].should be_nil + response_body['url'].should =~ /^http/ + + InfoRequest.count(:conditions => [ + 'public_body_id = ?', + public_bodies(:geraldine_public_body).id] + ).should == number_of_requests + 1 + + new_request = InfoRequest.find(response_body['id']) + new_request.user_id.should be_nil + new_request.external_user_name.should == request_data['external_user_name'] + new_request.external_url.should == request_data['external_url'] + + new_request.title.should == request_data['title'] + new_request.last_event_forming_initial_request.outgoing_message.body.should == request_data['body'].strip + + new_request.public_body_id.should == public_bodies(:geraldine_public_body).id + new_request.info_request_events.size.should == 1 + new_request.info_request_events[0].event_type.should == 'sent' + new_request.info_request_events[0].calculated_state.should == 'waiting_response' + end + end - "external_url" => "http://www.example.gov.uk/foi/chickens_23", - "external_user_name" => "Bob Smith", - } + # POST /api/v2/request/:id/add_correspondence.json + describe 'adding correspondence to a request' do + it 'should add a response to a request' do + # First we need an external request + request_id = info_requests(:external_request).id + + # Initially it has no incoming messages + IncomingMessage.count(:conditions => ["info_request_id = ?", request_id]).should == 0 + + # Now add one + sent_at = '2012-05-28T12:35:39+01:00' + response_body = "Thank you for your request for information, which we are handling in accordance with the Freedom of Information Act 2000. You will receive a response within 20 working days or before the next full moon, whichever is sooner.\n\nYours sincerely,\nJohn Gandermulch,\nExample Council FOI Officer\n" + post :add_correspondence, + :k => public_bodies(:geraldine_public_body).api_key, + :id => request_id, + :correspondence_json => { + 'direction' => 'response', + 'sent_at' => sent_at, + 'body' => response_body + }.to_json + + # And make sure it worked + response.should be_success + incoming_messages = IncomingMessage.all(:conditions => ['info_request_id = ?', request_id]) + incoming_messages.count.should == 1 + incoming_message = incoming_messages[0] + + incoming_message.sent_at.should == Time.iso8601(sent_at) + incoming_message.get_main_body_text_folded.should be_equal_modulo_whitespace_to(response_body) + end - post :create_request, :k => public_bodies(:geraldine_public_body).api_key, :request_json => request_data.to_json - response.should be_success + it 'should add a followup to a request' do + # First we need an external request + request_id = info_requests(:external_request).id + + # Initially it has one outgoing message + OutgoingMessage.count(:conditions => ['info_request_id = ?', request_id]).should == 1 + + # Add another, as a followup + sent_at = '2012-05-29T12:35:39+01:00' + followup_body = "Pls answer ASAP.\nkthxbye\n" + post :add_correspondence, + :k => public_bodies(:geraldine_public_body).api_key, + :id => request_id, + :correspondence_json => { + 'direction' => 'request', + 'sent_at' => sent_at, + 'body' => followup_body + }.to_json + + # Make sure it worked + response.should be_success + followup_messages = OutgoingMessage.all( + :conditions => ["info_request_id = ? and message_type = 'followup'", request_id] + ) + followup_messages.size.should == 1 + followup_message = followup_messages[0] + + followup_message.last_sent_at.should == Time.iso8601(sent_at) + followup_message.body.should == followup_body.strip + end - response.content_type.should == "application/json" + it 'should update the status if a valid state is supplied' do + # First we need an external request + request_id = info_requests(:external_request).id + + # Initially it has no incoming messages + IncomingMessage.count(:conditions => ['info_request_id = ?', request_id]).should == 0 + + # Now add one + sent_at = '2012-05-28T12:35:39+01:00' + response_body = "Thank you for your request for information, which we are handling in accordance with the Freedom of Information Act 2000. You will receive a response within 20 working days or before the next full moon, whichever is sooner.\n\nYours sincerely,\nJohn Gandermulch,\nExample Council FOI Officer\n" + post :add_correspondence, + :k => public_bodies(:geraldine_public_body).api_key, + :id => request_id, + :state => 'successful', + :correspondence_json => { + 'direction' => 'response', + 'sent_at' => sent_at, + 'body' => response_body, + }.to_json + + # And make sure it worked + response.should be_success + incoming_messages = IncomingMessage.all(:conditions => ['info_request_id = ?', request_id]) + incoming_messages.count.should == 1 + request = InfoRequest.find_by_id(request_id) + request.described_state.should == 'successful' + end - response_body = ActiveSupport::JSON.decode(response.body) - response_body["errors"].should be_nil - response_body["url"].should =~ /^http/ + it 'should raise a JSON 500 error if an invalid state is supplied' do + # First we need an external request + request_id = info_requests(:external_request).id + + # Initially it has no incoming messages + IncomingMessage.count(:conditions => ['info_request_id = ?', request_id]).should == 0 + + # Now add one + sent_at = '2012-05-28T12:35:39+01:00' + response_body = "Thank you for your request for information, which we are handling in accordance with the Freedom of Information Act 2000. You will receive a response within 20 working days or before the next full moon, whichever is sooner.\n\nYours sincerely,\nJohn Gandermulch,\nExample Council FOI Officer\n" + post :add_correspondence, + :k => public_bodies(:geraldine_public_body).api_key, + :id => request_id, + :state => 'random_string', + :correspondence_json => { + 'direction' => 'response', + 'sent_at' => sent_at, + 'body' => response_body, + }.to_json + + # And make sure it worked + response.status.should == 500 + ActiveSupport::JSON.decode(response.body)['errors'].should == [ + "'random_string' is not a valid request state"] + + incoming_messages = IncomingMessage.all(:conditions => ['info_request_id = ?', request_id]) + incoming_messages.count.should == 0 + request = InfoRequest.find_by_id(request_id) + request.described_state.should == 'waiting_response' + end - InfoRequest.count(:conditions => [ - "public_body_id = ?", - public_bodies(:geraldine_public_body).id] - ).should == number_of_requests + 1 + it 'should not allow internal requests to be updated' do + n_incoming_messages = IncomingMessage.count + n_outgoing_messages = OutgoingMessage.count + + request_id = info_requests(:naughty_chicken_request).id + post :add_correspondence, + :k => public_bodies(:geraldine_public_body).api_key, + :id => request_id, + :correspondence_json => { + 'direction' => 'request', + 'sent_at' => Time.now.iso8601, + 'body' => 'xxx' + }.to_json + + response.status.should == 403 + ActiveSupport::JSON.decode(response.body)['errors'].should == [ + "Request #{request_id} cannot be updated using the API"] + + IncomingMessage.count.should == n_incoming_messages + OutgoingMessage.count.should == n_outgoing_messages + end - new_request = InfoRequest.find(response_body["id"]) - new_request.user_id.should be_nil - new_request.external_user_name.should == request_data["external_user_name"] - new_request.external_url.should == request_data["external_url"] + it 'should not allow other people\'s requests to be updated' do + request_id = _create_request + n_incoming_messages = IncomingMessage.count + n_outgoing_messages = OutgoingMessage.count + + post :add_correspondence, + :k => public_bodies(:humpadink_public_body).api_key, + :id => request_id, + :correspondence_json => { + 'direction' => 'request', + 'sent_at' => Time.now.iso8601, + 'body' => 'xxx' + }.to_json + + response.status.should == 403 + ActiveSupport::JSON.decode(response.body)['errors'].should == [ + "You do not own request #{request_id}"] + + IncomingMessage.count.should == n_incoming_messages + OutgoingMessage.count.should == n_outgoing_messages + end - new_request.title.should == request_data["title"] - new_request.last_event_forming_initial_request.outgoing_message.body.should == request_data["body"].strip + it 'should return a JSON 404 error for non-existent requests' do + request_id = '123459876' + InfoRequest.stub(:find_by_id).with(request_id).and_return(nil) + sent_at = '2012-05-28T12:35:39+01:00' + response_body = "Thank you for your request for information, which we are handling in accordance with the Freedom of Information Act 2000. You will receive a response within 20 working days or before the next full moon, whichever is sooner.\n\nYours sincerely,\nJohn Gandermulch,\nExample Council FOI Officer\n" + post :add_correspondence, + :k => public_bodies(:geraldine_public_body).api_key, + :id => request_id, + :correspondence_json => { + 'direction' => 'response', + 'sent_at' => sent_at, + 'body' => response_body + }.to_json + response.status.should == 404 + ActiveSupport::JSON.decode(response.body)['errors'].should == ['Could not find request 123459876'] + end - new_request.public_body_id.should == public_bodies(:geraldine_public_body).id - new_request.info_request_events.size.should == 1 - new_request.info_request_events[0].event_type.should == 'sent' - new_request.info_request_events[0].calculated_state.should == 'waiting_response' - end + it 'should return a JSON 403 error if we try to add correspondence to a request we don\'t own' do + request_id = info_requests(:naughty_chicken_request).id + sent_at = '2012-05-28T12:35:39+01:00' + response_body = "Thank you for your request for information, which we are handling in accordance with the Freedom of Information Act 2000. You will receive a response within 20 working days or before the next full moon, whichever is sooner.\n\nYours sincerely,\nJohn Gandermulch,\nExample Council FOI Officer\n" + post :add_correspondence, + :k => public_bodies(:geraldine_public_body).api_key, + :id => request_id, + :correspondence_json => { + 'direction' => 'response', + 'sent_at' => sent_at, + 'body' => response_body + }.to_json + response.status.should == 403 + ActiveSupport::JSON.decode(response.body)['errors'].should == ["Request #{request_id} cannot be updated using the API"] + end - def _create_request - post :create_request, - :k => public_bodies(:geraldine_public_body).api_key, - :request_json => { - "title" => "Tell me about your chickens", - "body" => "Dear Sir,\n\nI should like to know about your chickens.\n\nYours in faith,\nBob\n", - - "external_url" => "http://www.example.gov.uk/foi/chickens_23", - "external_user_name" => "Bob Smith", - }.to_json - response.content_type.should == "application/json" - return ActiveSupport::JSON.decode(response.body)["id"] - end + it 'should not allow files to be attached to a followup' do + post :add_correspondence, + :k => public_bodies(:geraldine_public_body).api_key, + :id => info_requests(:external_request).id, + :correspondence_json => { + 'direction' => 'request', + 'sent_at' => Time.now.iso8601, + 'body' => 'Are you joking, or are you serious?' + }.to_json, + :attachments => [ + fixture_file_upload('/files/tfl.pdf') + ] + + # Make sure it worked + response.status.should == 500 + errors = ActiveSupport::JSON.decode(response.body)['errors'] + errors.should == ["You cannot attach files to messages in the 'request' direction"] + end - it "should add a response to a request" do - # First we need an external request - request_id = info_requests(:external_request).id - - # Initially it has no incoming messages - IncomingMessage.count(:conditions => ["info_request_id = ?", request_id]).should == 0 - - # Now add one - sent_at = "2012-05-28T12:35:39+01:00" - response_body = "Thank you for your request for information, which we are handling in accordance with the Freedom of Information Act 2000. You will receive a response within 20 working days or before the next full moon, whichever is sooner.\n\nYours sincerely,\nJohn Gandermulch,\nExample Council FOI Officer\n" - post :add_correspondence, - :k => public_bodies(:geraldine_public_body).api_key, - :id => request_id, - :correspondence_json => { - "direction" => "response", - "sent_at" => sent_at, - "body" => response_body - }.to_json - - # And make sure it worked - response.should be_success - incoming_messages = IncomingMessage.all(:conditions => ["info_request_id = ?", request_id]) - incoming_messages.count.should == 1 - incoming_message = incoming_messages[0] - - incoming_message.sent_at.should == Time.iso8601(sent_at) - incoming_message.get_main_body_text_folded.should be_equal_modulo_whitespace_to(response_body) + it 'should allow files to be attached to a response' do + # First we need an external request + request_id = info_requests(:external_request).id + + # Initially it has no incoming messages + IncomingMessage.count(:conditions => ['info_request_id = ?', request_id]).should == 0 + + # Now add one + sent_at = '2012-05-28T12:35:39+01:00' + response_body = "Thank you for your request for information, which we are handling in accordance with the Freedom of Information Act 2000. You will receive a response within 20 working days or before the next full moon, whichever is sooner.\n\nYours sincerely,\nJohn Gandermulch,\nExample Council FOI Officer\n" + post :add_correspondence, + :k => public_bodies(:geraldine_public_body).api_key, + :id => request_id, + :correspondence_json => { + 'direction' => 'response', + 'sent_at' => sent_at, + 'body' => response_body + }.to_json, + :attachments => [ + fixture_file_upload('/files/tfl.pdf') + ] + + # And make sure it worked + response.should be_success + incoming_messages = IncomingMessage.all(:conditions => ['info_request_id = ?', request_id]) + incoming_messages.count.should == 1 + incoming_message = incoming_messages[0] + + incoming_message.sent_at.should == Time.iso8601(sent_at) + incoming_message.get_main_body_text_folded.should be_equal_modulo_whitespace_to(response_body) + + # Get the attachment + attachments = incoming_message.get_attachments_for_display + attachments.size.should == 1 + attachment = attachments[0] + attachment.filename.should == 'tfl.pdf' + attachment.body.should == load_file_fixture('tfl.pdf') + end end - it "should add a followup to a request" do - # First we need an external request - request_id = info_requests(:external_request).id - - # Initially it has one outgoing message - OutgoingMessage.count(:conditions => ["info_request_id = ?", request_id]).should == 1 - - # Add another, as a followup - sent_at = "2012-05-29T12:35:39+01:00" - followup_body = "Pls answer ASAP.\nkthxbye\n" - post :add_correspondence, - :k => public_bodies(:geraldine_public_body).api_key, - :id => request_id, - :correspondence_json => { - "direction" => "request", - "sent_at" => sent_at, - "body" => followup_body - }.to_json - - # Make sure it worked - response.should be_success - followup_messages = OutgoingMessage.all( - :conditions => ["info_request_id = ? and message_type = 'followup'", request_id] - ) - followup_messages.size.should == 1 - followup_message = followup_messages[0] - - followup_message.last_sent_at.should == Time.iso8601(sent_at) - followup_message.body.should == followup_body.strip - end + # POST /api/v2/request/:id/update.json + describe 'updating a request\'s status' do + it 'should update the status' do + # First we need an external request + request_id = info_requests(:external_request).id + request = InfoRequest.find_by_id(request_id) + + # Its status should be the default for a new request + request.described_state.should == 'waiting_response' + + # Now accept an update + post :update_state, + :k => public_bodies(:geraldine_public_body).api_key, + :id => request_id, + :state => 'partially_successful' + + # It should have updated the status + request = InfoRequest.find_by_id(request_id) + request.described_state.should == 'partially_successful' + + # It should have recorded the status_update event + last_event = request.info_request_events.last + last_event.event_type.should == 'status_update' + last_event.described_state.should == 'partially_successful' + last_event.params_yaml.should =~ /script: Geraldine Quango on behalf of requester via API/ + end - it "should not allow internal requests to be updated" do - n_incoming_messages = IncomingMessage.count - n_outgoing_messages = OutgoingMessage.count - - request_id = info_requests(:naughty_chicken_request).id - post :add_correspondence, - :k => public_bodies(:geraldine_public_body).api_key, - :id => request_id, - :correspondence_json => { - "direction" => "request", - "sent_at" => Time.now.iso8601, - "body" => "xxx" - }.to_json - - response.status.should == 500 - ActiveSupport::JSON.decode(response.body)["errors"].should == [ - "Request #{request_id} cannot be updated using the API"] - - IncomingMessage.count.should == n_incoming_messages - OutgoingMessage.count.should == n_outgoing_messages - end + it 'should return a JSON 500 error if an invalid state is sent' do + # First we need an external request + request_id = info_requests(:external_request).id + request = InfoRequest.find_by_id(request_id) - it "should not allow other people's requests to be updated" do - request_id = _create_request - n_incoming_messages = IncomingMessage.count - n_outgoing_messages = OutgoingMessage.count - - post :add_correspondence, - :k => public_bodies(:humpadink_public_body).api_key, - :id => request_id, - :correspondence_json => { - "direction" => "request", - "sent_at" => Time.now.iso8601, - "body" => "xxx" - }.to_json - - response.status.should == 500 - ActiveSupport::JSON.decode(response.body)["errors"].should == [ - "You do not own request #{request_id}"] - - IncomingMessage.count.should == n_incoming_messages - OutgoingMessage.count.should == n_outgoing_messages - end + # Its status should be the default for a new request + request.described_state.should == 'waiting_response' - it "should not allow files to be attached to a followup" do - post :add_correspondence, - :k => public_bodies(:geraldine_public_body).api_key, - :id => info_requests(:external_request).id, - :correspondence_json => { - "direction" => "request", - "sent_at" => Time.now.iso8601, - "body" => "Are you joking, or are you serious?" - }.to_json, - :attachments => [ - fixture_file_upload("/files/tfl.pdf") - ] + # Now post an invalid update + post :update_state, + :k => public_bodies(:geraldine_public_body).api_key, + :id => request_id, + :state => 'random_string' + # Check that the error has been raised... + response.status.should == 500 + ActiveSupport::JSON.decode(response.body)['errors'].should == ["'random_string' is not a valid request state"] - # Make sure it worked - response.status.should == 500 - errors = ActiveSupport::JSON.decode(response.body)["errors"] - errors.should == ["You cannot attach files to messages in the 'request' direction"] - end + # ..and that the status hasn't been updated + request = InfoRequest.find_by_id(request_id) + request.described_state.should == 'waiting_response' + end - it "should allow files to be attached to a response" do - # First we need an external request - request_id = info_requests(:external_request).id - - # Initially it has no incoming messages - IncomingMessage.count(:conditions => ["info_request_id = ?", request_id]).should == 0 - - # Now add one - sent_at = "2012-05-28T12:35:39+01:00" - response_body = "Thank you for your request for information, which we are handling in accordance with the Freedom of Information Act 2000. You will receive a response within 20 working days or before the next full moon, whichever is sooner.\n\nYours sincerely,\nJohn Gandermulch,\nExample Council FOI Officer\n" - post :add_correspondence, - :k => public_bodies(:geraldine_public_body).api_key, - :id => request_id, - :correspondence_json => { - "direction" => "response", - "sent_at" => sent_at, - "body" => response_body - }.to_json, - :attachments => [ - fixture_file_upload("/files/tfl.pdf") - ] + it 'should return a JSON 404 error for non-existent requests' do + request_id = '123459876' + InfoRequest.stub(:find_by_id).with(request_id).and_return(nil) - # And make sure it worked - response.should be_success - incoming_messages = IncomingMessage.all(:conditions => ["info_request_id = ?", request_id]) - incoming_messages.count.should == 1 - incoming_message = incoming_messages[0] - - incoming_message.sent_at.should == Time.iso8601(sent_at) - incoming_message.get_main_body_text_folded.should be_equal_modulo_whitespace_to(response_body) - - # Get the attachment - attachments = incoming_message.get_attachments_for_display - attachments.size.should == 1 - attachment = attachments[0] - attachment.filename.should == "tfl.pdf" - attachment.body.should == load_file_fixture("tfl.pdf") - end + post :update_state, + :k => public_bodies(:geraldine_public_body).api_key, + :id => request_id, + :state => "successful" - it "should show information about a request" do - info_request = info_requests(:naughty_chicken_request) - get :show_request, - :k => public_bodies(:geraldine_public_body).api_key, - :id => info_request.id - - response.should be_success - assigns[:request].id.should == info_request.id - - r = ActiveSupport::JSON.decode(response.body) - r["title"].should == info_request.title - # Let’s not test all the fields here, because it would - # essentially just be a matter of copying the code that - # assigns them and changing assignment to an equality - # check, which does not really test anything at all. - end + response.status.should == 404 + ActiveSupport::JSON.decode(response.body)['errors'].should == ['Could not find request 123459876'] + end - it 'should show information about an external request' do - info_request = info_requests(:external_request) - get :show_request, - :k => public_bodies(:geraldine_public_body).api_key, - :id => info_request.id + it 'should return a JSON 403 error if we try to add correspondence to a request we don\'t own' do + request_id = info_requests(:naughty_chicken_request).id - response.should be_success - assigns[:request].id.should == info_request.id - r = ActiveSupport::JSON.decode(response.body) - r["title"].should == info_request.title - end + post :update_state, + :k => public_bodies(:geraldine_public_body).api_key, + :id => request_id, + :state => 'successful' - it "should show an Atom feed of new request events" do - get :body_request_events, - :id => public_bodies(:geraldine_public_body).id, - :k => public_bodies(:geraldine_public_body).api_key, - :feed_type => "atom" - - response.should be_success - response.should render_template("api/request_events") - assigns[:events].size.should > 0 - assigns[:events].each do |event| - event.info_request.public_body.should == public_bodies(:geraldine_public_body) - event.outgoing_message.should_not be_nil - event.event_type.should satisfy {|x| ['sent', 'followup_sent', 'resent', 'followup_resent'].include?(x)} + response.status.should == 403 + ActiveSupport::JSON.decode(response.body)['errors'].should == ["Request #{request_id} cannot be updated using the API"] end end - it "should show a JSON feed of new request events" do - get :body_request_events, - :id => public_bodies(:geraldine_public_body).id, - :k => public_bodies(:geraldine_public_body).api_key, - :feed_type => "json" - - response.should be_success - assigns[:events].size.should > 0 - assigns[:events].each do |event| - event.info_request.public_body.should == public_bodies(:geraldine_public_body) - event.outgoing_message.should_not be_nil - event.event_type.should satisfy {|x| ['sent', 'followup_sent', 'resent', 'followup_resent'].include?(x)} + # GET /api/v2/request/:id.json + describe 'showing request info' do + it 'should show information about a request' do + info_request = info_requests(:naughty_chicken_request) + + get :show_request, + :k => public_bodies(:geraldine_public_body).api_key, + :id => info_request.id + + response.should be_success + assigns[:request].id.should == info_request.id + + r = ActiveSupport::JSON.decode(response.body) + r['title'].should == info_request.title + # Let’s not test all the fields here, because it would + # essentially just be a matter of copying the code that + # assigns them and changing assignment to an equality + # check, which does not really test anything at all. end - assigns[:event_data].size.should == assigns[:events].size - assigns[:event_data].each do |event_record| - event_record[:event_type].should satisfy {|x| ['sent', 'followup_sent', 'resent', 'followup_resent'].include?(x)} + it 'should show information about an external request' do + info_request = info_requests(:external_request) + get :show_request, + :k => public_bodies(:geraldine_public_body).api_key, + :id => info_request.id + + response.should be_success + assigns[:request].id.should == info_request.id + r = ActiveSupport::JSON.decode(response.body) + r['title'].should == info_request.title end end - it "should honour the since_event_id parameter" do - get :body_request_events, - :id => public_bodies(:geraldine_public_body).id, - :k => public_bodies(:geraldine_public_body).api_key, - :feed_type => "json" - response.should be_success - first_event = assigns[:event_data][0] - second_event_id = assigns[:event_data][1][:event_id] - - get :body_request_events, - :id => public_bodies(:geraldine_public_body).id, - :k => public_bodies(:geraldine_public_body).api_key, - :feed_type => "json", - :since_event_id => second_event_id - response.should be_success - assigns[:event_data].should == [first_event] - end + # GET /api/v2/body/:id/request_events.:feed_type + describe 'showing public body info' do + it 'should show an Atom feed of new request events' do + get :body_request_events, + :id => public_bodies(:geraldine_public_body).id, + :k => public_bodies(:geraldine_public_body).api_key, + :feed_type => 'atom' + + response.should be_success + response.should render_template('api/request_events') + assigns[:events].size.should > 0 + assigns[:events].each do |event| + event.info_request.public_body.should == public_bodies(:geraldine_public_body) + event.outgoing_message.should_not be_nil + event.event_type.should satisfy { |x| ['sent', 'followup_sent', 'resent', 'followup_resent'].include?(x) } + end + end - it "should honour the since_date parameter for the Atom feed" do - get :body_request_events, - :id => public_bodies(:humpadink_public_body).id, - :k => public_bodies(:humpadink_public_body).api_key, - :since_date => "2010-01-01", - :feed_type => "atom" - - response.should be_success - response.should render_template("api/request_events") - assigns[:events].size.should > 0 - assigns[:events].each do |event| - event.created_at.should >= Date.new(2010, 1, 1) + it 'should show a JSON feed of new request events' do + get :body_request_events, + :id => public_bodies(:geraldine_public_body).id, + :k => public_bodies(:geraldine_public_body).api_key, + :feed_type => 'json' + + response.should be_success + assigns[:events].size.should > 0 + assigns[:events].each do |event| + event.info_request.public_body.should == public_bodies(:geraldine_public_body) + event.outgoing_message.should_not be_nil + event.event_type.should satisfy {|x| ['sent', 'followup_sent', 'resent', 'followup_resent'].include?(x)} + end + + assigns[:event_data].size.should == assigns[:events].size + assigns[:event_data].each do |event_record| + event_record[:event_type].should satisfy { |x| ['sent', 'followup_sent', 'resent', 'followup_resent'].include?(x) } + end end - end - it "should return a JSON 404 error for non-existent requests" do - request_id = 123459876 # Let's hope this doesn't exist! - sent_at = "2012-05-28T12:35:39+01:00" - response_body = "Thank you for your request for information, which we are handling in accordance with the Freedom of Information Act 2000. You will receive a response within 20 working days or before the next full moon, whichever is sooner.\n\nYours sincerely,\nJohn Gandermulch,\nExample Council FOI Officer\n" - post :add_correspondence, - :k => public_bodies(:geraldine_public_body).api_key, - :id => request_id, - :correspondence_json => { - "direction" => "response", - "sent_at" => sent_at, - "body" => response_body - }.to_json - response.status.should == 404 - ActiveSupport::JSON.decode(response.body)["errors"].should == ["Could not find request 123459876"] - end + it 'should honour the since_event_id parameter' do + get :body_request_events, + :id => public_bodies(:geraldine_public_body).id, + :k => public_bodies(:geraldine_public_body).api_key, + :feed_type => 'json' + + response.should be_success + first_event = assigns[:event_data][0] + second_event_id = assigns[:event_data][1][:event_id] + + get :body_request_events, + :id => public_bodies(:geraldine_public_body).id, + :k => public_bodies(:geraldine_public_body).api_key, + :feed_type => 'json', + :since_event_id => second_event_id + response.should be_success + assigns[:event_data].should == [first_event] + end - it "should return a JSON 500 error if we try to add correspondence to a request we don't own" do - request_id = info_requests(:naughty_chicken_request).id - sent_at = "2012-05-28T12:35:39+01:00" - response_body = "Thank you for your request for information, which we are handling in accordance with the Freedom of Information Act 2000. You will receive a response within 20 working days or before the next full moon, whichever is sooner.\n\nYours sincerely,\nJohn Gandermulch,\nExample Council FOI Officer\n" - post :add_correspondence, - :k => public_bodies(:geraldine_public_body).api_key, - :id => request_id, - :correspondence_json => { - "direction" => "response", - "sent_at" => sent_at, - "body" => response_body - }.to_json - response.status.should == 500 - ActiveSupport::JSON.decode(response.body)["errors"].should == ["Request #{request_id} cannot be updated using the API"] + it 'should honour the since_date parameter' do + get :body_request_events, + :id => public_bodies(:humpadink_public_body).id, + :k => public_bodies(:humpadink_public_body).api_key, + :since_date => '2010-01-01', + :feed_type => 'atom' + + response.should be_success + response.should render_template('api/request_events') + assigns[:events].size.should > 0 + assigns[:events].each do |event| + event.created_at.should >= Date.new(2010, 1, 1) + end + + get :body_request_events, + :id => public_bodies(:humpadink_public_body).id, + :k => public_bodies(:humpadink_public_body).api_key, + :since_date => '2010-01-01', + :feed_type => 'json' + assigns[:events].each do |event| + event.created_at.should >= Date.new(2010, 1, 1) + end + end end end diff --git a/spec/controllers/comment_controller_spec.rb b/spec/controllers/comment_controller_spec.rb index 5e250f689..480c85ad7 100644 --- a/spec/controllers/comment_controller_spec.rb +++ b/spec/controllers/comment_controller_spec.rb @@ -26,7 +26,7 @@ describe CommentController, "when commenting on a request" do post :new, params post_redirect = PostRedirect.get_last_post_redirect response.should redirect_to(:controller => 'user', :action => 'signin', :token => post_redirect.token) - # post_redirect.post_params.should == params # XXX get this working. there's a : vs '' problem amongst others + # post_redirect.post_params.should == params # TODO: get this working. there's a : vs '' problem amongst others end it "should create the comment, and redirect to request page when input is good and somebody is logged in" do diff --git a/spec/controllers/general_controller_spec.rb b/spec/controllers/general_controller_spec.rb index 7590a5b42..c0a9d57d3 100644 --- a/spec/controllers/general_controller_spec.rb +++ b/spec/controllers/general_controller_spec.rb @@ -188,7 +188,7 @@ describe GeneralController, 'when using xapian search' do it 'should highlight words for a user-only request' do get :search, :combined => "bob/users" - assigns[:highlight_words].should == ['bob'] + assigns[:highlight_words].should == [/\b(bob)\w*\b/iu, /\b(bob)\b/iu] end it 'should show spelling corrections for a user-only request' do diff --git a/spec/controllers/public_body_change_requests_controller_spec.rb b/spec/controllers/public_body_change_requests_controller_spec.rb index 7b878b893..8fe7befeb 100644 --- a/spec/controllers/public_body_change_requests_controller_spec.rb +++ b/spec/controllers/public_body_change_requests_controller_spec.rb @@ -22,7 +22,8 @@ describe PublicBodyChangeRequestsController, "creating a change request" do :public_body_name => 'New Body', :public_body_email => 'new_body@example.com', :notes => 'Please', - :source => 'http://www.example.com'} + :source => 'http://www.example.com', + :comment => '' } end it "should send an email to the site contact address" do @@ -51,6 +52,18 @@ describe PublicBodyChangeRequestsController, "creating a change request" do response.should redirect_to frontpage_url end + it 'has rudimentary spam protection' do + spam_request_params = @change_request_params.merge({ :comment => 'I AM A SPAMBOT' }) + + post :create, { :public_body_change_request => spam_request_params } + + response.should redirect_to(frontpage_path) + + deliveries = ActionMailer::Base.deliveries + deliveries.size.should == 0 + deliveries.clear + end + end context 'when handling a request for an update to an existing authority' do @@ -64,7 +77,8 @@ describe PublicBodyChangeRequestsController, "creating a change request" do :public_body_id => @public_body.id, :public_body_email => 'new_body@example.com', :notes => 'Please', - :source => 'http://www.example.com'} + :source => 'http://www.example.com', + :comment => '' } end it 'should send an email to the site contact address' do diff --git a/spec/controllers/public_body_controller_spec.rb b/spec/controllers/public_body_controller_spec.rb index 63989baaa..f64975580 100644 --- a/spec/controllers/public_body_controller_spec.rb +++ b/spec/controllers/public_body_controller_spec.rb @@ -184,6 +184,11 @@ describe PublicBodyController, "when listing bodies" do assigns[:public_bodies].should == [ public_bodies(:geraldine_public_body) ] end + it "should support simple searching of bodies by short_name" do + get :list, :public_body_query => 'DfH' + assigns[:public_bodies].should == [ public_bodies(:humpadink_public_body) ] + end + it "should support simple searching of bodies by notes" do get :list, :public_body_query => 'Albatross' assigns[:public_bodies].should == [ public_bodies(:humpadink_public_body) ] @@ -287,6 +292,23 @@ describe PublicBodyController, "when asked to export public bodies as CSV" do all_data[1].length.should == 11 end + it "only includes visible bodies" do + get :list_all_csv + all_data = CSV.parse(response.body) + all_data.any?{ |row| row.include?('Internal admin authority') }.should be_false + end + + it "does not include site_administration bodies" do + FactoryGirl.create(:public_body, + :name => 'Site Admin Body', + :tag_string => 'site_administration') + + get :list_all_csv + + all_data = CSV.parse(response.body) + all_data.any?{ |row| row.include?('Site Admin Body') }.should be_false + end + end describe PublicBodyController, "when showing public body statistics" do diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 9353efcb3..f7c935af3 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -77,7 +77,7 @@ describe RequestController, "when changing things that appear on the request pag PurgeRequest.all().count.should == 0 end it "should purge the downstream cache when censor rules have changed" do - # XXX really, CensorRules should execute expiry logic as part + # TODO: really, CensorRules should execute expiry logic as part # of the after_save of the model. Currently this is part of # the AdminCensorRuleController logic, so must be tested from # there. Leaving this stub test in place as a reminder @@ -643,7 +643,7 @@ describe RequestController, "when showing one request" do ir = info_requests(:fancy_dog_request) receive_incoming_mail('incoming-request-two-same-name.email', ir.incoming_email) - # XXX this is horrid, but don't know a better way. If we + # TODO: this is horrid, but don't know a better way. If we # don't do this, the info_request_event to which the # info_request is attached still uses the unmodified # version from the fixture. @@ -900,7 +900,7 @@ describe RequestController, "when handling prominence" do end -# XXX do this for invalid ids +# TODO: do this for invalid ids # it "should render 404 file" do # response.should render_template("#{Rails.root}/public/404.html") # response.headers["Status"].should == "404 Not Found" @@ -923,7 +923,6 @@ describe RequestController, "when searching for an authority" do end it "should return matching bodies" do - session[:user_id] = @user.id get :select_authority, :query => "Quango" @@ -1004,7 +1003,18 @@ describe RequestController, "when creating a new request" do post :new, params post_redirect = PostRedirect.get_last_post_redirect response.should redirect_to(:controller => 'user', :action => 'signin', :token => post_redirect.token) - # post_redirect.post_params.should == params # XXX get this working. there's a : vs '' problem amongst others + # post_redirect.post_params.should == params # TODO: get this working. there's a : vs '' problem amongst others + end + + it 'redirects to the frontpage if the action is sent the invalid + public_body param' do + post :new, :info_request => { :public_body => @body.id, + :title => 'Why Geraldine?', + :tag_string => '' }, + :outgoing_message => { :body => 'This is a silly letter.' }, + :submitted_new_request => 1, + :preview => 1 + response.should redirect_to frontpage_url end it "should show preview when input is good" do @@ -1793,7 +1803,7 @@ describe RequestController, "when sending a followup message" do session[:user_id] = users(:bob_smith_user).id post :show_response, :outgoing_message => { :body => "", :what_doing => 'normal_sort'}, :id => info_requests(:fancy_dog_request).id, :incoming_message_id => incoming_messages(:useless_incoming_message), :submitted_followup => 1 - # XXX how do I check the error message here? + # TODO: how do I check the error message here? response.should render_template('show_response') end @@ -1843,13 +1853,13 @@ describe RequestController, "when sending a followup message" do # second time should give an error post :show_response, :outgoing_message => { :body => "Stop repeating yourself!", :what_doing => 'normal_sort' }, :id => info_requests(:fancy_dog_request).id, :incoming_message_id => incoming_messages(:useless_incoming_message), :submitted_followup => 1 - # XXX how do I check the error message here? + # TODO: how do I check the error message here? response.should render_template('show_response') end end -# XXX Stuff after here should probably be in request_mailer_spec.rb - but then +# TODO: Stuff after here should probably be in request_mailer_spec.rb - but then # it can't check the URLs in the emails I don't think, ugh. describe RequestController, "sending overdue request alerts" do @@ -1878,7 +1888,7 @@ describe RequestController, "sending overdue request alerts" do mail_token = $2 session[:user_id].should be_nil - controller.test_code_redirect_by_email_token(mail_token, self) # XXX hack to avoid having to call User controller for email link + controller.test_code_redirect_by_email_token(mail_token, self) # TODO: hack to avoid having to call User controller for email link session[:user_id].should == info_requests(:naughty_chicken_request).user.id response.should render_template('show_response') @@ -1935,7 +1945,7 @@ describe RequestController, "sending overdue request alerts" do mail_token = $2 session[:user_id].should be_nil - controller.test_code_redirect_by_email_token(mail_token, self) # XXX hack to avoid having to call User controller for email link + controller.test_code_redirect_by_email_token(mail_token, self) # TODO: hack to avoid having to call User controller for email link session[:user_id].should == info_requests(:naughty_chicken_request).user.id response.should render_template('show_response') @@ -2017,12 +2027,12 @@ describe RequestController, "sending unclassified new response reminder alerts" mail_token = $2 session[:user_id].should be_nil - controller.test_code_redirect_by_email_token(mail_token, self) # XXX hack to avoid having to call User controller for email link + controller.test_code_redirect_by_email_token(mail_token, self) # TODO: hack to avoid having to call User controller for email link session[:user_id].should == info_requests(:fancy_dog_request).user.id response.should render_template('show') assigns[:info_request].should == info_requests(:fancy_dog_request) - # XXX should check anchor tag here :) that it goes to last new response + # TODO: should check anchor tag here :) that it goes to last new response end end @@ -2053,7 +2063,7 @@ describe RequestController, "clarification required alerts" do mail_token = $2 session[:user_id].should be_nil - controller.test_code_redirect_by_email_token(mail_token, self) # XXX hack to avoid having to call User controller for email link + controller.test_code_redirect_by_email_token(mail_token, self) # TODO: hack to avoid having to call User controller for email link session[:user_id].should == info_requests(:fancy_dog_request).user.id response.should render_template('show_response') diff --git a/spec/controllers/track_controller_spec.rb b/spec/controllers/track_controller_spec.rb index d2b45b6bf..29f5c7fe1 100644 --- a/spec/controllers/track_controller_spec.rb +++ b/spec/controllers/track_controller_spec.rb @@ -122,11 +122,11 @@ describe TrackController, "when sending alerts for a track" do mail.body.should =~ /This a the daftest comment the world has ever seen/ # comment text included # Check subscription managing link -# XXX We can't do this, as it is redirecting to another controller. I'm +# TODO: We can't do this, as it is redirecting to another controller. I'm # apparently meant to be writing controller unit tests here, not functional # tests. Bah, I so don't care, bit of an obsessive constraint. # session[:user_id].should be_nil -# controller.test_code_redirect_by_email_token(mail_token, self) # XXX hack to avoid having to call User controller for email link +# controller.test_code_redirect_by_email_token(mail_token, self) # TODO: hack to avoid having to call User controller for email link # session[:user_id].should == users(:silly_name_user).id # # response.should render_template('users/show') @@ -173,7 +173,7 @@ describe TrackController, "when viewing RSS feed for a track" do get :track_request, :feed => 'feed', :url_title => track_thing.info_request.url_title response.should render_template('track/atom_feed') response.content_type.should == 'application/atom+xml' - # XXX should check it is an atom.builder type being rendered, not sure how to + # TODO: should check it is an atom.builder type being rendered, not sure how to assigns[:xapian_object].matches_estimated.should == 3 assigns[:xapian_object].results.size.should == 3 diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb index cf361d898..6ecdf1ad4 100644 --- a/spec/controllers/user_controller_spec.rb +++ b/spec/controllers/user_controller_spec.rb @@ -1,7 +1,7 @@ # coding: utf-8 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') -# XXX Use route_for or params_from to check /c/ links better +# TODO: Use route_for or params_from to check /c/ links better # http://rspec.rubyforge.org/rspec-rails/1.1.12/classes/Spec/Rails/Example/ControllerExampleGroup.html describe UserController, "when redirecting a show request to a canonical url" do @@ -327,7 +327,7 @@ describe UserController, "when signing up" do deliveries[0].body.should match(/when\s+you\s+already\s+have\s+an/) end - # XXX need to do bob@localhost signup and check that sends different email + # TODO: need to do bob@localhost signup and check that sends different email end describe UserController, "when signing out" do @@ -380,7 +380,7 @@ describe UserController, "when sending another user a message" do mail = deliveries[0] mail.body.should include("Bob Smith has used #{AlaveteliConfiguration::site_name} to send you the message below") mail.body.should include("Just a test!") - #mail.to_addrs.first.to_s.should == users(:silly_name_user).name_and_email # XXX fix some nastiness with quoting name_and_email + #mail.to_addrs.first.to_s.should == users(:silly_name_user).name_and_email # TODO: fix some nastiness with quoting name_and_email mail.from_addrs.first.to_s.should == users(:bob_smith_user).email end @@ -651,7 +651,7 @@ describe UserController, "when using profile photos" do @user.profile_photo.should_not be_nil end - # XXX todo check the two stage javascript cropping (above only tests one stage non-javascript one) + # TODO: todo check the two stage javascript cropping (above only tests one stage non-javascript one) end describe UserController, "when showing JSON version for API" do diff --git a/spec/helpers/date_time_helper_spec.rb b/spec/helpers/date_time_helper_spec.rb new file mode 100644 index 000000000..c4fdee1d1 --- /dev/null +++ b/spec/helpers/date_time_helper_spec.rb @@ -0,0 +1,71 @@ +require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') + +describe DateTimeHelper do + + include DateTimeHelper + + describe :simple_date do + + it 'formats a date in html by default' do + time = Time.utc(2012, 11, 07, 21, 30, 26) + self.should_receive(:simple_date_html).with(time) + simple_date(time) + end + + it 'formats a date in the specified format' do + time = Time.utc(2012, 11, 07, 21, 30, 26) + self.should_receive(:simple_date_text).with(time) + simple_date(time, :format => :text) + end + + it 'raises an argument error if given an unrecognized format' do + time = Time.utc(2012, 11, 07, 21, 30, 26) + expect { simple_date(time, :format => :unknown) }.to raise_error(ArgumentError) + end + + end + + describe :simple_date_html do + + it 'formats a date in a time tag' do + Time.use_zone('London') do + time = Time.utc(2012, 11, 07, 21, 30, 26) + expected = %Q(<time datetime="2012-11-07T21:30:26+00:00" title="2012-11-07 21:30:26 +0000">November 07, 2012</time>) + simple_date_html(time).should == expected + end + end + + end + + describe :simple_date_text do + + it 'should respect time zones' do + Time.use_zone('Australia/Sydney') do + simple_date_text(Time.utc(2012, 11, 07, 21, 30, 26)).should == 'November 08, 2012' + end + end + + it 'should handle Date objects' do + simple_date_text(Date.new(2012, 11, 21)).should == 'November 21, 2012' + end + + end + + describe :simple_time do + + it 'returns 00:00:00 for a date' do + simple_time(Date.new(2012, 11, 21)).should == '00:00:00' + end + + it 'returns the time component of a datetime' do + date = DateTime.new(2012, 11, 21, 10, 34, 56) + simple_time(date).should == '10:34:56' + end + + it 'returns the time component of a time' do + time = Time.utc(2000, 'jan', 1, 20, 15, 1) + simple_time(time).should == '20:15:01' + end + + end +end diff --git a/spec/helpers/highlight_helper_spec.rb b/spec/helpers/highlight_helper_spec.rb new file mode 100644 index 000000000..e1be7e153 --- /dev/null +++ b/spec/helpers/highlight_helper_spec.rb @@ -0,0 +1,247 @@ +require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') + +describe HighlightHelper do + include HighlightHelper + + describe :highlight_and_excerpt do + + it 'excerpts text and highlights phrases' do + text = "Quentin Nobble-Boston, Permanent Under-Secretary, Department for Humpadinking" + phrases = ['humpadinking'] + expected = '...Department for <span class="highlight">Humpadinking</span>' + highlight_and_excerpt(text, phrases, 15).should == expected + end + + it 'excerpts text and highlights matches' do + text = "Quentin Nobble-Boston, Permanent Under-Secretary, Department for Humpadinking" + matches = [/\bhumpadink\w*\b/iu] + expected = '...Department for <span class="highlight">Humpadinking</span>' + highlight_and_excerpt(text, matches, 15).should == expected + end + + context 'multiple matches' do + + it 'highlights multiple matches' do + text = <<-EOF +Quentin Nobble-Boston, Permanent Under-Secretary, Department for Humpadinking +decided to visit Humpadink so that he could be with the Humpadinks +EOF + + expected = <<-EOF +Quentin Nobble-Boston, Permanent Under-Secretary, Department for <span class="highlight">Humpadinking</span> +decided to visit <span class="highlight">Humpadink</span> so that he could be with the <span class="highlight">Humpadinks</span> +EOF + text.chomp! + expected.chomp! + matches = [/\b(humpadink\w*)\b/iu] + highlight_and_excerpt(text, matches, 1000).should == expected + end + + it 'bases the split on the first match' do + text = "Quentin Nobble-Boston, Permanent Under-Secretary," \ + "Department for Humpadinking decided to visit Humpadink" \ + "so that he could be with the Humpadinks" + + expected = "...Department for <span class=\"highlight\">" \ + "Humpadinking</span> decided to vis..." + + matches = [/\b(humpadink\w*)\b/iu] + highlight_and_excerpt(text, matches, 15).should == expected + end + + end + + end + + describe :highlight_matches do + + it 'highlights' do + assert_equal( + "This is a <mark>beautiful</mark> morning", + highlight_matches("This is a beautiful morning", "beautiful") + ) + + assert_equal( + "This is a <mark>beautiful</mark> morning, but also a <mark>beautiful</mark> day", + highlight_matches("This is a beautiful morning, but also a beautiful day", "beautiful") + ) + + assert_equal( + "This is a <b>beautiful</b> morning, but also a <b>beautiful</b> day", + highlight_matches("This is a beautiful morning, but also a beautiful day", "beautiful", :highlighter => '<b>\1</b>') + ) + + assert_equal( + "This text is not changed because we supplied an empty phrase", + highlight_matches("This text is not changed because we supplied an empty phrase", nil) + ) + + assert_equal ' ', highlight_matches(' ', 'blank text is returned verbatim') + end + + it 'sanitizes input' do + assert_equal( + "This is a <mark>beautiful</mark> morning", + highlight_matches("This is a beautiful morning<script>code!</script>", "beautiful") + ) + end + + it 'doesnt sanitize when the sanitize option is false' do + assert_equal( + "This is a <mark>beautiful</mark> morning<script>code!</script>", + highlight_matches("This is a beautiful morning<script>code!</script>", "beautiful", :sanitize => false) + ) + end + + it 'highlights using regexp' do + assert_equal( + "This is a <mark>beautiful!</mark> morning", + highlight_matches("This is a beautiful! morning", "beautiful!") + ) + + assert_equal( + "This is a <mark>beautiful! morning</mark>", + highlight_matches("This is a beautiful! morning", "beautiful! morning") + ) + + assert_equal( + "This is a <mark>beautiful? morning</mark>", + highlight_matches("This is a beautiful? morning", "beautiful? morning") + ) + end + + it 'accepts regex' do + assert_equal("This day was challenging for judge <mark>Allen</mark> and his colleagues.", + highlight_matches("This day was challenging for judge Allen and his colleagues.", /\ballen\b/i)) + end + + it 'highlights multiple phrases in one pass' do + assert_equal %(<em>wow</em> <em>em</em>), highlight_matches('wow em', %w(wow em), :highlighter => '<em>\1</em>') + end + + it 'highlights with html' do + assert_equal( + "<p>This is a <mark>beautiful</mark> morning, but also a <mark>beautiful</mark> day</p>", + highlight_matches("<p>This is a beautiful morning, but also a beautiful day</p>", "beautiful") + ) + assert_equal( + "<p>This is a <em><mark>beautiful</mark></em> morning, but also a <mark>beautiful</mark> day</p>", + highlight_matches("<p>This is a <em>beautiful</em> morning, but also a beautiful day</p>", "beautiful") + ) + assert_equal( + "<p>This is a <em class=\"error\"><mark>beautiful</mark></em> morning, but also a <mark>beautiful</mark> <span class=\"last\">day</span></p>", + highlight_matches("<p>This is a <em class=\"error\">beautiful</em> morning, but also a beautiful <span class=\"last\">day</span></p>", "beautiful") + ) + assert_equal( + "<p class=\"beautiful\">This is a <mark>beautiful</mark> morning, but also a <mark>beautiful</mark> day</p>", + highlight_matches("<p class=\"beautiful\">This is a beautiful morning, but also a beautiful day</p>", "beautiful") + ) + assert_equal( + "<p>This is a <mark>beautiful</mark> <a href=\"http://example.com/beautiful#top?what=beautiful%20morning&when=now+then\">morning</a>, but also a <mark>beautiful</mark> day</p>", + highlight_matches("<p>This is a beautiful <a href=\"http://example.com/beautiful\#top?what=beautiful%20morning&when=now+then\">morning</a>, but also a beautiful day</p>", "beautiful") + ) + assert_equal( + "<div>abc <b>div</b></div>", + highlight_matches("<div>abc div</div>", "div", :highlighter => '<b>\1</b>') + ) + end + + it 'doesnt modify the options hash' do + options = { :highlighter => '<b>\1</b>', :sanitize => false } + passed_options = options.dup + highlight_matches("<div>abc div</div>", "div", passed_options) + assert_equal options, passed_options + end + + it 'highlights with a block' do + assert_equal( + "<b>one</b> <b>two</b> <b>three</b>", + highlight_matches("one two three", ["one", "two", "three"]) { |word| "<b>#{word}</b>" } + ) + end + + end + + describe :excerpt do + + it 'excerpts' do + assert_equal("...is a beautiful morn...", excerpt("This is a beautiful morning", "beautiful", :radius => 5)) + assert_equal("This is a...", excerpt("This is a beautiful morning", "this", :radius => 5)) + assert_equal("...iful morning", excerpt("This is a beautiful morning", "morning", :radius => 5)) + assert_nil excerpt("This is a beautiful morning", "day") + end + + it 'is not html safe' do + assert !excerpt('This is a beautiful! morning', 'beautiful', :radius => 5).html_safe? + end + + it 'excerpts borderline cases' do + assert_equal("", excerpt("", "", :radius => 0)) + assert_equal("a", excerpt("a", "a", :radius => 0)) + assert_equal("...b...", excerpt("abc", "b", :radius => 0)) + assert_equal("abc", excerpt("abc", "b", :radius => 1)) + assert_equal("abc...", excerpt("abcd", "b", :radius => 1)) + assert_equal("...abc", excerpt("zabc", "b", :radius => 1)) + assert_equal("...abc...", excerpt("zabcd", "b", :radius => 1)) + assert_equal("zabcd", excerpt("zabcd", "b", :radius => 2)) + + # excerpt strips the resulting string before ap-/prepending excerpt_string. + # whether this behavior is meaningful when excerpt_string is not to be + # appended is questionable. + assert_equal("zabcd", excerpt(" zabcd ", "b", :radius => 4)) + assert_equal("...abc...", excerpt("z abc d", "b", :radius => 1)) + end + + it 'excerpts with regex' do + assert_equal('...is a beautiful! mor...', excerpt('This is a beautiful! morning', 'beautiful', :radius => 5)) + assert_equal('...is a beautiful? mor...', excerpt('This is a beautiful? morning', 'beautiful', :radius => 5)) + assert_equal('...is a beautiful? mor...', excerpt('This is a beautiful? morning', /\bbeau\w*\b/i, :radius => 5)) + assert_equal('...is a beautiful? mor...', excerpt('This is a beautiful? morning', /\b(beau\w*)\b/i, :radius => 5)) + assert_equal("...udge Allen and...", excerpt("This day was challenging for judge Allen and his colleagues.", /\ballen\b/i, :radius => 5)) + assert_equal("...judge Allen and...", excerpt("This day was challenging for judge Allen and his colleagues.", /\ballen\b/i, :radius => 1, :separator => ' ')) + assert_equal("...was challenging for...", excerpt("This day was challenging for judge Allen and his colleagues.", /\b(\w*allen\w*)\b/i, :radius => 5)) + end + + it 'excerpts with omission' do + assert_equal("[...]is a beautiful morn[...]", excerpt("This is a beautiful morning", "beautiful", :omission => "[...]",:radius => 5)) + assert_equal( + "This is the ultimate supercalifragilisticexpialidoceous very looooooooooooooooooong looooooooooooong beautiful morning with amazing sunshine and awesome tempera[...]", + excerpt("This is the ultimate supercalifragilisticexpialidoceous very looooooooooooooooooong looooooooooooong beautiful morning with amazing sunshine and awesome temperatures. So what are you gonna do about it?", "very", + :omission => "[...]") + ) + end + + it 'excerpts with utf8' do + if RUBY_VERSION.to_f >= 1.9 + assert_equal("...\357\254\203ciency could not be...".force_encoding(Encoding::UTF_8), excerpt("That's why e\357\254\203ciency could not be helped".force_encoding(Encoding::UTF_8), 'could', :radius => 8)) + else + assert_equal("...\357\254\203ciency could not be...", excerpt("That's why e\357\254\203ciency could not be helped", 'could', :radius => 8)) + end + end + + it 'doesnt modify the options hash' do + options = { :omission => "[...]",:radius => 5 } + passed_options = options.dup + excerpt("This is a beautiful morning", "beautiful", passed_options) + assert_equal options, passed_options + end + + it 'excerpts with separator' do + options = { :separator => ' ', :radius => 1 } + assert_equal('...a very beautiful...', excerpt('This is a very beautiful morning', 'very', options)) + assert_equal('This is...', excerpt('This is a very beautiful morning', 'this', options)) + assert_equal('...beautiful morning', excerpt('This is a very beautiful morning', 'morning', options)) + + options = { :separator => "\n", :radius => 0 } + assert_equal("...very long...", excerpt("my very\nvery\nvery long\nstring", 'long', options)) + + options = { :separator => "\n", :radius => 1 } + assert_equal("...very\nvery long\nstring", excerpt("my very\nvery\nvery long\nstring", 'long', options)) + + assert_equal excerpt('This is a beautiful morning', 'a'), + excerpt('This is a beautiful morning', 'a', :separator => nil) + end + + end + +end diff --git a/spec/helpers/link_to_helper_spec.rb b/spec/helpers/link_to_helper_spec.rb index 4a01ec683..261e1ef3e 100644 --- a/spec/helpers/link_to_helper_spec.rb +++ b/spec/helpers/link_to_helper_spec.rb @@ -20,6 +20,82 @@ describe LinkToHelper do end + describe 'when linking to new incoming messages' do + + before do + @info_request = mock_model(InfoRequest, :id => 123, :url_title => 'test_title') + @incoming_message = mock_model(IncomingMessage, :id => 32, :info_request => @info_request) + end + + context 'for external links' do + + it 'generates the url to the info request of the message' do + incoming_message_url(@incoming_message).should include('http://test.host/request/test_title') + end + + it 'includes an anchor to the new message' do + incoming_message_url(@incoming_message).should include('#incoming-32') + end + + it 'does not cache by default' do + incoming_message_url(@incoming_message).should_not include('nocache=incoming-32') + end + + it 'includes a cache busting parameter if set' do + incoming_message_url(@incoming_message, :cachebust => true).should include('nocache=incoming-32') + end + + end + + context 'for internal links' do + + it 'generates the incoming_message_url with the path only' do + expected = '/request/test_title#incoming-32' + incoming_message_path(@incoming_message).should == expected + end + + end + + end + + describe 'when linking to new outgoing messages' do + + before do + @info_request = mock_model(InfoRequest, :id => 123, :url_title => 'test_title') + @outgoing_message = mock_model(OutgoingMessage, :id => 32, :info_request => @info_request) + end + + context 'for external links' do + + it 'generates the url to the info request of the message' do + outgoing_message_url(@outgoing_message).should include('http://test.host/request/test_title') + end + + it 'includes an anchor to the new message' do + outgoing_message_url(@outgoing_message).should include('#outgoing-32') + end + + it 'does not cache by default' do + outgoing_message_url(@outgoing_message).should_not include('nocache=outgoing-32') + end + + it 'includes a cache busting parameter if set' do + outgoing_message_url(@outgoing_message, :cachebust => true).should include('nocache=outgoing-32') + end + + end + + context 'for internal links' do + + it 'generates the outgoing_message_url with the path only' do + expected = '/request/test_title#outgoing-32' + outgoing_message_path(@outgoing_message).should == expected + end + + end + + end + describe 'when displaying a user link for a request' do context "for external requests" do @@ -69,51 +145,4 @@ describe LinkToHelper do end - describe 'simple_date' do - - it 'formats a date in html by default' do - time = Time.utc(2012, 11, 07, 21, 30, 26) - self.should_receive(:simple_date_html).with(time) - simple_date(time) - end - - it 'formats a date in the specified format' do - time = Time.utc(2012, 11, 07, 21, 30, 26) - self.should_receive(:simple_date_text).with(time) - simple_date(time, :format => :text) - end - - it 'raises an argument error if given an unrecognized format' do - time = Time.utc(2012, 11, 07, 21, 30, 26) - expect { simple_date(time, :format => :unknown) }.to raise_error(ArgumentError) - end - - end - - describe 'simple_date_html' do - - it 'formats a date in a time tag' do - Time.use_zone('London') do - time = Time.utc(2012, 11, 07, 21, 30, 26) - expected = "<time datetime=\"2012-11-07T21:30:26+00:00\" title=\"2012-11-07 21:30:26 +0000\">November 07, 2012</time>" - simple_date_html(time).should == expected - end - end - - end - - describe 'simple_date_text' do - - it 'should respect time zones' do - Time.use_zone('Australia/Sydney') do - simple_date_text(Time.utc(2012, 11, 07, 21, 30, 26)).should == 'November 08, 2012' - end - end - - it 'should handle Date objects' do - simple_date_text(Date.new(2012, 11, 21)).should == 'November 21, 2012' - end - - end - end diff --git a/spec/integration/xapian_search_highlighting_spec.rb b/spec/integration/xapian_search_highlighting_spec.rb new file mode 100644 index 000000000..65a34cf91 --- /dev/null +++ b/spec/integration/xapian_search_highlighting_spec.rb @@ -0,0 +1,39 @@ +require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') + +describe 'highlighting search results' do + include HighlightHelper + + it 'ignores stopwords' do + phrase = 'department of humpadinking' + search = ActsAsXapian::Search.new([PublicBody], phrase, :limit => 1) + matches = search.words_to_highlight(:regex => true) + highlight_matches(phrase, matches).should == '<mark>department</mark> of <mark>humpadinking</mark>' + end + + it 'ignores case' do + search_phrase = 'department of humpadinking' + search = ActsAsXapian::Search.new([PublicBody], search_phrase, :limit => 1) + matches = search.words_to_highlight(:regex => true) + highlight_matches('Department of Humpadinking', matches).should == '<mark>Department</mark> of <mark>Humpadinking</mark>' + end + + it 'highlights stemmed words' do + phrase = 'department' + search = ActsAsXapian::Search.new([PublicBody], phrase, :limit => 1) + matches = search.words_to_highlight(:regex => true) + + search.words_to_highlight(:regex => false).should == ['depart'] + highlight_matches(phrase, matches).should == '<mark>department</mark>' + end + + it 'highlights stemmed words even if the stem is unhelpful' do + # Stemming returns 'bore' as the word to highlight which can't be + # matched in the original phrase. + phrase = 'boring' + search = ActsAsXapian::Search.new([PublicBody], phrase, :limit => 1) + matches = search.words_to_highlight(:regex => true, :include_original => true) + + highlight_matches(phrase, matches).should == '<mark>boring</mark>' + end + +end diff --git a/spec/lib/attachment_to_html/view_spec.rb b/spec/lib/attachment_to_html/view_spec.rb index 65eff4cad..50179b0f7 100644 --- a/spec/lib/attachment_to_html/view_spec.rb +++ b/spec/lib/attachment_to_html/view_spec.rb @@ -119,6 +119,7 @@ describe AttachmentToHTML::View do <!DOCTYPE html> <html> <head> + <meta charset="UTF-8"> <title>An attachment.txt</title> </head> <body> diff --git a/spec/lib/public_body_csv_spec.rb b/spec/lib/public_body_csv_spec.rb new file mode 100644 index 000000000..e3cc4be6e --- /dev/null +++ b/spec/lib/public_body_csv_spec.rb @@ -0,0 +1,114 @@ +require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') + +describe PublicBodyCSV do + + describe '.default_fields' do + defaults = [:name, + :short_name, + :url_name, + :tag_string, + :calculated_home_page, + :publication_scheme, + :disclosure_log, + :notes, + :created_at, + :updated_at, + :version] + PublicBodyCSV.default_fields.should == defaults + end + + describe '.default_headers' do + defaults = ['Name', + 'Short name', + 'URL name', + 'Tags', + 'Home page', + 'Publication scheme', + 'Disclosure log', + 'Notes', + 'Created at', + 'Updated at', + 'Version'] + PublicBodyCSV.default_headers.should == defaults + end + + describe :fields do + + it 'has a default set of fields' do + csv = PublicBodyCSV.new + csv.fields.should == PublicBodyCSV.default_fields + end + + # DO NOT include request_email (we don't want to make it + # easy to spam all authorities with requests) + it 'does not include the request_email attribute' do + csv = PublicBodyCSV.new + csv.fields.should_not include(:request_email) + end + + it 'allows custom fields to be set on instantiation' do + custom_fields = [:name, :short_name] + csv = PublicBodyCSV.new(:fields => custom_fields) + csv.fields.should == custom_fields + end + + end + + describe :headers do + + it 'has a default set of headers' do + csv = PublicBodyCSV.new + csv.headers.should == PublicBodyCSV.default_headers + end + + it 'allows custom headers to be set on instantiation' do + custom_headers = ['Name', 'Short Name'] + csv = PublicBodyCSV.new(:headers => custom_headers) + csv.headers.should == custom_headers + end + + end + + describe :rows do + + it 'is empty on instantiation' do + csv = PublicBodyCSV.new + csv.rows.should be_empty + end + + end + + describe :<< do + + it 'adds an elements attributes to the rows collection' do + csv = PublicBodyCSV.new + expected = ["Ministry of Silly Walks,MSW,msw,useless_agency,http://www.localhost,\"\",\"\",You know the one.,2007-10-25 10:51:01 UTC,2007-10-25 10:51:01 UTC,1"] + csv << PublicBody.find(5) + csv.rows.should == expected + end + + end + + describe :generate do + + it 'generates the csv' do + expected = <<-CSV +Name,Short name,URL name,Home page,Publication scheme,Disclosure log,Notes,Created at,Updated at,Version +Department for Humpadinking,DfH,dfh,http://www.localhost,"","",An albatross told me!!!,2007-10-25 10:51:01 UTC,2007-10-25 10:51:01 UTC,2 +Department of Loneliness,DoL,lonely,http://www.localhost,"","",A very lonely public body that no one has corresponded with,2011-01-26 14:11:02 UTC,2011-01-26 14:11:02 UTC,1 +CSV + + # Miss out the tags field because the specs keep changing the order + # that the tags are returned in + fields = [:name, :short_name, :url_name, :calculated_home_page, :publication_scheme, :disclosure_log, :notes, :created_at, :updated_at, :version] + headers = ['Name', 'Short name', 'URL name', 'Home page', 'Publication scheme', 'Disclosure log', 'Notes', 'Created at', 'Updated at', 'Version'] + + csv = PublicBodyCSV.new(:fields => fields, :headers => headers) + csv << PublicBody.where(:name => 'Department for Humpadinking').first + csv << PublicBody.where(:name => 'Department of Loneliness').first + csv.generate.should == expected + end + + end + +end diff --git a/spec/models/customstates.rb b/spec/models/customstates.rb index bffbe86fb..942e1fcde 100644 --- a/spec/models/customstates.rb +++ b/spec/models/customstates.rb @@ -24,7 +24,7 @@ module InfoRequestCustomStates end def date_deadline_extended - # XXX shouldn't this be 15 days after the date the status was + # TODO: shouldn't this be 15 days after the date the status was # changed to "deadline extended"? Or perhaps 15 days ater the # initial request due date? return Holiday.due_date_from_working_days(self.date_response_required_by, 15) diff --git a/spec/models/public_body_spec.rb b/spec/models/public_body_spec.rb index 38e31783d..a7544c218 100644 --- a/spec/models/public_body_spec.rb +++ b/spec/models/public_body_spec.rb @@ -493,7 +493,7 @@ describe PublicBody, " when loading CSV files" do PublicBody.count.should == original_count + 3 - # XXX Not sure why trying to do a I18n.with_locale fails here. Seems related to + # TODO: Not sure why trying to do a I18n.with_locale fails here. Seems related to # the way categories are loaded every time from the PublicBody class. For now we just # test some translation was done. body = PublicBody.find_by_name('North West Fake Authority') @@ -594,6 +594,20 @@ describe PublicBody do end + describe :site_administration? do + + it 'is true when the body has the site_administration tag' do + p = FactoryGirl.build(:public_body, :tag_string => 'site_administration') + p.site_administration?.should be_true + end + + it 'is false when the body does not have the site_administration tag' do + p = FactoryGirl.build(:public_body) + p.site_administration?.should be_false + end + + end + end describe PublicBody, " when override all public body request emails set" do diff --git a/spec/models/raw_email_spec.rb b/spec/models/raw_email_spec.rb index f86b35e99..aa82b0bc3 100644 --- a/spec/models/raw_email_spec.rb +++ b/spec/models/raw_email_spec.rb @@ -23,7 +23,7 @@ describe User, "manipulating a raw email" do @raw_email.data.should == "Hello, world!" end - # XXX this test fails, hopefully will be fixed in later Rails. + # TODO: this test fails, hopefully will be fixed in later Rails. # Doesn't matter too much for us for storing raw_emails, it would seem, # but keep an eye out. diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index c54043092..7dcd3ab8a 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -284,7 +284,7 @@ describe User, " when making name and email address" do end end -# XXX not finished +# TODO: not finished describe User, "when setting a profile photo" do before do @user = User.new diff --git a/spec/models/xapian_spec.rb b/spec/models/xapian_spec.rb index a1e060d8e..678e3a2dc 100644 --- a/spec/models/xapian_spec.rb +++ b/spec/models/xapian_spec.rb @@ -380,23 +380,63 @@ describe ActsAsXapian::Search, "#words_to_highlight" do it "should return a list of words used in the search" do s = ActsAsXapian::Search.new([PublicBody], "albatross words", :limit => 100) - s.words_to_highlight.should == ["albatross", "words"] + s.words_to_highlight.should == ["albatross", "word"] end it "should remove any operators" do s = ActsAsXapian::Search.new([PublicBody], "albatross words tag:mice", :limit => 100) - s.words_to_highlight.should == ["albatross", "words"] + s.words_to_highlight.should == ["albatross", "word"] end - # This is the current behaviour but it seems a little simplistic to me it "should separate punctuation" do s = ActsAsXapian::Search.new([PublicBody], "The doctor's patient", :limit => 100) - s.words_to_highlight.should == ["The", "doctor", "s", "patient"] + s.words_to_highlight.should == ["the", "doctor", "patient"].sort end it "should handle non-ascii characters" do s = ActsAsXapian::Search.new([PublicBody], "adatigénylés words tag:mice", :limit => 100) - s.words_to_highlight.should == ["adatigénylés", "words"] + s.words_to_highlight.should == ["adatigénylé", "word"] + end + + it "should ignore stopwords" do + s = ActsAsXapian::Search.new([PublicBody], "department of humpadinking", :limit => 100) + s.words_to_highlight.should_not include('of') + end + + it "uses stemming" do + s = ActsAsXapian::Search.new([PublicBody], 'department of humpadinking', :limit => 100) + s.words_to_highlight.should == ["depart", "humpadink"] + end + + it "doesn't stem proper nouns" do + s = ActsAsXapian::Search.new([PublicBody], 'department of Humpadinking', :limit => 1) + s.words_to_highlight.should == ["depart", "humpadinking"] + end + + it "includes the original search terms if requested" do + s = ActsAsXapian::Search.new([PublicBody], 'boring', :limit => 1) + s.words_to_highlight(:include_original => true).should == ['bore', 'boring'] + end + + it "does not return duplicate terms" do + s = ActsAsXapian::Search.new([PublicBody], 'boring boring', :limit => 1) + s.words_to_highlight.should == ['bore'] + end + + context 'the :regex option' do + + it 'wraps each words in a regex that matches the full word' do + expected = [/\b(albatross)\b/iu] + s = ActsAsXapian::Search.new([PublicBody], 'Albatross', :limit => 1) + s.words_to_highlight(:regex => true).should == expected + end + + it 'wraps each stem in a regex' do + expected = [/\b(depart)\w*\b/iu] + s = ActsAsXapian::Search.new([PublicBody], 'department', :limit => 1) + s.words_to_highlight(:regex => true).should == expected + end + end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e391c97d3..0e3fe35c7 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -123,7 +123,7 @@ Spork.prefork do end end - # XXX No idea what namespace/class/module to put this in + # TODO: No idea what namespace/class/module to put this in # Create a clean xapian index based on the fixture files and the raw_email data. def create_fixtures_xapian_index load_raw_emails_data |