Replace html_safe to i18n _html

This commit is contained in:
decabeza
2019-03-19 17:35:39 +01:00
parent 6c0b1a316b
commit cbc89dae8c
6 changed files with 16 additions and 14 deletions

View File

@@ -8,7 +8,7 @@
<%= image_tag "quote_before_white.png", style: "max-width: 40px; vertical-align: top;" %> <%= image_tag "quote_before_white.png", style: "max-width: 40px; vertical-align: top;" %>
<h1 style="color: #fff; font-size: 60px; line-height: 90px; display: inline;"><%= @proposal.title %></h1> <h1 style="color: #fff; font-size: 60px; line-height: 90px; display: inline;"><%= @proposal.title %></h1>
<%= image_tag "quote_after_white.png", style: "max-width: 40px; vertical-align: top;" %> <%= image_tag "quote_after_white.png", style: "max-width: 40px; vertical-align: top;" %>
<h2 style="color: #fff; font-size: 40px; line-height: 60px"><%= t("dashboard.mailer.forward.subtitle").html_safe %></h2> <h2 style="color: #fff; font-size: 40px; line-height: 60px"><%= t("dashboard.mailer.forward.subtitle_html") %></h2>
</td> </td>
</tr> </tr>
</tbody> </tbody>

View File

@@ -5,7 +5,7 @@
<%= image_tag "quote_before_white.png" %> <%= image_tag "quote_before_white.png" %>
<h1 class="inline"><%= proposal.title %></h1> <h1 class="inline"><%= proposal.title %></h1>
<%= image_tag "quote_after_white.png" %> <%= image_tag "quote_after_white.png" %>
<h2><%= t("dashboard.mailer.forward.subtitle").html_safe %></h2> <h2><%= t("dashboard.mailer.forward.subtitle_html") %></h2>
</div> </div>
<div class="margin-bottom"> <div class="margin-bottom">

View File

@@ -9,7 +9,9 @@
<%= image_tag("finger.png") %> <%= image_tag("finger.png") %>
<%= t("dashboard.poster.index.poster_subtitle") %> <%= t("dashboard.poster.index.poster_subtitle") %>
</h1> </h1>
<p class="intro"><%= t("dashboard.poster.index.intro_text", org: Setting["org_name"]).html_safe %></p> <p class="intro">
<%= t("dashboard.poster.index.intro_text_html", org: Setting["org_name"]) %>
</p>
<p class="text-center"> <p class="text-center">
<strong><%= t("dashboard.poster.index.proposal_code", code: proposal.code) %></strong> <strong><%= t("dashboard.poster.index.proposal_code", code: proposal.code) %></strong>

View File

@@ -16,7 +16,7 @@
</strong> </strong>
</h1> </h1>
<p class="intro"> <p class="intro">
<%= t("dashboard.poster.index.intro_text", org: Setting["org_name"]).html_safe %> <%= t("dashboard.poster.index.intro_text_html", org: Setting["org_name"]) %>
</p> </p>
<p class="text-center proposal-code"> <p class="text-center proposal-code">
<strong><%= t("dashboard.poster.index.proposal_code", code: proposal.code) %></strong> <strong><%= t("dashboard.poster.index.proposal_code", code: proposal.code) %></strong>

View File

@@ -575,12 +575,12 @@ en:
title: Poster preview title: Poster preview
poster_title: "Do not keep looking," poster_title: "Do not keep looking,"
poster_subtitle: "back me up! ;)" poster_subtitle: "back me up! ;)"
intro_text: intro_text_html:
<strong>I am participating in %{org}</strong> with my own citizen proposal and only if you also add you can I achieve the "<strong>I am participating in %{org}</strong> with my own citizen proposal and only if you also add you can I achieve the
necessary support to make Madrid the city we all want. necessary support to make the city we all want."
proposal_code: "Code of the proposal: %{code}" proposal_code: "Code of the proposal: %{code}"
support: Support my proposal support: Support my proposal
footer: Visit %{link} and support this proposal. We need to be many. Decide your too. Thank you! footer_html: "<strong>Visit %{link} and support this proposal.</strong> We need to be many. Decide your too. Thank you!"
new: new:
title: Poster feature title: Poster feature
options: options:
@@ -598,7 +598,7 @@ en:
sent: The email has been sent sent: The email has been sent
mailer: mailer:
forward: forward:
subtitle: If you support me, <br>we will achieve it. subtitle_html: "If you support me, <br>we will achieve it."
support_button: Support this proposal support_button: Support this proposal
share_in: Share in share_in: Share in
hi: "Hello!" hi: "Hello!"

View File

@@ -575,12 +575,12 @@ es:
title: Previsualización del poster title: Previsualización del poster
poster_title: "No te quedes mirando," poster_title: "No te quedes mirando,"
poster_subtitle: "¡apóyame! ;)" poster_subtitle: "¡apóyame! ;)"
intro_text: intro_text_html:
<strong>Estoy participando en %{org}</strong> con mi propia propuesta ciudadana y sólo si tú también te sumas podré lograr el "<strong>Estoy participando en %{org}</strong> con mi propia propuesta ciudadana y sólo si tú también te sumas podré lograr el
apoyo necesario para hacer de madrid la ciudad que todos queremos. apoyo necesario para hacer la ciudad que todos queremos."
proposal_code: "Código de la propuesta: %{code}" proposal_code: "Código de la propuesta: %{code}"
support: Apoya mi propuesta support: Apoya mi propuesta
footer: <strong>Entra en %{link} y apoya esta propuesta.</strong> Necesitamos ser muchos. Decide tu también. ¡Gracias! footer_html: "<strong>Entra en %{link} y apoya esta propuesta.</strong> Necesitamos ser muchos. Decide tu también. ¡Gracias!"
new: new:
title: Funcionalidad de póster title: Funcionalidad de póster
options: options:
@@ -598,7 +598,7 @@ es:
sent: El e-mail ha sido enviado sent: El e-mail ha sido enviado
mailer: mailer:
forward: forward:
subtitle: Si me apoyas, <br>lo conseguiremos. subtitle_html: "Si me apoyas, <br>lo conseguiremos."
support_button: Apoyar esta propuesta support_button: Apoyar esta propuesta
share_in: Compartir en share_in: Compartir en
hi: "¡Hola!" hi: "¡Hola!"