Fixed
Project:
Drupal core
Version:
11.4.x-dev
Component:
locale.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Jul 2026 at 17:04 UTC
Updated:
8 Jul 2026 at 07:51 UTC
Jump to comment: Most recent
\Drupal\locale\LocaleProjectRepository::buildProjects no longer respects weight since the massive refactor in #3037156: Modernize locale history functions
The example hook documentation
function hook_locale_translation_projects_alter(&$projects) {
// The translations are located at a custom translation sever.
$projects['existing_project'] = [
'info' => [
'interface translation server pattern' => 'http://example.com/files/translations/%core/%project/%project-%version.%language.po',
],
// An optional key to change the order in which translation files are
// processed. By default, the projects are sorted alphabetically by key.
'weight' => 1,
];
}works on 11.3 but not 11.4.x
See #3609008: Fix module on 11.4.x
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:
Comments
Comment #3
alexpottComment #4
alexpottComment #5
nicxvan commentedThanks!
This is a straightforward fix, not sure why we dropped it.
Test looks good, I can't run test only changes against core committer pipelines.
I checked all other instances of LocaleTranslatableProject and they should be good, it's just here we create it without the weight.
Comment #6
nicxvan commentedI manually pulled this down and ran the test only changes, it fails as expected without the weight set and passes with the fix!
Comment #9
catchCommitted/pushed to main, 11.x and 11.4.x, thanks!