Remove unneeded _html suffix in I18n keys

This suffix does the same thing as calling `.html_safe` on them. So we
don't need to use it in texts that don't use HTML.
This commit is contained in:
Javi Martín
2019-10-02 13:16:02 +02:00
parent 031b5aba63
commit 55a190f44a
21 changed files with 30 additions and 30 deletions

View File

@@ -54,6 +54,6 @@ module DocumentsHelper
#{number_to_human_size(document.attachment_file_size)}</small>)".html_safe, #{number_to_human_size(document.attachment_file_size)}</small>)".html_safe,
document.attachment.url, document.attachment.url,
target: "_blank", target: "_blank",
title: t("shared.target_blank_html") title: t("shared.target_blank")
end end
end end

View File

@@ -10,7 +10,7 @@
count: @ballot.investments.count) %> count: @ballot.investments.count) %>
</h2> </h2>
<p class="confirmed"> <p class="confirmed">
<%= t("budgets.ballots.show.voted_info_html") %> <%= t("budgets.ballots.show.voted_info") %>
<p> <p>
<p><%= t("budgets.ballots.show.voted_info_2") %></p> <p><%= t("budgets.ballots.show.voted_info_2") %></p>
</div> </div>

View File

@@ -9,7 +9,7 @@
info_link: link_to(t("debates.new.info_link"), new_proposal_path)).html_safe %> info_link: link_to(t("debates.new.info_link"), new_proposal_path)).html_safe %>
<% if feature?(:help_page) %> <% if feature?(:help_page) %>
<%= link_to help_path, title: t("shared.target_blank_html"), target: "_blank" do %> <%= link_to help_path, title: t("shared.target_blank"), target: "_blank" do %>
<strong><%= t("debates.new.more_info") %></strong> <strong><%= t("debates.new.more_info") %></strong>
<% end %> <% end %>
<% end %> <% end %>

View File

@@ -38,7 +38,7 @@
<% if setting["twitter_handle"] %> <% if setting["twitter_handle"] %>
<li class="inline-block"> <li class="inline-block">
<%= link_to "https://twitter.com/#{setting["twitter_handle"]}", target: "_blank", <%= link_to "https://twitter.com/#{setting["twitter_handle"]}", target: "_blank",
title: t("shared.go_to_page") + t("social.twitter", org: setting["org_name"]) + t("shared.target_blank_html") do %> title: t("shared.go_to_page") + t("social.twitter", org: setting["org_name"]) + t("shared.target_blank") do %>
<span class="show-for-sr"><%= t("social.twitter", org: setting["org_name"]) %></span> <span class="show-for-sr"><%= t("social.twitter", org: setting["org_name"]) %></span>
<span class="icon-twitter" aria-hidden="true"></span> <span class="icon-twitter" aria-hidden="true"></span>
<% end %> <% end %>
@@ -47,7 +47,7 @@
<% if setting["facebook_handle"] %> <% if setting["facebook_handle"] %>
<li class="inline-block"> <li class="inline-block">
<%= link_to "https://www.facebook.com/#{setting["facebook_handle"]}/", target: "_blank", <%= link_to "https://www.facebook.com/#{setting["facebook_handle"]}/", target: "_blank",
title: t("shared.go_to_page") + t("social.facebook", org: setting["org_name"]) + t("shared.target_blank_html") do %> title: t("shared.go_to_page") + t("social.facebook", org: setting["org_name"]) + t("shared.target_blank") do %>
<span class="show-for-sr"><%= t("social.facebook", org: setting["org_name"]) %></span> <span class="show-for-sr"><%= t("social.facebook", org: setting["org_name"]) %></span>
<span class="icon-facebook" aria-hidden="true"></span> <span class="icon-facebook" aria-hidden="true"></span>
<% end %> <% end %>
@@ -56,7 +56,7 @@
<% if setting["youtube_handle"] %> <% if setting["youtube_handle"] %>
<li class="inline-block"> <li class="inline-block">
<%= link_to "https://www.youtube.com/#{setting["youtube_handle"]}", target: "_blank", <%= link_to "https://www.youtube.com/#{setting["youtube_handle"]}", target: "_blank",
title: t("shared.go_to_page") + t("social.youtube", org: setting["org_name"]) + t("shared.target_blank_html") do %> title: t("shared.go_to_page") + t("social.youtube", org: setting["org_name"]) + t("shared.target_blank") do %>
<span class="show-for-sr"><%= t("social.youtube", org: setting["org_name"]) %></span> <span class="show-for-sr"><%= t("social.youtube", org: setting["org_name"]) %></span>
<span class="icon-youtube" aria-hidden="true"></span> <span class="icon-youtube" aria-hidden="true"></span>
<% end %> <% end %>
@@ -65,7 +65,7 @@
<% if setting["telegram_handle"] %> <% if setting["telegram_handle"] %>
<li class="inline-block"> <li class="inline-block">
<%= link_to "https://www.telegram.me/#{setting["telegram_handle"]}", target: "_blank", <%= link_to "https://www.telegram.me/#{setting["telegram_handle"]}", target: "_blank",
title: t("shared.go_to_page") + t("social.telegram", org: setting["org_name"]) + t("shared.target_blank_html") do %> title: t("shared.go_to_page") + t("social.telegram", org: setting["org_name"]) + t("shared.target_blank") do %>
<span class="show-for-sr"><%= t("social.telegram", org: setting["org_name"]) %></span> <span class="show-for-sr"><%= t("social.telegram", org: setting["org_name"]) %></span>
<span class="icon-telegram" aria-hidden="true"></span> <span class="icon-telegram" aria-hidden="true"></span>
<% end %> <% end %>
@@ -74,7 +74,7 @@
<% if setting["instagram_handle"] %> <% if setting["instagram_handle"] %>
<li class="inline-block"> <li class="inline-block">
<%= link_to "https://www.instagram.com/#{setting["instagram_handle"]}", target: "_blank", <%= link_to "https://www.instagram.com/#{setting["instagram_handle"]}", target: "_blank",
title: t("shared.go_to_page") + t("social.instagram", org: setting["org_name"]) + t("shared.target_blank_html") do %> title: t("shared.go_to_page") + t("social.instagram", org: setting["org_name"]) + t("shared.target_blank") do %>
<span class="show-for-sr"><%= t("social.instagram", org: setting["org_name"]) %></span> <span class="show-for-sr"><%= t("social.instagram", org: setting["org_name"]) %></span>
<span class="icon-instagram" aria-hidden="true"></span> <span class="icon-instagram" aria-hidden="true"></span>
<% end %> <% end %>

