wire-elements / spotlight

Livewire component that brings Spotlight/Alfred-like functionality to your Laravel application.
MIT License
927 stars 72 forks source link

Localize command name and description #119

Closed Khal-ID closed 1 year ago

Khal-ID commented 1 year ago

Using Laravel helper trans() we can now put the $name and $description string values in our lang files and translate them to what we need.

PhiloNL commented 1 year ago

Thanks for the PR, but I'm not going to merge this as you localize the name and description; by overriding the getters:

    public function getDescription(): string
    {
        return trans($this->description);
    }

    public function getName(): string
    {
        return trans($this->name);
    }
Khal-ID commented 1 year ago

Thank you, that helps a lot.