Laravel-Lang/publisher

Publisher installs 'validation-inline' instead of 'validation'

madman-81 opened this issue · 4 comments

  • Lang Publisher Version: 12.1
  • Laravel Version: 8.80
  • PHP Version: 7.4

Description:

If you create a new project and install a language, the 'validation-inline' translations are used instead of 'validation'. Also, the original lang\en\validation.php is changed in this way.

I would have expected that either 'validation' is used or that both are installed separately.

If this is expected default behaviour, how can I choose to use 'validation' instead? Or how can I have them both installed separately?

Steps To Reproduce:

composer create-project laravel/laravel ./
composer require laravel-lang/publisher laravel-lang/lang --dev
php artisan lang:add en nl de

Most often, in applications, the validation message is displayed immediately by the input field, so the publisher uses the inline version by default

It's nice that there is an option to change this, but I would not have expected it to change the default behaviour of Laravel. I would recommend to change the default value for inline to false and allow users to set it to true if they prefer the inline messages.

Also, there is no possibility to use that both at the same time now. If the publisher would generate two files, this is possible. The configuration option could have three values: 'normal' (default), 'inline' and 'both'. The first two would generate 1 validation.php file. The last one would generate two files.

As for the default value, I'll think about it.

As for saving two files, I think this is a bad idea, since the application only uses the validation.php file by default.

The validation-inline.php file is a feature of the laravel-lang/lang project, and the publisher skillfully chooses the right option.