Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Using an install profile that imports local translation files doesn't work with drush si
.
The same install profile does import the translation files when you use the web interface.
module_load_include('fetch.inc', 'l10n_update');
$options = _l10n_update_default_update_options();
$batch = l10n_update_batch_update_build(array(), array(), $options);
It think it has something to do with the project type, which is empty in l10n_update_batch_fetch_import
if ($source->type == L10N_UPDATE_REMOTE || $source->type == L10N_UPDATE_LOCAL) { ... }
After the installation is done, the translation files aren't imported. Running the drush commands to refresh and update the translations they get imported.
Comment | File | Size | Author |
---|
Comments
Comment #2
robert-os CreditAttribution: robert-os at One Shoe commentedComment #3
robert-os CreditAttribution: robert-os at One Shoe commentedSorry, added patch for another module
Comment #4
Sutharsan CreditAttribution: Sutharsan at LimoenGroen commentedWrong patch?
Comment #5
Sutharsan CreditAttribution: Sutharsan at LimoenGroen commentedCan this be reproduced with https://www.drupal.org/project/l10n_install
Can you share the install profile to reproduce and test?
Comment #6
robert-os CreditAttribution: robert-os at One Shoe commentedComment #7
robert-os CreditAttribution: robert-os at iO commentedI've tested this with the l10n_install, but I will do this again and provide you more detailed results.
Comment #8
cbccharlie CreditAttribution: cbccharlie at Balidea commentedI've the same problem with a custom install profile. I've tested with l10n_install and it has the same problem.
Carlos B.
Comment #9
cbccharlie CreditAttribution: cbccharlie at Balidea commentedI can confirm that cache_set in l10n_update_status_save method is not working correctly. It does not save any value.