Merge branch 'legislation-module-stable' of https://github.com/medialab-prado/consul into medialab-legislation

This commit is contained in:
decabeza
2017-05-22 18:43:49 +02:00
177 changed files with 10710 additions and 125 deletions

View File

@@ -36,6 +36,7 @@ data:
- config/locales/kaminari.%{locale}.yml
- config/locales/officing.%{locale}.yml
- config/locales/budgets.%{locale}.yml
- config/locales/legislation.%{locale}.yml
# Locale files to write new keys to, based on a list of key pattern => file rules. Matched from top to bottom:
# `i18n-tasks normalize -p` will force move the keys according to these rules
@@ -127,6 +128,10 @@ ignore_unused:
- 'admin.organizations.index.filter*'
- 'admin.users.index.filter*'
- 'admin.activity.show.filter*'
- 'admin.legislation.processes.index.filter*'
- 'admin.legislation.processes.*.submit_button'
- 'admin.legislation.draft_versions.*.submit_button'
- 'admin.legislation.questions.*.submit_button'
- 'admin.comments.index.hidden_*'
- 'admin.settings.index.features.*'
- 'admin.polls.*.submit_button'
@@ -152,11 +157,14 @@ ignore_unused:
- 'notifications.index.comments_on*'
- 'notifications.index.replies_to*'
- 'notifications.index.proposal_notification*'
- 'legislation.processes.index.filter*'
- 'helpers.page_entries_info.*' # kaminari
- 'views.pagination.*' # kaminari
- 'shared.suggest.*'
- 'invisible_captcha.*'
- 'admin.site_customization.pages.page.status_*'
- 'admin.legislation.processes.process.*'
- 'legislation.processes.index.*'
# - '{devise,kaminari,will_paginate}.*'
# - 'simple_form.{yes,no}'
# - 'simple_form.{placeholders,hints,labels}.*'

View File

@@ -55,6 +55,21 @@ en:
site_customization/content_block:
one: Custom content block
other: Custom content blocks
legislation/process:
one: "Process"
other: "Processes"
legislation/draft_versions:
one: "Draft version"
other: "Draft versions"
legislation/questions:
one: "Question"
other: "Questions"
legislation/question_options:
one: "Question option"
other: "Question options"
legislation/answers:
one: "Answer"
other: "Answers"
attributes:
budget:
name: "Name"
@@ -146,6 +161,33 @@ en:
name: Name
locale: locale
body: Body
legislation/process:
title: Process Title
description: Description
target: Target
how_to_participate: How to participate
additional_info: Additional info
start_date: Start date
end_date: End date
debate_start_date: Debate start date
debate_end_date: Debate end date
draft_publication_date: Draft publication date
allegations_start_date: Allegations start date
allegations_end_date: Allegations end date
final_publication_date: Final result publication date
legislation/draft_version:
title: Version title
body: Text
changelog: Changes
status: Status
final_version: Final version
legislation/question:
title: Title
question_options: Options
legislation/question_option:
value: Value
legislation/annotation:
text: Comment
errors:
models:
user:
@@ -165,6 +207,14 @@ en:
document_number:
not_in_census: "Document not in census"
has_voted: "User has already voted"
legislation/process:
attributes:
end_date:
invalid_date_range: must be on or after the start date
debate_end_date:
invalid_date_range: must be on or after the debate start date
allegations_end_date:
invalid_date_range: must be on or after the allegations start date
proposal:
attributes:
tag_list:

View File

