Changed
-
#2243 Simplified project structure:
Before:
excludes af.php ... locales af af.json auth.php pagination.php passwords.php validation-inline.php validation.php validation-nova-inline.php validation-nova.php source packages framework laravel-5.json laravel-6.json ... breeze.json cashier.json ... auth.php pagination.php passwords.php validation-inline.php validation.php
After:
locales af _excludes.json json.json json-inline.json php.json php-inline.json source breeze 1.x breeze.json framework extended.json 6.x framework.json 7.x framework.json laravel 6.x auth.php pagination.php passwords.php validation.php ...
-
Now the project can store translations for different versions of the project. For example, in Laravel 9 the validation.password key is an array, while in older versions it is a string.
"password": "Le mot de passe est incorrect", "password.letters": "The :attribute must contain at least one letter.", "password.mixed": "The :attribute must contain at least one uppercase and one lowercase letter.", "password.numbers": "The :attribute must contain at least one number.", "password.symbols": "The :attribute must contain at least one symbol.", "password.uncompromised": "The given :attribute has appeared in a data leak. Please choose a different :attribute.",
Laravel 8:
// validation.php return [ 'password' => 'The password is incorrect.', ],
Laravel 9:
// validation.php return [ 'password' => [ 'letters' => 'The :attribute must contain at least one letter.', 'mixed' => 'The :attribute must contain at least one uppercase and one lowercase letter.', 'numbers' => 'The :attribute must contain at least one number.', 'symbols' => 'The :attribute must contain at least one symbol.', 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', ], ],
Using the 14th version of our
publisher
, he himself can determine the installed version and use the necessary keys. -
Now we don't need to manually create the inline translation source file. When an occurrence in the :attribute string is found, the script will automatically collect such values and create keys for inline translations.
-
Added automatic download and copying of translation files to the project. This will keep the keys up to date across multiple versions. For example, Laravel 6, 7, 8 and 9.