laravelio / laravel.io

The Laravel.io Community Portal.
https://laravel.io
MIT License
2.45k stars 654 forks source link

Move language strings from lang dir to inline usage #1059

Closed driesvints closed 6 months ago

driesvints commented 7 months ago

After reflecting upon it I believe it's better to keep the language strings in the places where's they're used. This keeps a smaller footprint and easier way to edit them without having to move through different language files.

So how this would go is that we need to replace the keys with their actual language strings:

$this->success('settings.deleted');

Becomes

$this->success('Account was successfully removed.');

Additionally, SendsAlerts should be updated to use the __() helper instead of the obsolete trans helper.

Lastly, all language files, including its directory should be removed. It's not needed to add an en.json language file because it's highly unlikely we'll ever offer multi language support for Laravel.io