View File

@@ -32,9 +32,9 @@
<p> <p>
<%= t("layouts.application.ie", <%= t("layouts.application.ie",
chrome: link_to( chrome: link_to(
t("layouts.application.chrome"), "https://www.google.com/chrome/browser/desktop/", title: t("shared.target_blank_html"), target: "_blank"), t("layouts.application.chrome"), "https://www.google.com/chrome/browser/desktop/", title: t("shared.target_blank"), target: "_blank"),
firefox: link_to( firefox: link_to(
t("layouts.application.firefox"), "https://www.mozilla.org/firefox", title: t("shared.target_blank_html"), target: "_blank") t("layouts.application.firefox"), "https://www.mozilla.org/firefox", title: t("shared.target_blank"), target: "_blank")
).html_safe %> ).html_safe %>
</p> </p>
</div> </div>

View File

@@ -32,7 +32,7 @@
label: t("devise_views.users.registrations.new.terms", label: t("devise_views.users.registrations.new.terms",
terms: link_to(t("devise_views.users.registrations.new.terms_link"), terms: link_to(t("devise_views.users.registrations.new.terms_link"),
"/conditions", "/conditions",
title: t("shared.target_blank_html"), title: t("shared.target_blank"),
target: "_blank") target: "_blank")
).html_safe %> ).html_safe %>

View File

@@ -2,7 +2,7 @@
<p><%= t("devise_views.organizations.registrations.success.thank_you_html") %></p> <p><%= t("devise_views.organizations.registrations.success.thank_you_html") %></p>
<p><%= t("devise_views.organizations.registrations.success.instructions_1_html") %></p> <p><%= t("devise_views.organizations.registrations.success.instructions_1_html") %></p>
<p><%= t("devise_views.organizations.registrations.success.instructions_2_html") %></p> <p><%= t("devise_views.organizations.registrations.success.instructions_2_html") %></p>
<p><%= t("devise_views.organizations.registrations.success.instructions_3_html") %></p> <p><%= t("devise_views.organizations.registrations.success.instructions_3") %></p>
<p> <p>
<%= link_to t("devise_views.organizations.registrations.success.back_to_index"), <%= link_to t("devise_views.organizations.registrations.success.back_to_index"),
root_path, class: "button margin-top expanded" %> root_path, class: "button margin-top expanded" %>

View File