@@ -55,6 +55,21 @@ es:
site_customization/content_block:
one: Bloque
other: Bloques
legislation/process:
one: "Proceso"
other: "Procesos"
legislation/draft_texts:
one: "Borrador"
other: "Borradores"
legislation/questions:
one: "Pregunta"
other: "Preguntas"
legislation/question_options:
one: "Opción de respuesta cerrada"
other: "Opciones de respuesta cerrada"
legislation/answers:
one: "Respuesta"
other: "Respuestas"
attributes:
budget:
name: "Nombre"
@@ -141,6 +156,33 @@ es:
name: Nombre
locale: Idioma
body: Contenido
legislation/process:
title: Título del proceso
description: En qué consiste
target: A quién afecta
how_to_participate: Cómo participar
additional_info: Información adicional
start_date: Fecha de inicio del proceso
end_date: Fecha de fin del proceso
debate_start_date: Fecha de inicio del debate
debate_end_date: Fecha de fin del debate
draft_publication_date: Fecha de publicación del borrador
allegations_start_date: Fecha de inicio de alegaciones
allegations_end_date: Fecha de fin de alegaciones
final_publication_date: Fecha de publicación del resultado final
legislation/draft_version:
title: Título de la version
body: Texto
changelog: Cambios
status: Estado
final_version: Versión final
legislation/question:
title: Título
question_options: Respuestas
legislation/question_option:
value: Valor
legislation/annotation:
text: Comentario
errors:
models:
user:
@@ -160,6 +202,14 @@ es:
document_number:
not_in_census: "Este documento no aparece en el censo"
has_voted: "Este usuario ya ha votado"
legislation/process:
attributes:
end_date:
invalid_date_range: tiene que ser igual o posterior a la fecha de inicio
debate_end_date:
invalid_date_range: tiene que ser igual o posterior a la fecha de inicio del debate
allegations_end_date:
invalid_date_range: tiene que ser igual o posterior a la fecha de inicio de las alegaciones
proposal:
attributes:
tag_list:

View File

@@ -181,6 +181,143 @@ en:
with_confirmed_hide: Confirmed
without_confirmed_hide: Pending
title: Hidden debates
legislation:
processes:
create:
notice: 'Process created successfully. <a href="%{link}">Click to visit</a>'
error: Process couldn't be created
update:
notice: 'Process updated successfully. <a href="%{link}">Click to visit</a>'
error: Process couldn't be updated
destroy:
notice: Process deleted successfully
edit:
back: Back
submit_button: Save changes
errors:
form:
error: Error
form:
active: Active
process: Process
debate_phase: Debate phase
allegations_phase: Allegations phase
start: Start
end: End
use_markdown: Use Markdown to format the text
title_placeholder: The title of the process
description_placeholder: Add a description of the process
target_placeholder: Describe who is the target of the process
how_to_participate_placeholder: Describe how to participate
additional_info_placeholder: Add an additional information you consider useful
index:
create: New process
delete: Delete
title: Legislation processess
filters:
open: Open
next: Next
past: Past
all: All
new:
back: Back
title: Create new collaborative legislation process
submit_button: Create process
process:
title: Process
comments: Comments
status: Status
creation_date: Creation date
status_open: Open
status_closed: Closed
status_planned: Planned
subnav:
info: Information
draft_texts: Text
questions: Debate
draft_versions:
create:
notice: 'Draft created successfully. <a href="%{link}">Click to visit</a>'
error: Draft couldn't be created
update:
notice: 'Draft updated successfully. <a href="%{link}">Click to visit</a>'
error: Draft couldn't be updated
destroy:
notice: Draft deleted successfully
edit:
back: Back
submit_button: Save changes
warning: You've edited the text, don't forget to click on Save to permanently save the changes.
errors:
form:
error: Error
form:
title_html: 'Editing <span class="strong">%{draft_version_title}</span> from the process <span class="strong">%{process_title}</span>'
launch_text_editor: Launch text editor
close_text_editor: Close text editor
use_markdown: Use Markdown to format the text
hints:
final_version: This version will be published as Final Result for this process. Comments won't be allowed in this version.
status:
draft: You can preview as admin, no one else can see it
published: Visible for everybody
title_placeholder: Write the title of the draft version
changelog_placeholder: Add the main changes from the previous version
body_placeholder: Write down the draft text
index:
title: Draft versions
create: Create version
delete: Delete
preview: Preview
new:
back: Back
title: Create new version
submit_button: Create version
statuses:
draft: Draft
published: Published
table:
title: Title
created_at: Created at
comments: Comments
final_version: Final version
status: Status
questions:
create:
notice: 'Question created successfully. <a href="%{link}">Click to visit</a>'
error: Question couldn't be created
update:
notice: 'Question updated successfully. <a href="%{link}">Click to visit</a>'
error: Question couldn't be updated
destroy:
notice: Question deleted successfully
edit:
back: Back
title: "Edit “%{question_title}”"
submit_button: Save changes
errors:
form:
error: Error
form:
add_option: Add option
title_placeholder: Add a title
value_placeholder: Add a closed answer
index:
back: Back
title: Questions associated to this process
create: Create question
delete: Delete
new:
back: Back
title: Create new question
submit_button: Create question
table:
title: Title
question_options: Question options
answers_count: Answers count
comments_count: Comments count
question_option_fields:
remove_option: Remove option
managers:
index:
title: Managers
@@ -226,6 +363,7 @@ en:
title_profiles: Profiles
title_banners: Banners
title_site_customization: Site customization
legislation: Collaborative Legislation
moderators:
index:
title: Moderators

