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

ACF - Set fields as translatable #113

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

goncaloasimoes
Copy link
Contributor

closes #38

Copy link
Member

@xipasduarte xipasduarte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see how it makes sense to force all fields to be translatable. The only hook we're using is for the import operation and we delegate copying to other plugins/add-ons, so what is the actual benefit of this?

private function define_integrations() : void {
$this->define_integration_migrators();
$immediate_integrations = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if it's an overkill for now, but it seems that we might need other situations for this and we could structure things a bit better in an array that indicates when to run each integration.

@goncaloasimoes
Copy link
Contributor Author

@xipasduarte We're forcing all the fields that have translatable post/term ids to be translatable. This is used when a post's language is changed and the IDs are automatically corrected, and also when copying to another language via the duplicate-post plugin, which still needs us to fix and translate the IDs.

If we don't force all these ACF fields with translatable post/term IDs to be translatable by default, then the user can very easily run into issues where meta values contain IDs for a language that is not the post/term's language, which we obviously want to avoid.

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

Successfully merging this pull request may close these issues.

ACF Integration - set field as translatable
2 participants