I have a PetsController in which a flash message is installed. Something like that:
class PetsController ... def treat_dog
This controller belongs to the administrator, so it is located at: app/controllers/admin/pets_controller.rb . I will use I18n, so I replaced the line in the t('controllers.admin.pet.treated') controller t('controllers.admin.pet.treated') , then I wrote this yml:
en: controllers: admin: pet: treated: "Your dog is being treated."
located at config/locales/controllers/admin/pet/en.yml and that didn't work. I tried to find it on config/locales/controllers/admin/pets/en.yml , config/locales/controllers/admin/en.yml config/locales/controllers/en.yml and none of them worked, no translation was found.
How can I use translation from this controller?
source share