View File

@@ -181,6 +181,143 @@ es:
with_confirmed_hide: Confirmados
without_confirmed_hide: Pendientes
title: Debates ocultos
legislation:
processes:
create:
notice: 'Proceso creado correctamente. <a href="%{link}">Haz click para verlo</a>'
error: No se ha podido crear el proceso
update:
notice: 'Proceso actualizado correctamente. <a href="%{link}">Haz click para verlo</a>'
error: No se ha podido actualizar el proceso
destroy:
notice: Proceso eliminado correctamente
edit:
back: Volver
submit_button: Guardar cambios
errors:
form:
error: Error
form:
active: Activa
process: Proceso
debate_phase: Fase previa
allegations_phase: Fase de alegaciones
start: Inicio
end: Fin
use_markdown: Usa Markdown para formatear el texto
title_placeholder: Escribe el título del proceso
description_placeholder: Añade una descripción del proceso
target_placeholder: Describe a quién va dirigido
how_to_participate_placeholder: Describe cómo participar
additional_info_placeholder: Añade cualquier información adicional que pueda ser de interés
index:
create: Nuevo proceso
delete: Borrar
title: Procesos de legislación colaborativa
filters:
open: Abiertos
next: Próximamente
past: Pasados
all: Todos
new:
back: Volver
title: Crear nuevo proceso de legislación colaborativa
submit_button: Crear proceso
process:
title: Proceso
comments: Comentarios
status: Estado
creation_date: Fecha creación
status_open: Abierto
status_closed: Cerrado
status_planned: Próximamente
subnav:
info: Información
draft_texts: Texto
questions: Debate
draft_versions:
create:
notice: 'Borrador creado correctamente. <a href="%{link}">Haz click para verlo</a>'
error: No se ha podido crear el borrador
update:
notice: 'Borrador actualizado correctamente. <a href="%{link}">Haz click para verlo</a>'
error: No se ha podido actualizar el borrador
destroy:
notice: Borrador eliminado correctamente
edit:
back: Volver
submit_button: Guardar cambios
warning: Ojo, has editado el texto. Para conservar de forma permanente los cambios, no te olvides de hacer click en Guardar.
errors:
form:
error: Error
form:
title_html: 'Editando <span class="strong">%{draft_version_title}</span> del proceso <span class="strong">%{process_title}</span>'
launch_text_editor: Lanzar editor de texto
close_text_editor: Cerrar editor de texto
use_markdown: Usa Markdown para formatear el texto
hints:
final_version: Será la versión que se publique en Publicación de Resultados. Esta versión no se podrá comentar
status:
draft: Podrás previsualizarlo como logueado, nadie más lo podrá ver
published: Será visible para todo el mundo
title_placeholder: Escribe el título de esta versión del borrador
changelog_placeholder: Describe cualquier cambio relevante con la versión anterior
body_placeholder: Escribe el texto del borrador
index:
title: Versiones del borrador
create: Crear versión
delete: Borrar
preview: Previsualizar
new:
back: Volver
title: Crear nueva versión
submit_button: Crear versión
statuses:
draft: Borrador
published: Publicado
table:
title: Título
created_at: Creado
comments: Comentarios
final_version: Versión final
status: Estado
questions:
create:
notice: 'Pregunta creada correctamente. <a href="%{link}">Haz click para verla</a>'
error: No se ha podido crear la pregunta
update:
notice: 'Pregunta actualizada correctamente. <a href="%{link}">Haz click para verla</a>'
error: No se ha podido actualizar la pregunta
destroy:
notice: Pregunta eliminada correctamente
edit:
back: Volver
title: "Editar “%{question_title}”"
submit_button: Guardar cambios
errors:
form:
error: Error
form:
add_option: +Añadir respuesta cerrada
title_placeholder: Escribe un título a la pregunta
value_placeholder: Escribe una respuesta cerrada
index:
back: Volver
title: Preguntas asociadas a este proceso
create: Crear pregunta
delete: Borrar
new:
back: Volver
title: Crear nueva pregunta
submit_button: Crear pregunta
table:
title: Título
question_options: Opciones de respuesta
answers_count: Número de respuestas
comments_count: Número de comentarios
question_option_fields:
remove_option: Eliminar
managers:
index:
title: Gestores
@@ -226,6 +363,7 @@ es:
title_profiles: Perfiles
title_banners: Banners
title_site_customization: Personalizar sitio
legislation: Legislación colaborativa
moderators:
index:
title: Moderadores

