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

Any Payload functions that can replace getLocalizedFields? #65

Open
thompsonsj opened this issue Jul 4, 2023 · 0 comments
Open

Any Payload functions that can replace getLocalizedFields? #65

thompsonsj opened this issue Jul 4, 2023 · 0 comments

Comments

@thompsonsj
Copy link
Owner

getLocalizedFields is fairly complicated. Over time, support is added for multiple Payload field types such as group, array, blocks ...etc.

Because we are writing our own logic for this, bugs can creep in that are hard to detect! For example, consider what might happen if fields are added that get detected as localized when they shouldn't be - #64.

On the one hand, it makes sense to have our own function - we need to be involved in the recursion to control:

  • which fields are sent to fields.json;
  • which fields create their own html files; and
  • which fields are excluded.

However, https://github.com/payloadcms/payload should be studied to see if there is any logic that can be used to make this functionality more maintainable/reliable.

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