Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation interface doesn't show up when only a JsonRepeater field is translatable #2649

Open
magiceupho opened this issue Sep 9, 2024 · 0 comments

Comments

@magiceupho
Copy link

Description

I've a Model with use HasTranslation; who has a JsonRepeater containing a translatable field.
This is the only translatable field of this model, so public $translatedAttributes = [];.

The repository for this model has use HandleJsonRepeaters, HandleTranslations; and protected $jsonRepeaters = ['propertyName'];.

The translation interface doesn't show up in this configuration. In order to make it appear, I must define a fantom/empty field in the translations table and in the public $translatedAttributes = ['fantomPropertyName'];.

Steps to reproduce

Make a Model with HasTranslation and a json property, a Repository with HandleJsonRepeaters, HandleTranslations and a migration with no field in the translations table.
Make a jsonRepeater containing a translatable field.

Expected result

I expect that the translation interface show up if one or more field in the form is translatable.

Actual result

The translation interface doesn't show up.

Versions

Twill version: 3.3.1
Laravel version: 11.22.0
PHP version: 8.3.10
Database engine: mysql:latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant