- <% if @user != current_user && @user.email_on_direct_message? %>
- <%= link_to t("users.show.send_private_message"),
- new_user_direct_message_path(@user),
- class: "button hollow float-right" %>
- <% else %>
-
- <%= t("users.show.no_private_messages") %>
-
+ <% if @user != current_user %>
+ <% if @user.email_on_direct_message? %>
+ <%= link_to t("users.show.send_private_message"),
+ new_user_direct_message_path(@user),
+ class: "button hollow float-right" %>
+ <% else %>
+
+ <%= t("users.show.no_private_messages") %>
+
+ <% end %>
<% end %>
diff --git a/config/locales/activerecord.en.yml b/config/locales/activerecord.en.yml
index 9b48c1fc2..07791e53c 100644
--- a/config/locales/activerecord.en.yml
+++ b/config/locales/activerecord.en.yml
@@ -81,7 +81,7 @@ en:
direct_message:
attributes:
max_per_day:
- invalid: "You can only send a maximum of %{max} direct messages per day"
+ invalid: "You have reached the maximum number of private messages per day"
proposal:
attributes:
tag_list:
diff --git a/config/locales/activerecord.es.yml b/config/locales/activerecord.es.yml
index f14022255..d5b7f0005 100644
--- a/config/locales/activerecord.es.yml
+++ b/config/locales/activerecord.es.yml
@@ -81,7 +81,7 @@ es:
direct_message:
attributes:
max_per_day:
- invalid: "Sólo puedes enviar %{max} mensajes directos por día"
+ invalid: "Has llegado al número máximo de mensajes privados por día"
proposal:
attributes:
tag_list:
diff --git a/config/locales/es.yml b/config/locales/es.yml
index a3922ef5f..620499ace 100755
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -15,7 +15,7 @@ es:
public_activity_label: Mostrar públicamente mi lista de actividades
save_changes_submit: Guardar cambios
subscription_to_website_newsletter_label: Recibir emails con información interesante sobre la web
- email_on_direct_message_label: Recibir emails con mensajes directos
+ email_on_direct_message_label: Recibir emails con mensajes privados
email_digest_label: Recibir resumen de notificaciones sobre propuestas
title: Mi cuenta
user_permission_debates: Participar en debates
@@ -506,7 +506,7 @@ es:
direct_messages:
new:
body_label: "Mensaje"
- direct_messages_bloqued: "Este usuarios ha decidido no recibir mensajes directos"
+ direct_messages_bloqued: "Este usuario ha decidido no recibir mensajes privados"
submit_button: "Enviar mensaje"
title: Enviar mensaje privado a %{receiver}
title_label: "Título"
diff --git a/config/locales/mailers.es.yml b/config/locales/mailers.es.yml
index bde81ec86..d90636c32 100644
--- a/config/locales/mailers.es.yml
+++ b/config/locales/mailers.es.yml
@@ -40,7 +40,7 @@ es:
direct_message_for_receiver:
subject: "Has recibido un nuevo mensaje privado"
reply: Responder a %{sender}
- unsubscribe: "Si no quieres recibir mensajes privados, puedes entrar en %{account} y desmarcar la opción 'Recibir emails con mensajes directos'."
+ unsubscribe: "Si no quieres recibir mensajes privados, puedes entrar en %{account} y desmarcar la opción 'Recibir emails con mensajes privados'."
unsubscribe_account: Mi cuenta
direct_message_for_sender:
subject: "Has enviado un nuevo mensaje privado"
diff --git a/db/seeds.rb b/db/seeds.rb
index 4a4741a07..86847a64e 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -76,5 +76,5 @@ Setting['banner-img.banner-img-two'] = "Banner image 2"
Setting['banner-img.banner-img-three'] = "Banner image 3"
# Proposal notifications
-Setting['proposal_notification_minimum_interval_in_days '] = 3
+Setting['proposal_notification_minimum_interval_in_days'] = 3
Setting['direct_message_max_per_day'] = 3
\ No newline at end of file
diff --git a/spec/features/direct_messages_spec.rb b/spec/features/direct_messages_spec.rb
index 8ec949e9a..3c822de5c 100644
--- a/spec/features/direct_messages_spec.rb
+++ b/spec/features/direct_messages_spec.rb
@@ -113,7 +113,7 @@ feature 'Direct messages' do
fill_in 'direct_message_body', with: "How are you doing?"
click_button "Send message"
- expect(page).to have_content "You can only send a maximum of 3 direct messages per day"
+ expect(page).to have_content "You have reached the maximum number of private messages per day"
expect(page).to_not have_content "You message has been sent successfully."
end