Group investment support translation keys together

This way it's easier to find the keys: keys related to the
`Budgets::Investments::VotesComponent` class are in the
`budgets.investments.votes` namespace.

We're making a couple of exceptions; we're not modifying the `supports`
nor the `support_title` keys because they're used in other places.
This commit is contained in:
Javi Martín
2021-06-13 23:34:34 +02:00
parent 758cdaf8d7
commit 368023986a
4 changed files with 18 additions and 16 deletions

View File

@@ -7,10 +7,10 @@
<div class="in-favor"> <div class="in-favor">
<% if user_voted_for? %> <% if user_voted_for? %>
<div class="supported callout success"> <div class="supported callout success">
<%= t("budgets.investments.investment.already_supported") %> <%= t("budgets.investments.votes.already_supported") %>
</div> </div>
<% elsif investment.should_show_votes? %> <% elsif investment.should_show_votes? %>
<%= button_to t("budgets.investments.investment.give_support"), vote_path, <%= button_to t("budgets.investments.votes.support"), vote_path,
class: "button button-support small expanded", class: "button button-support small expanded",
title: t("budgets.investments.investment.support_title"), title: t("budgets.investments.investment.support_title"),
method: "post", method: "post",

View File

@@ -38,10 +38,10 @@ class Budgets::Investments::VotesComponent < ApplicationComponent
end end
def confirm_vote_message def confirm_vote_message
t("budgets.investments.investment.confirm_group", count: investment.group.max_votable_headings) t("budgets.investments.votes.confirm_group", count: investment.group.max_votable_headings)
end end
def support_aria_label def support_aria_label
t("budgets.investments.investment.support_label", investment: investment.title) t("budgets.investments.votes.support_label", investment: investment.title)
end end
end end

View File

@@ -156,23 +156,24 @@ en:
investment: investment:
add: Vote add: Vote
already_added: You have already added this investment project already_added: You have already added this investment project
already_supported: You have already supported this investment project. Share it!
support_title: Support this project support_title: Support this project
support_label: "Support %{investment}"
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?"
other: "You can only support investments in %{count} districts. If you continue you cannot change the election of your district. Are you sure?"
supports: supports:
one: 1 support one: 1 support
other: "%{count} supports" other: "%{count} supports"
zero: No supports zero: No supports
give_support: Support
header: header:
check_ballot: "Submit my ballot" check_ballot: "Submit my ballot"
different_heading_assigned: "You have active votes in another heading: %{heading_link}" different_heading_assigned: "You have active votes in another heading: %{heading_link}"
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"
votes:
already_supported: "You have already supported this investment project. Share it!"
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?"
other: "You can only support investments in %{count} districts. If you continue you cannot change the election of your district. Are you sure?"
support: "Support"
support_label: "Support %{investment}"
investments_list: investments_list:
investment: investment:
price: "Price" price: "Price"

View File

@@ -156,23 +156,24 @@ es:
investment: investment:
add: Votar add: Votar
already_added: Ya has añadido este proyecto de gasto already_added: Ya has añadido este proyecto de gasto
already_supported: Ya has apoyado este proyecto de gasto. ¡Compártelo!
support_title: Apoyar este proyecto support_title: Apoyar este proyecto
support_label: "Apoyar %{investment}"
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?"
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?"
supports: supports:
zero: Sin apoyos zero: Sin apoyos
one: 1 apoyo one: 1 apoyo
other: "%{count} apoyos" other: "%{count} apoyos"
give_support: Apoyar
header: header:
check_ballot: Revisar y confirmar mis votos check_ballot: Revisar y confirmar mis votos
different_heading_assigned: "Ya apoyaste proyectos de otra sección del presupuesto: %{heading_link}" different_heading_assigned: "Ya apoyaste proyectos de otra sección del presupuesto: %{heading_link}"
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"
votes:
already_supported: "Ya has apoyado este proyecto de gasto. ¡Compártelo!"
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?"
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?"
support: "Apoyar"
support_label: "Apoyar %{investment}"
investments_list: investments_list:
investment: investment:
price: "Coste" price: "Coste"