ARCANEDEV / LogViewer

:page_with_curl: Provides a log viewer for Laravel
MIT License
2.37k stars 336 forks source link

I want to customize the names of the levels #438

Closed DanielKimmich closed 11 months ago

DanielKimmich commented 1 year ago

Description:

I want to customize the names of the levels and it is not taking said names,

Steps To Reproduce:

the translation was published php artisan log-viewer:publish --tag=translations

The file was modified for Spanish in lang/vendor/log-viewer

{ "Date": "Fecha", "The list of logs is empty!": "La lista del log está vacía!", "All": "Todos", "Emergency": "Auditoria", "Alert": "Alerta", "Critical": "Criticos", "Error": "Errores", "Warning": "Advertencia", "Notice": "LOGIN", "Info": "Info", "Debug": "Debug" }

on the web it keeps showing as "Aviso"

DanielKimmich commented 1 year ago

doing a couple of tests I could see that the file "es.json" is looking for it from the folder "lang"

and the publication is made in the folder "lang/vendor/log-viewer"

bluedasher13 commented 1 year ago

I found that the loadTranslations() method will always only read files in {base_path}/vendor/arcanedev/log-viewer/translations, instead of reading the files in {base_path}/resources/lang/vendor/log-viewer pointed to by the getTranslationsDestinationPath() method.

ARCANEDEV/Support/blob/master/src/Providers/Concerns/HasTranslations.php: https://github.com/ARCANEDEV/Support/blob/master/src/Providers/Concerns/HasTranslations.php#LL38C1-L64C1

So, it should be a bug that needs to be fixed?

arcanedev-maroc commented 11 months ago

I've released a new fix, try to update your dependencies and see if it's solves your issue Fix: https://github.com/ARCANEDEV/Support/commit/f401e1a859fe4e84331986d18ee0313e37e89810