Project

General

Profile

Actions

Feature #101526

open

Allow configuration to prevent downloading of language packs for specific extensions

Added by J. Peter M. Schuler 9 months ago. Updated 9 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2023-08-02
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Duplicate:
#98394 proposed this feature, but the solution was to implement an event ModifyLanguagePacksEvent, which can be used for the purpose. So it prepared the architecture, but didn't actually supply/solve the feature.

TYPO3 will try to fetch language packs for all installed extensions in all available languages.
This exposes locally installed extensions to the outer world (the language server).
Furthermore, there might be an extension in the wild with same name, leading to unexpected
downloading foreign language packs. Otherwise unnecessary 404 to TYPO3 translation server
will happen.
It would be cool if extensions could be defined to ignore the procedure. E.g. via

Proposed solutions:
a) On extension level, in extensions composer.json:

{
    "extra": {
        "typo3/cms": {
            "updateLanguages": false
        }
    }
}

b) On project level in settings.php, next to defined languages
    'EXTCONF' => [
        'lang' => [
            'availableLanguages' => [
                'nl',
                'de',
            ],
            'preventUpdateForExtension' => [
                'mysitepackage' => ['nl','de'],
                'mycustomerext' => ['*']
            ]
        ],
    ],

Both solutions don't contradict and solve different scenarios. The settings.php solution can be used in every case, the extension composer.json solution might be helpful additionally (e.g. for smaller extensions without FE output or a config GUI, that thus only output labels during exception and need no translation).


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Feature #98394: Allow Extension to prevent downloading of language packsClosed2022-09-21

Actions
Actions #1

Updated by J. Peter M. Schuler 9 months ago

  • Is duplicate of Feature #98394: Allow Extension to prevent downloading of language packs added
Actions #2

Updated by Chris Müller 9 months ago

Hmm, the new event is there for exactly this reason: implement an event listener which prevents the download of translations.

I am using this event in an extension in TER, where no translations are available.

I am using this event in a project to prevent the checking and download of translations for extension keys which start, for example, with "abc_" (project-specific-extensions).

In the PR for the event we discussed also the solution for a composer.json configuration.

So, why another implementation?

Actions #3

Updated by J. Peter M. Schuler 9 months ago

Not another implementation but a core implementation which just reads configuration.
As this is a rather common case, there shouldn't need to be logic in an extension (or for the install, e.g. in the sitepackage).

Actions #4

Updated by J. Peter M. Schuler 9 months ago

(premature send)
That is why they and me asked for "allow configuration for", instead of "prepare architecture for". While the event is helpful and necessary as a first step, it won't allow everybody to achieve the goal.

Actions

Also available in: Atom PDF