@@ -69,13 +69,13 @@ public static function form(Schema $form): Schema
6969 Section::make ()
7070 ->schema ([
7171 TextInput::make ('title ' )
72- ->label (' Title ' ),
72+ ->label (__ ( ' packages::fields.title ' ) ),
7373 TextInput::make ('name ' )
74- ->label (' Name ' ),
74+ ->label (__ ( ' packages::fields.name ' ) ),
7575 TextInput::make ('vendor ' )
76- ->label (' Vendor ' ),
76+ ->label (__ ( ' packages::fields.vendor ' ) ),
7777 Select::make ('package_type ' )
78- ->label (' Package Type ' )
78+ ->label (__ ( ' packages::fields.package_type ' ) )
7979 ->options ([
8080 'moox_package ' => 'Moox Package ' ,
8181 'moox_compatible ' => 'Moox Compatible ' ,
@@ -85,32 +85,32 @@ public static function form(Schema $form): Schema
8585 'php_package ' => 'PHP Package ' ,
8686 ]),
8787 Toggle::make ('is_theme ' )
88- ->label (' Is Theme ' ),
88+ ->label (__ ( ' packages::fields.is_theme ' ) ),
8989 TextInput::make ('version_installed ' )
90- ->label (' Version Installed ' ),
90+ ->label (__ ( ' packages::fields.version_installed ' ) ),
9191 Select::make ('install_status ' )
92- ->label (' Install Status ' )
92+ ->label (__ ( ' packages::fields.install_status ' ) )
9393 ->options ([
9494 'available ' => 'Available ' ,
9595 'installed ' => 'Installed ' ,
9696 'active ' => 'Active ' ,
9797 ]),
9898 Select::make ('update_status ' )
99- ->label (' Update Status ' )
99+ ->label (__ ( ' packages::fields.update_status ' ) )
100100 ->options ([
101101 'up-to-date ' => 'Up to Date ' ,
102102 'update-available ' => 'Update Available ' ,
103103 'update-scheduled ' => 'Update Scheduled ' ,
104104 'update-failed ' => 'Update Failed ' ,
105105 ]),
106106 Toggle::make ('auto_update ' )
107- ->label (' Auto Update ' ),
107+ ->label (__ ( ' packages::fields.auto_update ' ) ),
108108 DateTimePicker::make ('update_scheduled_at ' )
109- ->label (' Update Scheduled At ' ),
109+ ->label (__ ( ' packages::fields.update_scheduled_at ' ) ),
110110 TextInput::make ('installed_by_type ' )
111- ->label (' Installed By Type ' ),
111+ ->label (__ ( ' packages::fields.installed_by_type ' ) ),
112112 KeyValue::make ('activation_steps ' )
113- ->label (' Activation Steps ' )
113+ ->label (__ ( ' packages::fields.activation_steps ' ) )
114114 ->keyLabel ('Step ' )
115115 ->valueLabel ('Description ' )
116116 ->addActionLabel ('Add Step ' )
@@ -134,34 +134,35 @@ public static function form(Schema $form): Schema
134134 Section::make ('' )
135135 ->schema ([
136136 CopyableField::make ('id ' )
137- ->label ('ID ' )
138- ->defaultValue (fn ($ record ): string => $ record ->id ?? '' ),
137+ ->label (__ ('packages::fields.id ' ))
138+ ->defaultValue (fn ($ record ): string => $ record ->id ?? '' ),
139+
139140
140141 Section::make ('' )
141142 ->schema ([
142- TextEntry ::make ('created_at ' )
143- ->label (' Created ' )
144- ->state (fn ($ record ): string => $ record ->created_at ?
145- $ record ->created_at . ' - ' . $ record ->created_at ->diffForHumans () : '' )
143+ Placeholder ::make ('created_at ' )
144+ ->label (__ ( ' packages::fields.created_at ' ) )
145+ ->content (fn ($ record ): string => $ record ->created_at ?
146+ $ record ->created_at . ' - ' . $ record ->created_at ->diffForHumans () : '' )
146147 ->extraAttributes (['class ' => 'font-mono ' ]),
147- TextEntry ::make ('installed_at ' )
148- ->label (' Installed At ' )
149- ->state (fn ($ record ): string => $ record ->installed_at ?
150- $ record ->installed_at . ' - ' . $ record ->installed_at ->diffForHumans () : '' )
148+ Placeholder ::make ('installed_at ' )
149+ ->label (__ ( ' packages::fields.installed_at ' ) )
150+ ->content (fn ($ record ): string => $ record ->installed_at ?
151+ $ record ->installed_at . ' - ' . $ record ->installed_at ->diffForHumans () : '' )
151152 ->extraAttributes (['class ' => 'font-mono ' ]),
152- TextEntry ::make ('installed_by ' )
153- ->label (' Installed By ' )
154- ->state (fn ($ record ): string => $ record ->installed_by ?
153+ Placeholder ::make ('installed_by ' )
154+ ->label (__ ( ' packages::fields.installed_by ' ) )
155+ ->content (fn ($ record ): string => $ record ->installed_by ?
155156 $ record ->installed_by ->name : '' )
156157 ->extraAttributes (['class ' => 'font-mono ' ]),
157- TextEntry ::make ('updated_at ' )
158- ->label (' Updated At ' )
159- ->state (fn ($ record ): string => $ record ->updated_at ?
160- $ record ->updated_at . ' - ' . $ record ->updated_at ->diffForHumans () : '' )
158+ Placeholder ::make ('updated_at ' )
159+ ->label (__ ( ' packages::fields.updated_at ' ) )
160+ ->content (fn ($ record ): string => $ record ->updated_at ?
161+ $ record ->updated_at . ' - ' . $ record ->updated_at ->diffForHumans () : '' )
161162 ->extraAttributes (['class ' => 'font-mono ' ]),
162- TextEntry ::make ('updated_by ' )
163- ->label (' Updated By ' )
164- ->state (fn ($ record ): string => $ record ->updated_by ?
163+ Placeholder ::make ('updated_by ' )
164+ ->label (__ ( ' packages::fields.updated_by ' ) )
165+ ->content (fn ($ record ): string => $ record ->updated_by ?
165166 $ record ->updated_by ->name : '' )
166167 ->extraAttributes (['class ' => 'font-mono ' ]),
167168 ]),
@@ -182,33 +183,40 @@ public static function table(Table $table): Table
182183 return $ table
183184 ->columns ([
184185 TextColumn::make ('title ' )
186+ ->label (__ ('packages::fields.title ' ))
185187 ->searchable ()
186188 ->sortable ()
187189 ->formatStateUsing (fn ($ state ): string => ucfirst ($ state )),
188190 TextColumn::make ('name ' )
189- ->label (' Packagist ' )
190- ->formatStateUsing (fn ($ record ) => "{$ record ->vendor }/ {$ record ->name }" )
191+ ->label (__ ( ' packages::fields.packagist ' ) )
192+ ->formatStateUsing (fn ($ record ) => "{$ record ->vendor }/ {$ record ->name }" )
191193 ->searchable ()
192194 ->sortable (),
193195 TextColumn::make ('package_type ' )
196+ ->label (__ ('packages::fields.package_type ' ))
194197 ->searchable ()
195198 ->sortable ()
196199 ->formatStateUsing (fn ($ state ): string => ucwords (str_replace ('_ ' , ' ' , $ state ))),
197200 TextColumn::make ('version_installed ' )
201+ ->label (__ ('packages::fields.version_installed ' ))
198202 ->searchable ()
199203 ->sortable (),
200204 TextColumn::make ('install_status ' )
205+ ->label (__ ('packages::fields.install_status ' ))
201206 ->searchable ()
202207 ->sortable ()
203208 ->formatStateUsing (fn ($ state ): string => ucfirst ($ state )),
204209 TextColumn::make ('update_status ' )
210+ ->label (__ ('packages::fields.update_status ' ))
205211 ->searchable ()
206212 ->sortable ()
207213 ->formatStateUsing (fn ($ state ): string => ucwords (str_replace ('- ' , ' ' , $ state ))),
208214 ToggleColumn::make ('auto_update ' )
215+ ->label (__ ('packages::fields.auto_update ' ))
209216 ->searchable ()
210217 ->sortable (),
211218 TextColumn::make ('updated_at ' )
219+ ->label (__ ('packages::fields.updated_at ' ))
212220 ->searchable ()
213221 ->sortable (),
214222 ])
@@ -218,16 +226,16 @@ public static function table(Table $table): Table
218226 ])
219227 ->filters ([
220228 SelectFilter::make ('install_status ' )
221- ->label (' Install Status ' )
222- ->placeholder (__ ('core::core.filter ' ). ' Install Status ' )
229+ ->label (__ ( ' packages::fields.install_status ' ) )
230+ ->placeholder (__ ('core::core.filter ' ) . ' Install Status ' )
223231 ->options (['available ' => 'Available ' , 'installed ' => 'Installed ' , 'active ' => 'Active ' ]),
224232 SelectFilter::make ('package_type ' )
225- ->label (' Package Type ' )
226- ->placeholder (__ ('core::core.filter ' ). ' Package Type ' )
233+ ->label (__ ( ' packages::fields.package_type ' ) )
234+ ->placeholder (__ ('core::core.filter ' ) . ' Package Type ' )
227235 ->options (['moox_package ' => 'Moox Package ' , 'moox_compatible ' => 'Moox Compatible ' , 'moox_dependency ' => 'Moox Dependency ' , 'filament_plugin ' => 'Filament Plugin ' , 'laravel_package ' => 'Laravel Package ' , 'php_package ' => 'PHP Package ' ]),
228236 SelectFilter::make ('update_status ' )
229- ->label (' Update Status ' )
230- ->placeholder (__ ('core::core.filter ' ). ' Update Status ' )
237+ ->label (__ ( ' packages::fields.update_status ' ) )
238+ ->placeholder (__ ('core::core.filter ' ) . ' Update Status ' )
231239 ->options (['up-to-date ' => 'Up to Date ' , 'update-available ' => 'Update Available ' , 'update-scheduled ' => 'Update Scheduled ' , 'update-failed ' => 'Update Failed ' ]),
232240 ]);
233241 }
0 commit comments