Skip to content

Commit

Permalink
Merge pull request #167 from democrateam/backports
Browse files Browse the repository at this point in the history
Backports
  • Loading branch information
decabeza authored Jul 3, 2024
2 parents fe46575 + 941146b commit 57faf93
Show file tree
Hide file tree
Showing 22 changed files with 106 additions and 40 deletions.
5 changes: 5 additions & 0 deletions app/assets/stylesheets/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ body > header,

.menu {
margin-bottom: 0;
padding-left: $line-height / 2;
}
}

Expand Down Expand Up @@ -3144,6 +3145,10 @@ a {
}
}

.read-notifications {
margin-top: rem-calc(-12);
}

// 13. Custom
// ------------------------------

Expand Down
6 changes: 2 additions & 4 deletions app/views/mailer/budget_investment_created.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
</h1>

<p style="<%= css_for_mailer_text %>">
<%= sanitize(
t("mailers.budget_investment_created.intro", author: @investment.author.name)
) %>
<%= sanitize(t("mailers.budget_investment_created.hi", author: @investment.author.name)) %>
</p>

<p style="<%= css_for_mailer_text %>">
Expand Down Expand Up @@ -43,6 +41,6 @@
</table>

<p style="<%= css_for_mailer_text %>">
<%= t("mailers.budget_investment_created.sincerely") %>
<%= t("mailers.sincerely") %>
</p>
</td>
4 changes: 2 additions & 2 deletions app/views/mailer/budget_investment_selected.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</h1>

<p style="<%= css_for_mailer_text %>">
<%= t("mailers.budget_investment_selected.hi") %>
<%= sanitize(t("mailers.budget_investment_selected.hi", author: @investment.author.name)) %>
</p>

<p style="<%= css_for_mailer_text %>">
Expand All @@ -29,6 +29,6 @@
</p>

<p style="<%= css_for_mailer_text %>">
<%= t("mailers.budget_investment_selected.sincerely") %>
<%= t("mailers.sincerely") %>
</p>
</td>
4 changes: 2 additions & 2 deletions app/views/mailer/budget_investment_unfeasible.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</h1>

<p style="<%= css_for_mailer_text %>">
<%= t("mailers.budget_investment_unfeasible.hi") %>
<%= sanitize(t("mailers.budget_investment_unfeasible.hi", author: @investment.author.name)) %>
</p>

<p style="<%= css_for_mailer_text + css_for_mailer_quote %>">
Expand All @@ -29,6 +29,6 @@
</p>

<p style="<%= css_for_mailer_text %>">
<%= t("mailers.budget_investment_unfeasible.sincerely") %>
<%= t("mailers.sincerely") %>
</p>
</td>
4 changes: 2 additions & 2 deletions app/views/mailer/budget_investment_unselected.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
</h1>

<p style="<%= css_for_mailer_text %>">
<%= t("mailers.budget_investment_unselected.hi") %>
<%= sanitize(t("mailers.budget_investment_unselected.hi", author: @investment.author.name)) %>
</p>

<p style="<%= css_for_mailer_text %>">
<%= t("mailers.budget_investment_unselected.thanks") %>
</p>

<p style="<%= css_for_mailer_text %>">
<%= t("mailers.budget_investment_unselected.sincerely") %>
<%= t("mailers.sincerely") %>
</p>
</td>
4 changes: 4 additions & 0 deletions app/views/mailer/comment.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@
attributes: %w[href style]
) %>
</p>

<p style="<%= css_for_mailer_text %>">
<%= t("mailers.sincerely") %>
</p>
</td>
8 changes: 8 additions & 0 deletions app/views/mailer/direct_message_for_receiver.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
<%= @direct_message.title %>
</h1>

<p style="<%= css_for_mailer_text %>">
<%= sanitize(t("mailers.direct_message_for_receiver.hi", receiver: @direct_message.receiver.name)) %>
</p>

<div style="<%= css_for_mailer_text %>">
<%= mailer_simple_format(@direct_message.body) %>
</div>
Expand Down Expand Up @@ -33,4 +37,8 @@
attributes: %w[href style]
) %>
</p>

<p style="<%= css_for_mailer_text %>">
<%= t("mailers.sincerely") %>
</p>
</td>
8 changes: 8 additions & 0 deletions app/views/mailer/direct_message_for_sender.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<%= t("mailers.direct_message_for_sender.title") %>
</h1>

<p style="<%= css_for_mailer_text %>">
<%= sanitize(t("mailers.direct_message_for_sender.hi", sender: @direct_message.sender.name)) %>
</p>

<p style="<%= css_for_mailer_text %>">
<%= sanitize(t("mailers.direct_message_for_sender.text", receiver: @direct_message.receiver.name)) %>
</p>
Expand All @@ -15,4 +19,8 @@
<div style="<%= css_for_mailer_text %>">
<%= mailer_simple_format(@direct_message.body) %>
</div>

