diff --git a/app/controllers/valuation/budget_investments_controller.rb b/app/controllers/valuation/budget_investments_controller.rb index 69269f6bd..03facadb3 100644 --- a/app/controllers/valuation/budget_investments_controller.rb +++ b/app/controllers/valuation/budget_investments_controller.rb @@ -66,14 +66,14 @@ class Valuation::BudgetInvestmentsController < Valuation::BaseController def valid_price_params? if /\D/.match params[:budget_investment][:price] - @investment.errors.add(:price, I18n.t('budget.investments.wrong_price_format')) + @investment.errors.add(:price, I18n.t('budgets.investments.wrong_price_format')) end if /\D/.match params[:budget_investment][:price_first_year] - @investment.errors.add(:price_first_year, I18n.t('budget.investments.wrong_price_format')) + @investment.errors.add(:price_first_year, I18n.t('budgets.investments.wrong_price_format')) end @investment.errors.empty? end -end \ No newline at end of file +end diff --git a/app/views/budgets/ballot/_progress_bar.html.erb b/app/views/budgets/ballot/_progress_bar.html.erb index 3f10b54cf..ec9d28457 100644 --- a/app/views/budgets/ballot/_progress_bar.html.erb +++ b/app/views/budgets/ballot/_progress_bar.html.erb @@ -21,7 +21,7 @@

<%= @ballot.formatted_amount_spent(@heading) %> - <%= t("budget.progress_bar.available") %> + <%= t("budgets.progress_bar.available") %> <%= @ballot.formatted_amount_available(@heading) %>

diff --git a/app/views/budgets/index.html.erb b/app/views/budgets/index.html.erb index 509e79d65..73fc3a697 100644 --- a/app/views/budgets/index.html.erb +++ b/app/views/budgets/index.html.erb @@ -1,7 +1,7 @@
-

<%= t('budget.index.title') %>

+

<%= t('budgets.index.title') %>

@@ -10,8 +10,8 @@
- - + + <% @budgets.each do |budget| %> diff --git a/app/views/budgets/investments/_ballot.html.erb b/app/views/budgets/investments/_ballot.html.erb index 741586197..0ad43ab43 100644 --- a/app/views/budgets/investments/_ballot.html.erb +++ b/app/views/budgets/investments/_ballot.html.erb @@ -4,7 +4,7 @@
"> + title="<%= t("budgets.investments.investment.already_added") %>">

<%= investment.formatted_price %> @@ -27,12 +27,12 @@ <%= investment.formatted_price %>

<% if investment.should_show_ballots? %> - <%= link_to t("budget.investments.investment.add"), + <%= link_to t("budgets.investments.investment.add"), budget_ballot_lines_url(investment_id: investment.id, budget_id: investment.budget_id, investments_ids: investment_ids), class: "button button-support small expanded", - title: t('budget.investments.investment.support_title'), + title: t('budgets.investments.investment.support_title'), method: :post, remote: true %> <% end %> diff --git a/app/views/budgets/investments/_header.html.erb b/app/views/budgets/investments/_header.html.erb index ca3ee4f69..780370ac3 100644 --- a/app/views/budgets/investments/_header.html.erb +++ b/app/views/budgets/investments/_header.html.erb @@ -10,7 +10,7 @@ <% end %> <% if can? :show, @ballot %> - <%= link_to t("budget.investments.header.check_ballot"), + <%= link_to t("budgets.investments.header.check_ballot"), budget_ballot_path(@budget), class: "button float-right" %> <% end %> @@ -23,7 +23,7 @@

<%= @heading.name %>

<% if can? :show, @ballot %> <% if @ballot.valid_heading?(@heading) %> @@ -33,7 +33,7 @@ <% else %>

