Skip to content

Commit

Permalink
Merge pull request #6 from AjuntamentdeBarcelona/fix/translations
Browse files Browse the repository at this point in the history
Add translations
  • Loading branch information
Vera Rojman authored May 25, 2021
2 parents 58bd19c + ae5ac2d commit 35f18b7
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 12 deletions.
30 changes: 18 additions & 12 deletions decidim-budgets/app/views/decidim/budgets/budgets/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
<%= render partial: "decidim/shared/component_announcement" %>
<% start_date, end_date = %w(start_date end_date).map { |attribute| current_component.participatory_space.try(attribute) } %>
<% instructions = translated_attribute(current_component.current_settings.landing_page_instructions).presence || translated_attribute(current_component.settings.landing_page_instructions)%>

<div class="row">
<div class="columns medium-7 mediumlarge-8">
<%= cell("decidim/budgets/budgets_header", current_workflow) %>
<%= cell("decidim/budgets/budgets_list", current_workflow) %>
</div>

<% if current_component.participatory_space.try(:start_date) %>
<% if start_date.present? || instructions.present? %>
<div class="columns section view-side medium-4">
<div class="card extra">
<div class="card__content">
<h3><%= t(".date") %></h3>
<%= cell("decidim/date", { start: current_component.participatory_space.try(:start_date), end: current_component.participatory_space.try(:end_date), extra_classes: "extra__date-container--horizontal" }) %>
<% if start_date %>
<div class="card extra">
<div class="card__content">
<h3><%= t(".date") %></h3>
<%= cell("decidim/date", { start: start_date, end: end_date, extra_classes: "extra__date-container--horizontal" }) %>
</div>
</div>
</div>
<% end %>

<div class="card extra">
<div class="card__content">
<h3><%= t(".instructions") %></h3>
<div class="text-left">
<%== translated_attribute(current_component.current_settings.landing_page_instructions).presence || translated_attribute(current_component.settings.landing_page_instructions) %>
<% if instructions.present? %>
<div class="card extra">
<div class="card__content">
<h3><%= t(".instructions") %></h3>
<div class="text-left">
<%== instructions %>
</div>
</div>
</div>
</div>
<% end %>
</div>
<% end %>
</div>
8 changes: 8 additions & 0 deletions decidim-budgets/config/locales/ca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ ca:
update: "%{user_name} ha actualitzat el projecte %{resource_name} de l'espai %{space_name}"
budget:
view: Veure tots els projectes de pressupost
budgets:
index:
date: Dates de votació
instructions: Com participar
budget_information_modal:
back_to: Tornar a %{component_name}
close_modal: Tancar el modal
Expand All @@ -116,6 +120,9 @@ ca:
highlighted_cta: Votar a %{name}
if_change_opinion: Si has canviat d'opinió, pots
my_budgets: Els meus pressupostos
progress: Finalitza la votació
show: Veure més
vote: Vota
voted_on: Has votat a %{links}
limit_announcement:
cant_vote: No pots votar a aquests pressupostos. <a href="%{landing_path}"> Prova amb un altre pressupost </a>.
Expand Down Expand Up @@ -178,6 +185,7 @@ ca:
vote_threshold_percent_rule:
description: A quins projectes creus que hem de destinar el pressupost? Assigna <strong>com a mínim %{minimum_budget}</strong> als projectes que vulguis i vota segons les teves preferències per a definir el pressupost.
instruction: "<li>Assigna <strong>com a mínim %{minimum_budget}</strong> als projectes que vulguis i vota segons les teves preferències per a definir el pressupost.</li>"
vote: Vota
count:
projects_count:
one: 1 projecte
Expand Down
8 changes: 8 additions & 0 deletions decidim-budgets/config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ es:
update: "%{user_name} actualizó el proyecto %{resource_name} en el espacio %{space_name}"
budget:
view: Ver todos los proyectos de presupuesto
budgets:
index:
date: Fechas de votación
instructions: Cómo participar
budget_information_modal:
back_to: Volver a %{component_name}
close_modal: Cierra el modal
Expand All @@ -116,6 +120,9 @@ es:
highlighted_cta: Votar en %{name}
if_change_opinion: Si has cambiado de opinión, puedes
my_budgets: Mis presupuestos
progress: Finaliza la votación
show: Ver más
vote: Vota
voted_on: Has votado en %{links}
limit_announcement:
cant_vote: No puedes votar en este presupuesto. <a href="%{landing_path}"> Prueba con otro presupuesto</a>.
Expand Down Expand Up @@ -178,6 +185,7 @@ es:
vote_threshold_percent_rule:
description: '¿A qué proyectos crees que deberíamos asignar el presupuesto? Asigna <strong>por lo menos %{minimum_budget}</strong> a los proyectos que desees y vota para definir el presupuesto.'
instruction: "<li>Selecciona <strong>al menos %{minimum_budget}</strong> proyectos que quieras y vota de acuerdo a tus preferencias para definir el presupuesto.</li>"
vote: Vota
count:
projects_count:
one: 1 proyecto
Expand Down

0 comments on commit 35f18b7

Please sign in to comment.