<p style="<%= css_for_mailer_text %>">
<%= t("mailers.sincerely") %>
</p>
</td>
8 changes: 8 additions & 0 deletions app/views/mailer/email_verification.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<%= t("mailers.email_verification.title") %>
</h1>

<p style="<%= css_for_mailer_text %>">
<%= sanitize(t("mailers.email_verification.hi", user: @user.name)) %>
</p>

<p style="<%= css_for_mailer_text %>">
<%= t("mailers.email_verification.text") %>
</p>
Expand Down Expand Up @@ -33,4 +37,8 @@
<p style="<%= css_for_mailer_text %>">
<%= t("mailers.email_verification.thanks") %>
</p>

<p style="<%= css_for_mailer_text %>">
<%= t("mailers.sincerely") %>
</p>
</td>
4 changes: 4 additions & 0 deletions app/views/mailer/evaluation_comment.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@
<div style="<%= css_for_mailer_text + css_for_mailer_quote %>">
<%= mailer_simple_format(@email.comment.body) %>
</div>

<p style="<%= css_for_mailer_text %>">
<%= t("mailers.sincerely") %>
</p>
</td>
4 changes: 4 additions & 0 deletions app/views/mailer/reply.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@
attributes: %w[href style]
) %>
</p>

<p style="<%= css_for_mailer_text %>">
<%= t("mailers.sincerely") %>
</p>
</td>
4 changes: 4 additions & 0 deletions app/views/mailer/user_invite.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@
<p style="<%= css_for_mailer_text %>">
<%= t("mailers.user_invite.thanks") %>
</p>

<p style="<%= css_for_mailer_text %>">
<%= t("mailers.sincerely") %>
</p>
</td>
4 changes: 2 additions & 2 deletions app/views/notifications/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<div class="row margin-bottom">
<div class="small-12 column">

<h1 class="inline-block margin-bottom">
<h1 class="margin-bottom">
<%= t("notifications.index.title") %>
</h1>

<%= link_to t("notifications.index.mark_all_as_read"),
mark_all_as_read_notifications_path,
method: :put,
class: "button hollow float-right-medium" %>
class: "button hollow float-right-medium read-notifications" %>

<ul class="menu simple clear">
<li class="is-active">
Expand Down
2 changes: 1 addition & 1 deletion app/views/notifications/read.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="row margin-bottom">
<div class="small-12 column">

<h1><%= t("notifications.index.title") %></h1>
<h1 class="margin-bottom"><%= t("notifications.index.title") %></h1>

<ul class="menu simple clear">
<li>
Expand Down
16 changes: 8 additions & 8 deletions config/locales/custom/nl/mailers.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,34 @@
nl:
mailers:
sincerely: "Met vriendelijke groet"
budget_investment_created:
subject: "Bedankt voor het delen van je idee!"
title: "Bedankt voor het delen van je idee!"
intro: "Beste <strong>%{author}</strong>,"
hi: "Beste <strong>%{author}</strong>,"
text: "Bedankt voor het delen van je idee <strong>%{investment}</strong> <strong>%{budget}</strong>."
follow: "We houden je op de hoogte van het proces. Je kunt dit ook volgen op <strong>%{link}</strong>."
follow_link: "Ideeën"
sincerely: ""
share: "Deel"
config:
manage_email_subscriptions: "Wil je dit soort mails niet meer ontvangen? Verander dan hier je instellingen"
budget_investment_selected:
subject: "Gefeliciteerd, idee '%{code}' gaat door naar de stemronde!"
title: "Gefeliciteerd, je idee gaat door naar de stemronde!"
hi: "Beste deelnemer,"
hi: "Beste <strong>%{author}</strong>,"
share: "De Coöperatieve Wijkraad heeft alle ingediende ideeën bekeken, en gekeken hoeveel het ongeveer gaat kosten. Gefeliciteerd, jouw idee voor de Oosterparkwijk is haalbaar! Je kunt nu beginnen met je campagne. Deel je idee op social media en met je buren.<br>Veel succes!"
share_button: "Deel je idee"
sincerely: "Groeten van de Coöperatieve Wijkraad"
thanks: "Bedankt voor het meedoen."
budget_investment_unfeasible:
subject: "Helaas, je idee is onhaalbaar"
hi: "Beste deelnemer,"
hi: "Beste <strong>%{author}</strong>,"
new: "De Coöperatieve Wijkraad heeft naar je idee gekeken. Helaas blijkt dat je idee niet haalbaar is. We leggen ook uit waarom. Je kunt je idee eventueel aanpassen: %{url}."
new_href: "dat kan hier"
contact: "Heb je vragen of wil je hulp bij je idee? Mail dan naar %{email}, we denken graag met je mee."
email: "[email protected]"
sincerely: "Groeten van de Coöperatieve Wijkraad"
budget_investment_unselected:
subject: "Helaas heeft je idee het niet gehaald"
hi: "Beste deelnemer,"
hi: "Beste <strong>%{author}</strong>,"
thanks: "Helaas heeft je idee niet genoeg stemmen gekregen om door te gaan. Heel erg bedankt voor het delen van je idee."
sincerely: "Groeten van de Coöperatieve Wijkraad"
comment:
subject: "Iemand heeft gereageerd op je idee %{commentable}"
title: "Iemand heeft gereageerd op je idee"
Expand All @@ -45,10 +42,12 @@ nl:
direct_message_for_receiver:
subject: "Je hebt een nieuw privébericht ontvangen"
title: "Je hebt een nieuw privébericht ontvangen."
hi: "Beste <strong>%{receiver}</strong>,"
unsubscribe: "Als je geen directe boodschappen wilt ontvangen, kijk dan eens bij %{account en haal het vinkje weg bij 'ontvangen e-mails over directe berichten'."
direct_message_for_sender:
subject: "Je hebt een privébericht gestuurd"
title: "Je hebt een privébericht gestuurd"
hi: "Beste <strong>%{sender}</strong>,"
text: "Je hebt het volgende privébericht gestuurd naar <strong>%{receiver}</strong>:"
user_invite:
subject: "Welkom op de %{org_name}"
Expand All @@ -58,6 +57,7 @@ nl:
ignore: "Heb je deze uitnodiging ongevraagd ontvangen? Geen zorgen, dan kun je deze mail negeren.

