From 7f5f5d6b196a641837bfbe8a670d154c736585f7 Mon Sep 17 00:00:00 2001 From: kikito Date: Mon, 10 Aug 2015 16:24:01 +0200 Subject: [PATCH] Adds i18n for unauthorized messages --- config/i18n-tasks.yml | 4 ++++ config/locales/en.yml | 4 ++++ config/locales/es.yml | 18 ++++++++++++++++++ 3 files changed, 26 insertions(+) diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index f9b28d6a2..d556950f5 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -85,6 +85,8 @@ search: # ignore_missing: # - 'errors.messages.{accepted,blank,invalid,too_short,too_long}' # - '{devise,simple_form}.*' +ignore_missing: + - 'unauthorized.*' ## Consider these keys used: # ignore_unused: @@ -93,6 +95,8 @@ search: # - 'simple_form.{yes,no}' # - 'simple_form.{placeholders,hints,labels}.*' # - 'simple_form.{error_notification,required}.:' +ignore_unused: + - 'unauthorized.*' ## Exclude these keys from the `i18n-tasks eq-base' report: # ignore_eq_base: diff --git a/config/locales/en.yml b/config/locales/en.yml index 79e4e1129..3ab672c01 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -89,3 +89,7 @@ en: subject: Someone has commented on your debate reply: subject: Someone has replied to your comment + unauthorized: + default: "You are not authorized to access this page." + manage: + all: "You are not authorized to %{action} %{subject}." diff --git a/config/locales/es.yml b/config/locales/es.yml index 8daf07d42..5261d14c3 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -89,3 +89,21 @@ es: subject: Alguien ha comentado en tu debate reply: subject: Alguien ha respondido a tu comentario + unauthorized: + default: "No tienes permiso para acceder a esta página." + index: + all: "No tienes permiso para listar %{subject}" + show: + all: "No tienes permiso para ver %{subject}" + edit: + all: "No tienes permiso para editar %{subject}" + update: + all: "No tienes permiso para modificar %{subject}" + create: + all: "No tienes permiso para crear %{subject}" + delete: + all: "No tienes permiso para borrar %{subject}" + manage: + all: "No tienes permiso para realizar la acción '%{action}' sobre %{subject}." + +