View File

@@ -34,6 +34,9 @@ en:
close: Close
menu: Menu
comments:
comments_closed: Comments are closed
verified_only: To participate %{verify_account}
verify_account: verify your account
comment:
admin: Administrator
author: Author
@@ -62,6 +65,7 @@ en:
comments_helper:
comment_button: Publish comment
comment_link: Comment
comments_title: Comments
reply_button: Publish reply
reply_link: Reply
debates:
@@ -188,6 +192,7 @@ en:
header:
administration: Administration
available_locales: Available languages
collaborative_legislation: Legislation processes
debates: Debates
external_link_blog: Blog
external_link_opendata: Open data
@@ -217,7 +222,9 @@ en:
see_all: See proposals
budgets: Participatory budgeting
spending_proposals: Spending Proposals
legislation:
admin:
watch_form_message: 'You have unsaved changes. Do you confirm to leave the page?'
legacy_legislation:
help:
alt: Select the text you want to comment and press the button with the pencil.
text: To comment this document you must %{sign_in} or %{sign_up}. Then select the text you want to comment and press the button with the pencil.
@@ -688,13 +695,6 @@ en:
user_permission_verify_info: "* Only for users on Census."
user_permission_verify_my_account: Verify my account
user_permission_votes: Participate on final voting
legislation:
help:
title: "How I can comment this document?"
text: "To comment this document you must %{sign_in} or %{sign_up}. Then select the text you want to comment and press the button with the pencil."
text_sign_in: "login"
text_sign_up: "sign up"
alt: "Select the text you want to comment and press the button with the pencil."
invisible_captcha:
sentence_for_humans: "If you are human, ignore this field"
timestamp_error_message: "Sorry, that was too quick! Please resubmit."

View File

@@ -34,6 +34,9 @@ es:
close: Cerrar
menu: Menú
comments:
comments_closed: Los comentarios están cerrados
verified_only: Para participar %{verify_account}
verify_account: verifica tu cuenta
comment:
admin: Administrador
author: Autor
@@ -62,6 +65,7 @@ es:
comments_helper:
comment_button: Publicar comentario
comment_link: Comentar
comments_title: Comentarios
reply_button: Publicar respuesta
reply_link: Responder
debates:
@@ -188,6 +192,7 @@ es:
header:
administration: Administrar
available_locales: Idiomas disponibles
collaborative_legislation: Procesos legislativos
debates: Debates
external_link_blog: Blog
external_link_opendata: Datos abiertos
@@ -217,7 +222,9 @@ es:
see_all: Ver propuestas
budgets: Presupuestos participativos
spending_proposals: "Propuestas de inversión"
legislation:
admin:
watch_form_message: 'Has realizado cambios que no han sido guardados. ¿Seguro que quieres abandonar la página?'
legacy_legislation:
help:
alt: Selecciona el texto que quieres comentar y pulsa en el botón con el lápiz.
text: Para comentar este documento debes %{sign_in} o %{sign_up}. Después selecciona el texto que quieres comentar y pulsa en el botón con el lápiz.
@@ -688,13 +695,6 @@ es:
user_permission_verify_info: "* Sólo usuarios empadronados."
user_permission_verify_my_account: Verificar mi cuenta
user_permission_votes: Participar en las votaciones finales*
legislation:
help:
title: "¿Cómo puedo comentar este documento?"
text: "Para comentar este documento debes %{sign_in} o %{sign_up}. Después selecciona el texto que quieres comentar y pulsa en el botón con el lápiz."
text_sign_in: "iniciar sesión"
text_sign_up: "registrarte"
alt: "Selecciona el texto que quieres comentar y pulsa en el botón con el lápiz."
invisible_captcha:
sentence_for_humans: "Si eres humano, por favor ignora este campo"
timestamp_error_message: "Eso ha sido demasiado rápido. Por favor, reenvía el formulario."

