#1627006-78: Collect project information for translation update
Follow-up issue to make a helper function

Based on webchick's initial comment
#1627006-56: Collect project information for translation update
+++ b/core/modules/locale/locale.compare.inc
@@ -0,0 +1,265 @@
+ // The first release with the same major release number which is not a
+ // dev release is the one. Releases are sorted the most recent first.
This logic looks like it'd be really nice to pull out into a helper function, since I've seen similar checks both here and in Update module. (Follow-up)

Comments

YesCT’s picture

This issue might need a better title.

Here is the code that spurred it:

        // Find a suitable release to use as alternative translation.
        foreach ($project_updates[$name]['releases'] as $project_release) {
          // The first release with the same major release number which is not a
          // dev release is the one. Releases are sorted the most recent first.
          if ($project_release['version_major'] == $matches[1] &&
              (!isset($project_release['version_extra']) || $project_release['version_extra'] != 'dev')) {
            $release = $project_release;
            break;
          }
        }
Sutharsan’s picture

#1832946: Runtime translation download fallback works different from installer translation download fallback is removing the code that finds release info for a project. This issue can be closed once it lands because it will no longer be applicable.