diff --git a/resources/lang/en/admin.php b/resources/lang/en/admin.php new file mode 100644 index 0000000..1d83cd8 --- /dev/null +++ b/resources/lang/en/admin.php @@ -0,0 +1,6 @@ + 'Settings', + 'saved' => 'Saved', +]; diff --git a/resources/lang/nl/admin.php b/resources/lang/nl/admin.php new file mode 100644 index 0000000..f17898e --- /dev/null +++ b/resources/lang/nl/admin.php @@ -0,0 +1,6 @@ + 'Instellingen', + 'saved' => 'Opgeslagen', +]; diff --git a/resources/lang/nl/widget.php b/resources/lang/nl/widget.php new file mode 100644 index 0000000..9c5f756 --- /dev/null +++ b/resources/lang/nl/widget.php @@ -0,0 +1,8 @@ + 'OK', + 'required fields title' => 'Belangrijke instellingen', + 'setting needs check' => 'vereist aandacht', + 'save' => 'Bewaar instellingen', +]; diff --git a/src/Pages/Settings.php b/src/Pages/Settings.php index c361b9b..ea53ce5 100644 --- a/src/Pages/Settings.php +++ b/src/Pages/Settings.php @@ -9,6 +9,7 @@ use Filament\Forms\Form; use Filament\Notifications\Notification; use Filament\Pages\Page; +use Illuminate\Contracts\Support\Htmlable; class Settings extends Page { @@ -53,7 +54,7 @@ public function submit() collect($data)->each(fn ($value, $key) => $interface->set($key, $value)); Notification::make() - ->title('Settings') + ->title(self::getNavigationLabel()) ->body(__('filament-settings::admin.saved')) ->success() ->send(); @@ -80,4 +81,14 @@ protected function getHeaderWidgets(): array RequiredFieldsWidget::class, ]; } + + public static function getNavigationLabel(): string + { + return __('filament-settings::admin.settings title'); + } + + public function getTitle(): string|Htmlable + { + return self::getNavigationLabel(); + } }