Skip to content

[TASK] Streamline Localization handling #464

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 2 commits into
base: main
Choose a base branch
from

Conversation

calien666
Copy link
Member

No description provided.

@calien666 calien666 requested a review from sbuerk May 15, 2025 16:44
The issue on TYPO3 13 having the button label writing outside the
borders made a refactoring and regeneration of the localization.ts
necessary.

The labels were rewritten as CDATA to allow line breaks, getting rid of
the too long labels.

Together with TYPO3 Core standardized TSconfig for localizations the
overridden JavaScript is more lightweight and doesn't need the AjaxRoute
anymore.

Therefore the AjaxRoutes.php and AjaxController.php are removed.

In addition to Core functionality, the DeepL allow translateion now can
be enabled/disabled by the following setting in Page TSConfig:

```
# Enabled (Default)
mod.web_layout.localization.enableDeeplTranslate = 1
# Disabled
mod.web_layout.localization.enableDeeplTranslate = 0
```

This could be overridden in User TSconfig, too:
```
# Enabled (Default)
page.mod.web_layout.localization.enableDeeplTranslate = 1
# Disabled
page.mod.web_layout.localization.enableDeeplTranslate = 0
```
@calien666 calien666 force-pushed the bugfix/ts-button-text branch from 849fae5 to 4923ee5 Compare May 15, 2025 16:54
The TCEmainHook.php was intentionally added allowing the override of the
cmdMap array inside the DataHandler. As this was in older versions bad
practice and the DataHandler hardening in v13 enforced
`deepltranslate-core` introducing an own translation command as best
practice, the hook allowing `localization` inside the cmdMap array is
superfluous.
@sbuerk sbuerk force-pushed the bugfix/ts-button-text branch from 4923ee5 to cfdffc0 Compare May 15, 2025 17:08
@sbuerk
Copy link
Contributor

sbuerk commented May 15, 2025

Hardblock 🛑 -2

Points

1. localization modal / text running out of field

The "fixing" for the "label" is not "needed" in that way. That was already fixed, but limited to 13.4.3 which was an error. The core fix took longer until it got merged (13.4.10 released this week).

Here the "custom" class in the JS modal needs to be kept, and the CSS loading limit changed from <13.4.2 to <13.4.10 in ext_localconf.php.

2. change of behaviour (only v13 in current patch state

Due to the refactoring the "error/hint" when API key has not been configured are no longer shown in the selection and the deepltranslate items "disabled" (not selectable).

That means, that with missing API key the options are "simply" not available, no notice for that. Do we really want this ? (Technically it's good to remove that).

3. removed configuration lookup code / dropped ajax route and controller

I love that removal in general, even more as this removes sequentially retriggered ajax calls. However, only v13 JavaScript has been recompiled leaving the v12 JavaScript still trying to call that ajax endpoint removed with this pull request.

That means, we need to adjust the TYPO3 v12 JavaScript in the same way.

4. PageTS options

This is nice, but that is really a feature and should be handled as such and honored with a dedicated pull-request, so it is emphasized in the GitHub generated release notes and not hidden away with a PR not really mentioning it.

Summary

There are quite some things we need to address and change, and I'd suppose to split it into dedicated parts. Must have is not breaking v12 support.

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