diff options
-rw-r--r-- | app/controllers/request_controller.rb | 12 | ||||
-rw-r--r-- | app/views/layouts/default.rhtml | 2 | ||||
-rw-r--r-- | app/views/request/_search_ahead.rhtml | 13 | ||||
-rw-r--r-- | app/views/request/new.rhtml | 204 | ||||
-rw-r--r-- | config/routes.rb | 1 | ||||
-rw-r--r-- | locale/es/app.po | 296 | ||||
l--------- | public/asktheeu-theme | 1 | ||||
-rw-r--r-- | public/javascripts/ba-throttle-debounce.js | 9 | ||||
-rw-r--r-- | public/stylesheets/main.css | 33 | ||||
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 31 |
10 files changed, 372 insertions, 230 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 7b9421464..c8c7bd34b 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -736,5 +736,17 @@ class RequestController < ApplicationController return end end + + # Type ahead search + def search_typeahead + # Since acts_as_xapian doesn't support the Partial match flag, we work around it + # by making the last work a wildcard, which is quite the same + query = params[:q] + '*' + + query = query.split(' ').join(' OR ') # XXX: HACK for OR instead of default AND! + @xapian_requests = perform_search([InfoRequestEvent], query, 'relevant', 'request_collapse', 5) + + render :partial => "request/search_ahead.rhtml" + end end diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml index 94ec5a956..a14dfcf8e 100644 --- a/app/views/layouts/default.rhtml +++ b/app/views/layouts/default.rhtml @@ -1,8 +1,8 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="<%= I18n.locale %>"> <head> + <script type="text/javascript" src="/javascripts/jquery.js"></script> <% if @profile_photo_javascript %> - <script type="text/javascript" src="/javascripts/jquery.js"></script> <script type="text/javascript" src="/javascripts/jquery.Jcrop.js"></script> <script type="text/javascript" src="/javascripts/profile_photo.js"></script> <link rel="stylesheet" href="/stylesheets/jquery.Jcrop.css" type="text/css" > diff --git a/app/views/request/_search_ahead.rhtml b/app/views/request/_search_ahead.rhtml new file mode 100644 index 000000000..053b10146 --- /dev/null +++ b/app/views/request/_search_ahead.rhtml @@ -0,0 +1,13 @@ +<p> + <div id="request_search_ahead_results"> + <% if @xapian_requests.results.size > 0 %> + <h3>Possibly related requests:</h3> + <% end %> + <% for result in @xapian_requests.results %> + <%= render :partial => 'request/request_listing_short_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> + <% end %> + </div> +</p> + + + diff --git a/app/views/request/new.rhtml b/app/views/request/new.rhtml index a97116aa3..a640c7d1e 100644 --- a/app/views/request/new.rhtml +++ b/app/views/request/new.rhtml @@ -1,3 +1,14 @@ +<script type="text/javascript" src="/javascripts/ba-throttle-debounce.js"></script> +<script> + $(document).ready(function(){ + // Avoid triggering too often (on each keystroke) by using the debounce jQuery plugin: + // http://benalman.com/projects/jquery-throttle-debounce-plugin/ + $("#typeahead_search").keypress($.debounce( 300, function() { + $("#typeahead_response").load("<%=search_ahead_url%>?q="+encodeURI(this.value)); + })); + }); +</script> + <% @title = _("Make an {{law_used_short}} request to '{{public_body_name}}'",:law_used_short=>h(@info_request.law_used_short),:public_body_name=>h(@info_request.public_body.name)) %> <% if @existing_request %> @@ -10,107 +21,90 @@ </ul></div> <% end %> -<%= foi_error_messages_for :info_request, :outgoing_message %> + <%= foi_error_messages_for :info_request, :outgoing_message %> -<div id="request_advice"> - <h1><%= _('Read this before writing your {{info_request_law_used_full}} request', :info_request_law_used_full=>h(@info_request.law_used_full)) %></h1> - <ul> - <li> - <% form_tag("http://www.google.co.uk/search", {:id => "search_body_website_form", :method => "get"} ) do %> - <p> - <%= _('First,') %> - <% if !@info_request.public_body.publication_scheme.empty? %> - <%= _('<strong>browse</strong> the authority\'s <a href="%s">publication scheme</a> or <strong>search</strong> their web site ...') % [@info_request.public_body.publication_scheme] %> + <h1><%= _('2. Ask for Information') %></h1> + + <% form_for(:info_request, @info_request, :html => { :id => 'write_form' } ) do |f| %> + + <div id="request_header"> + <p> + <label class="form_label" for="info_request_public_body_id"><%= _('To:') %></label> + <span id="to_public_body"><%=h(@info_request.public_body.name)%></span> + <div class="form_item_note"> + <% if @info_request.public_body.info_requests.size > 0 %> + <%= _("Browse <a href='%s'>other requests</a> to '{{public_body_name}}' for examples of how to word your request.", :public_body_name=>h(@info_request.public_body.name)) % [public_body_url(@info_request.public_body)] %> <% else %> - <%= _('<strong>search</strong> the authority\'s web site ...') %> + <%= _('Browse <a href="%s">other requests</a> for examples of how to word your request.') % [request_list_url] %> <% end %> - <% if !@info_request.public_body.calculated_home_page.nil? %> - <br> - <%= text_field_tag 'q', params[:q], { :size => 20 } %> - <%= hidden_field_tag 'as_sitesearch', @info_request.public_body.calculated_home_page %> - <%= submit_tag _("Search") %> - <% end %> - <br> - ... <%= _('to check that the info isn\'t already published.') %> - </p> - <% end %> - </li> + </div> + </p> - <li> - <% if @info_request.public_body.info_requests.size > 0 %> - <%= _("Browse <a href='%s'>other requests</a> to '{{public_body_name}}' for examples of how to word your request.", :public_body_name=>h(@info_request.public_body.name)) % [public_body_url(@info_request.public_body)] %> - <% else %> - <%= _('Browse <a href="%s">other requests</a> for examples of how to word your request.') % [request_list_url] %> + <div id="request_header_text"> + <% if @info_request.public_body.has_notes? %> + <h3><%= _('Special note for this authority!') %></h3> + <p><%= @info_request.public_body.notes_as_html %></p> <% end %> - </li> - <li><%= _('Write your request in <strong>simple, precise language</strong>.') %></li> - <li><%= _('Ask for <strong>specific</strong> documents or information, this site is not suitable for general enquiries.') %></li> - <li><%= _('Keep it <strong>focused</strong>, you\'ll be more likely to get what you want (<a href="%s">why?</a>).') % [help_requesting_path + '#focused'] %></li> - <li><%= _('This site is <strong>public</strong>. Everything you type and any response will be published.') %></li> - </ul> - - <% if @info_request.public_body.has_notes? %> - <h1><%= _('Special note for this authority!') %></h1> - <ul> - <li><p><%= @info_request.public_body.notes_as_html %></p></li> - </ul> - <% end %> - <% if @info_request.public_body.eir_only? %> - <h1><%= _('Please ask for environmental information only') %></h1> - - <p><%= _('The Freedom of Information Act <strong>does not apply</strong> to') %> <%=h(@info_request.public_body.name)%>. - <%= _('However, you have the right to request environmental - information under a different law') %> (<a href="/help/requesting#eir">explanation</a>). - <%= _('This covers a very wide spectrum of information about the state of - the <strong>natural and built environment</strong>, such as:') %> + <% if @info_request.public_body.eir_only? %> + <h3><%= _('Please ask for environmental information only') %></h3> + + <p><%= _('The Freedom of Information Act <strong>does not apply</strong> to') %> <%=h(@info_request.public_body.name)%>. + <%= _('However, you have the right to request environmental + information under a different law') %> (<a href="/help/requesting#eir">explanation</a>). + <%= _('This covers a very wide spectrum of information about the state of + the <strong>natural and built environment</strong>, such as:') %> + <ul> + <li><%= _('Air, water, soil, land, flora and fauna (including how these effect + human beings)') %></li> + <li><%= _('Information on emissions and discharges (e.g. noise, energy, + radiation, waste materials)') %></li> + <li><%= _('Human health and safety') %></li> + <li><%= _('Cultural sites and built structures (as they may be affected by the + environmental factors listed above)') %></li> + <li><%= _('Plans and administrative measures that affect these matters') %></li> + </ul> + + <p><%= _('Please only request information that comes under those categories, <strong>do not waste your + time</strong> or the time of the public authority by requesting unrelated information.') %></p> + <% end %> + </div> + + <p> + <label class="form_label" for="info_request_title"><%= _('Summary:') %></label> + <%= f.text_field :title, :size => 50, :id =>"typeahead_search" %> + </p> + <div class="form_item_note"> + (<%= _('a one line summary of the information you are requesting, + e.g.') %> + <% if @info_request.law_used == 'eir' %> + <%= _("'Pollution levels over time for the River Tyne'") %> + <% else %> + <%= _("'Crime statistics by ward level for Wales'") %> + <% end %> + ) + </div> + <div id="typeahead_response"> + </div> + </div> + + <div id="request_advice"> <ul> - <li><%= _('Air, water, soil, land, flora and fauna (including how these effect - human beings)') %></li> - <li><%= _('Information on emissions and discharges (e.g. noise, energy, - radiation, waste materials)') %></li> - <li><%= _('Human health and safety') %></li> - <li><%= _('Cultural sites and built structures (as they may be affected by the - environmental factors listed above)') %></li> - <li><%= _('Plans and administrative measures that affect these matters') %></li> + <li><%= _('Write your request in <strong>simple, precise language</strong>.') %></li> + <li><%= _('Ask for <strong>specific</strong> documents or information, this site is not suitable for general enquiries.') %></li> + <li><%= _('Keep it <strong>focused</strong>, you\'ll be more likely to get what you want (<a href="%s">why?</a>).') % [help_requesting_path + '#focused'] %></li> </ul> + </div> - <p><%= _('Please only request information that comes under those categories, <strong>do not waste your - time</strong> or the time of the public authority by requesting unrelated information.') %></p> - <% end %> -</div> - -<% form_for(:info_request, @info_request, :html => { :id => 'write_form' } ) do |f| %> - - <div id="request_form"> - <h1> - <label class="form_label" for="info_request_public_body_id"><%= _('To:') %></label> - <span id="to_public_body"><%=h(@info_request.public_body.name)%></span> - </h1> - - <p> - <label class="form_label" for="info_request_title"><%= _('Summary:') %></label> - <%= f.text_field :title, :size => 50 %> - </p> - <div class="form_item_note"> - (<%= _('a one line summary of the information you are requesting, - e.g.') %> - <% if @info_request.law_used == 'eir' %> - <%= _("'Pollution levels over time for the River Tyne'") %> - <% else %> - <%= _("'Crime statistics by ward level for Wales'") %> - <% end %> - ) - </div> - - <% fields_for :outgoing_message do |o| %> - <p> - <label class="form_label" for="outgoing_message_body"><%= _('Your request:') %></label> - <%= o.text_area :body, :rows => 20, :cols => 60 %> - </p> - <% end %> - + <div id="request_form"> + <% fields_for :outgoing_message do |o| %> + <p> + <label class="form_label" for="outgoing_message_body"><%= _('Your request:') %></label> + <%= o.text_area :body, :rows => 20, :cols => 60 %> + </p> + <% end %> + <% if !@user %> <p class="form_note"> <%= _('Everything that you enter on this page, including <strong>your name</strong>, @@ -126,18 +120,18 @@ this website forever (<a href="%s">why?</a>).') % [help_privacy_path+"#public_request"] %> </p> <% end %> - - <p class="form_note"> - <%= _('<strong> Can I request information about myself?</strong> - <a href="%s">No! (Click here for details)</a>') % [help_requesting_path+"#data_protection"] %> - </p> - - <div class="form_button"> - <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %> - <%= hidden_field_tag(:submitted_new_request, 1 ) %> - <%= hidden_field_tag(:preview, 1 ) %> - <%= submit_tag _("Preview your public request") %> - </div> + + <p class="form_note"> + <%= _('<strong> Can I request information about myself?</strong> + <a href="%s">No! (Click here for details)</a>') % [help_requesting_path+"#data_protection"] %> + </p> + + <div class="form_button"> + <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %> + <%= hidden_field_tag(:submitted_new_request, 1 ) %> + <%= hidden_field_tag(:preview, 1 ) %> + <%= submit_tag _("Preview your public request") %> + </div> <% if !@info_request.tag_string.empty? %> <p class="form_note"> @@ -148,8 +142,8 @@ <strong>Tags:</strong> <%=h @info_request.tag_string %> </p> <% end %> - - </div> + + </div> <% end %> diff --git a/config/routes.rb b/config/routes.rb index c16c10eb9..7da279002 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -53,6 +53,7 @@ ActionController::Routing::Routes.draw do |map| request.upload_response "/upload/request/:url_title", :action => 'upload_response' + request.search_ahead '/request_search_ahead', :action => 'search_typeahead' end # Use /profile for things to do with the currently signed in user. diff --git a/locale/es/app.po b/locale/es/app.po index f5d55f3e6..a44453445 100644 --- a/locale/es/app.po +++ b/locale/es/app.po @@ -2,14 +2,15 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # +# David Cabo <david.cabo@gmail.com>, 2011. # skenaja <alex@alexskene.com>, 2011. msgid "" msgstr "" "Project-Id-Version: alaveteli\n" "Report-Msgid-Bugs-To: http://github.com/sebbacon/alaveteli/issues\n" "POT-Creation-Date: 2011-06-25 15:32+0200\n" -"PO-Revision-Date: 2011-07-12 14:28+0000\n" -"Last-Translator: sebbacon <seb.bacon@gmail.com>\n" +"PO-Revision-Date: 2011-07-23 21:07+0000\n" +"Last-Translator: dcabo <david.cabo@gmail.com>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -132,14 +133,14 @@ msgstr "" #: app/views/public_body/show.rhtml:82 msgid "%d Freedom of Information request" msgid_plural "%d Freedom of Information requests" -msgstr[0] "%d Libera de Information requesto" -msgstr[1] "Libera de Information requesti numbera %d" +msgstr[0] "%d petición de acceso a información" +msgstr[1] "%d peticiones de acceso a información" #: app/views/general/frontpage.rhtml:35 msgid "%d request" msgid_plural "%d requests" -msgstr[0] "%d nonna requesti" -msgstr[1] "%d multissimo requestos" +msgstr[0] "%d petición" +msgstr[1] "%d peticiones" #: app/views/request/new.rhtml:102 msgid "'Crime statistics by ward level for Wales'" @@ -176,7 +177,7 @@ msgstr "" #: app/views/general/search.rhtml:53 msgid "<a href=\"%s\">Browse all</a> or <a href=\"%s\">ask us to add one</a>." -msgstr "<a href=\"%s\">Browso tutto</a> ou <a href=\"%s\">demandus adder une</a>." +msgstr "<a href=\"%s\">Ver todas</a> o <a href=\"%s\">pídenos que añadamos una</a>." #: app/views/general/exception_caught.rhtml:13 msgid "<a href=\"%s\">Contact us</a> to tell us about the problem</li>" @@ -187,7 +188,7 @@ msgid "" "<a href=\"%s\">Make a new Freedom of Information request</a> to " "{{public_body_name}}" msgstr "" -"<a href=\"%s\">Makando une Libera de Information requesti</a> a " +"<a href=\"%s\">Hacer una nueva petición de información</a> a " "{{public_body_name}}" #: app/views/public_body/list.rhtml:43 @@ -339,32 +340,42 @@ msgid "" "<strong><code>commented_by:tony_bowden</code></strong> to search annotations" " made by Tony Bowden, typing the name as in the URL." msgstr "" -"<strong><code>commented_by:tony_bowden</code></strong> a busquar annotationi \n" -"makando para Tony Bowden, typar la nom con en el URL." +"<strong><code>commented_by:rafael_nadal</code></strong> para buscar " +"comentarios hechos por el usuario 'rafael_nadal'." #: app/views/general/search.rhtml:120 msgid "" "<strong><code>filetype:pdf</code></strong> to find all responses with PDF " "attachments. Or try these: <code>{{list_of_file_extensions}}</code>" msgstr "" +"<strong><code>filetype:pdf</code></strong> para buscar todas las respuestas " +"con PDFs adjuntos. O prueba estas: <code>{{list_of_file_extensions}}</code>" #: app/views/general/search.rhtml:119 msgid "" "<strong><code>request:</code></strong> to restrict to a specific request, " "typing the title as in the URL." msgstr "" +"<strong><code>request:</code></strong> para restringir la búsqueda a una " +"petición específica, escribiendo el título tal y como aparece en la URL." #: app/views/general/search.rhtml:117 msgid "" "<strong><code>requested_by:julian_todd</code></strong> to search requests " "made by Julian Todd, typing the name as in the URL." msgstr "" +"<code><strong>requested_by:julian_todd</strong></code> para buscar las " +"peticiones realizadas por Julian Todd, escribiendo el nombre como aparece en" +" la URL." #: app/views/general/search.rhtml:116 msgid "" "<strong><code>requested_from:home_office</code></strong> to search requests " "from the Home Office, typing the name as in the URL." msgstr "" +"<strong><code>requested_from:consejo_europeo</code></strong> para buscar " +"peticiones realizadas al Consejo Europeo, escribiendo su nombre como aparece" +" en la URL." #: app/views/general/search.rhtml:114 msgid "" @@ -372,6 +383,9 @@ msgid "" "historical status of the request, see the <a href=\"%s\">table of " "statuses</a> below." msgstr "" +"<code><strong>status:</strong></code> para seleccionar en función del estado" +" de la solicitud, consulte la <a href=\"%s\">tabla de estados</a> a " +"continuación." #: app/views/general/search.rhtml:122 msgid "" @@ -379,12 +393,18 @@ msgid "" " and tag values, e.g. <code>tag:openlylocal AND tag:financial_transaction:335633</code>. Note that by default any of the tags\n" " can be present, you have to put <code>AND</code> explicitly if you only want results them all present." msgstr "" +"<strong><code>tag:salud</code></strong> para buscar todos los organismos públicos o peticiones con la etiqueta dada. Puede incluir múltiples etiquetas, \n" +" y valores, e.g. <code>tag:salud AND tag:financial_transaction:335633</code>. Por defecto, basta con que cualquiera de las etiquetas\n" +" esté presente, añada <code>AND</code> explícitamente si sólo quiere resultados con todas ellas presentes." #: app/views/general/search.rhtml:115 msgid "" "<strong><code>variety:</code></strong> to select type of thing to search " "for, see the <a href=\"%s\">table of varieties</a> below." msgstr "" +"<strong><code>variety:</code></strong> para seleccionar el tipo de " +"información a buscar, consulte la <a href=\"%s\">tabla de tipos</a> a " +"continuación." #: app/views/comment/new.rhtml:56 msgid "" @@ -511,7 +531,7 @@ msgstr "" #: app/models/user.rb:54 msgid "Admin level is not included in list" -msgstr "" +msgstr "Nivel de Administrador no incluido en la lista" #: app/views/request_mailer/requires_admin.rhtml:9 msgid "Administration URL:" @@ -519,7 +539,7 @@ msgstr "" #: app/views/general/search.rhtml:31 app/views/general/search.rhtml:109 msgid "Advanced search tips" -msgstr "" +msgstr "Ayuda para la búsqueda avanzada" #: app/views/comment/new.rhtml:52 msgid "" @@ -642,8 +662,8 @@ msgid "" "Can't find it? <a href=\"%s\">Browse all</a> or <a href=\"%s\">ask us to add" " it</a>." msgstr "" -"No busquara? <a href=\"%s\">Browse tutti</a> ou <a href=\"%s\">demanda a nous a addare \"\n" -"\"la</a> " +"No lo encuentra? <a href=\"%s\">Consulte la lista completa</a> o <a " +"href=\"%s\">pídanos que añadamos uno nuevo</a> " #: app/controllers/track_controller.rb:143 msgid "Cancel a {{site_name}} alert" @@ -787,7 +807,7 @@ msgstr "" #: app/views/layouts/default.rhtml:143 msgid "Contact {{site_name}}" -msgstr "" +msgstr "Contacte con {{site_name}}" #: app/models/profile_photo.rb:96 msgid "" @@ -837,7 +857,7 @@ msgstr "" #: app/views/general/search.rhtml:50 app/views/general/search.rhtml:62 msgid "Did you mean: {{correction}}" -msgstr "" +msgstr "¿Quiere decir: {{correction}}?" #: app/views/outgoing_mailer/initial_request.rhtml:4 #: app/views/outgoing_mailer/followup.rhtml:6 @@ -895,6 +915,8 @@ msgid "" "Enter words that you want to find separated by spaces, e.g. <strong>climbing" " lane</strong>" msgstr "" +"Introduzca las palabras que desee separadas por espacio, es decir " +"<strong>parlamento gasto</strong>" #: app/views/request/upload_response.rhtml:23 msgid "" @@ -964,13 +986,15 @@ msgstr "" #: app/models/profile_photo.rb:101 msgid "Failed to convert image to a PNG" -msgstr "" +msgstr "Error al convertir la imagen a PNG" #: app/models/profile_photo.rb:105 msgid "" "Failed to convert image to the correct size: at %{cols}x%{rows}, need " "%{width}x%{height}" msgstr "" +"Error al convertir la imagen al tamaño adecuado: es %{cols}x%{rows}, debería" +" ser %{width}x%{height}" #: app/views/request/new.rhtml:21 msgid "First," @@ -982,8 +1006,6 @@ msgid "" " <br>like information from. <strong>By law, they have to respond</strong>\n" " (<a href=\"%s\">why?</a>)." msgstr "" -"Premiero, si poco <strong>nomo de Seblando publicus authoritita</strong> \n" -"tu <br>amo informatia. <strong>Con legalando, se obligandus respondre</strong> (<a href=\"%s\">pour acqui?</a>)." #: app/views/request_mailer/old_unclassified_updated.rhtml:8 msgid "Follow this link to see the request:" @@ -1008,6 +1030,7 @@ msgid "" "For an unknown reason, it is not possible to make a request to this " "authority." msgstr "" +"No es posible hacer una petición a este organismo, por motivos desconocidos." #: app/views/user/_signin.rhtml:21 msgid "Forgotten your password?" @@ -1035,7 +1058,7 @@ msgstr "" #: app/views/public_body/show.rhtml:100 msgid "Freedom of Information requests made" -msgstr "Makando Libera de Information requesti" +msgstr "peticiones de acceso a la información realizadas" #: app/views/user/show.rhtml:121 app/views/user/show.rhtml:140 msgid "Freedom of Information requests made by" @@ -1043,7 +1066,7 @@ msgstr "" #: app/views/public_body/show.rhtml:74 msgid "Freedom of Information requests made using this site" -msgstr "Makando Libera de Information requesti con la site isto" +msgstr "peticiones de acceso a la información realizadas por esta web" #: app/views/request/followup_bad.rhtml:12 msgid "" @@ -1070,15 +1093,15 @@ msgstr "" #: app/views/layouts/default.rhtml:119 msgid "Hello!" -msgstr "Nomjour!" +msgstr "¡Hola!" #: app/views/layouts/default.rhtml:116 msgid "Hello, {{username}}!" -msgstr "¡{{username}} hola!" +msgstr "¡Hola, {{username}}!" #: app/views/layouts/default.rhtml:111 msgid "Help" -msgstr "Aider" +msgstr "Ayuda" #: app/views/request/details.rhtml:50 msgid "" @@ -1106,7 +1129,7 @@ msgstr "" #: app/views/public_body/show.rhtml:7 msgid "Home page of authority" -msgstr "La pago home del authoritias" +msgstr "Sitio web del organismo" #: app/views/request/new.rhtml:63 msgid "" @@ -1420,19 +1443,19 @@ msgstr "" #: app/views/layouts/default.rhtml:17 msgid "Make and browse Freedom of Information (FOI) requests" -msgstr "Makando et browser los Libera de Information requesti" +msgstr "Realiza una petición de información o mira las ya realizadas" #: app/views/layouts/default.rhtml:88 msgid "Make and explore Freedom of Information requests" -msgstr "Makando et explorator los Libera de Information requesti" +msgstr "Realiza una petición de información o mira las ya realizadas" #: app/views/general/frontpage.rhtml:4 msgid "Make or explore Freedom of Information requests" -msgstr "\"Makando ou explorator los Libera de Information requesti" +msgstr "Realiza una petición de información o mira las ya realizadas" #: app/views/layouts/default.rhtml:104 msgid "Make request" -msgstr "Creer requesto" +msgstr "Realizar petición" #: app/views/public_body/_body_listing_single.rhtml:23 msgid "Make your own request" @@ -1448,15 +1471,15 @@ msgstr "" #: app/views/public_body/show.rhtml:5 msgid "More about this authority" -msgstr "Mas ou subjet du autoritas" +msgstr "Más información sobre este organismo" #: app/views/general/frontpage.rhtml:39 msgid "More authorities..." -msgstr "Mas autorititatas..." +msgstr "Más organismos..." #: app/views/general/frontpage.rhtml:53 msgid "More successful requests..." -msgstr "Mas requestos de suces" +msgstr "Más peticiones realizadas con éxito..." #: app/views/request/_describe_state.rhtml:65 msgid "My request has been <strong>refused</strong>" @@ -1464,15 +1487,15 @@ msgstr "" #: app/views/layouts/default.rhtml:108 msgid "My requests" -msgstr "Mes requestos" +msgstr "Mis peticiones" #: app/models/public_body.rb:36 msgid "Name can't be blank" -msgstr "" +msgstr "El nombre no puede estar vacío" #: app/models/public_body.rb:40 msgid "Name is already taken" -msgstr "Nom deja prendar" +msgstr "El nombre ya está siendo utilizado" #: app/views/user/signchangeemail.rhtml:20 msgid "New e-mail:" @@ -1500,7 +1523,7 @@ msgstr "" #: app/views/general/search.rhtml:40 msgid "Newest results first" -msgstr "Los resultas la mas nouvela premer" +msgstr "Resultados recientes primero" #: app/views/user/set_draft_profile_photo.rhtml:32 msgid "Next, crop your photo >>" @@ -1508,11 +1531,11 @@ msgstr "" #: app/views/general/search.rhtml:16 msgid "Next, select the public authority you'd like to make the request from." -msgstr "Maintena, shala el authoritas publicas que tu aimer requestar por" +msgstr "Ahora, elige el organismo al que le quiere enviar su petición." #: app/views/general/search.rhtml:48 msgid "No public authorities found" -msgstr "Nulla authoritas publiqua trouves" +msgstr "No se han encontrado organismos" #: app/views/request/list.rhtml:23 msgid "No requests of this sort yet." @@ -1527,8 +1550,8 @@ msgid "" "Nobody has made any Freedom of Information requests to {{public_body_name}} " "using this site yet." msgstr "" -"Nonna persona crear los requestos Libras Informatias a {{public_body_name}} " -"con esto sita" +"Nadie ha realizado todavía una petición de información a " +"{{public_body_name}} usando esta web." #: app/views/request/_request_listing.rhtml:2 #: app/views/public_body/_body_listing.rhtml:2 @@ -1537,7 +1560,7 @@ msgstr "" #: app/views/general/search.rhtml:7 msgid "Nothing found for '{{search_terms}}'" -msgstr "" +msgstr "No hay resultados para '{{search_terms}}'" #: app/views/user/signchangepassword_confirm.rhtml:1 #: app/views/user/signchangepassword_confirm.rhtml:3 @@ -1570,7 +1593,8 @@ msgid "" "OR, <strong>search</strong> for information others have requested using " "{{site_name}}" msgstr "" -"Ou <strong>busqar</strong> per infos los autros requesta com {{site_name}}" +"O, <strong>busca</strong> busca en la información que otros han solicitado " +"usando {{site_name}}" #: app/controllers/request_controller.rb:395 msgid "" @@ -1602,7 +1626,7 @@ msgstr "" #: app/views/public_body/show.rhtml:93 msgid "Only requests made using {{site_name}} are shown." -msgstr "Seul los requestos crear con {{site_name}} heerro" +msgstr "Sólo se muestran las peticiones realizadas con {{site_name}}." #: locale/model_attributes.rb:21 msgid "OutgoingMessage|Body" @@ -1645,6 +1669,8 @@ msgid "" "People {{start_count}} to {{end_count}} of {{total_count}} for " "{{user_search_query}}" msgstr "" +"Usuarios {{start_count}} a {{end_count}} de {{total_count}} para " +"{{user_search_query}}" #: app/views/user/set_draft_profile_photo.rhtml:13 msgid "Photo of you:" @@ -1700,7 +1726,7 @@ msgstr "" #: app/models/profile_photo.rb:91 msgid "Please choose a file containing your photo." -msgstr "" +msgstr "Por favor elige el fichero que contiene tu foto" #: app/models/outgoing_message.rb:162 msgid "Please choose what sort of reply you are making." @@ -1728,6 +1754,8 @@ msgid "" "Please describe more what the request is about in the subject. There is no " "need to say it is an FOI request, we add that on anyway." msgstr "" +"Por favor, describe mejor el tema de tu petición en el asunto. Por cierto, " +"no hace falta decir que es una petición FOI, ya lo añadimos nosotros." #: app/views/user/set_draft_profile_photo.rhtml:22 msgid "" @@ -1741,77 +1769,81 @@ msgstr "" #: app/models/user.rb:38 msgid "Please enter a password" -msgstr "" +msgstr "Por favor, introduce una contraseña." #: app/models/contact_validator.rb:30 msgid "Please enter a subject" -msgstr "Por favor, creear una suject" +msgstr "Por favor, introduce un asunto" #: app/models/info_request.rb:35 msgid "Please enter a summary of your request" -msgstr "" +msgstr "Por favor, introduce un resumen de tu petición" #: app/models/user.rb:106 msgid "Please enter a valid email address" -msgstr "" +msgstr "Por favor, introduce una dirección de correo válida" #: app/models/contact_validator.rb:31 msgid "Please enter the message you want to send" -msgstr "" +msgstr "Por favor, introduce el mensaje que quieres enviar" #: app/models/user.rb:49 msgid "Please enter the same password twice" -msgstr "" +msgstr "Por favor, introduce la misma contraseña dos veces" #: app/models/comment.rb:59 msgid "Please enter your annotation" -msgstr "" +msgstr "Por favor, introduce tu comentario" #: app/models/contact_validator.rb:29 app/models/user.rb:34 msgid "Please enter your email address" -msgstr "" +msgstr "Por favor, introduce tu dirección de correo" #: app/models/outgoing_message.rb:147 msgid "Please enter your follow up message" -msgstr "" +msgstr "Por favor, introduce tu mensaje" #: app/models/outgoing_message.rb:150 msgid "Please enter your letter requesting information" -msgstr "" +msgstr "Por favor, introduce tu petición de información" #: app/models/contact_validator.rb:28 app/models/user.rb:36 msgid "Please enter your name" -msgstr "" +msgstr "Por favor, introduce tu nombre" #: app/models/user.rb:109 msgid "Please enter your name, not your email address, in the name field." msgstr "" +"Por favor, introduce tu nombre - no tu dirección de correo - en el campo " +"para el nombre" #: app/models/change_email_validator.rb:29 msgid "Please enter your new email address" -msgstr "" +msgstr "Por favor, introduce tu nueva dirección de correo" #: app/models/change_email_validator.rb:28 msgid "Please enter your old email address" -msgstr "" +msgstr "Por favor, introduce tu antigua dirección de correo" #: app/models/change_email_validator.rb:30 msgid "Please enter your password" -msgstr "" +msgstr "Por favor, introduce tu contraseña" #: app/models/outgoing_message.rb:145 msgid "Please give details explaining why you want a review" -msgstr "" +msgstr "Por favor, explica por qué quieres una revisión" #: app/models/about_me_validator.rb:24 msgid "Please keep it shorter than 500 characters" -msgstr "" +msgstr "Por favor, limita tu mensaje a 500 carácteres" #: app/models/info_request.rb:103 msgid "" "Please keep the summary short, like in the subject of an email. You can use " "a phrase, rather than a full sentence." msgstr "" +"Por favor, mantén el resumen corto, como en el asunto de un correo " +"electrónico" #: app/views/request/new.rhtml:79 msgid "" @@ -1830,6 +1862,8 @@ msgid "" "Please sign at the bottom with your name, or alter the \"%{signoff}\" " "signature" msgstr "" +"Por favor, firma con tu nombre en la parte inferior, o cambia la firma " +"\"%{signoff}\"" #: app/views/user/sign.rhtml:8 msgid "Please sign in as " @@ -1850,19 +1884,23 @@ msgstr "" #: app/models/info_request.rb:36 msgid "Please write a summary with some text in it" -msgstr "" +msgstr "Por favor, escribe un resumen que no esté vacío" #: app/models/info_request.rb:100 msgid "" "Please write the summary using a mixture of capital and lower case letters. " "This makes it easier for others to read." msgstr "" +"Por favor, escribe el resumen usando letras mayúsculas y minúsculas para " +"facilitar su lectura" #: app/models/comment.rb:62 msgid "" "Please write your annotation using a mixture of capital and lower case " "letters. This makes it easier for others to read." msgstr "" +"Por favor, escribe tu comentario usando letras mayúsculas y minúsculas para " +"facilitar su lectura" #: app/controllers/request_controller.rb:404 msgid "" @@ -1875,6 +1913,8 @@ msgid "" "Please write your message using a mixture of capital and lower case letters." " This makes it easier for others to read." msgstr "" +"Por favor, escribe tu mensaje usando letras mayúsculas y minúsculas para " +"facilitar su lectura" #: app/views/comment/new.rhtml:41 msgid "" @@ -1947,14 +1987,16 @@ msgid "" "Public authorities {{start_count}} to {{end_count}} of {{total_count}} for " "{{user_search_query}}" msgstr "" +"Organismos {{start_count}} a {{end_count}} de {{total_count}} para " +"{{user_search_query}}" #: locale/model_attributes.rb:12 msgid "PublicBody|First letter" -msgstr "El premier lettre" +msgstr "Primera letra" #: locale/model_attributes.rb:10 msgid "PublicBody|Home page" -msgstr "La page de home" +msgstr "Stio web" #: locale/model_attributes.rb:8 msgid "PublicBody|Last edit comment" @@ -1966,11 +2008,11 @@ msgstr "" #: locale/model_attributes.rb:3 msgid "PublicBody|Name" -msgstr "La Nom" +msgstr "Nombre" #: locale/model_attributes.rb:11 msgid "PublicBody|Notes" -msgstr "" +msgstr "Notas" #: locale/model_attributes.rb:13 msgid "PublicBody|Publication scheme" @@ -1982,19 +2024,19 @@ msgstr "" #: locale/model_attributes.rb:4 msgid "PublicBody|Short name" -msgstr "La nom breva" +msgstr "Nombre corto" #: locale/model_attributes.rb:9 msgid "PublicBody|Url name" -msgstr "" +msgstr "Dirección web" #: locale/model_attributes.rb:6 msgid "PublicBody|Version" -msgstr "" +msgstr "Versión" #: app/views/public_body/show.rhtml:10 msgid "Publication scheme" -msgstr "" +msgstr "Esquema de publicación" #: locale/model_attributes.rb:49 msgid "RawEmail|Data binary" @@ -2021,10 +2063,12 @@ msgid "" "Read about <a href=\"%s\">advanced search operators</a>, such as proximity " "and wildcards." msgstr "" +"Más información sobre <a href=\"%s\">los operadores de búsqueda " +"avanzados</a>, como cercanía y comodines." #: app/views/layouts/default.rhtml:110 msgid "Read blog" -msgstr "Lire bloggo" +msgstr "Leer el blog" #: app/views/request/new.rhtml:16 msgid "Read this before writing your {{info_request_law_used_full}} request" @@ -2032,7 +2076,7 @@ msgstr "" #: app/views/general/search.rhtml:42 msgid "Recently described results first" -msgstr "Los resultas recentas decriba au premier" +msgstr "Resultados descritos recientemente primero" #: app/controllers/request_controller.rb:122 msgid "Recently sent Freedom of Information requests" @@ -2134,7 +2178,7 @@ msgstr "" #: app/views/general/search.rhtml:9 msgid "Results page {{page_number}}" -msgstr "Page de resultas numero {{page_number}}" +msgstr "Página de resultados {{page_number}}" #: app/views/user/set_profile_about_me.rhtml:35 msgid "Save" @@ -2144,11 +2188,11 @@ msgstr "" #: app/views/general/exception_caught.rhtml:10 #: app/views/general/frontpage.rhtml:16 app/views/general/search.rhtml:29 msgid "Search" -msgstr "Busquar" +msgstr "Buscar" #: app/views/general/search.rhtml:4 msgid "Search Freedom of Information requests, public authorities and users" -msgstr "Busquare Libra Info Requesta, authoritas et personna" +msgstr "Buscar peticiones de información, organismos públicos y usuarios" #: app/views/general/exception_caught.rhtml:7 msgid "Search the site to find what you were looking for." @@ -2188,11 +2232,11 @@ msgstr "" #: app/models/public_body.rb:39 msgid "Short name is already taken" -msgstr "" +msgstr "Nombre de usuario ya en uso" #: app/views/general/search.rhtml:38 msgid "Show most relevant results first" -msgstr "" +msgstr "Muestra resultados más relevantes primero" #: app/views/request/list.rhtml:2 app/views/public_body/list.rhtml:3 msgid "Show only..." @@ -2208,11 +2252,11 @@ msgstr "" #: app/views/layouts/default.rhtml:120 msgid "Sign in or sign up" -msgstr "Enregister au signin" +msgstr "Iniciar sesión o registro" #: app/views/layouts/default.rhtml:117 msgid "Sign out" -msgstr "Exito" +msgstr "Cerrar sesión" #: app/views/user/_signup.rhtml:41 msgid "Sign up" @@ -2289,7 +2333,7 @@ msgstr "" #: app/views/general/search.rhtml:128 msgid "Table of statuses" -msgstr "" +msgstr "Tabla de estados" #: app/views/request/preview.rhtml:45 msgid "Tags:" @@ -2457,6 +2501,8 @@ msgid "" "The search index is currently offline, so we can't show the Freedom of " "Information requests that have been made to this authority." msgstr "" +"El índice de búsqueda no está accesible en estos momentos: no podemos " +"mostrar las peticiones de información realizadas a este organismo." #: app/views/user/show.rhtml:141 msgid "" @@ -2579,6 +2625,7 @@ msgstr "" #: app/views/public_body/show.rhtml:60 msgid "This authority no longer exists, so you cannot make a request to it." msgstr "" +"Este organismo ya no existe, no pueden realizarse peticiones de información." #: app/views/request/_hidden_correspondence.rhtml:23 msgid "" @@ -2696,7 +2743,7 @@ msgstr "" #: app/controllers/track_controller.rb:141 msgid "To cancel this alert" -msgstr "" +msgstr "Cancelar esta alerta" #: app/views/user/no_cookies.rhtml:5 msgid "" @@ -2706,11 +2753,11 @@ msgstr "" #: app/controllers/user_controller.rb:247 msgid "To change your email address used on {{site_name}}" -msgstr "" +msgstr "Cambiar la dirección de correo usada en {{site_name}}" #: app/controllers/request_controller.rb:320 msgid "To classify the response to this FOI request" -msgstr "" +msgstr "Reclasificar la respuesta a esta petición" #: app/views/request/show_response.rhtml:39 msgid "To do that please send a private email to " @@ -2736,36 +2783,38 @@ msgstr "" #: app/controllers/request_game_controller.rb:38 msgid "To play the request categorisation game" -msgstr "" +msgstr "Jugar al juego de recategorización de peticiones" #: app/controllers/comment_controller.rb:55 msgid "To post your annotation" -msgstr "" +msgstr "Añadir su comentario" #: app/controllers/request_controller.rb:526 msgid "To reply to " -msgstr "" +msgstr "Contestar a " #: app/controllers/request_controller.rb:525 msgid "To send a follow up message to " -msgstr "" +msgstr "Enviar una respuesta a " #: app/controllers/user_controller.rb:319 msgid "To send a message to " -msgstr "" +msgstr "Para enviar un mensaje a" #: app/controllers/request_controller.rb:281 msgid "To send your FOI request" -msgstr "" +msgstr "Para enviar su petición de información" #: app/controllers/request_controller.rb:47 msgid "To update the status of this FOI request" -msgstr "" +msgstr "Para actualizar el estado de su petición de información" #: app/controllers/request_controller.rb:685 msgid "" "To upload a response, you must be logged in using an email address from " msgstr "" +"Para cargar una respuesta, debe estar registrado con una dirección de correo" +" electrónico de" #: app/views/public_body/view_email_captcha.rhtml:5 msgid "" @@ -2792,7 +2841,7 @@ msgstr "" #: app/views/public_body/show.rhtml:3 msgid "Track this authority" -msgstr "Traqo esto authotito" +msgstr "" #: app/views/user/show.rhtml:29 msgid "Track this person" @@ -2819,10 +2868,12 @@ msgid "" "Type <strong><code>01/01/2008..14/01/2008</code></strong> to only show " "things that happened in the first two weeks of January." msgstr "" +"Introduce <code><strong>01/01/2008..14/01/2008</strong></code> para mostrar " +"sólo las cosas que sucedieron en las dos primeras semanas de enero." #: app/models/public_body.rb:37 msgid "URL name can't be blank" -msgstr "" +msgstr "La URL no puede estar vacía." #: app/models/user_mailer.rb:45 msgid "Unable to change email address on WhatDoTheyKnow.com" @@ -2876,19 +2927,23 @@ msgstr "" #: app/controllers/request_controller.rb:49 msgid "Update the status of your request to " -msgstr "" +msgstr "Actualizar el estado de la petición a " #: app/views/general/search.rhtml:112 msgid "" "Use OR (in capital letters) where you don't mind which word, e.g. " "<strong><code>commons OR lords</code></strong>" msgstr "" +"Escriba OR (en mayúsculas) cuando no le importe qué palabra, e.g. " +"<strong><code>diputado OR parlamento</code></strong>" #: app/views/general/search.rhtml:113 msgid "" "Use quotes when you want to find an exact phrase, e.g. " "<strong><code>\"Liverpool City Council\"</code></strong>" msgstr "" +"Utilice comillas cuando quiera buscar una frase exacta, por ejemplo " +"<strong><code>\"Consejo de Europa\"</code></strong>" #: locale/model_attributes.rb:68 msgid "UserInfoRequestSentAlert|Alert type" @@ -2896,7 +2951,7 @@ msgstr "" #: locale/model_attributes.rb:79 msgid "User|About me" -msgstr "" +msgstr "Sobre mí" #: locale/model_attributes.rb:77 msgid "User|Admin level" @@ -2908,7 +2963,7 @@ msgstr "" #: locale/model_attributes.rb:70 msgid "User|Email" -msgstr "" +msgstr "Dirección de correo" #: locale/model_attributes.rb:74 msgid "User|Email confirmed" @@ -2924,7 +2979,7 @@ msgstr "" #: locale/model_attributes.rb:71 msgid "User|Name" -msgstr "" +msgstr "Nombre" #: locale/model_attributes.rb:73 msgid "User|Salt" @@ -2932,11 +2987,11 @@ msgstr "" #: locale/model_attributes.rb:75 msgid "User|Url name" -msgstr "" +msgstr "URL" #: app/views/public_body/show.rhtml:22 msgid "View FOI email address" -msgstr "" +msgstr "Ver dirección de correo" #: app/views/public_body/view_email_captcha.rhtml:1 msgid "View FOI email address for '{{public_body_name}}'" @@ -2952,7 +3007,7 @@ msgstr "" #: app/views/layouts/default.rhtml:106 msgid "View authorities" -msgstr "" +msgstr "Ver organismos públicos" #: app/views/public_body/view_email_captcha.rhtml:12 msgid "View email" @@ -3073,11 +3128,11 @@ msgstr "" #: app/controllers/request_controller.rb:532 msgid "Write a reply to " -msgstr "" +msgstr "Escribir una respuesta a " #: app/controllers/request_controller.rb:531 msgid "Write your FOI follow up message to " -msgstr "" +msgstr "Escribir una respuesta a " #: app/views/request/new.rhtml:46 msgid "Write your request in <strong>simple, precise language</strong>." @@ -3102,7 +3157,7 @@ msgstr "" #: app/controllers/track_controller.rb:96 msgid "You are already being emailed updates about " -msgstr "" +msgstr "Ya está recibiendo actualizaciones por correo sobre " #: app/models/track_thing.rb:156 msgid "You are being emailed about any new successful responses" @@ -3133,11 +3188,11 @@ msgstr "" #: app/controllers/user_controller.rb:482 msgid "You have now changed the text about you on your profile." -msgstr "" +msgstr "Ha cambiado el texto sobre usted en su perfil." #: app/controllers/user_controller.rb:300 msgid "You have now changed your email address used on {{site_name}}" -msgstr "" +msgstr "Ha cambiado la dirección de correo que usa en {{site_name}}" #: app/views/user_mailer/already_registered.rhtml:3 msgid "" @@ -3153,6 +3208,8 @@ msgid "" "You know what caused the error, and can <strong>suggest a solution</strong>," " such as a working email address." msgstr "" +"Sabe lo que ha causado el error, y puede <strong>sugerir una solución</a>, " +"como una dirección de correo válida." #: app/views/request/upload_response.rhtml:16 msgid "" @@ -3176,15 +3233,15 @@ msgstr "" #: app/controllers/user_controller.rb:460 msgid "You need to be logged in to change the text about you on your profile." -msgstr "" +msgstr "Necesita identificarse para cambiar el texto de su perfil." #: app/controllers/user_controller.rb:361 msgid "You need to be logged in to change your profile photo." -msgstr "" +msgstr "Necesita identificarse para cambiar la foto de su perfil." #: app/controllers/user_controller.rb:423 msgid "You need to be logged in to clear your profile photo." -msgstr "" +msgstr "Necesita identificarse para borrar la foto de su perfil." #: app/controllers/request_controller.rb:542 msgid "" @@ -3213,15 +3270,15 @@ msgstr "" #: app/controllers/track_controller.rb:152 msgid "You will no longer be emailed updates about " -msgstr "" +msgstr "Ya no recibirá actualizaciones por correo sobre " #: app/controllers/track_controller.rb:181 msgid "You will no longer be emailed updates for those alerts" -msgstr "" +msgstr "Ya no recibirá correos para esas alertas" #: app/controllers/track_controller.rb:109 msgid "You will now be emailed updates about " -msgstr "" +msgstr "Ahora recibirá actualizaciones por correo sobre " #: app/views/request_mailer/not_clarified_alert.rhtml:6 msgid "" @@ -3231,7 +3288,7 @@ msgstr "" #: app/controllers/user_controller.rb:432 msgid "You've now cleared your profile photo" -msgstr "" +msgstr "Ha borrado la foto de su perfil" #: app/views/user/show.rhtml:152 msgid "Your " @@ -3267,6 +3324,9 @@ msgid "" "prevent spam. Please <a href=\"%s\">contact us</a> if you really want to " "send a follow up message." msgstr "" +"Su respuesta no ha sido enviada porque esta petición ha sido bloqueada para " +"evitar spam. Por favor <a href=\"%s\">contáctenos</a> si realmente quiere " +"enviar una respuesta." #: app/controllers/request_controller.rb:567 msgid "Your follow up message has been sent on its way." @@ -3281,10 +3341,12 @@ msgid "" "Your message has been sent. Thank you for getting in touch! We'll get back " "to you soon." msgstr "" +"Su mensaje ha sido enviado. Gracias por escribir, nos pondremos en contacto " +"con usted pronto." #: app/controllers/user_controller.rb:339 msgid "Your message to {{recipient_user_name}} has been sent!" -msgstr "" +msgstr "Su mensaje a {{recipient_user_name}} ha sido enviado." #: app/views/request/followup_preview.rhtml:15 msgid "Your message will appear in <strong>search engines</strong>" @@ -3311,7 +3373,7 @@ msgstr "" #: app/controllers/user_controller.rb:230 msgid "Your password has been changed." -msgstr "" +msgstr "Su contraseña ha sido cambiada." #: app/views/user/signchangeemail.rhtml:25 msgid "Your password:" @@ -3365,7 +3427,7 @@ msgstr "" #: app/views/public_body/show.rhtml:30 msgid "also called {{public_body_short_name}}" -msgstr "en additionado, nomme {{public_body_short_name}}" +msgstr "también conocido como {{public_body_short_name}}" #: app/views/user/wrong_user.rhtml:5 msgid "and sign in as " @@ -3441,7 +3503,7 @@ msgstr "" #: app/views/general/frontpage.rhtml:18 msgid "e.g." -msgstr "par exemplo" +msgstr "por ejemplo" #: app/views/user/show.rhtml:96 msgid "edit text about you" @@ -3707,7 +3769,7 @@ msgstr "" #: app/views/general/frontpage.rhtml:49 msgid "{{length_of_time}} ago" -msgstr "depuis {{length_of_time}}" +msgstr "hace {{length_of_time}}" #: app/views/request/_after_actions.rhtml:43 msgid "{{public_body_name}} only:" @@ -3723,7 +3785,7 @@ msgstr "" msgid "{{user}} made this {{law_used_full}} request" msgstr "" - - +#~ msgid "activerecord.errors.full_messages.format" +#~ msgstr "%{message}" diff --git a/public/asktheeu-theme b/public/asktheeu-theme new file mode 120000 index 000000000..108ef0abe --- /dev/null +++ b/public/asktheeu-theme @@ -0,0 +1 @@ +/Users/David/src/asktheeu/asktheeu/vendor/plugins/asktheeu-theme/public
\ No newline at end of file diff --git a/public/javascripts/ba-throttle-debounce.js b/public/javascripts/ba-throttle-debounce.js new file mode 100644 index 000000000..07205508e --- /dev/null +++ b/public/javascripts/ba-throttle-debounce.js @@ -0,0 +1,9 @@ +/* + * jQuery throttle / debounce - v1.1 - 3/7/2010 + * http://benalman.com/projects/jquery-throttle-debounce-plugin/ + * + * Copyright (c) 2010 "Cowboy" Ben Alman + * Dual licensed under the MIT and GPL licenses. + * http://benalman.com/about/license/ + */ +(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this);
\ No newline at end of file diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index 8dfecd586..0c669e8ef 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -930,16 +930,39 @@ a img.attachment_image { /*------------------------------------------------ making a request / sign up / sign in */ #request_advice -{} +{ + float: right; + width: 250px; + margin-top: 1em; +} + #request_advice ul { - width: 26em; margin: 0 auto 0 auto; } #request_advice ul li { margin: 0 0 1em 0; } +#request_header +{ + background-color: #FFFFE0; + padding-top: 0.5em; + padding-bottom: 1em; +} + +#request_header_text +{ + font-size: 0.8em; + margin-left: 11em; +} + +#request_search_ahead_results +{ + font-size: 0.8em; + margin-left: 11em; +} + #request_form -{ margin-top: 4em;} +{ margin-top: 1em;} #request_form label, label.form_label @@ -952,10 +975,6 @@ label.form_label padding: 0 10px 0 0; margin: 0 0 0 0; } - #request_form h1 label - { - font-size: 0.55em; - } .form_item_note, .form_note { diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 1a190cad6..33a6d0486 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -1253,5 +1253,36 @@ describe RequestController, "when showing JSON version for API" do end +describe RequestController, "when doing type ahead searches" do + fixtures :info_requests, :info_request_events, :public_bodies, :public_body_translations, :users, :incoming_messages, :raw_emails, :outgoing_messages, :comments + + it "should return nothing for the empty query string" do + get :search_typeahead, :q => "" + response.should render_template('request/_search_ahead.rhtml') + assigns[:xapian_requests].results.size.should == 0 + end + + it "should return a request matching the given keyword, but not users with a matching description" do + get :search_typeahead, :q => "chicken" + response.should render_template('request/_search_ahead.rhtml') + assigns[:xapian_requests].results.size.should == 1 + assigns[:xapian_requests].results[0][:model].title.should == info_requests(:naughty_chicken_request).title + end + + it "should return all requests matching any of the given keywords" do + get :search_typeahead, :q => "money dog" + response.should render_template('request/_search_ahead.rhtml') + assigns[:xapian_requests].results.size.should == 2 + assigns[:xapian_requests].results[0][:model].title.should == info_requests(:fancy_dog_request).title + assigns[:xapian_requests].results[1][:model].title.should == info_requests(:naughty_chicken_request).title + end + + it "should return partial matches" do + get :search_typeahead, :q => "chick" # 'chick' for 'chicken' + response.should render_template('request/_search_ahead.rhtml') + assigns[:xapian_requests].results.size.should == 1 + assigns[:xapian_requests].results[0][:model].title.should == info_requests(:naughty_chicken_request).title + end +end |