diff --git a/app/views/budgets/investments/show.html.erb b/app/views/budgets/investments/show.html.erb
index 175e08854..b621e2f96 100644
--- a/app/views/budgets/investments/show.html.erb
+++ b/app/views/budgets/investments/show.html.erb
@@ -23,5 +23,5 @@
display_comments_count: false } %>
- <%= render "budgets/investments/milestones" %>
+ <%= render "milestones/milestones", milestoneable: @investment %>
diff --git a/app/views/budgets/investments/milestones/_milestone.html.erb b/app/views/milestones/_milestone.html.erb
similarity index 91%
rename from app/views/budgets/investments/milestones/_milestone.html.erb
rename to app/views/milestones/_milestone.html.erb
index d534002ca..2e3ace7fb 100644
--- a/app/views/budgets/investments/milestones/_milestone.html.erb
+++ b/app/views/milestones/_milestone.html.erb
@@ -4,7 +4,7 @@
<% if milestone.publication_date.present? %>
- <%= t("budgets.investments.show.milestone_publication_date",
+ <%= t("milestones.show.publication_date",
publication_date: l(milestone.publication_date.to_date)) %>
@@ -13,7 +13,7 @@
<% if milestone.status.present? %>
- <%= t("budgets.investments.show.milestone_status_changed") %>
+ <%= t("milestones.show.status_changed") %>
diff --git a/app/views/budgets/investments/_milestones.html.erb b/app/views/milestones/_milestones.html.erb
similarity index 54%
rename from app/views/budgets/investments/_milestones.html.erb
rename to app/views/milestones/_milestones.html.erb
index 60b52f46e..7ec843077 100644
--- a/app/views/budgets/investments/_milestones.html.erb
+++ b/app/views/milestones/_milestones.html.erb
@@ -1,15 +1,15 @@
- <% if @investment.milestones.blank? %>
+ <% if milestoneable.milestones.blank? %>
- <%= t('budgets.investments.show.no_milestones') %>
+ <%= t("milestones.index.no_milestones") %>
<% end %>
- <% @investment.milestones.order_by_publication_date.each do |milestone| %>
- <%= render 'budgets/investments/milestones/milestone', milestone: milestone %>
+ <% milestoneable.milestones.order_by_publication_date.each do |milestone| %>
+ <%= render "milestones/milestone", milestone: milestone %>
<% end %>
diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml
index 4b683e7fd..23190a660 100644
--- a/config/i18n-tasks.yml
+++ b/config/i18n-tasks.yml
@@ -43,6 +43,7 @@ data:
- config/locales/%{locale}/images.yml
- config/locales/%{locale}/user_groups.yml
- config/locales/%{locale}/i18n.yml
+ - config/locales/%{locale}/milestones.yml
# Locale files to write new keys to, based on a list of key pattern => file rules. Matched from top to bottom:
# `i18n-tasks normalize -p` will force move the keys according to these rules
diff --git a/config/locales/ar/budgets.yml b/config/locales/ar/budgets.yml
index 7b63003ce..f6e2159db 100644
--- a/config/locales/ar/budgets.yml
+++ b/config/locales/ar/budgets.yml
@@ -110,9 +110,6 @@ ar:
price: سعر
comments_tab: تعليقات
milestones_tab: معالم
- no_milestones: لا يوجد معالم محددة
- milestone_publication_date: "تم نشرها %{publication_date}"
- milestone_status_changed: تم تغيير حالة الستثمار الى
author: كاتب
project_unfeasible_html: 'مشروع الاستثمار هذا
تم تعليمه كغير مجدي ولن يذهب الى مرحلة الاقتراع.'
project_selected_html: 'مشروع الاستثمار هذا
تم اختيارهلمرحلة الاقتراع.'
diff --git a/config/locales/ar/milestones.yml b/config/locales/ar/milestones.yml
new file mode 100644
index 000000000..65ad9e65e
--- /dev/null
+++ b/config/locales/ar/milestones.yml
@@ -0,0 +1,7 @@
+ar:
+ milestones:
+ index:
+ no_milestones: لا يوجد معالم محددة
+ show:
+ publication_date: "تم نشرها %{publication_date}"
+ status_changed: تم تغيير حالة الستثمار الى
diff --git a/config/locales/ast/budgets.yml b/config/locales/ast/budgets.yml
index 3f2c5800c..bd3cae2b5 100644
--- a/config/locales/ast/budgets.yml
+++ b/config/locales/ast/budgets.yml
@@ -83,7 +83,6 @@ ast:
votes: Votos
price: Costu
milestones_tab: Siguimientu
- no_milestones: Nun hai finxos definíos
wrong_price_format: Solo pue incluyir calteres numbéricos
investment:
add: Votar
diff --git a/config/locales/ast/milestones.yml b/config/locales/ast/milestones.yml
new file mode 100644
index 000000000..9365fc84c
--- /dev/null
+++ b/config/locales/ast/milestones.yml
@@ -0,0 +1,4 @@
+ast:
+ milestones:
+ index:
+ no_milestones: Nun hai finxos definíos
diff --git a/config/locales/de-DE/budgets.yml b/config/locales/de-DE/budgets.yml
index 8857cfb81..1d68b9ce3 100644
--- a/config/locales/de-DE/budgets.yml
+++ b/config/locales/de-DE/budgets.yml
@@ -118,9 +118,6 @@ de:
price: Preis
comments_tab: Kommentare
milestones_tab: Meilensteine
- no_milestones: Keine Meilensteine definiert
- milestone_publication_date: "Veröffentlicht %{publication_date}"
- milestone_status_changed: Investitionsstatus geändert zu
author: Autor
project_unfeasible_html: 'Dieses Investitionsprojekt
wurde als nicht durchführbar markiert und wird nicht in die Abstimmungsphase übergehen.'
project_selected_html: 'Dieses Investitionsprojekt wurde für die Abstimmungsphase
ausgewählt.'
diff --git a/config/locales/de-DE/milestones.yml b/config/locales/de-DE/milestones.yml
new file mode 100644
index 000000000..6ec140299
--- /dev/null
+++ b/config/locales/de-DE/milestones.yml
@@ -0,0 +1,7 @@
+de:
+ milestones:
+ index:
+ no_milestones: Keine Meilensteine definiert
+ show:
+ publication_date: "Veröffentlicht %{publication_date}"
+ status_changed: Investitionsstatus geändert zu
diff --git a/config/locales/en/budgets.yml b/config/locales/en/budgets.yml
index 086cb03a1..961cde423 100644
--- a/config/locales/en/budgets.yml
+++ b/config/locales/en/budgets.yml
@@ -122,9 +122,6 @@ en:
price: Price
comments_tab: Comments
milestones_tab: Milestones
- no_milestones: Don't have defined milestones
- milestone_publication_date: "Published %{publication_date}"
- milestone_status_changed: Investment status changed to
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.'
diff --git a/config/locales/en/milestones.yml b/config/locales/en/milestones.yml
new file mode 100644
index 000000000..f660f82e6
--- /dev/null
+++ b/config/locales/en/milestones.yml
@@ -0,0 +1,7 @@
+en:
+ milestones:
+ index:
+ no_milestones: Don't have defined milestones
+ show:
+ publication_date: "Published %{publication_date}"
+ status_changed: Status changed to
diff --git a/config/locales/es-AR/budgets.yml b/config/locales/es-AR/budgets.yml
index 2a9a4df31..b83388325 100644
--- a/config/locales/es-AR/budgets.yml
+++ b/config/locales/es-AR/budgets.yml
@@ -117,9 +117,6 @@ es-AR:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
- milestone_status_changed: Estado de inversión cambiado a
author: Autor
project_unfeasible_html: 'Este proyecto de inversión
ha sido marcado como inviabley no pasará la fase de votación.'
project_not_selected_html: 'Este proyecto de inversión
no ha sido seleccionadopara la fase de votación.'
diff --git a/config/locales/es-AR/milestones.yml b/config/locales/es-AR/milestones.yml
new file mode 100644
index 000000000..c8dcfc26b
--- /dev/null
+++ b/config/locales/es-AR/milestones.yml
@@ -0,0 +1,7 @@
+es-AR:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
+ status_changed: Estado de inversión cambiado a
diff --git a/config/locales/es-BO/budgets.yml b/config/locales/es-BO/budgets.yml
index 1f6f90ef0..2c7a53499 100644
--- a/config/locales/es-BO/budgets.yml
+++ b/config/locales/es-BO/budgets.yml
@@ -107,8 +107,6 @@ es-BO:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
author: Autor
wrong_price_format: Solo puede incluir caracteres numéricos
investment:
diff --git a/config/locales/es-BO/milestones.yml b/config/locales/es-BO/milestones.yml
new file mode 100644
index 000000000..96868499a
--- /dev/null
+++ b/config/locales/es-BO/milestones.yml
@@ -0,0 +1,6 @@
+es-BO:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
diff --git a/config/locales/es-CL/budgets.yml b/config/locales/es-CL/budgets.yml
index d332e5f81..691e06deb 100644
--- a/config/locales/es-CL/budgets.yml
+++ b/config/locales/es-CL/budgets.yml
@@ -107,8 +107,6 @@ es-CL:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
author: Autor
wrong_price_format: Solo puede incluir caracteres numéricos
investment:
diff --git a/config/locales/es-CL/milestones.yml b/config/locales/es-CL/milestones.yml
new file mode 100644
index 000000000..f6d5f86e7
--- /dev/null
+++ b/config/locales/es-CL/milestones.yml
@@ -0,0 +1,6 @@
+es-CL:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
diff --git a/config/locales/es-CO/budgets.yml b/config/locales/es-CO/budgets.yml
index df62df554..17cd7fdd1 100644
--- a/config/locales/es-CO/budgets.yml
+++ b/config/locales/es-CO/budgets.yml
@@ -107,8 +107,6 @@ es-CO:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
author: Autor
wrong_price_format: Solo puede incluir caracteres numéricos
investment:
diff --git a/config/locales/es-CO/milestones.yml b/config/locales/es-CO/milestones.yml
new file mode 100644
index 000000000..7e1da9289
--- /dev/null
+++ b/config/locales/es-CO/milestones.yml
@@ -0,0 +1,6 @@
+es-CO:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
diff --git a/config/locales/es-CR/budgets.yml b/config/locales/es-CR/budgets.yml
index d8ff1cf88..b3f9a3ded 100644
--- a/config/locales/es-CR/budgets.yml
+++ b/config/locales/es-CR/budgets.yml
@@ -107,8 +107,6 @@ es-CR:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
author: Autor
wrong_price_format: Solo puede incluir caracteres numéricos
investment:
diff --git a/config/locales/es-CR/milestones.yml b/config/locales/es-CR/milestones.yml
new file mode 100644
index 000000000..4744caf83
--- /dev/null
+++ b/config/locales/es-CR/milestones.yml
@@ -0,0 +1,6 @@
+es-CR:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
diff --git a/config/locales/es-DO/budgets.yml b/config/locales/es-DO/budgets.yml
index 895029fda..2694dca85 100644
--- a/config/locales/es-DO/budgets.yml
+++ b/config/locales/es-DO/budgets.yml
@@ -107,8 +107,6 @@ es-DO:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
author: Autor
wrong_price_format: Solo puede incluir caracteres numéricos
investment:
diff --git a/config/locales/es-DO/milestones.yml b/config/locales/es-DO/milestones.yml
new file mode 100644
index 000000000..69246f382
--- /dev/null
+++ b/config/locales/es-DO/milestones.yml
@@ -0,0 +1,6 @@
+es-DO:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
diff --git a/config/locales/es-EC/budgets.yml b/config/locales/es-EC/budgets.yml
index 8f394e937..d9b047fe3 100644
--- a/config/locales/es-EC/budgets.yml
+++ b/config/locales/es-EC/budgets.yml
@@ -107,8 +107,6 @@ es-EC:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
author: Autor
wrong_price_format: Solo puede incluir caracteres numéricos
investment:
diff --git a/config/locales/es-EC/milestones.yml b/config/locales/es-EC/milestones.yml
new file mode 100644
index 000000000..4f7f0e698
--- /dev/null
+++ b/config/locales/es-EC/milestones.yml
@@ -0,0 +1,6 @@
+es-EC:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
diff --git a/config/locales/es-GT/budgets.yml b/config/locales/es-GT/budgets.yml
index 104afa04c..1a3a162f4 100644
--- a/config/locales/es-GT/budgets.yml
+++ b/config/locales/es-GT/budgets.yml
@@ -107,8 +107,6 @@ es-GT:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
author: Autor
wrong_price_format: Solo puede incluir caracteres numéricos
investment:
diff --git a/config/locales/es-GT/milestones.yml b/config/locales/es-GT/milestones.yml
new file mode 100644
index 000000000..f05f298ef
--- /dev/null
+++ b/config/locales/es-GT/milestones.yml
@@ -0,0 +1,6 @@
+es-GT:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
diff --git a/config/locales/es-HN/budgets.yml b/config/locales/es-HN/budgets.yml
index e7a66e8a2..06b419fdf 100644
--- a/config/locales/es-HN/budgets.yml
+++ b/config/locales/es-HN/budgets.yml
@@ -107,8 +107,6 @@ es-HN:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
author: Autor
wrong_price_format: Solo puede incluir caracteres numéricos
investment:
diff --git a/config/locales/es-HN/milestones.yml b/config/locales/es-HN/milestones.yml
new file mode 100644
index 000000000..e6fd75c12
--- /dev/null
+++ b/config/locales/es-HN/milestones.yml
@@ -0,0 +1,6 @@
+es-HN:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
diff --git a/config/locales/es-MX/budgets.yml b/config/locales/es-MX/budgets.yml
index 6f165e57e..5f071bd26 100644
--- a/config/locales/es-MX/budgets.yml
+++ b/config/locales/es-MX/budgets.yml
@@ -107,8 +107,6 @@ es-MX:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
author: Autor
wrong_price_format: Solo puede incluir caracteres numéricos
investment:
diff --git a/config/locales/es-MX/milestones.yml b/config/locales/es-MX/milestones.yml
new file mode 100644
index 000000000..65d3e0222
--- /dev/null
+++ b/config/locales/es-MX/milestones.yml
@@ -0,0 +1,6 @@
+es-MX:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
diff --git a/config/locales/es-NI/budgets.yml b/config/locales/es-NI/budgets.yml
index 278ab73fb..3a59f3550 100644
--- a/config/locales/es-NI/budgets.yml
+++ b/config/locales/es-NI/budgets.yml
@@ -107,8 +107,6 @@ es-NI:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
author: Autor
wrong_price_format: Solo puede incluir caracteres numéricos
investment:
diff --git a/config/locales/es-NI/milestones.yml b/config/locales/es-NI/milestones.yml
new file mode 100644
index 000000000..44f61b550
--- /dev/null
+++ b/config/locales/es-NI/milestones.yml
@@ -0,0 +1,6 @@
+es-NI:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
diff --git a/config/locales/es-PA/budgets.yml b/config/locales/es-PA/budgets.yml
index 02eb6d6d4..d43db48c9 100644
--- a/config/locales/es-PA/budgets.yml
+++ b/config/locales/es-PA/budgets.yml
@@ -107,8 +107,6 @@ es-PA:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
author: Autor
wrong_price_format: Solo puede incluir caracteres numéricos
investment:
diff --git a/config/locales/es-PA/milestones.yml b/config/locales/es-PA/milestones.yml
new file mode 100644
index 000000000..6a42686cb
--- /dev/null
+++ b/config/locales/es-PA/milestones.yml
@@ -0,0 +1,6 @@
+es-PA:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
diff --git a/config/locales/es-PE/budgets.yml b/config/locales/es-PE/budgets.yml
index 21d899ad9..71317fbbf 100644
--- a/config/locales/es-PE/budgets.yml
+++ b/config/locales/es-PE/budgets.yml
@@ -107,8 +107,6 @@ es-PE:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
author: Autor
wrong_price_format: Solo puede incluir caracteres numéricos
investment:
diff --git a/config/locales/es-PE/milestones.yml b/config/locales/es-PE/milestones.yml
new file mode 100644
index 000000000..a960399d4
--- /dev/null
+++ b/config/locales/es-PE/milestones.yml
@@ -0,0 +1,6 @@
+es-PE:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
diff --git a/config/locales/es-PR/budgets.yml b/config/locales/es-PR/budgets.yml
index 61fbcee1b..62285d759 100644
--- a/config/locales/es-PR/budgets.yml
+++ b/config/locales/es-PR/budgets.yml
@@ -107,8 +107,6 @@ es-PR:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
author: Autor
wrong_price_format: Solo puede incluir caracteres numéricos
investment:
diff --git a/config/locales/es-PR/milestones.yml b/config/locales/es-PR/milestones.yml
new file mode 100644
index 000000000..88b84770f
--- /dev/null
+++ b/config/locales/es-PR/milestones.yml
@@ -0,0 +1,6 @@
+es-PR:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
diff --git a/config/locales/es-PY/budgets.yml b/config/locales/es-PY/budgets.yml
index 3d13a4d61..957bcb0c0 100644
--- a/config/locales/es-PY/budgets.yml
+++ b/config/locales/es-PY/budgets.yml
@@ -107,8 +107,6 @@ es-PY:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
author: Autor
wrong_price_format: Solo puede incluir caracteres numéricos
investment:
diff --git a/config/locales/es-PY/milestones.yml b/config/locales/es-PY/milestones.yml
new file mode 100644
index 000000000..4dc13f35d
--- /dev/null
+++ b/config/locales/es-PY/milestones.yml
@@ -0,0 +1,6 @@
+es-PY:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
diff --git a/config/locales/es-SV/budgets.yml b/config/locales/es-SV/budgets.yml
index 3978956e5..8900a7688 100644
--- a/config/locales/es-SV/budgets.yml
+++ b/config/locales/es-SV/budgets.yml
@@ -107,8 +107,6 @@ es-SV:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
author: Autor
wrong_price_format: Solo puede incluir caracteres numéricos
investment:
diff --git a/config/locales/es-SV/milestones.yml b/config/locales/es-SV/milestones.yml
new file mode 100644
index 000000000..4bc02f1a4
--- /dev/null
+++ b/config/locales/es-SV/milestones.yml
@@ -0,0 +1,6 @@
+es-SV:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
diff --git a/config/locales/es-UY/budgets.yml b/config/locales/es-UY/budgets.yml
index 7e30b95a7..0f433a363 100644
--- a/config/locales/es-UY/budgets.yml
+++ b/config/locales/es-UY/budgets.yml
@@ -107,8 +107,6 @@ es-UY:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
author: Autor
wrong_price_format: Solo puede incluir caracteres numéricos
investment:
diff --git a/config/locales/es-UY/milestones.yml b/config/locales/es-UY/milestones.yml
new file mode 100644
index 000000000..d0b097694
--- /dev/null
+++ b/config/locales/es-UY/milestones.yml
@@ -0,0 +1,6 @@
+es-UY:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
diff --git a/config/locales/es-VE/budgets.yml b/config/locales/es-VE/budgets.yml
index edb4621d2..82f3fb08d 100644
--- a/config/locales/es-VE/budgets.yml
+++ b/config/locales/es-VE/budgets.yml
@@ -110,8 +110,6 @@ es-VE:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
author: Autor
wrong_price_format: Solo puede incluir caracteres numéricos
investment:
diff --git a/config/locales/es-VE/milestones.yml b/config/locales/es-VE/milestones.yml
new file mode 100644
index 000000000..b36ebadf9
--- /dev/null
+++ b/config/locales/es-VE/milestones.yml
@@ -0,0 +1,6 @@
+es-VE:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
diff --git a/config/locales/es/budgets.yml b/config/locales/es/budgets.yml
index c4be7cf87..e55cff134 100644
--- a/config/locales/es/budgets.yml
+++ b/config/locales/es/budgets.yml
@@ -122,9 +122,6 @@ es:
price: Coste
comments_tab: Comentarios
milestones_tab: Seguimiento
- no_milestones: No hay hitos definidos
- milestone_publication_date: "Publicado el %{publication_date}"
- milestone_status_changed: El proyecto ha cambiado al estado
author: Autor
project_unfeasible_html: 'Este proyecto de gasto
ha sido marcado como inviable y no pasará a la fase de votación.'
project_selected_html: 'Este proyecto de gasto
ha sido seleccionado para la fase de votación.'
diff --git a/config/locales/es/milestones.yml b/config/locales/es/milestones.yml
new file mode 100644
index 000000000..406a2ea89
--- /dev/null
+++ b/config/locales/es/milestones.yml
@@ -0,0 +1,7 @@
+es:
+ milestones:
+ index:
+ no_milestones: No hay hitos definidos
+ show:
+ publication_date: "Publicado el %{publication_date}"
+ status_changed: El proyecto ha cambiado al estado
diff --git a/config/locales/fa-IR/budgets.yml b/config/locales/fa-IR/budgets.yml
index 84dc8a63c..6e675c053 100644
--- a/config/locales/fa-IR/budgets.yml
+++ b/config/locales/fa-IR/budgets.yml
@@ -114,8 +114,6 @@ fa:
price: قیمت
comments_tab: توضیحات
milestones_tab: نقطه عطف
- no_milestones: نقاط قوت را مشخص نکرده اید
- milestone_publication_date: "منتشر شده\n%{publication_date}"
author: نویسنده
project_unfeasible_html: 'این پروژه سرمایه گذاری
به عنوان غیرقابل توصیف مشخص شده است strong> و به مرحله رای گیری نرسیده است'
project_not_selected_html: 'این پروژه سرمایه گذاری انتخاب نشده است strong> برای مرحله رای گیری .'
diff --git a/config/locales/fa-IR/milestones.yml b/config/locales/fa-IR/milestones.yml
new file mode 100644
index 000000000..ae2131010
--- /dev/null
+++ b/config/locales/fa-IR/milestones.yml
@@ -0,0 +1,6 @@
+fa:
+ milestones:
+ index:
+ no_milestones: نقاط قوت را مشخص نکرده اید
+ show:
+ publication_date: "منتشر شده\n%{publication_date}"
diff --git a/config/locales/fr/budgets.yml b/config/locales/fr/budgets.yml
index 18e9d3e48..379a44127 100644
--- a/config/locales/fr/budgets.yml
+++ b/config/locales/fr/budgets.yml
@@ -118,9 +118,6 @@ fr:
price: Coût
comments_tab: Commentaires
milestones_tab: Jalons
- no_milestones: Aucun jalon défini
- milestone_publication_date: "Publié le %{publication_date}"
- milestone_status_changed: Statut d'investissement changé à
author: Auteur
project_unfeasible_html: 'Ce projet d''investissement a été marqué comme irréalisable et n''ira pas en phase de vote.'
project_selected_html: 'Ce projet d''investissement n’a pas été sélectionné pour la phase de vote.'
diff --git a/config/locales/fr/milestones.yml b/config/locales/fr/milestones.yml
new file mode 100644
index 000000000..fa6994310
--- /dev/null
+++ b/config/locales/fr/milestones.yml
@@ -0,0 +1,7 @@
+fr:
+ milestones:
+ index:
+ no_milestones: Aucun jalon défini
+ show:
+ publication_date: "Publié le %{publication_date}"
+ status_changed: Statut d'investissement changé à
diff --git a/config/locales/gl/budgets.yml b/config/locales/gl/budgets.yml
index 72f2f78f3..420977a08 100644
--- a/config/locales/gl/budgets.yml
+++ b/config/locales/gl/budgets.yml
@@ -118,9 +118,6 @@ gl:
price: Custo
comments_tab: Comentarios
milestones_tab: Seguimento
- no_milestones: Non hai datos definidos
- milestone_publication_date: "Publicouse o %{publication_date}"
- milestone_status_changed: O investimento mudou de estado a
author: Autoría
project_unfeasible_html: 'O proxecto de investimento foi marcado como inviable e non chegará á fase de votación.'
project_selected_html: 'Este proxecto de investimento foi seleccionado para a fase de votación.'
diff --git a/config/locales/gl/milestones.yml b/config/locales/gl/milestones.yml
new file mode 100644
index 000000000..9d2d5fd92
--- /dev/null
+++ b/config/locales/gl/milestones.yml
@@ -0,0 +1,7 @@
+gl:
+ milestones:
+ index:
+ no_milestones: Non hai datos definidos
+ show:
+ publication_date: "Publicouse o %{publication_date}"
+ status_changed: O investimento mudou de estado a
diff --git a/config/locales/id-ID/budgets.yml b/config/locales/id-ID/budgets.yml
index aa5c3b0e0..8c0273a5a 100644
--- a/config/locales/id-ID/budgets.yml
+++ b/config/locales/id-ID/budgets.yml
@@ -105,8 +105,6 @@ id:
price: Harga
comments_tab: Komentar
milestones_tab: Tonggak
- no_milestones: Jangan telah ditetapkan tonggak
- milestone_publication_date: "Diterbitkan %{publication_date}"
author: Penulis
wrong_price_format: Hanya angka bilangan bulat
investment:
diff --git a/config/locales/id-ID/milestones.yml b/config/locales/id-ID/milestones.yml
new file mode 100644
index 000000000..d96ab86fa
--- /dev/null
+++ b/config/locales/id-ID/milestones.yml
@@ -0,0 +1,6 @@
+id:
+ milestones:
+ index:
+ no_milestones: Jangan telah ditetapkan tonggak
+ show:
+ publication_date: "Diterbitkan %{publication_date}"
diff --git a/config/locales/it/budgets.yml b/config/locales/it/budgets.yml
index 5d4a0406b..3f8dcf381 100644
--- a/config/locales/it/budgets.yml
+++ b/config/locales/it/budgets.yml
@@ -118,9 +118,6 @@ it:
price: Costi
comments_tab: Commenti
milestones_tab: Traguardi
- no_milestones: Non ci sono traguardi definiti
- milestone_publication_date: "Pubblicato il %{publication_date}"
- milestone_status_changed: Status dell’investimento cambiato in
author: Autore
project_unfeasible_html: 'Questo progetto di investimento è stato contrassegnato come irrealizzabile e non accederà alla fase di voto finale.'
project_selected_html: 'Il progetto di investimento è stato selezionato per la fase di voto.'
diff --git a/config/locales/it/milestones.yml b/config/locales/it/milestones.yml
new file mode 100644
index 000000000..0465094a0
--- /dev/null
+++ b/config/locales/it/milestones.yml
@@ -0,0 +1,7 @@
+it:
+ milestones:
+ index:
+ no_milestones: Non ci sono traguardi definiti
+ show:
+ publication_date: "Pubblicato il %{publication_date}"
+ status_changed: Status dell’investimento cambiato in
diff --git a/config/locales/nl/budgets.yml b/config/locales/nl/budgets.yml
index 5cde6c47e..45c4b3e82 100644
--- a/config/locales/nl/budgets.yml
+++ b/config/locales/nl/budgets.yml
@@ -118,9 +118,6 @@ nl:
price: Bedrag
comments_tab: Reacties
milestones_tab: Mijlpalen
- no_milestones: Zonder gedefinieerde mijlpalen
- milestone_publication_date: "Gepubliceerd %{publication_date}"
- milestone_status_changed: Investeringsstatus gewijzigd in
author: Auteur
project_unfeasible_html: 'Dit investeringsproject is gemarkeerd als niet haalbaar strong> en gaat niet naar de beslissingsfase.'
project_selected_html: 'Dit investeringsproject is geselecteerd voor beslissingsfase.'
diff --git a/config/locales/nl/milestones.yml b/config/locales/nl/milestones.yml
new file mode 100644
index 000000000..7dc2e7e9b
--- /dev/null
+++ b/config/locales/nl/milestones.yml
@@ -0,0 +1,7 @@
+nl:
+ milestones:
+ index:
+ no_milestones: Zonder gedefinieerde mijlpalen
+ show:
+ publication_date: "Gepubliceerd %{publication_date}"
+ status_changed: Investeringsstatus gewijzigd in
diff --git a/config/locales/pl-PL/budgets.yml b/config/locales/pl-PL/budgets.yml
index 2025ca47b..4109129a8 100644
--- a/config/locales/pl-PL/budgets.yml
+++ b/config/locales/pl-PL/budgets.yml
@@ -114,9 +114,6 @@ pl:
price: Koszt
comments_tab: Komentarze
milestones_tab: Kamienie milowe
- no_milestones: Nie ma zdefiniowanych kamieni milowych
- milestone_publication_date: "Opublikowane %{publication_date}"
- milestone_status_changed: Zmieniono stan inwestycji na
author: Autor
project_unfeasible_html: 'Ten projekt inwestycyjny został oznaczony jako niewykonalny i nie przejdzie do fazy głosowania.'
project_selected_html: 'Ten projekt inwestycyjny został wybrany do fazy głosowania.'
diff --git a/config/locales/pl-PL/milestones.yml b/config/locales/pl-PL/milestones.yml
new file mode 100644
index 000000000..644d61ae6
--- /dev/null
+++ b/config/locales/pl-PL/milestones.yml
@@ -0,0 +1,7 @@
+pl:
+ milestones:
+ index:
+ no_milestones: Nie ma zdefiniowanych kamieni milowych
+ show:
+ publication_date: "Opublikowane %{publication_date}"
+ status_changed: Zmieniono stan inwestycji na
diff --git a/config/locales/pt-BR/budgets.yml b/config/locales/pt-BR/budgets.yml
index 3ac73b1b9..8444d2661 100644
--- a/config/locales/pt-BR/budgets.yml
+++ b/config/locales/pt-BR/budgets.yml
@@ -118,9 +118,6 @@ pt-BR:
price: Preço
comments_tab: Comentários
milestones_tab: Marcos
- no_milestones: Não possui marcos definidos
- milestone_publication_date: "Publicado %{publication_date}"
- milestone_status_changed: Status de investimento mudado para
author: Autor
project_unfeasible_html: 'Este projeto de investimento foi marcado como não viável e não vai à fase de votação.'
project_selected_html: 'Este projeto de investimento está selecionado para a fase de votação.'
diff --git a/config/locales/pt-BR/milestones.yml b/config/locales/pt-BR/milestones.yml
new file mode 100644
index 000000000..e8ab2330b
--- /dev/null
+++ b/config/locales/pt-BR/milestones.yml
@@ -0,0 +1,7 @@
+pt-BR:
+ milestones:
+ index:
+ no_milestones: Não possui marcos definidos
+ show:
+ publication_date: "Publicado %{publication_date}"
+ status_changed: Status de investimento mudado para
diff --git a/config/locales/ru/budgets.yml b/config/locales/ru/budgets.yml
index 7e47bd865..d589f4f7b 100644
--- a/config/locales/ru/budgets.yml
+++ b/config/locales/ru/budgets.yml
@@ -109,9 +109,6 @@ ru:
price: Цена
comments_tab: Комментарии
milestones_tab: Основные этапы
- no_milestones: Не имеет определенных основных этапов
- milestone_publication_date: "Опубликованные %{publication_date}"
- milestone_status_changed: Инвестиционный статус изменен на
author: Автор
project_unfeasible_html: 'Этот инвестиционный проект был отмечен как неосуществимый и не перейдет к этапу голосования.'
project_selected_html: 'Этот инвестиционный проект был выбран для этапа голосования.'
diff --git a/config/locales/ru/milestones.yml b/config/locales/ru/milestones.yml
new file mode 100644
index 000000000..540d79306
--- /dev/null
+++ b/config/locales/ru/milestones.yml
@@ -0,0 +1,7 @@
+ru:
+ milestones:
+ index:
+ no_milestones: Не имеет определенных основных этапов
+ show:
+ publication_date: "Опубликованные %{publication_date}"
+ status_changed: Инвестиционный статус изменен на
diff --git a/config/locales/sq-AL/budgets.yml b/config/locales/sq-AL/budgets.yml
index 8748902e7..b988c418e 100644
--- a/config/locales/sq-AL/budgets.yml
+++ b/config/locales/sq-AL/budgets.yml
@@ -118,9 +118,6 @@ sq:
price: Çmim
comments_tab: Komentet
milestones_tab: Pikëarritje
- no_milestones: Nuk keni pikëarritje të përcaktuara
- milestone_publication_date: "Publikuar %{publication_date}"
- milestone_status_changed: Statusi i investimeve u ndryshua
author: Autori
project_unfeasible_html: 'Ky projekt investimi është shënuar si jo e realizueshme dhe nuk do të shkojë në fazën e votimit.'
project_selected_html: 'Ky projekt investimi është përzgjedhur për fazën e votimit.'
diff --git a/config/locales/sq-AL/milestones.yml b/config/locales/sq-AL/milestones.yml
new file mode 100644
index 000000000..1a920f73a
--- /dev/null
+++ b/config/locales/sq-AL/milestones.yml
@@ -0,0 +1,7 @@
+sq:
+ milestones:
+ index:
+ no_milestones: Nuk keni pikëarritje të përcaktuara
+ show:
+ publication_date: "Publikuar %{publication_date}"
+ status_changed: Statusi i investimeve u ndryshua
diff --git a/config/locales/sv-SE/budgets.yml b/config/locales/sv-SE/budgets.yml
index dc75af701..2d4974595 100644
--- a/config/locales/sv-SE/budgets.yml
+++ b/config/locales/sv-SE/budgets.yml
@@ -118,9 +118,6 @@ sv:
price: Kostnad
comments_tab: Kommentarer
milestones_tab: Milstolpar
- no_milestones: Har inga definierade milstolpar
- milestone_publication_date: "Publicerad %{publication_date}"
- milestone_status_changed: Förslagets status har ändrats till
author: Förslagslämnare
project_unfeasible_html: 'Det här budgetförslaget har markerats som ej genomförbart och kommer inte gå vidare till omröstning.'
project_selected_html: 'Det här budgetförslaget har gått vidare till omröstning.'
diff --git a/config/locales/sv-SE/milestones.yml b/config/locales/sv-SE/milestones.yml
new file mode 100644
index 000000000..3e3c9a80c
--- /dev/null
+++ b/config/locales/sv-SE/milestones.yml
@@ -0,0 +1,7 @@
+sv:
+ milestones:
+ index:
+ no_milestones: Har inga definierade milstolpar
+ show:
+ publication_date: "Publicerad %{publication_date}"
+ status_changed: Förslagets status har ändrats till
diff --git a/config/locales/val/budgets.yml b/config/locales/val/budgets.yml
index 0db0e00db..19e853a4c 100644
--- a/config/locales/val/budgets.yml
+++ b/config/locales/val/budgets.yml
@@ -117,9 +117,6 @@ val:
price: Cost
comments_tab: Comentaris
milestones_tab: Seguiments
- no_milestones: No hi ha fites definides
- milestone_publication_date: "Publicat el %{publication_date}"
- milestone_status_changed: Estat de la proposta canviat a
author: Autor
project_unfeasible_html: 'Esta proposta ha sigut marcada com inviable i no passarà a la fase de votació.'
project_selected_html: 'Este projecte d''inversió ha sigut seleccionat per a la fase de votació.'
diff --git a/config/locales/val/milestones.yml b/config/locales/val/milestones.yml
new file mode 100644
index 000000000..3b97bd91f
--- /dev/null
+++ b/config/locales/val/milestones.yml
@@ -0,0 +1,7 @@
+val:
+ milestones:
+ index:
+ no_milestones: No hi ha fites definides
+ show:
+ publication_date: "Publicat el %{publication_date}"
+ status_changed: Estat de la proposta canviat a
diff --git a/config/locales/zh-CN/budgets.yml b/config/locales/zh-CN/budgets.yml
index eb3f20bc3..d3430e7b2 100644
--- a/config/locales/zh-CN/budgets.yml
+++ b/config/locales/zh-CN/budgets.yml
@@ -115,9 +115,6 @@ zh-CN:
price: 价格
comments_tab: 评论
milestones_tab: 里程碑
- no_milestones: 没有已定义的里程碑
- milestone_publication_date: "发布于%{publication_date}"
- milestone_status_changed: 投资状态更改为
author: 作者
project_unfeasible_html: '此投资项目已经被标记为不可行,并将不会进入投票阶段。'
project_selected_html: '此投资项目已经被选择进入投票阶段。'
diff --git a/config/locales/zh-CN/milestones.yml b/config/locales/zh-CN/milestones.yml
new file mode 100644
index 000000000..82ce02f2b
--- /dev/null
+++ b/config/locales/zh-CN/milestones.yml
@@ -0,0 +1,7 @@
+zh-CN:
+ milestones:
+ index:
+ no_milestones: 没有已定义的里程碑
+ show:
+ publication_date: "发布于%{publication_date}"
+ status_changed: 投资状态更改为
diff --git a/config/locales/zh-TW/budgets.yml b/config/locales/zh-TW/budgets.yml
index 66280aecc..298e96afa 100644
--- a/config/locales/zh-TW/budgets.yml
+++ b/config/locales/zh-TW/budgets.yml
@@ -115,9 +115,6 @@ zh-TW:
price: 價格
comments_tab: 評論
milestones_tab: 里程碑
- no_milestones: 沒有已定義的里程碑
- milestone_publication_date: "發佈於 %{publication_date}"
- milestone_status_changed: 投資狀態改為
author: 作者
project_unfeasible_html: '此投資項目 已被標記為不可行,不會進入投票階段。'
project_selected_html: '此投資項目 已被選入投票階段。'
diff --git a/config/locales/zh-TW/milestones.yml b/config/locales/zh-TW/milestones.yml
new file mode 100644
index 000000000..e6cd9e8e1
--- /dev/null
+++ b/config/locales/zh-TW/milestones.yml
@@ -0,0 +1,7 @@
+zh-TW:
+ milestones:
+ index:
+ no_milestones: 沒有已定義的里程碑
+ show:
+ publication_date: "發佈於 %{publication_date}"
+ status_changed: 投資狀態改為
diff --git a/spec/features/budgets/investments_spec.rb b/spec/features/budgets/investments_spec.rb
index 93f2f3799..991b1e632 100644
--- a/spec/features/budgets/investments_spec.rb
+++ b/spec/features/budgets/investments_spec.rb
@@ -10,6 +10,10 @@ feature 'Budget Investments' do
let(:group) { create(:budget_group, name: "Health", budget: budget) }
let!(:heading) { create(:budget_heading, name: "More hospitals", price: 666666, group: group) }
+ it_behaves_like "milestoneable",
+ :budget_investment,
+ "budget_investment_path"
+
before do
Setting['feature.allow_images'] = true
end
@@ -1118,59 +1122,6 @@ feature 'Budget Investments' do
expect(page).not_to have_content("Local government is not competent in this matter")
end
- scenario "Show milestones", :js do
- user = create(:user)
- investment = create(:budget_investment)
- create(:milestone, milestoneable: investment,
- description_en: "Last milestone with a link to https://consul.dev",
- description_es: "Último hito con el link https://consul.dev",
- publication_date: Date.tomorrow)
- first_milestone = create(:milestone, milestoneable: investment,
- description: "First milestone",
- publication_date: Date.yesterday)
- image = create(:image, imageable: first_milestone)
- document = create(:document, documentable: first_milestone)
-
- login_as(user)
- visit budget_investment_path(budget_id: investment.budget.id, id: investment.id)
-
- find("#tab-milestones-label").click
-
- within("#tab-milestones") do
- expect(first_milestone.description).to appear_before('Last milestone with a link to https://consul.dev')
- expect(page).to have_content(Date.tomorrow)
- expect(page).to have_content(Date.yesterday)
- expect(page).not_to have_content(Date.current)
- expect(page.find("#image_#{first_milestone.id}")['alt']).to have_content(image.title)
- expect(page).to have_link(document.title)
- expect(page).to have_link("https://consul.dev")
- expect(page).to have_content(first_milestone.status.name)
- end
-
- select('Español', from: 'locale-switcher')
-
- find("#tab-milestones-label").click
-
- within("#tab-milestones") do
- expect(page).to have_content('Último hito con el link https://consul.dev')
- expect(page).to have_link("https://consul.dev")
- end
- end
-
- scenario "Show no_milestones text", :js do
- user = create(:user)
- investment = create(:budget_investment)
-
- login_as(user)
- visit budget_investment_path(budget_id: investment.budget.id, id: investment.id)
-
- find("#tab-milestones-label").click
-
- within("#tab-milestones") do
- expect(page).to have_content("Don't have defined milestones")
- end
- end
-
scenario "Only winner investments are show when budget is finished" do
3.times { create(:budget_investment, heading: heading) }
diff --git a/spec/shared/features/milestoneable.rb b/spec/shared/features/milestoneable.rb
new file mode 100644
index 000000000..a623aa82c
--- /dev/null
+++ b/spec/shared/features/milestoneable.rb
@@ -0,0 +1,58 @@
+shared_examples "milestoneable" do |factory_name, path_name|
+ let!(:milestoneable) { create(factory_name) }
+
+ feature "Show milestones" do
+ let(:path) { send(path_name, *resource_hierarchy_for(milestoneable)) }
+
+ scenario "Show milestones", :js do
+ create(:milestone, milestoneable: milestoneable,
+ description_en: "Last milestone with a link to https://consul.dev",
+ description_es: "Último hito con el link https://consul.dev",
+ publication_date: Date.tomorrow)
+
+ first_milestone = create(:milestone, milestoneable: milestoneable,
+ description: "First milestone",
+ publication_date: Date.yesterday)
+ image = create(:image, imageable: first_milestone)
+ document = create(:document, documentable: first_milestone)
+
+ login_as(create(:user))
+ visit path
+
+ find("#tab-milestones-label").click
+
+ within("#tab-milestones") do
+ expect(first_milestone.description).to appear_before('Last milestone with a link to https://consul.dev')
+ expect(page).to have_content(Date.tomorrow)
+ expect(page).to have_content(Date.yesterday)
+ expect(page).not_to have_content(Date.current)
+ expect(page.find("#image_#{first_milestone.id}")['alt']).to have_content(image.title)
+ expect(page).to have_link(document.title)
+ expect(page).to have_link("https://consul.dev")
+ expect(page).to have_content(first_milestone.status.name)
+ end
+
+ select('Español', from: 'locale-switcher')
+
+ find("#tab-milestones-label").click
+
+ within("#tab-milestones") do
+ expect(page).to have_content('Último hito con el link https://consul.dev')
+ expect(page).to have_link("https://consul.dev")
+ end
+ end
+
+ scenario "Show no_milestones text", :js do
+ create(:budget_investment)
+ login_as(create(:user))
+
+ visit path
+
+ find("#tab-milestones-label").click
+
+ within("#tab-milestones") do
+ expect(page).to have_content("Don't have defined milestones")
+ end
+ end
+ end
+end