View File

@@ -0,0 +1,112 @@
---
en:
legislation:
annotations:
comments:
see_all: See all
see_complete: See complete
comments_count:
one: "%{count} comment"
other: "%{count} comments"
replies_count:
one: "%{count} reply"
other: "%{count} replies"
cancel: Cancel
publish_comment: Publish Comment
form:
phase_not_open: This phase is not open
login_to_comment: You must %{signin} or %{signup} to leave a comment.
signin: Sign in
signup: Sign up
index:
title: Comments
comments_about: Comments about
see_in_context: See in context
comments_count:
one: "%{count} comment"
other: "%{count} comments"
show:
title: Comment
version_chooser:
seeing_version: Commments for version
see_text: See text draft
draft_versions:
changes:
title: Changes
seeing_changelog_version: Revision changes summary
see_text: See text draft
show:
loading_comments: Loading comments
seeing_version: You're seeing draft version
select_draft_version: Select draft
select_version_submit: see
updated_at: updated at %{date}
see_changes: see changes summary
see_comments: See all comments
text_toc: Table of contents
text_body: Text
text_comments: Comments
processes:
header:
view_process_information: View process information
debate:
empty_questions: There aren't any questions
participate: Participate in the debate
header_full:
title: Participate
description: Description
target: Target
how_to_participate: How to participate
more_info: More information and context
index:
filters:
open: Open processes
next: Next
past: Past
no_open_processes: There aren't open processes
no_next_processes: There aren't planned processes
no_past_processes: There aren't past processes
phase_not_open:
not_open: This phase is not open yet
phase_empty:
empty: Nothing published yet
process:
see_latest_comments: See latest comments
see_latest_comments_title: Comment on this process
shared:
key_dates: "Key dates:"
debate_dates: Debate
draft_publication_date: Draft publication
allegations_dates: Allegations
final_publication_date: Final result publication
questions:
comments:
comment_button: Publish answer
comments_title: Open answers
comments_closed: Closed phase
form:
leave_comment: Leave your answer
question:
comments:
zero: No comments
one: "%{count} comment"
other: "%{count} comments"
debate: Debate
show:
answer_question: Submit answer
next_question: Next question
first_question: First question
share: Share
title: Collaborative legislation process
participation:
phase_not_open: This phase is not open
organizations: Organisations are not permitted to participate in the debate
signin: Sign in
signup: Sign up
unauthenticated: You must %{signin} or %{signup} to participate.
verified_only: Only verified users can participate, %{verify_account}.
verify_account: verify your account
debate_phase_not_open: Debate phase has finished and answers are not accepted anymore
shared:
share: Share
share_comment: Comment on %{version_name} from process draft %{process_name}

View File

