filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
18.57k stars 2.89k forks source link

`ExportAction` / `ImportAction` doesn't respect $modelLabel defined in Resource class #13643

Open ayrtonandino opened 3 months ago

ayrtonandino commented 3 months ago

Package

filament/actions

Package Version

v3.2.95

Laravel Version

v11.16.0

Livewire Version

v3.5.4

PHP Version

PHP 8.3.6

Problem description

Filament\Actions\ExportAction and Filament\Actions\ImportAction doesn't respect $modelLabel defined in Resource class.

Expected behavior

To produce the same result as Filament\Tables\Actions\ExportBulkAction, Filament\Tables\Actions\ExportAction and Filament\Tables\Actions\ImportAction.

Steps to reproduce

Install filament-demo as usual, app is set to Spanish to show malformed labels.

For Filament\Actions\ExportAction:

Go to http://127.0.0.1:8000/shop/products/brands, select some records for bulkActions, see produced exporter labels, "Exportar brands" should be "Exportar marcas", same as labels generated by Filament\Tables\Actions\ExportBulkAction and Filament\Tables\Actions\ExportAction.

ExportAction img

For Filament\Actions\ImportAction

Go to http://127.0.0.1:8000/shop/products/categories, see produced importer labels, "Importar categories" should be "Importar categorías", same as label generated by Filament\Tables\Actions\ImportAction.

ImportAction img

Reproduction repository (issue will be closed if this is not valid)

https://github.com/ayrtonandino/filament-exporter-importer-bug

Relevant log output

No response

Donate 💰 to fund this issue

Fund with Polar

porozhnyy commented 2 months ago

They also ignore the override of the getTableRecordKey method.