-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Translations are going too deep #44
Comments
Found this old post, must've had the same issue months ago: wintercms/winter#448 (comment) |
Are you using the latest version of the plugin? |
This line was added to prevent exactly that: |
Yes i'm on the latest version. I have that line in the Class EventRegistry.php Composer.json has "winter/wn-translate-plugin": "~2.1.1", |
When you're in the create form, do you see only the top most title field with the localePicker (language selection) or do you also see this when creating the nested form title entry? |
…dgets at once Attempted to add a test for wintercms/wn-translate-plugin#44 but was unable to replicate the issue.
Probably cleaned code a little bit too much in my code example, fields need to be in a nestedform -> form -> tabs -> fields -> x, where 'tabs' seem to be the cause @LukeTowers So 'tabs' need to be added in the code above for the bug to happen |
Can someone please look in to this? I'm willing to pay for the fix. |
When adding a key to the $translatable array:
I noticed that the translation is picking up all
title/image/...
fieldsWhat I mean with this is that when you have the following structure (simplified it):
The translation will pick up
[title]
but alsorepeater[x][data][title]
.Meaning
[title]
will always have the value ofrepeater[lastIndex][data][title]
.This also occurs with my image (which I posted about in Discord), which is why when removing
[image]
is not working because the translation is savingrepeater[lastIndex][data][image]
in my[image]
fieldI would expect it would only pick the
title/image
field located inPlugin[image]
and that fields inside a jsonable field are ignored.The workaround is to create unique keys. Instead of
title
in repeater, userepeater_title
, ...Note that
repeater[x][data][title]
is also getting the locale switcher thingyNote how
RLTranslate
sets image on theBlog[image]
but also onBlog[blocks][0][data][image]
The text was updated successfully, but these errors were encountered: