Incomplete translations #3239
-
Description:Incomplete translation when localization is set to another language in the app config file. Detailed steps to reproduce the issue on a fresh Nova installation:FILE: config/app.php When 'locale' => 'en' is OK: When 'locale' => 'pl' is INCOMPLETE ("Resouces" label in sidebar and "Create" button): NovaServiceProvider: |
Beta Was this translation helpful? Give feedback.
Replies: 13 comments 31 replies
-
|
This doesn't seem to be correct. |
Beta Was this translation helpful? Give feedback.
-
|
Based on code review, you shouldn't use the above code since Laravel Nova would already load |
Beta Was this translation helpful? Give feedback.
-
|
It doesn't work for me either, in my case the local language is Italian (it). Red circles are in English, green circles are in Italian. So strange... |
Beta Was this translation helpful? Give feedback.
-
|
Nothing changes by setting all language references to IT instead of EN and importing only the IT language. It still loads half in English and half in Italian. |
Beta Was this translation helpful? Give feedback.
-
|
You can refer reproducing code nova-issues/issue-3239@9bb0a0f |
Beta Was this translation helpful? Give feedback.
-
|
@crynobone I didn't understand your request |
Beta Was this translation helpful? Give feedback.
-
|
The translation is working perfect for me. I use the entire app in 'pt_BR' locale.
Ps: Nova, automatically handle the translation, so, your code adding the translation is breaking the app. Just do the 3 steps above AND remove your code in |
Beta Was this translation helpful? Give feedback.
-
|
If the localization is the same as in the provider, there are translation problems... config/app.php => 'en' and NovaServiceProvider => 'de' config/app.php => 'de' and NovaServiceProvider => 'de' NovaServiceProvider.php |
Beta Was this translation helpful? Give feedback.
-
|
I checked. I have only this: and "Resources" in the sidebar is not translated... |
Beta Was this translation helpful? Give feedback.
-
|
I've note JetStream and I still suffer this issue. I don't think JetStream
it's the point of fault, there should be an issue with Nova. Everything
works fine with translations on Laravel, but not within Nova backed. Can't
understand why
Il lun 8 mar 2021, 18:10 Marcin Lewandowski <notifications@github.com> ha
scritto:
… @crynobone <https://github.com/crynobone> I found a problem! The problem
occurs when usign translations in the JetstreamServiceProvider class, in
configurePermissions class. It's not the Nova's fault. Sorry! :(
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3239 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACUQ4HE7DOZWE774UYHK3DTCUAJFANCNFSM4XOACCRQ>
.
|
Beta Was this translation helpful? Give feedback.
-
|
I think the problem is with Laravel Nova. See:
Up to this point is fine...
E.g: and... translation in admin panel is incomplete... If I remove what is below it is fine: __('messages.welcome'); |
Beta Was this translation helpful? Give feedback.
-
|
I can confirm the same thing in Swedish. |
Beta Was this translation helpful? Give feedback.
-
|
@ekandreas, @martio, @crynobone I think here the best solution is to create a middleware and put it in nova.php before HandleInertiaRequests. 'middleware' => [
'web',
SwitchLanguage::class,
HandleInertiaRequests::class,
],This because if you use Nova::serving some translation are translated others not, so I think is a little too late. |
Beta Was this translation helpful? Give feedback.











The translation is working perfect for me. I use the entire app in 'pt_BR' locale.
You have to do just 3 things:
.jsonlang file inresources/langfolderconfig/app.php, change thelocaleto the name of your json filePs: Nova, automatically handle the translation, so, your code adding the translation is breaking the app. Just do the 3 steps above AND remove your code in
NovaServiceProviderthat the translation will work perfectly.