"
thanks: "Bedankt!"
email_verification:
hi: "Beste <strong>%{user}</strong>,"
subject: "Bevestig je e-mailadres"
title: "Bevestig je e-mailadres"
text: "Bevestig je account door de volgende link te gebruiken."
Expand Down
16 changes: 8 additions & 8 deletions config/locales/en/mailers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ en:
mailers:
title: "Open Government"
no_reply: "This message was sent from an email address that does not accept replies."
sincerely: "Sincerely"
already_confirmed:
info: "We've received a request to send you instructions to confirm your account. However, your account is already confirmed, so there's no need to do so again."
new_password: "If you've forgotten your password, you can reset it at the following link:"
Expand All @@ -15,6 +16,7 @@ en:
notifications_link: Notifications
unsubscribe_text: 'To unsubscribe from these emails, visit %{notifications} and uncheck "%{notification}".'
email_verification:
hi: "Hi <strong>%{user}</strong>,"
click_here_to_verify: this link
instructions_2: This email will verify your account with <b>%{document_type} %{document_number}</b>. If these don't belong to you, please don't click on the previous link and ignore this email.
instructions: To complete the verification of your user account you must click %{verification_link}.
Expand All @@ -37,10 +39,12 @@ en:
direct_message_for_receiver:
subject: "You have received a new private message"
reply: Reply to %{sender}
hi: "Hi <strong>%{receiver}</strong>,"
unsubscribe_text: "If you don't want to receive direct messages, visit %{notifications} and uncheck 'Receive emails about direct messages'."
direct_message_for_sender:
subject: "You have sent a new private message"
title: "You have sent a new private message"
hi: "Hi <strong>%{sender}</strong>,"
text: "You have sent a new private message to <strong>%{receiver}</strong> with the content:"
user_invite:
ignore: "If you have not requested this invitation don't worry, you can ignore this email."
Expand All @@ -52,34 +56,30 @@ en:
budget_investment_created:
subject: "Thank you for creating an investment!"
title: "Thank you for creating an investment!"
intro: "Hi <strong>%{author}</strong>,"
hi: "Hi <strong>%{author}</strong>,"
text: "Thank you for creating your investment <strong>%{investment}</strong> for Participatory Budgets <strong>%{budget}</strong>."
follow: "We will inform you about how the process progresses, which you can also follow on <strong>%{link}</strong>."
follow_link: "Participatory Budgets"
sincerely: "Sincerely,"
share: "Share your project"
budget_investment_unfeasible:
title: "Your investment project has been marked as unfeasible"
hi: "Dear user,"
hi: "Hi <strong>%{author}</strong>,"
new: "For all these, we invite you to elaborate a <strong>new investment</strong> that adjusts to the conditions of this process. You can do it following this link: %{url}."
new_href: "new investment project"
sincerely: "Sincerely"
sorry: "Sorry for the inconvenience and we again thank you for your invaluable participation."
subject: "Your investment project '%{code}' has been marked as unfeasible"
budget_investment_selected:
subject: "Your investment project '%{code}' has been selected"
title: "Your investment project has been selected"
hi: "Dear user,"
hi: "Hi <strong>%{author}</strong>,"
share: "Start to get votes, share your investment project on social networks. Share is essential to make it a reality."
share_button: "Share your investment project"
thanks: "Thank you again for participating."
sincerely: "Sincerely"
budget_investment_unselected:
subject: "Your investment project '%{code}' has not been selected"
title: "Your investment project has not been selected"
hi: "Dear user,"
hi: "Hi <strong>%{author}</strong>,"
thanks: "Thank you again for participating."
sincerely: "Sincerely"
evaluation_comment:
subject: "New evaluation comment"
title: New evaluation comment for %{investment}
Expand Down
Loading

0 comments on commit 57faf93

Please sign in to comment.