From 6b1864fbcd4e588373d928596f6fc1ffff7ec00d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Javi=20Mart=C3=ADn?= <%= t("#{i18n_namespace}.filters.two_filters_html",
+ <%= sanitize(t("#{i18n_namespace}.filters.two_filters",
filter: t("#{i18n_namespace}.filters.#{params[:filter]}"),
- advanced_filters: budget_investments_advanced_filters(params[:advanced_filters])) %>
<%= t("#{i18n_namespace}.filters.one_filter_html", - filter: t("#{i18n_namespace}.filters.#{params[:filter]}")) %>
+<%= sanitize(t("#{i18n_namespace}.filters.one_filter", + filter: t("#{i18n_namespace}.filters.#{params[:filter]}"))) %>
<% elsif params[:advanced_filters].present? %> -<%= t("#{i18n_namespace}.filters.one_filter_html", - filter: budget_investments_advanced_filters(params[:advanced_filters])) %>
+<%= sanitize(t("#{i18n_namespace}.filters.one_filter", + filter: budget_investments_advanced_filters(params[:advanced_filters]))) %>
<% end %> diff --git a/app/views/admin/legislation/draft_versions/_form.html.erb b/app/views/admin/legislation/draft_versions/_form.html.erb index 938a7c282..a3997775e 100644 --- a/app/views/admin/legislation/draft_versions/_form.html.erb +++ b/app/views/admin/legislation/draft_versions/_form.html.erb @@ -36,9 +36,9 @@<%= t("budgets.ballots.show.voted_info") %> diff --git a/app/views/budgets/investments/_header.html.erb b/app/views/budgets/investments/_header.html.erb index e46e2d287..a5c63f160 100644 --- a/app/views/budgets/investments/_header.html.erb +++ b/app/views/budgets/investments/_header.html.erb @@ -36,8 +36,8 @@
- <%= t("budgets.investments.show.code_html", code: investment.id) %> + <%= sanitize(t("budgets.investments.show.code", code: investment.id)) %>
<%= auto_link_already_sanitized_html investment.description %> @@ -32,13 +32,13 @@ <% if investment.location.present? %>- <%= t("budgets.investments.show.location_html", location: investment.location) %> + <%= sanitize(t("budgets.investments.show.location", location: investment.location)) %>
<% end %> <% if investment.organization_name.present? %>- <%= t("budgets.investments.show.organization_name_html", name: investment.organization_name) %> + <%= sanitize(t("budgets.investments.show.organization_name", name: investment.organization_name)) %>
<% end %> diff --git a/app/views/budgets/investments/_investment_show.html.erb b/app/views/budgets/investments/_investment_show.html.erb index 7c9dfa2c2..98d18e655 100644 --- a/app/views/budgets/investments/_investment_show.html.erb +++ b/app/views/budgets/investments/_investment_show.html.erb @@ -75,7 +75,7 @@ <% if investment.unfeasible? && investment.valuation_finished? %>- <%= t("budgets.investments.index.sidebar.voted_html", + <%= sanitize(t("budgets.investments.index.sidebar.voted", count: @ballot.investments.by_heading(@heading.id).count, - amount_spent: @ballot.formatted_amount_spent(@heading)) %> + amount_spent: @ballot.formatted_amount_spent(@heading))) %>
<% elsif @assigned_heading.present? %>
- <%= t("budgets.investments.index.sidebar.different_heading_assigned_html",
+ <%= sanitize(t("budgets.investments.index.sidebar.different_heading_assigned",
heading_link: heading_link(@assigned_heading, @budget)
- ) %>
+ )) %>
<%= sanitize(t("budgets.investments.index.sidebar.change_ballot",
diff --git a/app/views/budgets/investments/index.html.erb b/app/views/budgets/investments/index.html.erb
index f1e53520b..d167cf53a 100644
--- a/app/views/budgets/investments/index.html.erb
+++ b/app/views/budgets/investments/index.html.erb
@@ -28,9 +28,9 @@
<%= t("shared.search_results") %>
<%= page_entries_info @investments %> - <%= t("budgets.investments.index.search_results_html", + <%= sanitize(t("budgets.investments.index.search_results", count: @investments.size, - search_term: params[:search]) %> + search_term: params[:search])) %>
- <%= t("dashboard.poster.index.intro_text_html", org: Setting["org_name"]) %> + <%= sanitize(t("dashboard.poster.index.intro_text", org: Setting["org_name"])) %>
@@ -29,7 +29,7 @@
- <%= t("dashboard.poster.index.intro_text_html", org: Setting["org_name"]) %> + <%= sanitize(t("dashboard.poster.index.intro_text", org: Setting["org_name"])) %>
<%= t("dashboard.poster.index.proposal_code", code: proposal.code) %> @@ -34,7 +34,7 @@
<%= page_entries_info @debates %> <% if !@advanced_search_terms %> - <%= t("debates.index.search_results_html", count: @debates.size, search_term: @search_terms) %> + <%= sanitize( + t("debates.index.search_results", count: @debates.size, search_term: @search_terms) + ) %> <% end %>
<% elsif @tag_filter %> diff --git a/app/views/devise/confirmations/show.html.erb b/app/views/devise/confirmations/show.html.erb index 82df09b06..b6c7d5729 100644 --- a/app/views/devise/confirmations/show.html.erb +++ b/app/views/devise/confirmations/show.html.erb @@ -1,7 +1,7 @@ <% provide :title do %><%= t("devise_views.confirmations.show.title") %><% end %><%= t("devise_views.confirmations.show.instructions_html", email: resource.email) %>
+<%= sanitize(t("devise_views.confirmations.show.instructions", email: resource.email)) %>
<%= form_for(resource, as: resource_name, diff --git a/app/views/documents/_nested_documents.html.erb b/app/views/documents/_nested_documents.html.erb index 239a77de4..10bedfa9a 100644 --- a/app/views/documents/_nested_documents.html.erb +++ b/app/views/documents/_nested_documents.html.erb @@ -18,6 +18,6 @@ } %>- <%= t("mailers.budget_investment_unfeasible.new_html", + <%= sanitize(t("mailers.budget_investment_unfeasible.new", url: link_to(t("mailers.budget_investment_unfeasible.new_href"), - new_budget_investment_url(@investment.budget), style: "color: #2895F1; text-decoration: underline;")) %> + new_budget_investment_url(@investment.budget), style: "color: #2895F1; text-decoration: underline;"))) %>
diff --git a/app/views/mailer/comment.html.erb b/app/views/mailer/comment.html.erb index c0bd1c8f0..c4e7d1354 100644 --- a/app/views/mailer/comment.html.erb +++ b/app/views/mailer/comment.html.erb @@ -9,7 +9,8 @@
- <%= t("mailers.comment.new_comment_by_html", commenter: @comment.author.name) %> <%= link_to @commentable.title, commentable_url(@commentable), style: "color: #2895F1; text-decoration:none;" %> + <%= sanitize(t("mailers.comment.new_comment_by", commenter: @comment.author.name)) %> + <%= link_to @commentable.title, commentable_url(@commentable), style: "color: #2895F1; text-decoration:none;" %>
diff --git a/app/views/mailer/direct_message_for_sender.html.erb b/app/views/mailer/direct_message_for_sender.html.erb index 89124ab7b..cb2d9080a 100644 --- a/app/views/mailer/direct_message_for_sender.html.erb +++ b/app/views/mailer/direct_message_for_sender.html.erb @@ -1,8 +1,8 @@
- <%= t("mailers.direct_message_for_sender.title_html", - receiver: @direct_message.receiver.name) %> + <%= sanitize(t("mailers.direct_message_for_sender.title", + receiver: @direct_message.receiver.name)) %>
- <%= t("mailers.email_verification.instructions_html", + <%= sanitize(t("mailers.email_verification.instructions", verification_link: link_to( t("mailers.email_verification.click_here_to_verify"), - email_url(email_verification_token: @token))) %> + email_url(email_verification_token: @token)))) %>
- <%= t("mailers.email_verification.instructions_2_html", + <%= sanitize(t("mailers.email_verification.instructions_2", document_type: humanize_document_type(@document_type), - document_number: @document_number) %> + document_number: @document_number)) %>
<%= t("mailers.email_verification.thanks") %> diff --git a/app/views/mailer/evaluation_comment.html.erb b/app/views/mailer/evaluation_comment.html.erb index 85c842818..4feafc181 100644 --- a/app/views/mailer/evaluation_comment.html.erb +++ b/app/views/mailer/evaluation_comment.html.erb @@ -9,7 +9,11 @@
- <%= t("mailers.evaluation_comment.new_comment_by_html", commenter: @email.comment.author.name, investment: valuation_comments_link(@email.commentable)) %> + <%= sanitize(t( + "mailers.evaluation_comment.new_comment_by", + commenter: @email.comment.author.name, + investment: valuation_comments_link(@email.commentable) + )) %>
<%= t("mailers.evaluation_comment.commenter_info", commenter: @email.comment.author.name, time: l(@email.comment.created_at)) %> diff --git a/app/views/mailer/reply.html.erb b/app/views/mailer/reply.html.erb index d53815249..38419aacf 100644 --- a/app/views/mailer/reply.html.erb +++ b/app/views/mailer/reply.html.erb @@ -9,7 +9,8 @@- <%= t("mailers.reply.new_reply_by_html", commenter: @email.reply.author.name) %> <%= link_to @email.commentable.title, comment_url(@email.reply.id), style: "color: #2895F1; text-decoration:none;" %> + <%= sanitize(t("mailers.reply.new_reply_by", commenter: @email.reply.author.name)) %> + <%= link_to @email.commentable.title, comment_url(@email.reply.id), style: "color: #2895F1; text-decoration:none;" %>
<%= t("management.users.autogenerated_password_html", password: @user.password) %>
+<%= sanitize(t("management.users.autogenerated_password", password: @user.password)) %>
<% else %> -<%= t("management.users.create_user_success_html", email: @user.email) %>
+<%= sanitize(t("management.users.create_user_success", email: @user.email)) %>
<% end %> <%= render "management/user_permissions", diff --git a/app/views/organizations/registrations/success.html.erb b/app/views/organizations/registrations/success.html.erb index d526133bc..e4425b53a 100644 --- a/app/views/organizations/registrations/success.html.erb +++ b/app/views/organizations/registrations/success.html.erb @@ -1,7 +1,7 @@<%= t("devise_views.organizations.registrations.success.thank_you_html") %>
-<%= t("devise_views.organizations.registrations.success.instructions_1_html") %>
-<%= t("devise_views.organizations.registrations.success.instructions_2_html") %>
+<%= sanitize(t("devise_views.organizations.registrations.success.thank_you")) %>
+<%= sanitize(t("devise_views.organizations.registrations.success.instructions_1")) %>
+<%= sanitize(t("devise_views.organizations.registrations.success.instructions_2")) %>
<%= t("devise_views.organizations.registrations.success.instructions_3") %>
<%= link_to t("devise_views.organizations.registrations.success.back_to_index"), diff --git a/app/views/polls/_callout.html.erb b/app/views/polls/_callout.html.erb index 19ff207da..5a837d0e3 100644 --- a/app/views/polls/_callout.html.erb +++ b/app/views/polls/_callout.html.erb @@ -7,8 +7,8 @@ <% elsif current_user.unverified? %>
<%= t("proposals.created.motivation") %>
-<%= t("proposals.created.motivation_2_html") %>
+<%= sanitize(t("proposals.created.motivation_2")) %>
<% if can?(:dashboard, @proposal) %> <%= link_to t("proposals.created.dashboard"), diff --git a/app/views/proposals/index.html.erb b/app/views/proposals/index.html.erb index a83da2fc5..fb6256b72 100644 --- a/app/views/proposals/index.html.erb +++ b/app/views/proposals/index.html.erb @@ -24,7 +24,9 @@<%= page_entries_info @proposals %> <% if !@advanced_search_terms %> - <%= t("proposals.index.search_results_html", count: @proposals.size, search_term: @search_terms) %> + <%= sanitize( + t("proposals.index.search_results", count: @proposals.size, search_term: @search_terms) + ) %> <% end %>
<% elsif @tag_filter %> diff --git a/app/views/shared/_common_globalize_locales.html.erb b/app/views/shared/_common_globalize_locales.html.erb index 43232b2b9..e48aef1e5 100644 --- a/app/views/shared/_common_globalize_locales.html.erb +++ b/app/views/shared/_common_globalize_locales.html.erb @@ -1,7 +1,7 @@
<%= t("devise_views.users.registrations.success.thank_you_html") %>
-<%= t("devise_views.users.registrations.success.instructions_1_html") %>
+<%= sanitize(t("devise_views.users.registrations.success.thank_you")) %>
+<%= sanitize(t("devise_views.users.registrations.success.instructions_1")) %>
<%= t("devise_views.users.registrations.success.instructions_2") %>
<%= link_to t("devise_views.users.registrations.success.back_to_index"), diff --git a/app/views/valuation/budget_investments/_dossier_detail.html.erb b/app/views/valuation/budget_investments/_dossier_detail.html.erb index 71ecad66e..dcfe8990c 100644 --- a/app/views/valuation/budget_investments/_dossier_detail.html.erb +++ b/app/views/valuation/budget_investments/_dossier_detail.html.erb @@ -13,7 +13,9 @@ <%= investment.unfeasibility_explanation.presence || "-" %>
- <%= t("valuation.budget_investments.edit.price_html", currency: budget.currency_symbol) %>: + + <%= sanitize(t("valuation.budget_investments.edit.price", currency: budget.currency_symbol)) %>: + <%= investment.price.presence || "-" %>
diff --git a/app/views/valuation/budget_investments/_dossier_form.html.erb b/app/views/valuation/budget_investments/_dossier_form.html.erb index 7e1b89801..a5229234d 100644 --- a/app/views/valuation/budget_investments/_dossier_form.html.erb +++ b/app/views/valuation/budget_investments/_dossier_form.html.erb @@ -41,7 +41,7 @@
<%= t("verification.sms.new.phone_note") %>
<%= f.text_field :phone, label: false, placeholder: t("verification.sms.new.phone_placeholder"), diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index 6051d554b..3685fcb64 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -198,8 +198,8 @@ en: min_total_supports: Minimum supports max_total_supports: Maximum supports winners: Winners - one_filter_html: "Current applied filters: %{filter}" - two_filters_html: "Current applied filters: %{filter}, %{advanced_filters}" + one_filter: "Current applied filters: %{filter}" + two_filters: "Current applied filters: %{filter}, %{advanced_filters}" buttons: filter: Filter download_current_selection: "Download current selection" @@ -555,7 +555,7 @@ en: form: error: Error form: - title_html: 'Editing %{draft_version_title} from the process %{process_title}' + title: 'Editing %{draft_version_title} from the process %{process_title}' launch_text_editor: Launch text editor close_text_editor: Close text editor use_markdown: Use Markdown to format the text @@ -767,7 +767,7 @@ en: empty_newsletters: There are no newsletters to show new: title: New newsletter - header_footer_help_text_html: "The heading and footer are the same for all emails, you can modify them onapp/views/layouts/mailer_header and app/views/layouts/mailer_footer.app/views/layouts/mailer_header and app/views/layouts/mailer_footer.https://consulproject.org/page-slug"
+ slug_help: "Text to identify this page on URL, for example https://consulproject.org/page-slug"
page:
created_at: Created at
status: Status
diff --git a/config/locales/en/budgets.yml b/config/locales/en/budgets.yml
index ccdd6ec08..f3c5713b5 100644
--- a/config/locales/en/budgets.yml
+++ b/config/locales/en/budgets.yml
@@ -7,7 +7,7 @@ en:
remaining: "You still have %{amount} to invest."
no_balloted_group_yet: "You have not voted on this group yet, go vote!"
remove: Remove vote
- voted_html:
+ voted:
one: "You have voted one investment."
other: "You have voted %{count} investments."
voted_info: "Your ballot is confirmed!"
@@ -79,17 +79,17 @@ en:
button: Search
placeholder: Search investment projects...
title: Search
- search_results_html:
+ search_results:
one: " containing the term '%{search_term}'"
other: " containing the term '%{search_term}'"
sidebar:
my_ballot: My ballot
- voted_html:
+ voted:
one: "You voted one proposal with a cost of %{amount_spent}"
other: "You voted %{count} proposals with a cost of %{amount_spent}"
voted_info: You can %{link} at any time until the close of this phase. No need to spend all the money available.
voted_info_link: change your vote
- different_heading_assigned_html: "You have active votes in another heading: %{heading_link}"
+ different_heading_assigned: "You have active votes in another heading: %{heading_link}"
change_ballot: "If your change your mind you can remove your votes in %{check_ballot} and start again."
check_ballot_link: "check and confirm my ballot"
zero: You have not voted any investment project in this group.
@@ -109,9 +109,9 @@ en:
author_deleted: User deleted
price_explanation: Price explanation
unfeasibility_explanation: Unfeasibility explanation
- code_html: "Investment project code: %{code}"
- location_html: "Location: %{location}"
- organization_name_html: "Proposed on behalf of: %{name}"
+ code: "Investment project code: %{code}"
+ location: "Location: %{location}"
+ organization_name: "Proposed on behalf of: %{name}"
share: Share
title: Investment project
supports: Supports
@@ -120,10 +120,10 @@ en:
comments_tab: Comments
milestones_tab: Milestones
author: Author
- project_unfeasible_html: "This investment project has been marked as not feasible and will not go to balloting phase."
- project_selected_html: "This investment project has been selected for balloting phase."
+ project_unfeasible: "This investment project has been marked as not feasible and will not go to balloting phase."
+ project_selected: "This investment project has been selected for balloting phase."
project_winner: "Winning investment project"
- project_not_selected_html: "This investment project has not been selected for balloting phase."
+ project_not_selected: "This investment project has not been selected for balloting phase."
see_price_explanation: See price explanation
wrong_price_format: Only integer numbers
investment:
@@ -141,7 +141,7 @@ en:
give_support: Support
header:
check_ballot: Check and confirm my ballot
- different_heading_assigned_html: "You have active votes in another heading: %{heading_link}"
+ different_heading_assigned: "You have active votes in another heading: %{heading_link}"
change_ballot: "If your change your mind you can remove your votes in %{check_ballot} and start again."
check_ballot_link: "check and confirm my ballot"
price: "This heading has a budget of"
diff --git a/config/locales/en/devise_views.yml b/config/locales/en/devise_views.yml
index 2840069d7..d814dc55b 100644
--- a/config/locales/en/devise_views.yml
+++ b/config/locales/en/devise_views.yml
@@ -6,7 +6,7 @@ en:
submit: Re-send instructions
title: Re-send confirmation instructions
show:
- instructions_html: Confirming the account with email %{email}
+ instructions: Confirming the account with email %{email}
new_password_confirmation_label: Repeat access password
new_password_label: New access password
please_set_password: Please choose your new pasword (it will allow you to login with the email above)
@@ -50,10 +50,10 @@ en:
title: Register as an organisation or collective
success:
back_to_index: I understand; go back to main page
- instructions_1_html: "We will contact you soon to verify that you do in fact represent this collective."
- instructions_2_html: While your email is reviewed, we have sent you a link to confirm your account.
+ instructions_1: "We will contact you soon to verify that you do in fact represent this collective."
+ instructions_2: While your email is reviewed, we have sent you a link to confirm your account.
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 pending verification.
+ thank_you: Thank you for registering your collective on the website. It is now pending verification.
title: Registration of organisation / collective
passwords:
edit:
@@ -123,7 +123,7 @@ en:
username_note: Name that appears next to your posts
success:
back_to_index: I understand; go back to main page
- instructions_1_html: Please check your email - we have sent you a link to confirm your account.
+ instructions_1: Please check your email - we have sent you a link to confirm your account.
instructions_2: Once confirmed, you may begin participation.
- thank_you_html: Thank you for registering for the website. You must now confirm your email address.
+ thank_you: Thank you for registering for the website. You must now confirm your email address.
title: Confirm your email address
diff --git a/config/locales/en/documents.yml b/config/locales/en/documents.yml
index 62ab2ef24..d60fd5c9d 100644
--- a/config/locales/en/documents.yml
+++ b/config/locales/en/documents.yml
@@ -1,7 +1,7 @@
en:
documents:
title: Documents
- max_documents_allowed_reached_html: You have reached the maximum number of documents allowed! You have to delete one before you can upload another.
+ max_documents_allowed_reached: You have reached the maximum number of documents allowed! You have to delete one before you can upload another.
additional: Additional documentation
form:
title: Documents
diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml
index 5c070f4e7..b08677ab4 100644
--- a/config/locales/en/general.yml
+++ b/config/locales/en/general.yml
@@ -116,7 +116,7 @@ en:
button: Search
placeholder: Search debates...
title: Search
- search_results_html:
+ search_results:
one: " containing the term '%{search_term}'"
other: " containing the term '%{search_term}'"
select_order: Order by
@@ -169,7 +169,7 @@ en:
direct_message: private message
error: error
errors: errors
- not_saved_html: "prevented this %{resource} from being saved. app/views/layouts/mailer_header y app/views/layouts/mailer_footer.app/views/layouts/mailer_header y app/views/layouts/mailer_footer.https://consulproject.org/slug-de-pagina"
+ slug_help: "Texto que identifica esta página en la URL, por ejemplo https://consulproject.org/slug-de-pagina"
page:
created_at: Creada
status: Estado
diff --git a/config/locales/es/budgets.yml b/config/locales/es/budgets.yml
index a73292b76..e096dcc3b 100644
--- a/config/locales/es/budgets.yml
+++ b/config/locales/es/budgets.yml
@@ -7,7 +7,7 @@ es:
remaining: "Te quedan %{amount} para invertir"
no_balloted_group_yet: "Todavía no has votado proyectos de este grupo, ¡vota!"
remove: Quitar voto
- voted_html:
+ voted:
one: "Has votado un proyecto."
other: "Has votado %{count} proyectos."
voted_info: "¡Tus votos están confirmados!"
@@ -18,9 +18,9 @@ es:
not_verified: Los proyectos de gasto sólo pueden ser apoyados por usuarios verificados, %{verify_account}.
organization: Las organizaciones no pueden votar.
not_selected: No se pueden votar proyectos inviables.
- not_enough_money_html: "Ya has asignado el presupuesto disponible.