Filament Plugins

Purchase

Upgrade guide

As a result of Filament V4 having merged forms and infolists together into one concept called "schemas", the AutoTranslator had to be adapted significantly. As a result of the changes, several translation keys need to be adapted, primarily converting the keys fields and entries into components, and for action-schema translations converting form and infolist into schema. Furthermore, it would be recommended to do a thorough visual test of your application to spot any translations that might need to be adapted.

Key changes

As Filament V4 has merged forms and infolists into schemas, the AutoTranslator::translateFormText() and AutoTranslator::translateInfolistText() have been replaced with AutoTranslator::translateSchemaText(). The FormGroup and InfolistGroup enum has been consolidated into a SchemaGroup enum. If you are manually getting translations, you should do a search and replace in your application to convert any of these methods.

php
use RalphJSmit\Filament\AutoTranslator\Enums\FormGroup;
use RalphJSmit\Filament\AutoTranslator\Enums\InfolistGroup;
use RalphJSmit\Filament\AutoTranslator\Enums\SchemaGroup;

// Before (V1):
AutoTranslator::translateFormText($component, FormGroup::Fields, 'label');
AutoTranslator::translateInfolistText($component, InfolistGroup::Entries, 'label');

// After (V2):
AutoTranslator::translateSchemaText($component, SchemaGroup::Components, 'label');

Next, check your resource translations to change the keys form.fields into form.components. Also change infolist.entries into infolist.components. On action translations, change form.fields into schema.components and infolist.entries into schema.components as well.

At the end, do a thorough visual check by clicking through your application.

In case you run into anything during the upgrade, please let us know at [email protected].

© FilamentPlugins.com ✦ 2022 – 2026
PrivacyTerms & Conditions
All rights reserved.