FilamentF
Filament3y ago
2 replies
Guatashi

Trying to figure out where this string comes from

When translating the application to pt_BR, these two strings are not being translated in the subNavigation's Resource.
I'm trying to identify where they come from to submit a correction PR, but I couldn't identify it.

I know, i can do
protected static ?string $navigationLabel = 'whatever';
, but, somehow, looks like a missing translations.

Thx for you time
image.png
Solution
Strings come from the component name....


namespace Filament\Pages;

abstract class Page extends BasePage{

public static function getNavigationLabel(): string
    {
        return static::$navigationLabel ?? static::$title ?? str(class_basename(static::class))
            ->kebab()
            ->replace('-', ' ')
            ->title();
    }
}
Was this page helpful?