- <%= link_to debate_votes_path(debate, value: 'yes'), :class => 'in-favor', method: "post" do %>
+ <%= link_to debate_votes_path(debate, value: 'yes'), class: 'in-favor', method: "post" do %>
- <%= link_to debate_votes_path(debate, value: 'no'), :class => 'against', method: "post" do %>
+ <%= link_to debate_votes_path(debate, value: 'no'), class: 'against', method: "post" do %>
<% end %>
diff --git a/app/views/debates/_form.html.erb b/app/views/debates/_form.html.erb
index cc4101c90..7735c4c28 100644
--- a/app/views/debates/_form.html.erb
+++ b/app/views/debates/_form.html.erb
@@ -18,8 +18,7 @@
- <%= f.text_area :description %>
-
+ <%= f.cktext_area :description, ckeditor: { language: I18n.locale } %>
<%= f.label :tag_list, t("debates.form.tags_label") %>
<%= f.text_field :tag_list, value: @debate.tag_list.to_s %>
@@ -30,10 +29,10 @@
<%= t("debates.form.accept_terms") %>
<% end %>
- <%= render 'shared/captcha' %>
+ <%= render 'shared/captcha', resource: @debate %>
- <%= f.submit %>
+ <%= f.submit(class: "button radius") %>
-<% end %>
\ No newline at end of file
+<% end %>
diff --git a/app/views/debates/show.html.erb b/app/views/debates/show.html.erb
index 79f82bf7f..2ea1f8871 100644
--- a/app/views/debates/show.html.erb
+++ b/app/views/debates/show.html.erb
@@ -1,12 +1,12 @@
- <%= link_to t("debates.show.back_link"), debates_path, :class => 'right' %>
+ <%= link_to t("debates.show.back_link"), debates_path, class: 'right' %>
<%= @debate.title %>
Por <%= @debate.author.name %> el <%= l @debate.created_at.to_date %>
-
<%= @debate.description %>
+
<%= sanitize(@debate.description.html_safe) %>
<%= render 'shared/tags', debate: @debate %>
@@ -25,7 +25,7 @@
<% if current_user && @debate.editable_by?(current_user) %>
- <%= link_to t("debates.show.edit_debate_link"), edit_debate_path(@debate), :class => 'button radius right' %>
+ <%= link_to t("debates.show.edit_debate_link"), edit_debate_path(@debate), class: 'button radius right' %>
<% end %>
diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb
index 826672f74..065ea4383 100644
--- a/app/views/devise/confirmations/new.html.erb
+++ b/app/views/devise/confirmations/new.html.erb
@@ -1,15 +1,15 @@
-
Resend confirmation instructions
+
<%= t("devise_views.confirmations.title") %>
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
<%= devise_error_messages! %>
- <%= f.label :email %>
- <%= f.email_field :email, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
+ <%= f.label :email, t("devise_views.confirmations.email_label") %>
+ <%= f.email_field :email, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
- <%= f.submit "Resend confirmation instructions" %>
+ <%= f.submit(t("devise_views.confirmations.submit"), class: "button radius") %>
<% end %>
diff --git a/app/views/devise/mailer/confirmation_instructions.html.erb b/app/views/devise/mailer/confirmation_instructions.html.erb
index dc55f64f6..1f504444d 100644
--- a/app/views/devise/mailer/confirmation_instructions.html.erb
+++ b/app/views/devise/mailer/confirmation_instructions.html.erb
@@ -1,5 +1,5 @@
-
Welcome <%= @email %>!
+
<%= t("devise_views.mailer.confirmation_instructions.welcome") %> <%= @email %>
-
You can confirm your account email through the link below:
+
<%= t("devise_views.mailer.confirmation_instructions.text") %>
-
<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>
+
<%= link_to t("devise_views.mailer.confirmation_instructions.confirm_link"), confirmation_url(@resource, confirmation_token: @token) %>
diff --git a/app/views/devise/mailer/reset_password_instructions.html.erb b/app/views/devise/mailer/reset_password_instructions.html.erb
index f667dc12f..78923ce92 100644
--- a/app/views/devise/mailer/reset_password_instructions.html.erb
+++ b/app/views/devise/mailer/reset_password_instructions.html.erb
@@ -1,8 +1,8 @@
-
Hello <%= @resource.email %>!
+
<%= t("devise_views.mailer.reset_password_instructions.hello") %> <%= @resource.email %>
-
Someone has requested a link to change your password. You can do this through the link below.
+
<%= t("devise_views.mailer.reset_password_instructions.text") %>
-
<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>
+
<%= link_to t("devise_views.mailer.reset_password_instructions.change_link"), edit_password_url(@resource, reset_password_token: @token) %>
-
If you didn't request this, please ignore this email.
-
Your password won't change until you access the link above and create a new one.
+
<%= t("devise_views.mailer.reset_password_instructions.ignore_text") %>
+
<%= t("devise_views.mailer.reset_password_instructions.info_text") %>
diff --git a/app/views/devise/mailer/unlock_instructions.html.erb b/app/views/devise/mailer/unlock_instructions.html.erb
index 41e148bf2..12f4d2b62 100644
--- a/app/views/devise/mailer/unlock_instructions.html.erb
+++ b/app/views/devise/mailer/unlock_instructions.html.erb
@@ -1,7 +1,7 @@
-
Hello <%= @resource.email %>!
+
<%= t("devise_views.mailer.unlock_instructions.hello") %> <%= @resource.email %>
-
Your account has been locked due to an excessive number of unsuccessful sign in attempts.
+
<%= t("devise_views.mailer.unlock_instructions.info_text") %>
-
Click the link below to unlock your account:
+
<%= t("devise_views.mailer.unlock_instructions.instructions_text") %>
-
<%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>
+
<%= link_to t("devise_views.mailer.unlock_instructions.unlock_link"), unlock_url(@resource, unlock_token: @token) %>
diff --git a/app/views/devise/menu/_login_items.html.erb b/app/views/devise/menu/_login_items.html.erb
index 22ffa4b0e..c075d23aa 100644
--- a/app/views/devise/menu/_login_items.html.erb
+++ b/app/views/devise/menu/_login_items.html.erb
@@ -1,14 +1,14 @@
<% if user_signed_in? %>
- <%= link_to('Salir', destroy_user_session_path, method: :delete) %>
+ <%= link_to(t("devise_views.menu.login_items.logout"), destroy_user_session_path, method: :delete) %>
<% else %>
- <%= link_to('Entrar', new_user_session_path) %>
+ <%= link_to(t("devise_views.menu.login_items.login"), new_user_session_path) %>
- <%= link_to('Registrarse', new_user_registration_path) %>
+ <%= link_to(t("devise_views.menu.login_items.signup"), new_user_registration_path) %>
<% end %>
\ No newline at end of file
diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb
index 0ee12dd27..cd0cf81ec 100644
--- a/app/views/devise/passwords/edit.html.erb
+++ b/app/views/devise/passwords/edit.html.erb
@@ -1,24 +1,24 @@
-
Change your password
+
<%= t("devise_views.passwords.edit.title") %>
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
<%= devise_error_messages! %>
<%= f.hidden_field :reset_password_token %>
- <%= f.label :password, "New password" %>
+ <%= f.label :password, t("devise_views.passwords.edit.password_label") %>
<% if @minimum_password_length %>
- (<%= @minimum_password_length %> characters minimum)
+ <%= t("devise_views.passwords.edit.min_length", min: @minimum_password_length) %>
<% end %>
<%= f.password_field :password, autofocus: true, autocomplete: "off" %>
- <%= f.label :password_confirmation, "Confirm new password" %>
+ <%= f.label :password_confirmation, t("devise_views.passwords.edit.password_confirmation_label") %>
<%= f.password_field :password_confirmation, autocomplete: "off" %>
- <%= f.submit "Change my password" %>
+ <%= f.submit t("devise_views.passwords.edit.change_submit") %>
<% end %>
diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb
index 3d6d11aae..1e3baccc8 100644
--- a/app/views/devise/passwords/new.html.erb
+++ b/app/views/devise/passwords/new.html.erb
@@ -1,15 +1,15 @@
-
Forgot your password?
+
<%= t("devise_views.passwords.new.title") %>
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
<%= devise_error_messages! %>
- <%= f.label :email %>
+ <%= f.label :email, t("devise_views.passwords.new.email_label") %>
<%= f.email_field :email, autofocus: true %>
- <%= f.submit "Send me reset password instructions" %>
+ <%= f.submit t("devise_views.passwords.new.send_submit") %>
<% end %>
diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb
index 3ea40f014..d359cf5cd 100644
--- a/app/views/devise/registrations/edit.html.erb
+++ b/app/views/devise/registrations/edit.html.erb
@@ -1,39 +1,39 @@
-
Edit <%= resource_name.to_s.humanize %>
+
<%= t("devise_views.registrations.edit.edit") %> <%= resource_name.to_s.humanize %>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
<%= devise_error_messages! %>
- <%= f.label :email %>
+ <%= f.label :email, t("devise_views.registrations.edit.email_label") %>
<%= f.email_field :email, autofocus: true %>
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
-
Currently waiting confirmation for: <%= resource.unconfirmed_email %>
+
<%= t("devise_views.registrations.edit.waiting_for") %> <%= resource.unconfirmed_email %>
<% end %>
- <%= f.label :password %> (leave blank if you don't want to change it)
+ <%= f.label :password, t("devise_views.registrations.edit.password_label") %> <%= t("devise_views.registrations.edit.leave_blank") %>
<%= f.password_field :password, autocomplete: "off" %>
- <%= f.label :password_confirmation %>
+ <%= f.label :password_confirmation, t("devise_views.registrations.edit.password_confirmation_label") %>
<%= f.password_field :password_confirmation, autocomplete: "off" %>
- <%= f.label :current_password %> (we need your current password to confirm your changes)
+ <%= f.label :current_password, t("devise_views.registrations.edit.current_password_label") %> <%= t("devise_views.registrations.edit.need_current") %>
<%= f.password_field :current_password, autocomplete: "off" %>
- <%= f.submit "Update" %>
+ <%= f.submit t("devise_views.registrations.edit.update_submit") %>
<% end %>
-
Cancel my account
+
<%= t("devise_views.registrations.edit.cancel_title") %>
-
Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %>
+
<%= t("devise_views.registrations.edit.cancel_text") %> <%= button_to t("devise_views.registrations.edit.cancel_link"), registration_path(resource_name), data: { confirm: t("devise_views.registrations.edit.cancel_confirm") }, method: :delete %>
-<%= link_to "Back", :back %>
+<%= link_to t("devise_views.registrations.edit.back_link"), :back %>
diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb
index 021836277..d7203d549 100644
--- a/app/views/devise/registrations/new.html.erb
+++ b/app/views/devise/registrations/new.html.erb
@@ -1,39 +1,41 @@
-
Sign up
+
<%= t("devise_views.registrations.new.title") %>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
<%= devise_error_messages! %>
- <%= f.label :first_name %>
+ <%= f.label :first_name, t("devise_views.registrations.new.first_name_label") %>
<%= f.text_field :first_name, autofocus: true %>
- <%= f.label :last_name %>
+ <%= f.label :last_name, t("devise_views.registrations.new.last_name_label") %>
<%= f.text_field :last_name %>
- <%= f.label :email %>
+ <%= f.label :email, t("devise_views.registrations.new.email_label") %>
<%= f.email_field :email %>
- <%= f.label :password %>
+ <%= f.label :password, t("devise_views.registrations.new.password_label") %>
<% if @minimum_password_length %>
- (<%= @minimum_password_length %> characters minimum)
+ <%= t("devise_views.registrations.new.min_length", min: @minimum_password_length) %>
<% end %>
<%= f.password_field :password, autocomplete: "off" %>
- <%= f.label :password_confirmation %>
+ <%= f.label :password_confirmation, t("devise_views.registrations.new.password_confirmation_label") %>
<%= f.password_field :password_confirmation, autocomplete: "off" %>
-
- <%= f.submit "Registrarse", class: 'button radius' %>
+ <%= render 'shared/captcha', resource: resource %>
+
+
+ <%= f.submit t("devise_views.registrations.new.submit"), class: 'button radius' %>
<% end %>
diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb
index ba96a7ecd..e4e706cc6 100644
--- a/app/views/devise/sessions/new.html.erb
+++ b/app/views/devise/sessions/new.html.erb
@@ -1,25 +1,25 @@
-
Log in
+
<%= t("devise_views.sessions.new.title") %>
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
- <%= f.label :email %>
+ <%= f.label :email, t("devise_views.sessions.new.email_label") %>
<%= f.email_field :email, autofocus: true %>
- <%= f.label :password %>
+ <%= f.label :password, t("devise_views.sessions.new.password_label") %>
<%= f.password_field :password, autocomplete: "off" %>
<% if devise_mapping.rememberable? -%>
<%= f.check_box :remember_me %>
- <%= f.label :remember_me %>
+ <%= f.label :remember_me, t("devise_views.sessions.new.remember_me") %>
<% end -%>
- <%= f.submit "Entrar" %>
+ <%= f.submit(t("devise_views.sessions.new.submit"), class: "button radius") %>
<% end %>
diff --git a/app/views/devise/shared/_links.html.erb b/app/views/devise/shared/_links.html.erb
index cd795adb6..d7db78921 100644
--- a/app/views/devise/shared/_links.html.erb
+++ b/app/views/devise/shared/_links.html.erb
@@ -1,25 +1,25 @@
<%- if controller_name != 'sessions' %>
- <%= link_to "Log in", new_session_path(resource_name) %>
+ <%= link_to t("devise_views.shared.links.login"), new_session_path(resource_name) %>
<% end -%>
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
- <%= link_to "Sign up", new_registration_path(resource_name) %>
+ <%= link_to t("devise_views.shared.links.signup"), new_registration_path(resource_name) %>
<% end -%>
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
- <%= link_to "Forgot your password?", new_password_path(resource_name) %>
+ <%= link_to t("devise_views.shared.links.new_password"), new_password_path(resource_name) %>
<% end -%>
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
- <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %>
+ <%= link_to t("devise_views.shared.links.new_confirmation"), new_confirmation_path(resource_name) %>
<% end -%>
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
- <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %>
+ <%= link_to t("devise_views.shared.links.new_unlock"), new_unlock_path(resource_name) %>
<% end -%>
<%- if devise_mapping.omniauthable? %>
<%- resource_class.omniauth_providers.each do |provider| %>
- <%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %>
+ <%= link_to t("devise_views.shared.links.signin_with_provider", provider: provider.to_s.titleize), omniauth_authorize_path(resource_name, provider) %>
<% end -%>
<% end -%>
diff --git a/app/views/devise/unlocks/new.html.erb b/app/views/devise/unlocks/new.html.erb
index 16586bc7a..a92662664 100644
--- a/app/views/devise/unlocks/new.html.erb
+++ b/app/views/devise/unlocks/new.html.erb
@@ -1,15 +1,15 @@
-
Resend unlock instructions
+
<%= t("devise_views.unlocks.new.title") %>
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
<%= devise_error_messages! %>
- <%= f.label :email %>
+ <%= f.label :email, t("devise_views.unlocks.new.email_label") %>
<%= f.email_field :email, autofocus: true %>
- <%= f.submit "Resend unlock instructions" %>
+ <%= f.submit t("devise_views.unlocks.new.submit") %>
<% end %>
diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb
index 890954e80..773bb1e46 100644
--- a/app/views/layouts/_header.html.erb
+++ b/app/views/layouts/_header.html.erb
@@ -3,7 +3,7 @@
@@ -12,13 +12,13 @@
-
+
<%= link_to root_path do %>
- <%= image_tag('header-logo-madrid.png', :class => 'left', :size => '96x96') %>
- gobiernoabierto | Participación
+ <%= image_tag('header-logo-madrid.png', class: 'left', size: '96x96') %>
+ <%= t("layouts.header.open_gov", open: "#{t('layouts.header.open')} ").html_safe %> | <%= t("layouts.header.participation") %>
<% end %>
-
+
@@ -30,9 +30,9 @@
<% if home_page? %>
-
Estamos abriendo Madrid
- Para que todos los madrileños decidamos que ciudad queremos tener.
- <%= link_to 'Participa en los últimos debates e iniciativas', new_debate_path, :class => 'button radius' %>
+ <%= t("layouts.header.open_city") %>
+ <%= t("layouts.header.open_city_slogan") %>
+ <%= link_to t("layouts.header.create_debate"), new_debate_path, class: 'button radius' %>
<% end %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 00da7e8f8..cb502dce6 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -20,7 +20,7 @@
<% end %>
<% if alert %>
- <%= alert %>
+ <%= alert %>
<% end %>
diff --git a/app/views/shared/_captcha.html.erb b/app/views/shared/_captcha.html.erb
index 676cc0444..42ccb5936 100644
--- a/app/views/shared/_captcha.html.erb
+++ b/app/views/shared/_captcha.html.erb
@@ -1,3 +1,3 @@
-<% if recaptchable? and recaptcha_keys? %>
+<% if recaptchable?(resource) and recaptcha_keys? %>
<%= recaptcha_tags ajax: true, hl: I18n.locale %>
<% end %>
\ No newline at end of file
diff --git a/app/views/votes/_vote.html.erb b/app/views/votes/_vote.html.erb
index 95e32460a..c14ff9316 100644
--- a/app/views/votes/_vote.html.erb
+++ b/app/views/votes/_vote.html.erb
@@ -5,7 +5,7 @@
<%= percentage('likes', @debate) %>
<% end %>
-
+
@@ -20,4 +20,4 @@
<%= pluralize(@debate.total_votes, t("debates.debate.vote"), t("debates.debate.votes")) %>
-
\ No newline at end of file
+
diff --git a/config/initializers/acts_as_taggable_on.rb b/config/initializers/acts_as_taggable_on.rb
index ead1691e4..8b1378917 100644
--- a/config/initializers/acts_as_taggable_on.rb
+++ b/config/initializers/acts_as_taggable_on.rb
@@ -1 +1 @@
-ActsAsTaggableOn.delimiter = ','
\ No newline at end of file
+
diff --git a/config/locales/devise_views.en.yml b/config/locales/devise_views.en.yml
new file mode 100644
index 000000000..d07d487ad
--- /dev/null
+++ b/config/locales/devise_views.en.yml
@@ -0,0 +1,83 @@
+en:
+ devise_views:
+ confirmations:
+ title: "Resend confirmation instructions"
+ email_label: Email
+ submit: "Resend confirmation instructions"
+ mailer:
+ confirmation_instructions:
+ welcome: "Welcome"
+ text: "You can confirm your account email through the link below:"
+ confirm_link: "Confirm my account"
+ reset_password_instructions:
+ hello: "Hello"
+ text: "Someone has requested a link to change your password. You can do this through the link below."
+ change_link: "Change my password"
+ ignore_text: "If you didn't request this, please ignore this email."
+ info_text: "Your password won't change until you access the link above and create a new one."
+ unlock_instructions:
+ hello: "Hello"
+ info_text: "Your account has been locked due to an excessive number of unsuccessful sign in attempts."
+ instructions_text: "Click the link below to unlock your account:"
+ unlock_link: "Unlock my account"
+ menu:
+ login_items:
+ logout: "Logout"
+ signup: "Sign up"
+ login: "Log in"
+ passwords:
+ edit:
+ title: "Change your password"
+ password_label: "New password"
+ min_length: "(%{min} characters minimum)"
+ password_confirmation_label: "Confirm new password"
+ change_submit: "Change my password"
+ new:
+ title: "Forgot your password?"
+ email_label: "Email"
+ send_submit: "Send me reset password instructions"
+ registrations:
+ edit:
+ edit: "Edit"
+ email_label: "Email"
+ waiting_for: "Currently waiting confirmation for:"
+ leave_blank: "(leave blank if you don't want to change it)"
+ password_label: "New password"
+ password_confirmation_label: "Confirm new password"
+ current_password_label: "Current password"
+ need_current: "(we need your current password to confirm your changes)"
+ update_submit: "Update"
+ cancel_title: "Cancel my account"
+ cancel_text: "Unhappy?"
+ cancel_link: "Cancel my account"
+ cancel_confirm: "Are you sure?"
+ back_link: "Back"
+ new:
+ title: "Sign up"
+ first_name_label: "First name"
+ last_name_label: "Last name"
+ email_label: "Email"
+ password_label: "Password"
+ min_length: "(%{min} characters minimum)"
+ password_confirmation_label: "Confirm password"
+ submit: "Sign up"
+ sessions:
+ new:
+ title: "Log in"
+ email_label: "Email"
+ password_label: "Password"
+ remember_me: "Remember me"
+ submit: "Log in"
+ unlocks:
+ new:
+ title: "Resend unlock instructions"
+ email_label: "Email"
+ submit: "Resend unlock instructions"
+ shared:
+ links:
+ login: "Log in"
+ signup: "Sign up"
+ signin_with_provider: "Sign in with %{provider}"
+ new_password: "Forgot your password?"
+ new_confirmation: "Didn't receive confirmation instructions?"
+ new_unlock: "Didn't receive unlock instructions?"
diff --git a/config/locales/devise_views.es.yml b/config/locales/devise_views.es.yml
new file mode 100644
index 000000000..1fa6fe880
--- /dev/null
+++ b/config/locales/devise_views.es.yml
@@ -0,0 +1,83 @@
+es:
+ devise_views:
+ confirmations:
+ title: "Reenviar instrucciones de confirmación"
+ email_label: Email
+ submit: "Reenviar instrucciones de confirmación"
+ mailer:
+ confirmation_instructions:
+ welcome: "Bienvenido"
+ text: "Puedes confirmar tu cuenta de correo electrónico en el siguiente enlace:"
+ confirm_link: "Confirmar my cuenta"
+ reset_password_instructions:
+ hello: "Hola"
+ text: "Se ha solicitado un enlace para cambiar tu contraseña, puedes hacerlo en el siguiente enlace:"
+ change_link: "cambiar mi contraseña"
+ ignore_text: "Si tu no lo has solicitado, puedes ignorar este email"
+ info_text: "Tu contraseña no cambiará hasta que no accedas al enlace y la modifiques."
+ unlock_instructions:
+ hello: "Hola"
+ info_text: "Tu cuenta ha sido bloqueada debido a un excesivo número de intentos fallidos de alta."
+ instructions_text: "Sigue el siguiente enlace para desbloquear tu cuenta:"
+ unlock_link: "Desbloquear mi cuenta"
+ menu:
+ login_items:
+ logout: "Salir"
+ signup: "Registrarse"
+ login: "Entrar"
+ passwords:
+ edit:
+ title: "Cambia tu contraseña"
+ password_label: "Contraseña nueva"
+ min_length: "(mínimo %{min} caracteres)"
+ password_confirmation_label: "Confirmar contraseña nueva"
+ change_submit: "Cambiar mi contraseña"
+ new:
+ title: "¿Has olvidado tu contraseña?"
+ email_label: "Email"
+ send_submit: "Recibir instrucciones para recuperar mi contraseña"
+ registrations:
+ edit:
+ edit: "Editar"
+ email_label: "Email"
+ waiting_for: "Esperando confirmación de:"
+ leave_blank: "(dejar en blanco si no deseas cambiarla)"
+ password_label: "Contraseña nueva"
+ password_confirmation_label: "Confirmar contraseña nueva"
+ current_password_label: "Contraseña actual"
+ need_current: "(necesitamos tu contraseña actual para confirmar los cambios)"
+ update_submit: "Actualizar"
+ cancel_title: "Cancelar cuenta"
+ cancel_text: "¿Deseas borrar tu cuenta?"
+ cancel_link: "Cancelar mi cuenta"
+ cancel_confirm: "¿Seguro?"
+ back_link: "Atrás"
+ new:
+ title: "Registrarse"
+ first_name_label: "Nombre"
+ last_name_label: "Apellido"
+ email_label: "Email"
+ password_label: "Contraseña"
+ min_length: "(mínimo %{min} caracteres)"
+ password_confirmation_label: "Confirmar contraseña"
+ submit: "Registrarse"
+ sessions:
+ new:
+ title: "Entrar"
+ email_label: "Email"
+ password_label: "Contraseña"
+ remember_me: "Recordarme"
+ submit: "Entrar"
+ unlocks:
+ new:
+ title: "Reenviar instrucciones para desbloquear"
+ email_label: "Email"
+ submit: "Reenviar instrucciones para desbloquear"
+ shared:
+ links:
+ login: "Entrar"
+ signup: "Registrarse"
+ signin_with_provider: "Entrar con %{provider}"
+ new_password: "¿Olvidaste tu contraseña?"
+ new_confirmation: "¿No has recibido instrucciones para confirmar tu cuenta?"
+ new_unlock: "¿No has recibido instrucciones para desbloquear?"
\ No newline at end of file
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 79f0bb645..f0ee05b66 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1,4 +1,15 @@
en:
+ layouts:
+ header:
+ external_link_transparency: Transparency
+ external_link_opendata: Open data
+ open_gov: "%{open} government"
+ open: "Open"
+ participation: Participation
+ menu: Menu
+ open_city: We are opening Madrid
+ open_city_slogan: So the citizens can decide what kind of city they want.
+ create_debate: Create a debate
debates:
debate:
debate: Debate
diff --git a/config/locales/es.yml b/config/locales/es.yml
index 0243bc604..53ad433ea 100644
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -1,4 +1,15 @@
es:
+ layouts:
+ header:
+ external_link_transparency: Portal de Transparencia
+ external_link_opendata: Datos abiertos
+ open_gov: "Gobierno %{open}"
+ open: "abierto"
+ participation: Participación
+ menu: Menú
+ open_city: Estamos abriendo Madrid
+ open_city_slogan: Para que todos los madrileños decidamos que ciudad queremos tener.
+ create_debate: Crea un debate
debates:
debate:
debate: Debate
diff --git a/db/migrate/20150718091702_acts_as_commentable_with_threading_migration.rb b/db/migrate/20150718091702_acts_as_commentable_with_threading_migration.rb
index 26edafbaf..977fc79df 100644
--- a/db/migrate/20150718091702_acts_as_commentable_with_threading_migration.rb
+++ b/db/migrate/20150718091702_acts_as_commentable_with_threading_migration.rb
@@ -6,7 +6,7 @@ class ActsAsCommentableWithThreadingMigration < ActiveRecord::Migration
t.string :title
t.text :body
t.string :subject
- t.integer :user_id, :null => false
+ t.integer :user_id, null: false
t.integer :parent_id, :lft, :rgt
t.timestamps
end
diff --git a/spec/features/users_spec.rb b/spec/features/users_spec.rb
index 6f03544df..2d972e87f 100644
--- a/spec/features/users_spec.rb
+++ b/spec/features/users_spec.rb
@@ -4,7 +4,7 @@ feature 'Users' do
scenario 'Sign up' do
visit '/'
- click_link 'Registrarse'
+ click_link 'Sign up'
fill_in 'user_first_name', with: 'Manuela'
fill_in 'user_last_name', with: 'Carmena'
@@ -12,7 +12,7 @@ feature 'Users' do
fill_in 'user_password', with: 'judgementday'
fill_in 'user_password_confirmation', with: 'judgementday'
- click_button 'Registrarse'
+ click_button 'Sign up'
expect(page).to have_content 'Welcome! You have signed up successfully.'
end
@@ -21,10 +21,10 @@ feature 'Users' do
user = create(:user, email: 'manuela@madrid.es', password: 'judgementday')
visit '/'
- click_link 'Entrar'
+ click_link 'Log in'
fill_in 'user_email', with: 'manuela@madrid.es'
fill_in 'user_password', with: 'judgementday'
- click_button 'Entrar'
+ click_button 'Log in'
expect(page).to have_content 'Signed in successfully.'
end
@@ -34,7 +34,7 @@ feature 'Users' do
login_as(user)
visit "/"
- click_link 'Salir'
+ click_link 'Logout'
expect(page).to have_content 'Signed out successfully.'
end
diff --git a/spec/helpers/recaptcha_helper_spec.rb b/spec/helpers/recaptcha_helper_spec.rb
index f2fe651e5..7d44e2f08 100644
--- a/spec/helpers/recaptcha_helper_spec.rb
+++ b/spec/helpers/recaptcha_helper_spec.rb
@@ -5,13 +5,13 @@ describe RecaptchaHelper do
describe '#recaptchable?' do
it 'should be true if new record' do
- assign(:debate, build(:debate))
- expect(helper.recaptchable?).to be true
+ debate = build(:debate)
+ expect(helper.recaptchable?(debate)).to be true
end
it 'should be false if existing record' do
- assign(:debate, create(:debate))
- expect(helper.recaptchable?).to be false
+ debate = create(:debate)
+ expect(helper.recaptchable?(debate)).to be false
end
end
diff --git a/test/controllers/.keep b/test/controllers/.keep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/test/fixtures/.keep b/test/fixtures/.keep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/test/helpers/.keep b/test/helpers/.keep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/test/integration/.keep b/test/integration/.keep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/test/mailers/.keep b/test/mailers/.keep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/test/models/.keep b/test/models/.keep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/test/test_helper.rb b/test/test_helper.rb
deleted file mode 100644
index 92e39b2d7..000000000
--- a/test/test_helper.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-ENV['RAILS_ENV'] ||= 'test'
-require File.expand_path('../../config/environment', __FILE__)
-require 'rails/test_help'
-
-class ActiveSupport::TestCase
- # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
- fixtures :all
-
- # Add more helper methods to be used by all tests here...
-end