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

[FEATURE] Update l10n_state if translated values do not match #98

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

Conversation

sypets
Copy link
Contributor

@sypets sypets commented Nov 30, 2023

In case TCA allowLanguageSynchronization=1 is set the value of a translated record should be the same as the value in the default language, unless l10n_state contains a configuration for the field != "parent" (e.g. "custom").

In this case the value is inconsistent because "Use value from default language" is displayed in the BE, but the value is actually different.

For better consistency, we change the configuration in l10n_state for these cases to "custom".

Resolves: #97

In case TCA allowLanguageSynchronization=1 is set the value of
a translated record should be the same as the value in the
default language, unless l10n_state contains a configuration
for the field != "parent" (e.g. "custom").

In this case the value is inconsistent because "Use value from
default language" is displayed in the BE, but the value is
actually different.

For better consistency, we change the configuration in l10n_state
for these cases to "custom".

Resolves: lolli42#97
If several fields are affected in one records,
multiple UPDATEs in the DB would overwrite
the previous change in l10n_state again.

To fix this, the fields are now all bundled
together and written in one UPDATE.
@lolli42
Copy link
Owner

lolli42 commented Mar 9, 2024

Hey Sybille.
Thanks for your patch. It looks good at first sight. I just don't find the time to look at it in detail at the moment - dealing with l10n_state is new in dbdoctor, so this needs a good review to verify its fine.

@sypets
Copy link
Contributor Author

sypets commented Mar 15, 2024

@lolli42 No worries, I already fixed this manually in our site so there is no pressure. Let me know if you need anything, e.g. to improve the PR.

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.

Add check for: Inconsistent values for fields with allowLanguageSynchronization?
2 participants