Skip to content

Update ListLocalization.js #34

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mnediw
Copy link

@mnediw mnediw commented Jun 10, 2024

No description provided.

@dmitryd
Copy link
Owner

dmitryd commented Apr 1, 2025

There is no description of the change. Such pull requests cannot be accepted because it is unclear what it does.

@mnediw
Copy link
Author

mnediw commented Apr 1, 2025

You are absolutely right. Where has my description gone? Here it comes (again):

Say we have Records in sys_languages German (Default 0), English (1) and French (2).

With the original JS Code the buttons will look like this:
image

That looks completely right and the button for localizing to English will work as aspected. But the button for localizing to French will do completely crazy stuff: creates a second localisation to English instead.

This happens because the original code line 6 simply fetches the link from one of the buttons and sets this link to both buttons (adding &deepl=1). [So the error will not occur with only 1 language to localize to.]
And TYPO3 wont even check that there already is a localisation in this language and create a second. This will result in a complete data mess as TYPO3 cant work with 2 localisations of a record to the same language later on.

The new code iterates over all buttons and changes their links seperately.

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.

2 participants