Skip to content
This repository was archived by the owner on Mar 29, 2026. It is now read-only.
This repository was archived by the owner on Mar 29, 2026. It is now read-only.

The navigation group is not changing through the translation file #127

Description

@envolute

I noticed that the navigation group name file is being obtained through the configuration file, and not through the translation file... I think it must be a temporary change that was not corrected, because this way we cannot translate the term for multilingual panels.

I saw that the option "'navigation_sort' => 1" was added, which is very good, but I think the group name should continue through the translation file...

In this case the problem is in the method:

=> ..\filament-logger\src\Resources\ActivityResource.php

public static function getNavigationGroup(): ?string
{
     return __(config('filament-logger.resources.navigation_group','Settings'));
}

Which should be corrected to:

public static function getNavigationGroup(): ?string
{
     return __('filament-logger::filament-logger.nav.group');
}

Activity

  1. astondihor commented on Jan 28, 2025

    @astondihor

    @Z3d0X Thank you for the plugins.

    @envolute Try to add 'navigation_group' => 'menu.nav_group.activities' where 'menu.nav_group.activities' is in lang/en/menu.php.

    <?php
    //  config/filament-logger.php
    
    return [
        'datetime_format' => 'd/m/Y H:i:s',
        'date_format' => 'd/m/Y',
    
        'activity_resource' => \Z3d0X\FilamentLogger\Resources\ActivityResource::class,
    
        'resources' => [
            'enabled' => true,
            'log_name' => 'Resource',
            'logger' => \Z3d0X\FilamentLogger\Loggers\ResourceLogger::class,
            'color' => 'success',
            'exclude' => [
                //App\Filament\Resources\UserResource::class,
            ],
            'navigation_group' => 'menu.nav_group.activities',
        ],
    
        // ...
  2. krestaml commented on Feb 17, 2025

    @krestaml

    Hello, I see that you "broke" this in January when moving navigation_group to config.
    Found a solution myself: if you want to use filament-logger translations, use this line in config
    'navigation_group' => 'filament-logger::filament-logger.nav.group',

    Maybe this should be commented out in config in case someone wants to use it or smth. Thanks!

  3. envolute commented on Feb 20, 2025

    @envolute
    Author

    yes @krestaml
    This makes it more interesting because the change is only in the configuration file.
    But I believe that this adjustment should be made by default in config file, because in my view a label should be linked to a translation parameter so that there are no problems in multilingual applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions