Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing translation keys #35

Open
digitall-it opened this issue Nov 23, 2023 · 2 comments
Open

Missing translation keys #35

digitall-it opened this issue Nov 23, 2023 · 2 comments

Comments

@digitall-it
Copy link

It seems like the english translation is missing some translations, like Search for a :record, Logout, Dashboard and so on. Also, adding 'Search for a :record' as a key in the translation doesn't seem to pick it up here:

SpotlightCommandDependency::make('record')->setPlaceholder(__('Search for a :record', ['record' => $this->resource::getModelLabel()]))

I tried to clear the cache, and change both English and Italian languages to this:

'What do you want to do?', 'Search for a :record' => 'Test :record', ]; but with no avail.
@digitall-it digitall-it changed the title Missin translation keys Missing translation keys Nov 23, 2023
@pxlrbt
Copy link
Owner

pxlrbt commented Nov 23, 2023

I think the issue here is that the plugin initializes before the Translator is ready and therefore is always shows the english version. I need to look into this.

@digitall-it
Copy link
Author

I seem to remember that it wasn’t the case, in another project (I don’t remember what it was) I was able to find the correct key. Also the “placeholder” key works. This may be the occasion to search and refactor the translation keys to not use the default translations anymore, so that it becomes evident from the English translation what key to use (if it is possible).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants