Open markwalet opened 6 years ago
This would probably best be built into a package and eventually incorporated into the core.
We could do that. But I'd like to keep them in the official laravel
namespace. That makes it easier to maintain.
For accepting translation updates we could use the thumbs up/down reactions on pull requests for example. With enough positive reactions the pull-request can be safely accepted. It shouldn't be designed to be perfect. But nearly perfect. Just like the English translations.
I want to have the same approach as the make:auth
command. Making extra languages optional but easy to install with a single command that you can remember. An extra compose require
would ruin that experience.
An extra compose require would ruin that experience.
This is but a small step really. I would be fine with having another repository with "official" translations but never should this be part of the core in which translations come by default.
You have to think about the bigger picture here. You want to add this to artisan by default but there are probably a dozen others who want to add default commands as well and you end up with a list of 150 artisan commands.
Besides that you also do not want to blow up the size of the initial installation with even more files that might not get used anyways by the majority of users.
Agreed, we have to prevent that the list of artisan commands doesn't get too big. The downside of this solution is that is adds 3 extra commands.
Regarding the potentially unused files, an installation command prevents that from happening.
An administrator should make a decision here. I really want to have these translations in a official namespace and environment. It could be in a seperate package, or with install commands in the main installation.
While we are at it, validation should also support pluralization
As its stated in the doc itself:
Pluralization is a complex problem, as different languages have a variety of complex rules for pluralization.
Most of validation rules without it look silly in slavic languages.
Regarding artisan commands it should be configurable which to show.
Any updates?
Following the new laravel/ui
package, we could consider developing a new package for this under the laravel/localization
or laravel/lang
namespace. Thoughts?
Based on the following pull-request I saw this morning: https://github.com/laravel/laravel/pull/4673
I am not a fan of just adding all language packs to the default installation. This just gives too much files that hardly anyone would use anyway. I'd like an approach similar to the
php artisan make:auth
command. Which is only installing something when you need it.My idea is to create a new repository
laravel/localization
where translation files for all languages will be stored. Maybe we can collaborate with existing repositories like https://github.com/caouecs/Laravel-lang (I don't know if there are better alternatives. Just found this one with a quick search on Google)I have to main reasons for creating an official language pack repository:
Some ideas:
php artisan language:install {language}
Installs the latest version of a language pack from Github (or hosted somewhere on https://laravel.com). Throws an exception when the language folder already exists. Could also beadd
.php artisan language:fresh {language}
Reinstalls a language pack. Could also berefresh
.php artisan language:remove {language}
Removes a language folder completely. Could also bedelete
.I am reasonable experienced with Laravel and package development so I'm confident that I can help out with implementing this feature. I'd love to contribute, especially if it is on one of my own ideas.
I don't know completely sure if this is already proposed and rejected a little while ago. I did a search in the issue list and couldn't find anything. I'd love some feedback on this idea. Maybe you guys also have some interesting things that could improve this feature request.