From 96454a41f0ad09bcb54139dce06560ccaa01d292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 8 Jan 2019 20:44:00 +0100 Subject: [PATCH] Use I18n keys instead of `human_attribute_name` Even if it means duplicating the translations in many cases, it's consistent with the rest of the application. --- app/views/admin/progress_bars/_progress_bars.html.erb | 8 ++++---- config/locales/en/admin.yml | 4 ++++ config/locales/es/admin.yml | 4 ++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/views/admin/progress_bars/_progress_bars.html.erb b/app/views/admin/progress_bars/_progress_bars.html.erb index f56f3049b..3715c2f35 100644 --- a/app/views/admin/progress_bars/_progress_bars.html.erb +++ b/app/views/admin/progress_bars/_progress_bars.html.erb @@ -11,10 +11,10 @@ - - - - + + + + diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index 6f7d9d4d5..a86f8a315 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -339,6 +339,10 @@ en: no_progress_bars: "There are no progress bars" new_progress_bar: "Create new progress bar" primary: "Primary progress bar" + table_id: "ID" + table_kind: "Type" + table_title: "Title" + table_percentage: "Current progress" new: creating: "Create progress bar" edit: diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index 60a02402f..d33d91211 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -339,6 +339,10 @@ es: no_progress_bars: "No hay barras de progreso" new_progress_bar: "Crear nueva barra de progreso" primary: "Barra de progreso principal" + table_id: "ID" + table_kind: "Tipo" + table_title: "Título" + table_percentage: "Progreso" new: creating: "Crear barra de progreso" edit:
<%= ProgressBar.human_attribute_name("id") %><%= ProgressBar.human_attribute_name("kind") %><%= ProgressBar.human_attribute_name("title") %><%= ProgressBar.human_attribute_name("percentage") %><%= t("admin.progress_bars.index.table_id") %><%= t("admin.progress_bars.index.table_kind") %><%= t("admin.progress_bars.index.table_title") %><%= t("admin.progress_bars.index.table_percentage") %> <%= t("admin.actions.actions") %>