Problem/Motivation
Drupal CMS has a goal to make its heavily customized installer fully multilingual.
The core install system already provides quite a nice way to get translations in for the language of your choice, but it is completely hard-coded to only download translations for Drupal core. This means that custom install profiles with their own translatable strings are, in effect, not translatable at all. Even if they are available as separate projects, and have translations on localize.drupal.org, the installer won't download them. If you have a distribution-like project, it is shut out of the multilingual system at install time.
Proposed resolution
Change the installer so that it downloads translations for not just core, but also the current install profile, if it is marked as a distribution. This will also require a change to the \Drupal\Core\StringTranslation\Translator\FileTranslation, which is hard-coded to only read downloaded translations for core.
Issue fork drupal-3529211
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3529211-the-installer-should
changes, plain diff MR !12334
Comments
Comment #2
xjmI'd consider this a critical missing feature.
@phenaproxima says there are ways to work around this within the individual install profiles, so I've set it to major for now, but I think resolving this for any install profile--not just Drupal CMS--is core's responsibility.
Comment #4
xjmAdding @catch for participation in Slack brainstorm.
Comment #7
xjmAlso got feedback from Gábor in Slack as the subsystem maintainer for interface translation.
Comment #8
gábor hojtsyIn the early installer in the current MR there may be two .po files downloaded, the drupal core one and the install profile one.
Are both imported to memory for the installer?
If so, this would be overkill for packages like Drupal CMS that ships with core, so it would import two huge .po files?
However it would be needed for install profiles that customize the installer (eg. add steps to it) but use regular d.o packaging and thus do not bundle core and projects inside it.
Also, in the later stage of the installer, the installer downloads a lot more .po files for contrib projects (both in the core + install profile scenario and Drupal CMS). Is that also loaded into memory (not needed)? Or Does that confuse which .po files get loaded (that would be a problem). Also for the case of Drupal CMS if it includes all the core and contrib projects it ships with in terms of translations, and it already has that one .po file, it should not download more .po files and import then as that is duplicate work and unnecessarily slows down the installer, no?
Comment #10
gábor hojtsy#3605554: Translations are never loaded or downloaded for a custom profile is where this issue is finally being resolved also by @phenaproxima :)