diff --git a/app/views/admin/budget_investment_milestones/_form.html.erb b/app/views/admin/budget_investment_milestones/_form.html.erb index 4e7017d75..d39c736dd 100644 --- a/app/views/admin/budget_investment_milestones/_form.html.erb +++ b/app/views/admin/budget_investment_milestones/_form.html.erb @@ -1,4 +1,4 @@ -<%= render "globalize_locales" %> +<%= render "admin/shared/globalize_locales", resource: @milestone %> <%= form_for [:admin, @investment.budget, @investment, @milestone] do |f| %> diff --git a/app/views/admin/budget_investment_milestones/_globalize_locales.html.erb b/app/views/admin/shared/_globalize_locales.html.erb similarity index 80% rename from app/views/admin/budget_investment_milestones/_globalize_locales.html.erb rename to app/views/admin/shared/_globalize_locales.html.erb index b4b789ad2..977fa6d9d 100644 --- a/app/views/admin/budget_investment_milestones/_globalize_locales.html.erb +++ b/app/views/admin/shared/_globalize_locales.html.erb @@ -1,5 +1,5 @@ <% I18n.available_locales.each do |locale| %> - <%= link_to t("admin.milestones.form.remove_language"), "#", + <%= link_to t("admin.translations.remove_language"), "#", id: "delete-#{neutral_locale(locale)}", style: show_delete?(locale), class: 'float-right delete js-delete-language', @@ -11,7 +11,7 @@ <% I18n.available_locales.each do |locale| %>
  • <%= link_to name_for_locale(locale), "#", - style: css_to_display_translation?(@milestone, locale), + style: css_to_display_translation?(resource, locale), class: "js-globalize-locale-link #{highlight_current?(locale)}", data: { locale: neutral_locale(locale) }, remote: true %> @@ -22,6 +22,6 @@
    <%= select_tag :translation_locale, options_for_locale_select, - prompt: t("admin.milestones.form.add_language"), + prompt: t("admin.translations.add_language"), class: "js-globalize-locale" %>
    diff --git a/app/views/admin/site_customization/information_texts/_globalize_locales.html.erb b/app/views/admin/site_customization/information_texts/_globalize_locales.html.erb index 9e90283cd..f69e48897 100644 --- a/app/views/admin/site_customization/information_texts/_globalize_locales.html.erb +++ b/app/views/admin/site_customization/information_texts/_globalize_locales.html.erb @@ -1,5 +1,5 @@ <% I18n.available_locales.each do |locale| %> - <%= link_to t("admin.milestones.form.remove_language"), "#", + <%= link_to t("admin.translations.remove_language"), "#", id: "delete-#{neutral_locale(locale)}", style: show_delete?(locale), class: 'float-right delete js-delete-language', @@ -22,6 +22,6 @@
    <%= select_tag :translation_locale, options_for_locale_select, - prompt: t("admin.milestones.form.add_language"), + prompt: t("admin.translations.add_language"), class: "js-globalize-locale" %>
    diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index 065d506d2..bb7e45351 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -269,8 +269,6 @@ en: show_image: "Show image" documents: "Documents" form: - add_language: Add language - remove_language: Remove language admin_statuses: Admin investment statuses no_statuses_defined: There are no defined investment statuses yet new: @@ -1377,3 +1375,6 @@ en: submit_header: Save header card_title: Edit card submit_card: Save card + translations: + remove_language: Remove language + add_language: Add language diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index cc1561ffa..3fb310ae0 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -270,8 +270,6 @@ es: show_image: "Mostrar imagen" documents: "Documentos" form: - add_language: Añadir idioma - remove_language: Eliminar idioma admin_statuses: Gestionar estados de proyectos no_statuses_defined: No hay estados definidos new: @@ -1378,3 +1376,6 @@ es: submit_header: Guardar encabezado card_title: Editar tarjeta submit_card: Guardar tarjeta + translations: + add_language: Añadir idioma + remove_language: Eliminar idioma