@@ -10,7 +10,7 @@
<figure> <figure>
<%= image_tag "help/budgets_#{I18n.locale}.png", alt: t("pages.help.budgets.image_alt") %> <%= image_tag "help/budgets_#{I18n.locale}.png", alt: t("pages.help.budgets.image_alt") %>
<figcaption><%= t("pages.help.budgets.figcaption_html") %></figcaption> <figcaption><%= t("pages.help.budgets.figcaption") %></figcaption>
</figure> </figure>
</div> </div>
</div> </div>

View File

@@ -10,7 +10,7 @@
<figure> <figure>
<%= image_tag "help/proposals_#{I18n.locale}.png", alt: t("pages.help.proposals.image_alt") %> <%= image_tag "help/proposals_#{I18n.locale}.png", alt: t("pages.help.proposals.image_alt") %>
<figcaption><%= t("pages.help.proposals.figcaption_html") %></figcaption> <figcaption><%= t("pages.help.proposals.figcaption") %></figcaption>
</figure> </figure>
</div> </div>
</div> </div>

View File

@@ -5,7 +5,7 @@
<h1><%= t("proposals.new.start_new") %></h1> <h1><%= t("proposals.new.start_new") %></h1>
<div data-alert class="callout primary"> <div data-alert class="callout primary">
<%= link_to help_path(anchor: "proposals"), title: t("shared.target_blank_html"), target: "_blank" do %> <%= link_to help_path(anchor: "proposals"), title: t("shared.target_blank"), target: "_blank" do %>
<%= t("proposals.new.more_info") %> <%= t("proposals.new.more_info") %>
<% end %> <% end %>
</div> </div>

View File

@@ -40,7 +40,7 @@
title: t("devise_views.users.registrations.new.terms_title"), title: t("devise_views.users.registrations.new.terms_title"),
label: t("devise_views.users.registrations.new.terms", label: t("devise_views.users.registrations.new.terms",
terms: link_to(t("devise_views.users.registrations.new.terms_link"), "/conditions", terms: link_to(t("devise_views.users.registrations.new.terms_link"), "/conditions",
title: t("shared.target_blank_html"), title: t("shared.target_blank"),
target: "_blank") target: "_blank")
).html_safe %> ).html_safe %>

View File

@@ -1,7 +1,7 @@
<h2><%= t("devise_views.users.registrations.success.title") %></h2> <h2><%= t("devise_views.users.registrations.success.title") %></h2>
<p><%= t("devise_views.users.registrations.success.thank_you_html") %></p> <p><%= t("devise_views.users.registrations.success.thank_you_html") %></p>
<p><%= t("devise_views.users.registrations.success.instructions_1_html") %></p> <p><%= t("devise_views.users.registrations.success.instructions_1_html") %></p>
<p><%= t("devise_views.users.registrations.success.instructions_2_html") %></p> <p><%= t("devise_views.users.registrations.success.instructions_2") %></p>
<p> <p>
<%= link_to t("devise_views.users.registrations.success.back_to_index"), <%= link_to t("devise_views.users.registrations.success.back_to_index"),
root_path, class: "button margin-top expanded" %> root_path, class: "button margin-top expanded" %>

View File

@@ -78,7 +78,7 @@
title: t("verification.residence.new.accept_terms_text_title"), title: t("verification.residence.new.accept_terms_text_title"),
label: t("verification.residence.new.accept_terms_text", label: t("verification.residence.new.accept_terms_text",
terms_url: link_to(t("verification.residence.new.terms"), "/census_terms", terms_url: link_to(t("verification.residence.new.terms"), "/census_terms",
title: t("shared.target_blank_html"), title: t("shared.target_blank"),
target: "_blank") target: "_blank")
).html_safe %> ).html_safe %>
</div> </div>

View File

@@ -10,7 +10,7 @@ en:
voted_html: voted_html:
one: "You have voted <span>one</span> investment." one: "You have voted <span>one</span> investment."
other: "You have voted <span>%{count}</span> investments." other: "You have voted <span>%{count}</span> investments."
voted_info_html: "Your ballot is confirmed!" voted_info: "Your ballot is confirmed!"
voted_info_2: "But you can change your vote at any time until this phase is closed." voted_info_2: "But you can change your vote at any time until this phase is closed."
zero: You have not voted any investment project. zero: You have not voted any investment project.
reasons_for_not_balloting: reasons_for_not_balloting:

View File

