Problem/Motivation
When not the latest version of core is installed, the translation update system will download and import translation of the latest drupal core version. This behaviour only applies to core and not to contributed modules. This may cause confusion when the translation version is compared to the version of the installed core release.
As a side effect the test scripts which test the translation update code, must do additional effort to ignore the core release. Since the test scripts can be run with various core versions (currently 8.x-dev, but in the future 8.-RC1, 8.0, etc.) this unstable factor must be eliminated. The above behaviour makes this elimitation more complicated, as was discussed in #1998056: Automatically update interface translations using cron #26.
This problem has been reported before in the Drupal 7 branch of Localization Update module. See #1883154: Check version before update
Proposed resolution
Remove a piece of code which always applies the latest core release version to the core project.
Remaining tasks
none
User interface changes
none
API changes
none
Related Issues
#1998056: Automatically update interface translations using cron
Comment | File | Size | Author |
---|---|---|---|
#1 | locale-core-translation-update-2021749-1.patch | 1.76 KB | Sutharsan |
Comments
Comment #1
Sutharsan CreditAttribution: Sutharsan commentedThis patch fixes the problem.
Comment #2
Gábor HojtsyWhy was this code added in the first place? Was it a temporary need? What made us not need it anymore?
Comment #3
Sutharsan CreditAttribution: Sutharsan commentedI don't know why it was added, it was added to l10n_update in #1001554: Make it possible to fetch .po files for dev modules/core. Introduced in #42.
It changed (#40):
into (#42):
+ if (preg_match("/^[6-9].x-([0-9]+)\..*-dev$/", $data['info']['version'], $matches)) {
...
+ }
+ elseif ($name == "drupal" || preg_match("/HEAD/", $data['info']['version'], $matches)) {
+ // Pick latest available release.
+ $release = array_shift($projects_info[$name]['releases']);
+ }
I am puzzled by this change. There is hardly any description of this change:
It was removed from l10n_update in #1883154: Check version before update after the observation:
Comment #4
Gábor HojtsyAll right, well, looks entirely logical to remove :)
Comment #5
catchCommitted/pushed to 8.x, thanks!