Fix duplicate support_title I18n key
The key was declared twice and so the first one ("Support this project")
was overwritten.
We're grouping all keys related to the investment list together in order
to reduce the chances of this issue happening again (or, at least, in
this part of the code).
This commit is contained in:
@@ -8,12 +8,12 @@
|
|||||||
<% if investment.should_show_vote_count? || investment.should_show_price? %>
|
<% if investment.should_show_vote_count? || investment.should_show_price? %>
|
||||||
<div class="supports-and-price">
|
<div class="supports-and-price">
|
||||||
<% if investment.should_show_vote_count? %>
|
<% if investment.should_show_vote_count? %>
|
||||||
<span class="supports-title"><%= t("budgets.investments.investment.support_title") %></span>
|
<span class="supports-title"><%= t("budgets.investments_list.investment.supports") %></span>
|
||||||
<strong><%= investment.total_votes %></strong>
|
<strong><%= investment.total_votes %></strong>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if investment.should_show_price? %>
|
<% if investment.should_show_price? %>
|
||||||
<span class="price-title"><%= t("budgets.investments.investment.price_title") %></span>
|
<span class="price-title"><%= t("budgets.investments_list.investment.price") %></span>
|
||||||
<strong><%= investment.formatted_price %></strong>
|
<strong><%= investment.formatted_price %></strong>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<%= render Budgets::Investments::InfoComponent.new(investment) %>
|
<%= render Budgets::Investments::InfoComponent.new(investment) %>
|
||||||
|
|
||||||
<%= link_to namespaced_budget_investment_path(investment), class: "read-more" do %>
|
<%= link_to namespaced_budget_investment_path(investment), class: "read-more" do %>
|
||||||
<small><%= t("budgets.investments.index.read_more") %></small>
|
<small><%= t("budgets.investments_list.investment.read_more") %></small>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<% if investments.any? %>
|
<% if investments.any? %>
|
||||||
<section class="investments-list">
|
<section class="investments-list">
|
||||||
<header>
|
<header>
|
||||||
<h2><%= t("budgets.show.investments_list") %></h2>
|
<h2><%= t("budgets.investments_list.title") %></h2>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<% investments.each do |investment| %>
|
<% investments.each do |investment| %>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<% unless budget.informing? %>
|
<% unless budget.informing? %>
|
||||||
<div class="row margin-top">
|
<div class="row margin-top">
|
||||||
<div class="small-12 medium-6 large-4 small-centered column margin-top">
|
<div class="small-12 medium-6 large-4 small-centered column margin-top">
|
||||||
<%= link_to t("budgets.show.see_all_investments"),
|
<%= link_to t("budgets.investments_list.see_all"),
|
||||||
budget_investments_path(budget),
|
budget_investments_path(budget),
|
||||||
class: "button expanded" %>
|
class: "button expanded" %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -130,7 +130,6 @@ en:
|
|||||||
random: random
|
random: random
|
||||||
confidence_score: highest rated
|
confidence_score: highest rated
|
||||||
price: by price
|
price: by price
|
||||||
read_more: "Read more"
|
|
||||||
share:
|
share:
|
||||||
message: "I created the investment project %{title} in %{handle}. Create an investment project too!"
|
message: "I created the investment project %{title} in %{handle}. Create an investment project too!"
|
||||||
show:
|
show:
|
||||||
@@ -162,8 +161,6 @@ en:
|
|||||||
confirm_group:
|
confirm_group:
|
||||||
one: "You can only support investments in %{count} district. If you continue you cannot change the election of your district. Are you sure?"
|
one: "You can only support investments in %{count} district. If you continue you cannot change the election of your district. Are you sure?"
|
||||||
other: "You can only support investments in %{count} districts. If you continue you cannot change the election of your district. Are you sure?"
|
other: "You can only support investments in %{count} districts. If you continue you cannot change the election of your district. Are you sure?"
|
||||||
price_title: "Price"
|
|
||||||
support_title: "Supports"
|
|
||||||
supports:
|
supports:
|
||||||
one: 1 support
|
one: 1 support
|
||||||
other: "%{count} supports"
|
other: "%{count} supports"
|
||||||
@@ -175,10 +172,15 @@ en:
|
|||||||
change_ballot: "If you change your mind you can remove your votes in %{check_ballot} and start again."
|
change_ballot: "If you change your mind you can remove your votes in %{check_ballot} and start again."
|
||||||
check_ballot_link: "submit my ballot"
|
check_ballot_link: "submit my ballot"
|
||||||
price: "Total budget"
|
price: "Total budget"
|
||||||
|
investments_list:
|
||||||
|
investment:
|
||||||
|
price: "Price"
|
||||||
|
read_more: "Read more"
|
||||||
|
supports: "Supports"
|
||||||
|
see_all: "See all investments"
|
||||||
|
title: "List of investments"
|
||||||
show:
|
show:
|
||||||
see_results: See results
|
see_results: See results
|
||||||
see_all_investments: "See all investments"
|
|
||||||
investments_list: "List of investments"
|
|
||||||
results:
|
results:
|
||||||
link: Results
|
link: Results
|
||||||
page_title: "%{budget} - Results"
|
page_title: "%{budget} - Results"
|
||||||
|
|||||||
@@ -130,7 +130,6 @@ es:
|
|||||||
random: Aleatorios
|
random: Aleatorios
|
||||||
confidence_score: Mejor valorados
|
confidence_score: Mejor valorados
|
||||||
price: Por coste
|
price: Por coste
|
||||||
read_more: "Leer más"
|
|
||||||
share:
|
share:
|
||||||
message: "He presentado el proyecto %{title} en %{handle}. ¡Presenta un proyecto tú también!"
|
message: "He presentado el proyecto %{title} en %{handle}. ¡Presenta un proyecto tú también!"
|
||||||
show:
|
show:
|
||||||
@@ -162,8 +161,6 @@ es:
|
|||||||
confirm_group:
|
confirm_group:
|
||||||
one: "Sólo puedes apoyar proyectos en %{count} distrito. Si sigues adelante no podrás cambiar la elección de este distrito. ¿Estás seguro/a?"
|
one: "Sólo puedes apoyar proyectos en %{count} distrito. Si sigues adelante no podrás cambiar la elección de este distrito. ¿Estás seguro/a?"
|
||||||
other: "Sólo puedes apoyar proyectos en %{count} distritos. Si sigues adelante no podrás cambiar la elección de este distrito. ¿Estás seguro/a?"
|
other: "Sólo puedes apoyar proyectos en %{count} distritos. Si sigues adelante no podrás cambiar la elección de este distrito. ¿Estás seguro/a?"
|
||||||
price_title: "Coste"
|
|
||||||
support_title: "Apoyos"
|
|
||||||
supports:
|
supports:
|
||||||
zero: Sin apoyos
|
zero: Sin apoyos
|
||||||
one: 1 apoyo
|
one: 1 apoyo
|
||||||
@@ -175,10 +172,15 @@ es:
|
|||||||
change_ballot: "Si cambias de opinión puedes borrar tus votos en %{check_ballot} y volver a empezar."
|
change_ballot: "Si cambias de opinión puedes borrar tus votos en %{check_ballot} y volver a empezar."
|
||||||
check_ballot_link: "revisar y confirmar mis votos"
|
check_ballot_link: "revisar y confirmar mis votos"
|
||||||
price: "Presupuesto total"
|
price: "Presupuesto total"
|
||||||
|
investments_list:
|
||||||
|
investment:
|
||||||
|
price: "Coste"
|
||||||
|
read_more: "Leer más"
|
||||||
|
supports: "Apoyos"
|
||||||
|
see_all: "Ver todos los proyectos"
|
||||||
|
title: "Lista de proyectos"
|
||||||
show:
|
show:
|
||||||
see_results: Ver resultados
|
see_results: Ver resultados
|
||||||
see_all_investments: "Ver todos los proyectos"
|
|
||||||
investments_list: "Lista de proyectos"
|
|
||||||
results:
|
results:
|
||||||
link: Resultados
|
link: Resultados
|
||||||
page_title: "%{budget} - Resultados"
|
page_title: "%{budget} - Resultados"
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ describe "Votes" do
|
|||||||
visit budget_investments_path(budget, heading_id: heading.id)
|
visit budget_investments_path(budget, heading_id: heading.id)
|
||||||
|
|
||||||
within(".supports") do
|
within(".supports") do
|
||||||
find(".in-favor a").click
|
click_link "Support this project"
|
||||||
|
|
||||||
expect(page).to have_content "1 support"
|
expect(page).to have_content "1 support"
|
||||||
expect(page).to have_content "You have already supported this investment project. "\
|
expect(page).to have_content "You have already supported this investment project. "\
|
||||||
|
|||||||
Reference in New Issue
Block a user