Problem/Motivation
I need to disable downloading translations from the server to speed up the installation process.
I use a script php ./scripts/test-site.php install --langcode de
to install a minimum profile
For that task we have a special flag download_translation
in the function install_state_defaults()
, that is FALSE by default.
But, as I see, this flag is never checked in any part of the Drupal Core, and translations are downloaded every time, spending a lot of time on this.
As a result, the installation with non-default language takes too much time (48 sec instead of 4 sec on my local), when I actually don't need to download translations in most cases.
Steps to reproduce
1. Install the minimal Drupal version for tests with language = en:php ./scripts/test-site.php install --langcode en
See that it takes around 2-5 seconds.
2. Install the minimal Drupal version for tests with language != en, eg with "de":php ./scripts/test-site.php install --langcode de
See that it takes around 30-80 seconds!
Proposed resolution
Respect the value of the flag download_translation
and skip downloading translations if it is false.
And add an option to force enable or disable translation downloading.