| <%= milestone.id %> |
@@ -56,3 +58,10 @@
<% else %>
<%= t("admin.milestones.index.no_milestones") %>
<% end %>
+
+
+ <%= link_to t("admin.milestones.index.new_milestone"),
+ polymorphic_path([:admin, *resource_hierarchy_for(milestoneable.milestones.new)],
+ action: :new),
+ class: "button hollow" %>
+
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/admin.yml b/config/locales/ast/admin.yml
index 6cf7784cd..d5a6e9009 100644
--- a/config/locales/ast/admin.yml
+++ b/config/locales/ast/admin.yml
@@ -79,8 +79,6 @@ ast:
edit_classification: Editar clasificación
by: Autor
sent: Fecha
- milestone: Siguimientu
- new_milestone: Crear nuevu finxu
winner:
title: Ganadora
edit:
@@ -91,6 +89,8 @@ ast:
milestones:
index:
delete: "Esaniciar finxu"
+ milestone: Siguimientu
+ new_milestone: Crear nuevu finxu
new:
creating: Crear finxu
edit:
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/admin.yml b/config/locales/de-DE/admin.yml
index 715b905b4..4f3f54b5a 100644
--- a/config/locales/de-DE/admin.yml
+++ b/config/locales/de-DE/admin.yml
@@ -219,8 +219,6 @@ de:
tags: Tags
user_tags: Benutzer*innentags
undefined: Undefiniert
- milestone: Meilenstein
- new_milestone: Neuen Meilenstein erstellen
compatibility:
title: Kompatibilität
"true": Inkompatibel
@@ -268,6 +266,8 @@ de:
image: "Bild"
show_image: "Bild anzeigen"
documents: "Dokumente"
+ milestone: Meilenstein
+ new_milestone: Neuen Meilenstein erstellen
form:
admin_statuses: Status des Ausgabenvorschlags verwalten
no_statuses_defined: Es wurde noch kein Status für diese Ausgabenvorschläge definiert
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/admin.yml b/config/locales/en/admin.yml
index 6b85afdf0..0fd2a0d56 100644
--- a/config/locales/en/admin.yml
+++ b/config/locales/en/admin.yml
@@ -226,8 +226,6 @@ en:
tags: Tags
user_tags: User tags
undefined: Undefined
- milestone: Milestone
- new_milestone: Create new milestone
compatibility:
title: Compatibility
"true": Incompatible
@@ -275,6 +273,8 @@ en:
image: "Image"
show_image: "Show image"
documents: "Documents"
+ milestone: Milestone
+ new_milestone: Create new milestone
form:
admin_statuses: Admin investment statuses
no_statuses_defined: There are no defined investment statuses yet
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/admin.yml b/config/locales/es-AR/admin.yml
index f6e23985a..d4ac0f6d9 100644
--- a/config/locales/es-AR/admin.yml
+++ b/config/locales/es-AR/admin.yml
@@ -192,8 +192,6 @@ es-AR:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
"true": Incompatible
@@ -241,6 +239,8 @@ es-AR:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
form:
admin_statuses: Administrar estados de inversión
no_statuses_defined: No hay estados de inversión definidos aún
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/admin.yml b/config/locales/es-BO/admin.yml
index afb2fefdd..00bd85478 100644
--- a/config/locales/es-BO/admin.yml
+++ b/config/locales/es-BO/admin.yml
@@ -144,8 +144,6 @@ es-BO:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
selection:
@@ -180,6 +178,8 @@ es-BO:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
new:
creating: Crear hito
date: Fecha
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/admin.yml b/config/locales/es-CL/admin.yml
index 4a69fe2ea..85d944593 100644
--- a/config/locales/es-CL/admin.yml
+++ b/config/locales/es-CL/admin.yml
@@ -203,8 +203,6 @@ es-CL:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
selection:
@@ -244,6 +242,8 @@ es-CL:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
new:
creating: Crear hito
date: Fecha
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/admin.yml b/config/locales/es-CO/admin.yml
index 8f34dfe18..570b67497 100644
--- a/config/locales/es-CO/admin.yml
+++ b/config/locales/es-CO/admin.yml
@@ -144,8 +144,6 @@ es-CO:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
selection:
@@ -180,6 +178,8 @@ es-CO:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
new:
creating: Crear hito
date: Fecha
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/admin.yml b/config/locales/es-CR/admin.yml
index 965b7c0ad..17ab00733 100644
--- a/config/locales/es-CR/admin.yml
+++ b/config/locales/es-CR/admin.yml
@@ -144,8 +144,6 @@ es-CR:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
selection:
@@ -180,6 +178,8 @@ es-CR:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
new:
creating: Crear hito
date: Fecha
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/admin.yml b/config/locales/es-DO/admin.yml
index 15248078f..b402bea4e 100644
--- a/config/locales/es-DO/admin.yml
+++ b/config/locales/es-DO/admin.yml
@@ -144,8 +144,6 @@ es-DO:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
selection:
@@ -180,6 +178,8 @@ es-DO:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
new:
creating: Crear hito
date: Fecha
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/admin.yml b/config/locales/es-EC/admin.yml
index 86e3e5759..ae2f734c7 100644
--- a/config/locales/es-EC/admin.yml
+++ b/config/locales/es-EC/admin.yml
@@ -144,8 +144,6 @@ es-EC:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
selection:
@@ -180,6 +178,8 @@ es-EC:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
new:
creating: Crear hito
date: Fecha
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/admin.yml b/config/locales/es-GT/admin.yml
index 2e17a78cc..3729767ce 100644
--- a/config/locales/es-GT/admin.yml
+++ b/config/locales/es-GT/admin.yml
@@ -144,8 +144,6 @@ es-GT:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
selection:
@@ -180,6 +178,8 @@ es-GT:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
new:
creating: Crear hito
date: Fecha
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/admin.yml b/config/locales/es-HN/admin.yml
index e1c75fc71..521b88143 100644
--- a/config/locales/es-HN/admin.yml
+++ b/config/locales/es-HN/admin.yml
@@ -144,8 +144,6 @@ es-HN:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
selection:
@@ -180,6 +178,8 @@ es-HN:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
new:
creating: Crear hito
date: Fecha
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/admin.yml b/config/locales/es-MX/admin.yml
index e1828cbf9..6705e24d1 100644
--- a/config/locales/es-MX/admin.yml
+++ b/config/locales/es-MX/admin.yml
@@ -144,8 +144,6 @@ es-MX:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
selection:
@@ -180,6 +178,8 @@ es-MX:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
new:
creating: Crear hito
date: Fecha
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/admin.yml b/config/locales/es-NI/admin.yml
index 3f810fdf9..e46e159d8 100644
--- a/config/locales/es-NI/admin.yml
+++ b/config/locales/es-NI/admin.yml
@@ -144,8 +144,6 @@ es-NI:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
selection:
@@ -180,6 +178,8 @@ es-NI:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
new:
creating: Crear hito
date: Fecha
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/admin.yml b/config/locales/es-PA/admin.yml
index cce514212..63ea3086c 100644
--- a/config/locales/es-PA/admin.yml
+++ b/config/locales/es-PA/admin.yml
@@ -144,8 +144,6 @@ es-PA:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
selection:
@@ -180,6 +178,8 @@ es-PA:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
new:
creating: Crear hito
date: Fecha
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/admin.yml b/config/locales/es-PE/admin.yml
index dec901512..aff2029b1 100644
--- a/config/locales/es-PE/admin.yml
+++ b/config/locales/es-PE/admin.yml
@@ -144,8 +144,6 @@ es-PE:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
selection:
@@ -180,6 +178,8 @@ es-PE:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
new:
creating: Crear hito
date: Fecha
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/admin.yml b/config/locales/es-PR/admin.yml
index 3ab25fd5c..0ea2808aa 100644
--- a/config/locales/es-PR/admin.yml
+++ b/config/locales/es-PR/admin.yml
@@ -144,8 +144,6 @@ es-PR:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
selection:
@@ -180,6 +178,8 @@ es-PR:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
new:
creating: Crear hito
date: Fecha
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/admin.yml b/config/locales/es-PY/admin.yml
index d8b85a909..a0e200e23 100644
--- a/config/locales/es-PY/admin.yml
+++ b/config/locales/es-PY/admin.yml
@@ -144,8 +144,6 @@ es-PY:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
selection:
@@ -180,6 +178,8 @@ es-PY:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
new:
creating: Crear hito
date: Fecha
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/admin.yml b/config/locales/es-SV/admin.yml
index 40c1dae93..1ddc90588 100644
--- a/config/locales/es-SV/admin.yml
+++ b/config/locales/es-SV/admin.yml
@@ -144,8 +144,6 @@ es-SV:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
selection:
@@ -180,6 +178,8 @@ es-SV:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
new:
creating: Crear hito
date: Fecha
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/admin.yml b/config/locales/es-UY/admin.yml
index a8857cab4..c4197f736 100644
--- a/config/locales/es-UY/admin.yml
+++ b/config/locales/es-UY/admin.yml
@@ -144,8 +144,6 @@ es-UY:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
selection:
@@ -180,6 +178,8 @@ es-UY:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
new:
creating: Crear hito
date: Fecha
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/admin.yml b/config/locales/es-VE/admin.yml
index 6da4ba856..6c0966464 100644
--- a/config/locales/es-VE/admin.yml
+++ b/config/locales/es-VE/admin.yml
@@ -181,8 +181,6 @@ es-VE:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
"true": Incompatible
@@ -221,6 +219,8 @@ es-VE:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
new:
creating: Crear hito
date: Fecha
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/admin.yml b/config/locales/es/admin.yml
index 784b213d0..5798dd0b1 100644
--- a/config/locales/es/admin.yml
+++ b/config/locales/es/admin.yml
@@ -223,8 +223,6 @@ es:
tags: Etiquetas
user_tags: Etiquetas del usuario
undefined: Sin definir
- milestone: Seguimiento
- new_milestone: Crear nuevo hito
compatibility:
title: Compatibilidad
"true": Incompatible
@@ -272,6 +270,8 @@ es:
image: "Imagen"
show_image: "Mostrar imagen"
documents: "Documentos"
+ milestone: Seguimiento
+ new_milestone: Crear nuevo hito
form:
admin_statuses: Gestionar estados de proyectos
no_statuses_defined: No hay estados definidos
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/admin.yml b/config/locales/fa-IR/admin.yml
index d80d5edee..eab3e98b3 100644
--- a/config/locales/fa-IR/admin.yml
+++ b/config/locales/fa-IR/admin.yml
@@ -188,8 +188,6 @@ fa:
tags: برچسب ها
user_tags: برچسب های کاربر
undefined: تعریف نشده
- milestone: نقطه عطف
- new_milestone: ایجاد نقطه عطف جدید
compatibility:
title: سازگاری
"true": ناسازگار
@@ -236,6 +234,8 @@ fa:
image: "تصویر"
show_image: "نمایش تصویر"
documents: "اسناد"
+ milestone: نقطه عطف
+ new_milestone: ایجاد نقطه عطف جدید
new:
creating: ایجاد نقطه عطف جدید
date: تاریخ
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/admin.yml b/config/locales/fr/admin.yml
index 069cdabd3..d39bd3364 100644
--- a/config/locales/fr/admin.yml
+++ b/config/locales/fr/admin.yml
@@ -218,8 +218,6 @@ fr:
tags: Étiquettes
user_tags: Tags de l’utilisateur
undefined: Indéterminé
- milestone: Jalon
- new_milestone: Créer nouveau jalon
compatibility:
title: Compatibilité
"true": Incompatibles
@@ -267,6 +265,8 @@ fr:
image: "Image"
show_image: "Afficher l'image"
documents: "Documents"
+ milestone: Jalon
+ new_milestone: Créer nouveau jalon
form:
admin_statuses: Administrer les statuts d'investissement
no_statuses_defined: Il n'y a pas encore de statuts d'investissement définis
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/admin.yml b/config/locales/gl/admin.yml
index d90fd9849..d2db4638b 100644
--- a/config/locales/gl/admin.yml
+++ b/config/locales/gl/admin.yml
@@ -220,8 +220,6 @@ gl:
tags: Etiquetas
user_tags: Etiquetas do usuario
undefined: Sen definir
- milestone: Seguimento
- new_milestone: Crear novo seguimento
compatibility:
title: Compatibilidade
"true": Incompatible
@@ -269,6 +267,8 @@ gl:
image: "Imaxe"
show_image: "Amosar imaxe"
documents: "Documentos"
+ milestone: Seguimento
+ new_milestone: Crear novo seguimento
form:
admin_statuses: Administrar estados de investimento
no_statuses_defined: Aínda non se definirion os estados dos investimentos
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/admin.yml b/config/locales/id-ID/admin.yml
index cc0748d22..385104035 100644
--- a/config/locales/id-ID/admin.yml
+++ b/config/locales/id-ID/admin.yml
@@ -181,8 +181,6 @@ id:
tags: Tag
user_tags: Tag Pengguna
undefined: Tidak terdefinisi
- milestone: Batu peringatan
- new_milestone: Membuat batu peringatan baru
compatibility:
title: Kecocokan
"true": Tidak cocok
@@ -221,6 +219,8 @@ id:
image: "Gambar"
show_image: "Tampilkan gambar"
documents: "Dokumen"
+ milestone: Batu peringatan
+ new_milestone: Membuat batu peringatan baru
new:
creating: Membuat batu peringatan
date: Tanggal
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/admin.yml b/config/locales/it/admin.yml
index 840d6cb53..9393b8805 100644
--- a/config/locales/it/admin.yml
+++ b/config/locales/it/admin.yml
@@ -219,8 +219,6 @@ it:
tags: Etichette
user_tags: Etichette utente
undefined: Non definito
- milestone: Traguardo
- new_milestone: Crea nuovo traguardo
compatibility:
title: Compatibilità
"true": Incompatibile
@@ -268,6 +266,8 @@ it:
image: "Immagine"
show_image: "Mostra immagine"
documents: "Documenti"
+ milestone: Traguardo
+ new_milestone: Crea nuovo traguardo
form:
no_statuses_defined: Non ci sono ancora status d’investimento definiti
new:
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/admin.yml b/config/locales/nl/admin.yml
index e6267fcea..5e2cf8f0a 100644
--- a/config/locales/nl/admin.yml
+++ b/config/locales/nl/admin.yml
@@ -219,8 +219,6 @@ nl:
tags: Labels
user_tags: Deelnemerslabels
undefined: Niet gedefinieerd
- milestone: Mijlpaal
- new_milestone: Nieuwe mijlpaal
compatibility:
title: Compatibiliteit
"true": Niet compatibel
@@ -268,6 +266,8 @@ nl:
image: "Afbeelding"
show_image: "Toon afbeelding"
documents: "Documenten"
+ milestone: Mijlpaal
+ new_milestone: Nieuwe mijlpaal
form:
admin_statuses: Beheerderstatussen
no_statuses_defined: Er zijn nog geen gedefinieerde investeringsstatussen
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/admin.yml b/config/locales/pl-PL/admin.yml
index 81104831d..dbd89aabd 100644
--- a/config/locales/pl-PL/admin.yml
+++ b/config/locales/pl-PL/admin.yml
@@ -223,8 +223,6 @@ pl:
tags: Tagi
user_tags: Tagi użytkownika
undefined: Niezdefiniowany
- milestone: Wydarzenie
- new_milestone: Utwórz wydarzenie
compatibility:
title: Zgodność
"true": Niezgodne
@@ -272,6 +270,8 @@ pl:
image: "Obraz"
show_image: "Pokaż obraz"
documents: "Dokumenty"
+ milestone: Wydarzenie
+ new_milestone: Utwórz wydarzenie
form:
admin_statuses: Zarządzaj statusami inwestycyjnymi
no_statuses_defined: Nie ma jeszcze zdefiniowanych statusów inwestycyjnych
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/admin.yml b/config/locales/pt-BR/admin.yml
index 2d5457e3b..2da5218a8 100644
--- a/config/locales/pt-BR/admin.yml
+++ b/config/locales/pt-BR/admin.yml
@@ -219,8 +219,6 @@ pt-BR:
tags: Marcações
user_tags: Marcações do usuário
undefined: Não definido
- milestone: Marco
- new_milestone: Criar marco
compatibility:
title: Compatibilidade
"true": Incompatível
@@ -268,6 +266,8 @@ pt-BR:
image: "Imagem"
show_image: "Exibir imagem"
documents: "Documentos"
+ milestone: Marco
+ new_milestone: Criar marco
form:
admin_statuses: Status dos investimentos para administrador
no_statuses_defined: Ainda não há status de investimento definidos
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/admin.yml b/config/locales/sq-AL/admin.yml
index 74f25c2db..afa2b680d 100644
--- a/config/locales/sq-AL/admin.yml
+++ b/config/locales/sq-AL/admin.yml
@@ -219,8 +219,6 @@ sq:
tags: Etiketimet
user_tags: Përdorues të etiketuar
undefined: E padefinuar
- milestone: Moment historik
- new_milestone: Krijo momentet historik të ri
compatibility:
title: Pajtueshmëri
"true": I papajtueshëm
@@ -268,6 +266,8 @@ sq:
image: "Imazh"
show_image: "Trego imazhin"
documents: "Dokumentet"
+ milestone: Moment historik
+ new_milestone: Krijo momentet historik të ri
form:
admin_statuses: Statusi i investimeve të administratorit
no_statuses_defined: Ende nuk ka statuse të përcaktuara për investime
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/admin.yml b/config/locales/sv-SE/admin.yml
index 4e6d49059..5886863f6 100644
--- a/config/locales/sv-SE/admin.yml
+++ b/config/locales/sv-SE/admin.yml
@@ -219,8 +219,6 @@ sv:
tags: Taggar
user_tags: Användartaggar
undefined: Odefinierat
- milestone: Milstolpe
- new_milestone: Skapa ny milstolpe
compatibility:
title: Kompatibilitet
"true": Oförenlig
@@ -268,6 +266,8 @@ sv:
image: "Bild"
show_image: "Visa bild"
documents: "Dokument"
+ milestone: Milstolpe
+ new_milestone: Skapa ny milstolpe
form:
admin_statuses: Administrativ status för budgetförslag
no_statuses_defined: Det finns ingen definierad status för budgetförslag än
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/admin.yml b/config/locales/val/admin.yml
index 57dea5b0d..864530be3 100644
--- a/config/locales/val/admin.yml
+++ b/config/locales/val/admin.yml
@@ -219,8 +219,6 @@ val:
tags: Etiquetes
user_tags: Etiquetes de l'usuari
undefined: Sense definir
- milestone: Seguiment
- new_milestone: Crear nova fita
compatibility:
title: Compatibilitat
"true": Incomptatible
@@ -1046,6 +1044,8 @@ val:
image: Imatge
show_image: Mostrar imatge
moderated_content: "Revisa el contigut moderat pels moderadors, i confirma si la moderació s'ha realitzat correctament."
+ milestone: Seguiment
+ new_milestone: Crear nova fita
view: Vista
proposal: Proposta
author: Autor
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/admin.yml b/config/locales/zh-CN/admin.yml
index 10bc7eb00..87d8a99b3 100644
--- a/config/locales/zh-CN/admin.yml
+++ b/config/locales/zh-CN/admin.yml
@@ -217,8 +217,6 @@ zh-CN:
tags: 标签
user_tags: 用户标签
undefined: 未定义
- milestone: 里程碑
- new_milestone: 创建新的里程碑
compatibility:
title: 兼容性
"true": 不兼容
@@ -266,6 +264,8 @@ zh-CN:
image: "图像"
show_image: "显示图像"
documents: "文件"
+ milestone: 里程碑
+ new_milestone: 创建新的里程碑
form:
admin_statuses: 管理投资状态
no_statuses_defined: 尚未有已定义的投资状态
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/admin.yml b/config/locales/zh-TW/admin.yml
index 4e56527b4..a0366d83a 100644
--- a/config/locales/zh-TW/admin.yml
+++ b/config/locales/zh-TW/admin.yml
@@ -217,8 +217,6 @@ zh-TW:
tags: 標籤
user_tags: 用戶標籤
undefined: 未定義
- milestone: 里程碑
- new_milestone: 創建新的里程碑
compatibility:
title: 相容性
"true": 不相容
@@ -266,6 +264,8 @@ zh-TW:
image: "圖像"
show_image: "顯示圖像"
documents: "文檔"
+ milestone: 里程碑
+ new_milestone: 創建新的里程碑
form:
admin_statuses: 管理投資狀態
no_statuses_defined: 尚未有定義投資狀態
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/db/dev_seeds.rb b/db/dev_seeds.rb
index cae8eb2b2..cc568b119 100644
--- a/db/dev_seeds.rb
+++ b/db/dev_seeds.rb
@@ -36,5 +36,6 @@ require_relative 'dev_seeds/notifications'
require_relative 'dev_seeds/widgets'
require_relative 'dev_seeds/admin_notifications'
require_relative 'dev_seeds/legislation_proposals'
+require_relative 'dev_seeds/milestones'
log "All dev seeds created successfuly 👍"
diff --git a/db/dev_seeds/budgets.rb b/db/dev_seeds/budgets.rb
index cb1a17ed7..3c52c6c43 100644
--- a/db/dev_seeds/budgets.rb
+++ b/db/dev_seeds/budgets.rb
@@ -148,23 +148,3 @@ section "Creating Valuation Assignments" do
Budget::Investment.all.sample.valuators << Valuator.first
end
end
-
-section "Creating default Milestone Statuses" do
- Milestone::Status.create(name: I18n.t('seeds.budgets.statuses.studying_project'))
- Milestone::Status.create(name: I18n.t('seeds.budgets.statuses.bidding'))
- Milestone::Status.create(name: I18n.t('seeds.budgets.statuses.executing_project'))
- Milestone::Status.create(name: I18n.t('seeds.budgets.statuses.executed'))
-end
-
-section "Creating investment milestones" do
- Budget::Investment.find_each do |investment|
- milestone = investment.milestones.build(publication_date: Date.tomorrow, status_id: Milestone::Status.all.sample)
- I18n.available_locales.map do |locale|
- Globalize.with_locale(locale) do
- milestone.description = "Description for locale #{locale}"
- milestone.title = I18n.l(Time.current, format: :datetime)
- milestone.save!
- end
- end
- end
-end
diff --git a/db/dev_seeds/milestones.rb b/db/dev_seeds/milestones.rb
new file mode 100644
index 000000000..d3e2ced68
--- /dev/null
+++ b/db/dev_seeds/milestones.rb
@@ -0,0 +1,25 @@
+section "Creating default Milestone Statuses" do
+ Milestone::Status.create(name: I18n.t('seeds.budgets.statuses.studying_project'))
+ Milestone::Status.create(name: I18n.t('seeds.budgets.statuses.bidding'))
+ Milestone::Status.create(name: I18n.t('seeds.budgets.statuses.executing_project'))
+ Milestone::Status.create(name: I18n.t('seeds.budgets.statuses.executed'))
+end
+
+section "Creating investment milestones" do
+ Budget::Investment.find_each do |investment|
+ rand(1..5).times do
+ milestone = investment.milestones.build(
+ publication_date: rand(Date.tomorrow..(Date.current + 3.weeks)),
+ status_id: Milestone::Status.all.sample
+ )
+ I18n.available_locales.map do |locale|
+ Globalize.with_locale(locale) do
+ milestone.description = "Description for locale #{locale}"
+ milestone.title = I18n.l(Time.current, format: :datetime)
+ milestone.save!
+ end
+ end
+ end
+ end
+end
+
diff --git a/spec/features/admin/budget_investment_milestones_spec.rb b/spec/features/admin/budget_investment_milestones_spec.rb
index 28b05ff03..eae9786ca 100644
--- a/spec/features/admin/budget_investment_milestones_spec.rb
+++ b/spec/features/admin/budget_investment_milestones_spec.rb
@@ -2,120 +2,8 @@ require 'rails_helper'
feature 'Admin budget investment milestones' do
- background do
- admin = create(:administrator)
- login_as(admin.user)
- end
-
- let!(:investment) { create(:budget_investment) }
-
it_behaves_like "translatable",
"milestone",
"edit_admin_budget_budget_investment_milestone_path",
%w[description]
-
- context "Index" do
- scenario 'Displaying milestones' do
- milestone = create(:milestone, milestoneable: investment)
- create(:image, imageable: milestone)
- document = create(:document, documentable: milestone)
-
- visit admin_budget_budget_investment_path(investment.budget, investment)
-
- expect(page).to have_content("Milestone")
- expect(page).to have_content(milestone.title)
- expect(page).to have_content(milestone.id)
- expect(page).to have_content(milestone.publication_date.to_date)
- expect(page).to have_content(milestone.status.name)
- expect(page).to have_link 'Show image'
- expect(page).to have_link document.title
- end
-
- scenario 'Displaying no_milestones text' do
- visit admin_budget_budget_investment_path(investment.budget, investment)
-
- expect(page).to have_content("Milestone")
- expect(page).to have_content("Don't have defined milestones")
- end
- end
-
- context "New" do
- scenario "Add milestone" do
- status = create(:milestone_status)
- visit admin_budget_budget_investment_path(investment.budget, investment)
-
- click_link 'Create new milestone'
-
- select status.name, from: 'milestone_status_id'
- fill_in 'Description', with: 'New description milestone'
- fill_in 'milestone_publication_date', with: Date.current
-
- click_button 'Create milestone'
-
- expect(page).to have_content 'New description milestone'
- expect(page).to have_content Date.current
- expect(page).to have_content status.name
- end
-
- scenario "Status select is disabled if there are no statuses available" do
- visit admin_budget_budget_investment_path(investment.budget, investment)
-
- click_link 'Create new milestone'
- expect(find("#milestone_status_id").disabled?).to be true
- end
-
- scenario "Show validation errors on milestone form" do
- visit admin_budget_budget_investment_path(investment.budget, investment)
-
- click_link 'Create new milestone'
-
- fill_in 'Description', with: 'New description milestone'
-
- click_button 'Create milestone'
-
- within "#new_milestone" do
- expect(page).to have_content "can't be blank", count: 1
- expect(page).to have_content 'New description milestone'
- end
- end
- end
-
- context "Edit" do
- scenario "Change title, description and document names" do
- milestone = create(:milestone, milestoneable: investment)
- create(:image, imageable: milestone)
- document = create(:document, documentable: milestone)
-
- visit admin_budget_budget_investment_path(investment.budget, investment)
- expect(page).to have_link document.title
-
- click_link milestone.title
-
- expect(page).to have_css("img[alt='#{milestone.image.title}']")
-
- fill_in 'Description', with: 'Changed description'
- fill_in 'milestone_publication_date', with: Date.current
- fill_in 'milestone_documents_attributes_0_title', with: 'New document title'
-
- click_button 'Update milestone'
-
- expect(page).to have_content 'Changed description'
- expect(page).to have_content Date.current
- expect(page).to have_link 'Show image'
- expect(page).to have_link 'New document title'
- end
- end
-
- context "Delete" do
- scenario "Remove milestone" do
- milestone = create(:milestone, milestoneable: investment, title: "Title will it remove")
-
- visit admin_budget_budget_investment_path(investment.budget, investment)
-
- click_link "Delete milestone"
-
- expect(page).not_to have_content 'Title will it remove'
- end
- end
-
end
diff --git a/spec/features/admin/budget_investments_spec.rb b/spec/features/admin/budget_investments_spec.rb
index 19db58704..276e4bf2b 100644
--- a/spec/features/admin/budget_investments_spec.rb
+++ b/spec/features/admin/budget_investments_spec.rb
@@ -7,6 +7,10 @@ feature 'Admin budget investments' do
create(:administrator, user: create(:user, username: 'Ana', email: 'ana@admins.org'))
end
+ it_behaves_like "admin_milestoneable",
+ :budget_investment,
+ "admin_budget_budget_investment_path"
+
background do
@admin = create(:administrator)
login_as(@admin.user)
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/admin_milestoneable.rb b/spec/shared/features/admin_milestoneable.rb
new file mode 100644
index 000000000..66b4d1301
--- /dev/null
+++ b/spec/shared/features/admin_milestoneable.rb
@@ -0,0 +1,111 @@
+shared_examples "admin_milestoneable" do |factory_name, path_name|
+
+ feature "Admin milestones" do
+ let!(:milestoneable) { create(factory_name) }
+ let(:path) { send(path_name, *resource_hierarchy_for(milestoneable)) }
+
+ context "Index" do
+ scenario 'Displaying milestones' do
+ milestone = create(:milestone, milestoneable: milestoneable)
+ create(:image, imageable: milestone)
+ document = create(:document, documentable: milestone)
+
+ visit path
+
+ expect(page).to have_content("Milestone")
+ expect(page).to have_content(milestone.title)
+ expect(page).to have_content(milestone.id)
+ expect(page).to have_content(milestone.publication_date.to_date)
+ expect(page).to have_content(milestone.status.name)
+ expect(page).to have_link 'Show image'
+ expect(page).to have_link document.title
+ end
+
+ scenario 'Displaying no_milestones text' do
+ visit path
+
+ expect(page).to have_content("Milestone")
+ expect(page).to have_content("Don't have defined milestones")
+ end
+ end
+
+ context "New" do
+ scenario "Add milestone" do
+ status = create(:milestone_status)
+ visit path
+
+ click_link 'Create new milestone'
+
+ select status.name, from: 'milestone_status_id'
+ fill_in 'Description', with: 'New description milestone'
+ fill_in 'milestone_publication_date', with: Date.current
+
+ click_button 'Create milestone'
+
+ expect(page).to have_content 'New description milestone'
+ expect(page).to have_content Date.current
+ expect(page).to have_content status.name
+ end
+
+ scenario "Status select is disabled if there are no statuses available" do
+ visit path
+
+ click_link 'Create new milestone'
+ expect(find("#milestone_status_id").disabled?).to be true
+ end
+
+ scenario "Show validation errors on milestone form" do
+ visit path
+
+ click_link 'Create new milestone'
+
+ fill_in 'Description', with: 'New description milestone'
+
+ click_button 'Create milestone'
+
+ within "#new_milestone" do
+ expect(page).to have_content "can't be blank", count: 1
+ expect(page).to have_content 'New description milestone'
+ end
+ end
+ end
+
+ context "Edit" do
+ scenario "Change title, description and document names" do
+ milestone = create(:milestone, milestoneable: milestoneable)
+ create(:image, imageable: milestone)
+ document = create(:document, documentable: milestone)
+
+ visit path
+ expect(page).to have_link document.title
+
+ click_link milestone.title
+
+ expect(page).to have_css("img[alt='#{milestone.image.title}']")
+
+ fill_in 'Description', with: 'Changed description'
+ fill_in 'milestone_publication_date', with: Date.current
+ fill_in 'milestone_documents_attributes_0_title', with: 'New document title'
+
+ click_button 'Update milestone'
+
+ expect(page).to have_content 'Changed description'
+ expect(page).to have_content Date.current
+ expect(page).to have_link 'Show image'
+ expect(page).to have_link 'New document title'
+ end
+ end
+
+ context "Delete" do
+ scenario "Remove milestone" do
+ create(:milestone, milestoneable: milestoneable, title: "Title will it remove")
+
+ visit path
+
+ click_link "Delete milestone"
+
+ expect(page).not_to have_content 'Title will it remove'
+ end
+ end
+ end
+end
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
|