@@ -52,7 +52,7 @@ en:
back_to_index: I understand; go back to main page back_to_index: I understand; go back to main page
instructions_1_html: "<strong>We will contact you soon</strong> to verify that you do in fact represent this collective." instructions_1_html: "<strong>We will contact you soon</strong> to verify that you do in fact represent this collective."
instructions_2_html: While your <strong>email is reviewed</strong>, we have sent you a <strong>link to confirm your account</strong>. instructions_2_html: While your <strong>email is reviewed</strong>, we have sent you a <strong>link to confirm your account</strong>.
instructions_3_html: Once confirmed, you may begin to participate as an unverified collective. instructions_3: Once confirmed, you may begin to participate as an unverified collective.
thank_you_html: Thank you for registering your collective on the website. It is now <strong>pending verification</strong>. thank_you_html: Thank you for registering your collective on the website. It is now <strong>pending verification</strong>.
title: Registration of organisation / collective title: Registration of organisation / collective
passwords: passwords:
@@ -124,6 +124,6 @@ en:
success: success:
back_to_index: I understand; go back to main page back_to_index: I understand; go back to main page
instructions_1_html: Please <b>check your email</b> - we have sent you a <b>link to confirm your account</b>. instructions_1_html: Please <b>check your email</b> - we have sent you a <b>link to confirm your account</b>.
instructions_2_html: Once confirmed, you may begin participation. instructions_2: Once confirmed, you may begin participation.
thank_you_html: Thank you for registering for the website. You must now <b>confirm your email address</b>. thank_you_html: Thank you for registering for the website. You must now <b>confirm your email address</b>.
title: Confirm your email address title: Confirm your email address

View File

@@ -773,7 +773,7 @@ en:
districts: "Districts" districts: "Districts"
districts_list: "Districts list" districts_list: "Districts list"
categories: "Categories" categories: "Categories"
target_blank_html: " (link opens in new window)" target_blank: " (link opens in new window)"
you_are_in: "You are in" you_are_in: "You are in"
unflag: Unflag unflag: Unflag
unfollow_entity: "Unfollow %{entity}" unfollow_entity: "Unfollow %{entity}"

View File

@@ -27,13 +27,13 @@ en:
description: "In the %{link} section you can make proposals for the City Council to carry them out. The proposals require support, and if they reach sufficient support, they are put to a public vote. The proposals approved in these citizens' votes are accepted by the City Council and carried out." description: "In the %{link} section you can make proposals for the City Council to carry them out. The proposals require support, and if they reach sufficient support, they are put to a public vote. The proposals approved in these citizens' votes are accepted by the City Council and carried out."
link: "citizen proposals" link: "citizen proposals"
image_alt: "Button to support a proposal" image_alt: "Button to support a proposal"
figcaption_html: 'Button to "Support" a proposal.' figcaption: 'Button to "Support" a proposal.'
budgets: budgets:
title: "Participatory Budgeting" title: "Participatory Budgeting"
description: "The %{link} section helps people make a direct decision on what part of the municipal budget is spent on." description: "The %{link} section helps people make a direct decision on what part of the municipal budget is spent on."
link: "participative budgets" link: "participative budgets"
image_alt: "Different phases of a participatory budget" image_alt: "Different phases of a participatory budget"
figcaption_html: '"Support" and "Voting" phases of participatory budgets.' figcaption: '"Support" and "Voting" phases of participatory budgets.'
polls: polls:
title: "Polls" title: "Polls"
description: "The %{link} section is activated each time a proposal reaches 1% support and goes to the vote or when the City Council proposes an issue for people to decide on." description: "The %{link} section is activated each time a proposal reaches 1% support and goes to the vote or when the City Council proposes an issue for people to decide on."

View File

@@ -10,7 +10,7 @@ es:
voted_html: voted_html:
one: "Has votado <span>un</span> proyecto." one: "Has votado <span>un</span> proyecto."
other: "Has votado <span>%{count}</span> proyectos." other: "Has votado <span>%{count}</span> proyectos."
voted_info_html: "¡Tus votos están confirmados!" voted_info: "¡Tus votos están confirmados!"
voted_info_2: "Pero puedes cambiarlos en cualquier momento hasta el cierre de esta fase." voted_info_2: "Pero puedes cambiarlos en cualquier momento hasta el cierre de esta fase."
zero: Todavía no has votado ningún proyecto de gasto. zero: Todavía no has votado ningún proyecto de gasto.
reasons_for_not_balloting: reasons_for_not_balloting:

View File