@@ -0,0 +1,112 @@
---
es:
legislation:
annotations:
comments:
see_all: Ver todos
see_complete: Ver completo
comments_count:
one: "%{count} comentario"
other: "%{count} comentarios"
replies_count:
one: "%{count} respuesta"
other: "%{count} respuestas"
cancel: Cancelar
publish_comment: Publicar Comentario
form:
phase_not_open: Esta fase del proceso no está abierta
login_to_comment: Necesitas %{signin} o %{signup} para comentar.
signin: iniciar sesión
signup: registrarte
index:
title: Comentarios
see_in_context: Ver en contexto
comments_about: Comentarios sobre
comments_count:
one: "%{count} comentario"
other: "%{count} comentarios"
show:
title: Comentario
version_chooser:
seeing_version: Comentarios para la versión
see_text: Ver borrador del texto
draft_versions:
changes:
title: Cambios
seeing_changelog_version: Resumen de cambios de la revisión
see_text: Ver borrador del texto
show:
loading_comments: Cargando comentarios
seeing_version: Estás viendo la revisión
select_draft_version: Seleccionar borrador
select_version_submit: ver
updated_at: actualizada el %{date}
see_changes: ver resumen de cambios
see_comments: Ver todos los comentarios
text_toc: Índice
text_body: Texto
text_comments: Comentarios
processes:
header:
view_process_information: Ver información del proceso
debate:
empty_questions: No hay preguntas
participate: Realiza tus aportaciones al debate previo participando en los siguientes temas.
header_full:
title: Colabora en la elaboración de la normativa sobre
description: En qué consiste
target: A quién va dirigido
how_to_participate: Cómo puedes participar
more_info: Más información y contexto
index:
filters:
open: Procesos activos
next: Próximamente
past: Terminados
no_open_processes: No hay procesos activos
no_next_processes: No hay procesos planeados
no_past_processes: No hay procesos terminados
phase_not_open:
not_open: Esta fase del proceso todavía no está abierta
phase_empty:
empty: No hay nada publicado todavía
process:
see_latest_comments: Ver últimas aportaciones
see_latest_comments_title: Aportar a este proceso
shared:
key_dates: "Fechas clave:"
debate_dates: Debate previo
draft_publication_date: Publicación borrador
allegations_dates: Alegaciones
final_publication_date: Publicación resultados
questions:
comments:
comment_button: Publicar respuesta
comments_title: Respuestas abiertas
comments_closed: Fase cerrada
form:
leave_comment: Deja tu respuesta
question:
comments:
zero: Sin comentarios
one: "%{count} comentario"
other: "%{count} comentarios"
debate: Debate
show:
answer_question: Enviar respuesta
next_question: Siguiente pregunta
first_question: Primera pregunta
share: Compartir
title: Proceso de legislación colaborativa
participation:
phase_not_open: Esta fase no está abierta
organizations: Las organizaciones no pueden participar en el debate
signin: iniciar sesión
signup: registrarte
unauthenticated: Necesitas %{signin} o %{signup} para participar en el debate.
verified_only: Solo los usuarios verificados pueden participar en el debate, %{verify_account}.
verify_account: verifica tu cuenta
debate_phase_not_open: La fase de debate previo ya ha finalizado y en este momento no se aceptan respuestas
shared:
share: Compartir
share_comment: Comentario sobre la %{version_name} del borrador del proceso %{process_name}

View File

@@ -38,6 +38,7 @@ en:
spending_proposals: Investment projects
spending_proposal_features:
voting_allowed: Voting on investment projects
legislation: Legislation
mailer_from_name: Origin email name
mailer_from_address: Origin email address
meta_description: "Site description (SEO)"

View File

@@ -38,6 +38,7 @@ es:
spending_proposals: Propuestas de inversión
spending_proposal_features:
voting_allowed: Votaciones sobre propuestas de inversión
legislation: Legislación
mailer_from_name: Nombre email remitente
mailer_from_address: Dirección email remitente
meta_description: "Descripción del sitio (SEO)"

View File

@@ -1,5 +1,10 @@
Rails.application.routes.draw do
if Rails.env.development? || Rails.env.staging?
get '/sandbox' => 'sandbox#index'
get '/sandbox/*template' => 'sandbox#show'
end
devise_for :users, controllers: {
registrations: 'users/registrations',
sessions: 'users/sessions',
@@ -88,7 +93,7 @@ Rails.application.routes.draw do
resources :stats, only: [:index]
resources :legislations, only: [:show]
resources :legacy_legislations, only: [:show], path: 'legislations'
resources :annotations do
get :search, on: :collection
@@ -100,6 +105,27 @@ Rails.application.routes.draw do
end
end
namespace :legislation do
resources :processes, only: [:index, :show] do
get :debate
get :draft_publication
get :allegations
get :final_version_publication
resources :questions, only: [:show] do
resources :answers, only: [:create]
end
resources :draft_versions, only: [:show] do
get :go_to_version, on: :collection
get :changes
resources :annotations do
get :search, on: :collection
get :comments
post :new_comment
end
end
end
end
resources :users, only: [:show] do
resources :direct_messages, only: [:new, :create, :show]
end
@@ -244,6 +270,13 @@ Rails.application.routes.draw do
get :direct_messages, on: :collection
end
namespace :legislation do
resources :processes do
resources :questions
resources :draft_versions
end
end
namespace :api do
resource :stats, only: :show
end