From 1914495e88dcd25eda4c28af962e0348a0e72127 Mon Sep 17 00:00:00 2001 From: scossar Date: Tue, 15 Mar 2016 10:02:10 -0700 Subject: [PATCH] make error message translatable --- config/locales/server.en.yml | 1 + lib/validators/allow_user_locale_enabled_validator.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 5396a43a131..eeb360bc94e 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1308,6 +1308,7 @@ en: pop3_polling_authentication_failed: "POP3 authentication failed. Please verify your pop3 credentials." reply_by_email_address_is_empty: "You must set a 'reply by email address' before enabling reply by email." pop3_polling_disabled: "You must first enabled POP3 polling before enabling reply by email." + user_locale_not_enabled: "You must first enable 'allow user locale' before enabling this setting." notification_types: group_mentioned: "%{group_name} was mentioned in %{link}" diff --git a/lib/validators/allow_user_locale_enabled_validator.rb b/lib/validators/allow_user_locale_enabled_validator.rb index 9f36c32d570..ebae4be4509 100644 --- a/lib/validators/allow_user_locale_enabled_validator.rb +++ b/lib/validators/allow_user_locale_enabled_validator.rb @@ -12,7 +12,7 @@ class AllowUserLocaleEnabledValidator end def error_message - "You must first enable 'allow user locale' before enabling this setting." + I18n.t("site_settings.errors.user_locale_not_enabled"); end end \ No newline at end of file