- <%= t("budget.investments.header.different_heading_assigned_html", + <%= t("budgets.investments.header.different_heading_assigned_html", heading_link: link_to( @assigned_heading.name, budget_investments_path(@budget, heading: @assigned_heading)) @@ -57,7 +57,7 @@ <%= t("shared.back") %> <% end %> -

<%= t('budget.investments.index.title') %>

+

<%= t('budgets.investments.index.title') %>

diff --git a/app/views/budgets/investments/_investment.html.erb b/app/views/budgets/investments/_investment.html.erb index 3ba58c769..cf195e62e 100644 --- a/app/views/budgets/investments/_investment.html.erb +++ b/app/views/budgets/investments/_investment.html.erb @@ -6,7 +6,7 @@
<% cache [locale_and_user_status(investment), 'index', investment, investment.author] do %> - <%= t("budget.investments.investment.title") %> + <%= t("budgets.investments.investment.title") %>

<%= link_to investment.title, namespaced_budget_investment_path(investment) %>

@@ -16,7 +16,7 @@ <% if investment.author.hidden? || investment.author.erased? %>  •  - <%= t("budget.investments.show.author_deleted") %> + <%= t("budgets.investments.show.author_deleted") %> <% else %>  •  diff --git a/app/views/budgets/investments/_investment_show.html.erb b/app/views/budgets/investments/_investment_show.html.erb index 052b27ec8..dd1fd615f 100644 --- a/app/views/budgets/investments/_investment_show.html.erb +++ b/app/views/budgets/investments/_investment_show.html.erb @@ -20,18 +20,18 @@

- <%= t("budget.investments.show.code_html", code: investment.id) %> + <%= t("budgets.investments.show.code_html", code: investment.id) %>

<% if investment.location.present? %>

- <%= t("budget.investments.show.location_html", location: investment.location) %> + <%= t("budgets.investments.show.location_html", location: investment.location) %>

<% end %> <% if investment.organization_name.present? %>

- <%= t("budget.investments.show.organization_name_html", name: investment.organization_name) %> + <%= t("budgets.investments.show.organization_name_html", name: investment.organization_name) %>

<% end %> @@ -44,12 +44,12 @@ <% end %> <% if investment.unfeasible? && investment.unfeasibility_explanation.present? %> -

<%= t('budget.investments.show.unfeasibility_explanation') %>

+

<%= t('budgets.investments.show.unfeasibility_explanation') %>

<%= investment.unfeasibility_explanation %>

<% end %> <% if investment.feasible? && investment.price_explanation.present? %> -

<%= t('budget.investments.show.price_explanation') %>

+

<%= t('budgets.investments.show.price_explanation') %>

<%= investment.price_explanation %>

<% end %>
@@ -80,7 +80,7 @@ -

<%= t("budget.investments.show.share") %>

+

<%= t("budgets.investments.show.share") %>

<%= social_share_button_tag("#{investment.title} #{setting['twitter_hashtag']}") %> <% if browser.device.mobile? %> diff --git a/app/views/budgets/investments/_sidebar.html.erb b/app/views/budgets/investments/_sidebar.html.erb index f7cf65317..fd395c92c 100644 --- a/app/views/budgets/investments/_sidebar.html.erb +++ b/app/views/budgets/investments/_sidebar.html.erb @@ -2,11 +2,11 @@ <% if can?(:create, Budget::Investment.new(budget: @budget)) %> <% if current_user && current_user.level_two_or_three_verified? %> - <%= link_to t("budget.investments.index.sidebar.create"), new_budget_investment_path, class: "button budget expanded" %> + <%= link_to t("budgets.investments.index.sidebar.create"), new_budget_investment_path, class: "button budget expanded" %> <% else %>
- <%= t("budget.investments.index.sidebar.verified_only", - verify: link_to(t("budget.investments.index.sidebar.verify_account"), verification_path)).html_safe %> + <%= t("budgets.investments.index.sidebar.verified_only", + verify: link_to(t("budgets.investments.index.sidebar.verify_account"), verification_path)).html_safe %>
<% end %> <% end %> @@ -16,17 +16,17 @@ - + <% if @ballot.investments.by_heading(@heading.id).count > 0 %>

- <%= t("budget.investments.index.sidebar.voted_html", + <%= t("budgets.investments.index.sidebar.voted_html", count: @ballot.investments.by_heading(@heading.id).count, amount_spent: @ballot.formatted_amount_spent(@heading)) %>

<% else %> -

<%= t("budget.investments.index.sidebar.zero") %>

+

<%= t("budgets.investments.index.sidebar.zero") %>

<% end %> -

<%= t("budget.investments.index.sidebar.voted_info") %>

+

<%= t("budgets.investments.index.sidebar.voted_info") %>

<% end %> diff --git a/app/views/budgets/investments/_votes.html.erb b/app/views/budgets/investments/_votes.html.erb index a6bf88fe6..6d62b9a02 100644 --- a/app/views/budgets/investments/_votes.html.erb +++ b/app/views/budgets/investments/_votes.html.erb @@ -5,23 +5,23 @@
- <%= t("budget.investments.investment.supports", count: investment.total_votes) %> + <%= t("budgets.investments.investment.supports", count: investment.total_votes) %>
<% if user_voted_for %>
- <%= t("budget.investments.investment.already_supported") %> + <%= t("budgets.investments.investment.already_supported") %>
<% elsif investment.should_show_votes? %> <%= link_to vote_url, class: "button button-support small expanded", - title: t('budget.investments.investment.support_title'), + title: t('budgets.investments.investment.support_title'), method: "post", remote: true, "aria-hidden" => css_for_aria_hidden(reason) do %> - <%= t("budget.investments.investment.give_support") %> + <%= t("budgets.investments.investment.give_support") %> <% end %> <% end %>
diff --git a/app/views/budgets/investments/index.html.erb b/app/views/budgets/investments/index.html.erb index 3c91d27c1..b3bcf03fe 100644 --- a/app/views/budgets/investments/index.html.erb +++ b/app/views/budgets/investments/index.html.erb @@ -1,8 +1,8 @@ -<% provide :title do %><%= t('budget.investments.index.title') %><% end %> +<% provide :title do %><%= t('budgets.investments.index.title') %><% end %> <% content_for :header_addon do %> <%= render "shared/search_form", search_path: budget_investments_path(budget_id: @budget.id, page: 1), - i18n_namespace: "budget.investments.index.search_form" %> + i18n_namespace: "budgets.investments.index.search_form" %> <% end %>
@@ -17,23 +17,23 @@
<% if params[:unfeasible].present? %> -

<%= t("budget.investments.index.unfeasible") %>

+

<%= t("budgets.investments.index.unfeasible") %>

- <%= t("budget.investments.index.unfeasible_text", - definitions: link_to(t("budget.investments.index.unfeasible_text_definitions"), "https://decide.madrid.es/participatory_budget_info#20")).html_safe %> + <%= t("budgets.investments.index.unfeasible_text", + definitions: link_to(t("budgets.investments.index.unfeasible_text_definitions"), "https://decide.madrid.es/participatory_budget_info#20")).html_safe %>

<% end %> - <%= content_tag(:h2, t("budget.investments.index.by_heading", heading: @heading.name)) if @heading.present? %> + <%= content_tag(:h2, t("budgets.investments.index.by_heading", heading: @heading.name)) if @heading.present? %> <% if params[:search].present? %>

<%= page_entries_info @investments %> - <%= t("budget.investments.index.search_results", count: @investments.size, search_term: params[:search]) %> + <%= t("budgets.investments.index.search_results", count: @investments.size, search_term: params[:search]) %>

<% end %>
- <%= render('shared/order_links', i18n_namespace: "budget.investments.index") unless params[:unfeasible].present? %> + <%= render('shared/order_links', i18n_namespace: "budgets.investments.index") unless params[:unfeasible].present? %> <% @investments.each do |investment| %> <%= render partial: '/budgets/investments/investment', locals: { diff --git a/app/views/budgets/show.html.erb b/app/views/budgets/show.html.erb index 11d19d77b..bc4115fc3 100644 --- a/app/views/budgets/show.html.erb +++ b/app/views/budgets/show.html.erb @@ -12,18 +12,18 @@

- <%= t('budget.show.phase') %> + <%= t('budgets.show.phase') %>
<%= t("budget.phase.#{@budget.phase}") %>

<% if can?(:create, Budget::Investment.new(budget: @budget)) %> <% if current_user && current_user.level_two_or_three_verified? %> - <%= link_to t("budget.investments.index.sidebar.create"), new_budget_investment_path(@budget), class: "button margin-top" %> + <%= link_to t("budgets.investments.index.sidebar.create"), new_budget_investment_path(@budget), class: "button margin-top" %> <% else %>
- <%= t("budget.investments.index.sidebar.verified_only", - verify: link_to(t("budget.investments.index.sidebar.verify_account"), verification_path)).html_safe %> + <%= t("budgets.investments.index.sidebar.verified_only", + verify: link_to(t("budgets.investments.index.sidebar.verify_account"), verification_path)).html_safe %>
<% end %> <% end %> @@ -35,7 +35,7 @@
<%= t('budget.index.name') %><%= t('budget.index.phase') %><%= Budget.human_attribute_name(:name) %><%= Budget.human_attribute_name(:phase) %>
- + <% @budget.groups.each do |group| %> diff --git a/config/locales/budgets.en.yml b/config/locales/budgets.en.yml index 844c572ae..e0d9cfdc8 100644 --- a/config/locales/budgets.en.yml +++ b/config/locales/budgets.en.yml @@ -22,7 +22,6 @@ en: groups: show: title: Select a heading - budget: phase: accepting: Accepting proposals reviewing: Reviewing proposals @@ -31,56 +30,24 @@ en: balloting: Balloting proposals reviewing_ballots: Reviewing Ballots finished: Finished budget - groups: - index: - group_title: "Groups" - headings: - none: Whole City - all: All scopes index: - name: Budget name - phase: Phase title: Participatory budgets investments: - form: - association_name_label: 'If you propose in name of an assocation or collective add the name here' - association_name: 'Association name' - description: Description - external_url: Link to additional documentation - heading: Choose if a proposed citywide or district - location: "Location" - submit_buttons: - create: Create - new: Create - title: Investment title index: - available: "Available:" title: Participatory budgeting unfeasible: Unfeasible investment projects unfeasible_text: "The proposals must meet a number of criteria (legality, concreteness, be the responsibility of the city, not exceed the limit of the budget; %{definitions}) to be declared viable and reach the stage of final vote. All proposals don't meet these criteria are marked as unfeasible and published in the following list, along with its report of infeasibility." unfeasible_text_definitions: see definitions here by_heading: "Investment projects with scope: %{heading}" - search_form: - button: Search - placeholder: Investment projects... - title: Search search_results: one: " containing the term '%{search_term}'" other: " containing the term '%{search_term}'" sidebar: - back: Back to select page - district: District my_ballot: My ballot - remember_city: You can also vote %{city} investment projects. - remember_city_link_html: city-wide - remember_district: You can also vote investment projects for %{district}. - remember_district_link_html: a district voted_html: 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 change your vote at any time until the close of this phase. No need to spend all the money available. - votes: Supports remaining - votes_district: "You can only vote in the district %{district}" zero: You have not voted any investment project. verified_only: "To create a new budget investment %{verify}." verify_account: "verify your account" @@ -89,15 +56,6 @@ en: random: random confidence_score: highest rated price: by price - new: - back_link: Back - more_info: "Important, not to be ruled out your proposal must comply:" - recommendation_one: See the %{requirements}. - recommendation_one_link: requirements to be met by a proposal - recommendation_three: Try to go into details when describing your spending proposal so the reviewing team undertands your points. - recommendation_two: Each proposal must be submitted separately. You can make as many want. - recommendations_title: How to create a spending proposal - start_new: Create spending proposal show: author_deleted: User deleted price_explanation: Price explanation @@ -105,7 +63,6 @@ en: code_html: 'Investment project code: %{code}' location_html: 'Location: %{location}' organization_name_html: 'Organization: %{name}' - location: Location share: Share wrong_price_format: Only integer numbers investment: @@ -113,7 +70,6 @@ en: add: Add already_added: You have already added this investment project already_supported: You have already supported this. Share it! - forum: District discussion space support_title: Support this project supports: one: 1 support @@ -127,7 +83,4 @@ en: available: "Available: " show: group: Group - heading: Heading - price: Price - no_heading: No Heading phase: Actual phase diff --git a/config/locales/budgets.es.yml b/config/locales/budgets.es.yml index 11b48b520..0d4ba6309 100644 --- a/config/locales/budgets.es.yml +++ b/config/locales/budgets.es.yml @@ -22,7 +22,6 @@ es: groups: show: title: Selecciona una partida - budget: phase: accepting: Aceptando propuestas reviewing: Revisando propuestas @@ -31,56 +30,24 @@ es: balloting: Votación de propuestas reviewing_ballots: Contando resultados finished: Presupuesto terminado - groups: - index: - group_title: "Grupos" - headings: - none: Toda la ciudad - all: Todos los ámbitos index: - name: Nombre del presupuesto - phase: Fase title: Presupuestos participativos investments: - form: - association_name_label: 'Si propones en nombre de una asociación o colectivo añade el nombre aquí' - association_name: 'Nombre de la asociación' - description: Descripción detallada - external_url: Enlace a documentación adicional - heading: "Elige si es una propuesta para toda la ciudad o para un distrito" - location: "Ubicación de la propuesta" - submit_buttons: - create: Crear - new: Crear - title: Título de la propuesta de inversión index: - available: "Disponible:" title: Presupuestos participativos unfeasible: Propuestas de inversión no viables unfeasible_text: Las propuestas presentadas deben cumplir una serie de criterios (legalidad, concreción, ser competencia del Ayuntamiento, no superar el tope del presupuesto; %{definitions}) para ser declaradas viables y llegar hasta la fase de votación final. Todas las propuestas que no cumplen estos criterios son marcadas como inviables y publicadas en la siguiente lista, junto con su informe de inviabilidad. unfeasible_text_definitions: ver definiciones aquí by_heading: "Propuestas de inversión con ámbito: %{heading}" - search_form: - button: Buscar - placeholder: Propuestas de inversión... - title: Buscar search_results: one: " que contiene '%{search_term}'" other: " que contienen '%{search_term}'" sidebar: - back: Volver a página de selección - district: Distrito my_ballot: Mis votos - remember_city: Además puedes votar propuestas de inversión para %{city}. - remember_city_link_html: toda la ciudad - remember_district: Además puedes votar propuestas de inversión para %{district}. - remember_district_link_html: un distrito voted_html: one: "Has votado una propuesta por un valor de %{amount_spent}" other: "Has votado %{count} propuestas por un valor de %{amount_spent}" voted_info: Puedes cambiar tus votos en cualquier momento hasta el cierre de esta fase. No hace falta que gastes todo el dinero disponible. - votes: Apoyos restantes - votes_district: "Solo puedes votar en el distrito %{district}" zero: "Todavía no has votado ninguna propuesta de inversión." verified_only: "Para crear una nueva propuesta de inversión %{verify}." verify_account: "verifica tu cuenta" @@ -89,15 +56,6 @@ es: random: Aleatorias confidence_score: Mejor valoradas price: Por coste - new: - more_info: "¿Cómo funcionan los presupuestos participativos?" - recommendation_one: Consulta los %{requirements}. - recommendation_one_link: requisitos que debe cumplir una propuesta - recommendation_three: Intenta detallar lo máximo posible la propuesta para que el equipo de gobierno encargado de estudiarla tenga las menor dudas posibles. - recommendation_two: Cualquier propuesta o comentario que implique acciones ilegales será eliminada. - recommendations_title: Cómo crear una propuesta de inversión - start_new: Crear una propuesta de inversión - back_link: Volver show: author_deleted: Usuario eliminado price_explanation: Informe de coste @@ -112,7 +70,6 @@ es: add: Añadir already_added: "Ya has añadido esta propuesta de inversión" already_supported: Ya has apoyado este proyecto. ¡Compártelo! - forum: Espacio de debate distrital support_title: Apoyar este proyecto supports: one: 1 apoyo @@ -126,7 +83,4 @@ es: available: "Disponible: " show: group: Grupo - heading: Partida - price: Cantidad - no_heading: Sin línea phase: Fase actual diff --git a/config/locales/en.yml b/config/locales/en.yml index adfec0e84..89af11613 100755 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -33,15 +33,6 @@ en: application: close: Close menu: Menu - budgets: - progress_bar: - available: Available - phases: - accepting: Accepting investment projects - on_hold: On Hold - selecting: Selecting investment projects - balloting: Voting investment projects - finished: Finished comments: comment: admin: Administrator diff --git a/config/locales/es.yml b/config/locales/es.yml index 06a68286b..4290c0fbb 100755 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -33,15 +33,6 @@ es: application: close: Cerrar menu: Menú - budgets: - progress_bar: - available: Disponible - phases: - accepting: Aceptación de proyectos - on_hold: En espera - selecting: Selección de proyectos - balloting: Votación de proyectos - finished: Terminado comments: comment: admin: Administrador
<%= t('budget.show.group') %><%= t('budgets.show.group') %>