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

Fix issue with loading translated data with arrayNames #84

Conversation

nmiyazaki-chapleau
Copy link

A previous PR I did, #83, added a fix for obtaining data with arrayNames in MLControl's getLocaleFieldName method. However, loading data with arrayNames was not implemented. This PR aims to fix this issue by doing a basic implementation within the getLocaleValue and getLocaleSaveValue methods.
It has not been thoroughly tested; the main tests were for an implementation with the Blocks plugin, which uses arrayNames.

Any input is welcome.

@LukeTowers LukeTowers requested a review from mjauvin June 7, 2024 04:05
@LukeTowers
Copy link
Member

Seems fine to me, @mjauvin any thoughts? Related: wintercms/wn-blocks-plugin#34

@mjauvin
Copy link
Member

mjauvin commented Jun 7, 2024

I'll look into this when I get back from my vacation.

@mjauvin
Copy link
Member

mjauvin commented Jun 13, 2024

A previous PR I did, #83, added a fix for obtaining data with arrayNames in MLControl's getLocaleFieldName method. However, loading data with arrayNames was not implemented. This PR aims to fix this issue by doing a basic implementation within the getLocaleValue and getLocaleSaveValue methods. It has not been thoroughly tested; the main tests were for an implementation with the Blocks plugin, which uses arrayNames.

Any input is welcome.

Does this work when $this->valueFrom is used as well?

@LukeTowers
Copy link
Member

@nmiyazaki-chapleau are you still interested in getting this merged?

@mjauvin mjauvin self-assigned this Aug 1, 2024
@mjauvin mjauvin merged commit 0e12827 into wintercms:wip-ml-repeater-fields Aug 1, 2024
3 checks passed
@nmiyazaki-chapleau nmiyazaki-chapleau deleted the wip-ml-repeater-fields branch August 1, 2024 12:55
@nmiyazaki-chapleau
Copy link
Author

A previous PR I did, #83, added a fix for obtaining data with arrayNames in MLControl's getLocaleFieldName method. However, loading data with arrayNames was not implemented. This PR aims to fix this issue by doing a basic implementation within the getLocaleValue and getLocaleSaveValue methods. It has not been thoroughly tested; the main tests were for an implementation with the Blocks plugin, which uses arrayNames.
Any input is welcome.

Does this work when $this->valueFrom is used as well?

As long as arrayName should be applied to $this->valueFrom, then yes, as this uses the $key variable.

@nmiyazaki-chapleau are you still interested in getting this merged?

Yes, thank you and thanks @mjauvin for the emrge. I haven't worked with winter in a bit, but getting these things done helps. Appreciate all the work you've done!

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

Successfully merging this pull request may close these issues.

3 participants