@@ -52,7 +52,7 @@ es:
back_to_index: Entendido, volver a la página principal back_to_index: Entendido, volver a la página principal
instructions_1_html: "En breve <b>nos pondremos en contacto contigo</b> para verificar que realmente representas a este colectivo." instructions_1_html: "En breve <b>nos pondremos en contacto contigo</b> para verificar que realmente representas a este colectivo."
instructions_2_html: Mientras <b>revisa tu correo electrónico</b>, te hemos enviado un <b>enlace para confirmar tu cuenta</b>. instructions_2_html: Mientras <b>revisa tu correo electrónico</b>, te hemos enviado un <b>enlace para confirmar tu cuenta</b>.
instructions_3_html: Una vez confirmado, podrás empezar a participar como colectivo no verificado. instructions_3: Una vez confirmado, podrás empezar a participar como colectivo no verificado.
thank_you_html: Gracias por registrar tu colectivo en la web. Ahora está <b>pendiente de verificación</b>. thank_you_html: Gracias por registrar tu colectivo en la web. Ahora está <b>pendiente de verificación</b>.
title: Registro de organización / colectivo title: Registro de organización / colectivo
passwords: passwords:
@@ -124,6 +124,6 @@ es:
success: success:
back_to_index: Entendido, volver a la página principal back_to_index: Entendido, volver a la página principal
instructions_1_html: Por favor <b>revisa tu correo electrónico</b> - te hemos enviado un <b>enlace para confirmar tu cuenta</b>. instructions_1_html: Por favor <b>revisa tu correo electrónico</b> - te hemos enviado un <b>enlace para confirmar tu cuenta</b>.
instructions_2_html: Una vez confirmado, podrás empezar a participar. instructions_2: Una vez confirmado, podrás empezar a participar.
thank_you_html: Gracias por registrarte en la web. Ahora debes <b>confirmar tu correo</b>. thank_you_html: Gracias por registrarte en la web. Ahora debes <b>confirmar tu correo</b>.
title: Revisa tu correo title: Revisa tu correo

View File

@@ -770,7 +770,7 @@ es:
districts: "Distritos" districts: "Distritos"
districts_list: "Listado de distritos" districts_list: "Listado de distritos"
categories: "Categorías" categories: "Categorías"
target_blank_html: " (se abre en ventana nueva)" target_blank: " (se abre en ventana nueva)"
you_are_in: "Estás en" you_are_in: "Estás en"
unflag: Deshacer denuncia unflag: Deshacer denuncia
unfollow_entity: "Dejar de seguir %{entity}" unfollow_entity: "Dejar de seguir %{entity}"

View File

@@ -27,13 +27,13 @@ es:
description: "En la sección de %{link} puedes plantear propuestas para que el Ayuntamiento las lleve a cabo. Las propuestas recaban apoyos, y si alcanzan los apoyos suficientes se someten a votación ciudadana. Las propuestas aprobadas en estas votaciones ciudadanas son asumidas por el Ayuntamiento y se llevan a cabo." description: "En la sección de %{link} puedes plantear propuestas para que el Ayuntamiento las lleve a cabo. Las propuestas recaban apoyos, y si alcanzan los apoyos suficientes se someten a votación ciudadana. Las propuestas aprobadas en estas votaciones ciudadanas son asumidas por el Ayuntamiento y se llevan a cabo."
link: "propuestas ciudadanas" link: "propuestas ciudadanas"
image_alt: "Botón para apoyar una propuesta" image_alt: "Botón para apoyar una propuesta"
figcaption_html: 'Botón para "Apoyar" una propuesta.' figcaption: 'Botón para "Apoyar" una propuesta.'
budgets: budgets:
title: "Presupuestos participativos" title: "Presupuestos participativos"
description: "La sección de %{link} sirve para que la gente decida de manera directa a qué se destina una parte del presupuesto municipal." description: "La sección de %{link} sirve para que la gente decida de manera directa a qué se destina una parte del presupuesto municipal."
link: "presupuestos participativos" link: "presupuestos participativos"
image_alt: "Diferentes fases de un presupuesto participativo" image_alt: "Diferentes fases de un presupuesto participativo"
figcaption_html: 'Fase de "Apoyos" y fase de "Votación" de los presupuestos participativos.' figcaption: 'Fase de "Apoyos" y fase de "Votación" de los presupuestos participativos.'
polls: polls:
title: "Votaciones" title: "Votaciones"
description: "La sección de %{link} se activa cada vez que una propuesta alcanza el 1% de apoyos y pasa a votación o cuando el Ayuntamiento propone un tema para que la gente decida sobre él." description: "La sección de %{link} se activa cada vez que una propuesta alcanza el 1% de apoyos y pasa a votación o cuando el Ayuntamiento propone un tema para que la gente decida sobre él."