biscolab/laravel-recaptcha

Laravel Nova is always in English when using this package

lisotton opened this issue · 5 comments

Describe the bug
I have an installation of Laravel Nova in the same app that I'm using this package and I noticed that Laravel Nova started to be in English after installing this package. I have the translations for Laravel Nova to Brazilian Portuguese.

To Reproduce
Steps to reproduce the behavior:

  1. Install Laravel Nova (hard to reproduce because needs a license)
  2. Change the app to a different language
  3. Create some translations for this new language
  4. Install this package
  5. Go to Nova installation and you will see that Laravel Nova is in English

Expected behavior
See Laravel Nova in configured language.

Screenshots
When this package is installed:
image

If I comment this line in ReCaptchaServiceProvider:
image

Then I have it in the correct language:
image

Environment:

  • OS and server: Docker image php8.0-apache
  • PHP version 8.0
  • Laravel version 8.68.1
  • Package version 5.0.1

As I explained I can't merge your pull request but I'm on it

If you need any other info or help to reproduce, I'm available.

I read Nova documentation https://nova.laravel.com/docs/3.0/customization/localization.html and Nova issue tracker laravel/nova-issues#2774. It seems that Nova only works with JSON translation files. It could be a good starting point. I'll keep you posted.

I'm not sure if this is the case, I'm already using JSON translation files for Nova.

@lisotton please update to v5.1.0 and add 'empty_message' => true, to the recaptcha.php config file. Please give me feedback.