Missing translation keys #35

Closed
opened 2023-11-23 07:31:35 +00:00 by digitall-it · 2 comments
digitall-it commented 2023-11-23 07:31:35 +00:00 (Migrated from github.com)

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.
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: <?php return [ 'placeholder' => 'What do you want to do?', 'Search for a :record' => 'Test :record', ]; but with no avail.
pxlrbt commented 2023-11-23 09:44:51 +00:00 (Migrated from github.com)

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.

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 commented 2023-11-23 10:07:37 +00:00 (Migrated from github.com)

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).

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 in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pxlrbt/filament-spotlight#35
No description provided.