diff --git a/core/modules/locale/locale.compare.inc b/core/modules/locale/locale.compare.inc index 3ba1008..039eba3 100644 --- a/core/modules/locale/locale.compare.inc +++ b/core/modules/locale/locale.compare.inc @@ -78,6 +78,8 @@ function locale_translation_flush_projects() { * - "project_type": Project type, e.g. 'module', 'theme'. * - "core": Core release version, e.g. 8.x * - "version": Project release version, e.g. 8.x-1.0 + * See http://drupalcode.org/project/drupalorg.git/blob/refs/heads/7.x-3.x:/drupalorg_project/plugins/release_packager/DrupalorgProjectPackageRelease.class.php#l219 + * for how the version strings are created. * - "server_pattern": Translation server po file pattern. * - "status": Project status, 1 = enabled. */ @@ -99,6 +101,7 @@ function locale_translation_build_projects() { $default_server = locale_translation_default_translation_server(); + // If project is a dev release, or core, find the latest available release. $project_updates = update_get_available(TRUE); foreach ($projects as $name => $data) { if (isset($project_updates[$name]['releases']) && $project_updates[$name]['project_status'] != 'not-fetched') { @@ -116,8 +119,8 @@ function locale_translation_build_projects() { } } } - // HEAD versions are for module maintainers and should not be used. - elseif ($name == "drupal" || preg_match("/HEAD/", $data['info']['version'], $matches)) { + // If project is not a dev version, but is core, pick latest release. + elseif ($name == "drupal") { // Pick latest available release. $release = array_shift($project_updates[$name]['releases']); } @@ -129,6 +132,7 @@ function locale_translation_build_projects() { unset($release); } + // For every project store information. $data += array( 'version' => isset($data['info']['version']) ? $data['info']['version'] : '', 'core' => isset($data['info']['core']) ? $data['info']['core'] : DRUPAL_CORE_COMPATIBILITY, @@ -260,8 +264,6 @@ function locale_translation_build_server_pattern($project, $template) { '%project' => $project->name, '%version' => $project->version, '%core' => $project->core, - // @todo: http://drupal.org/node/1627006#comment-6396658 - // Can these be instantiated before getting to this function? '%language' => isset($project->language) ? $project->language : '%language', '%filename' => isset($project->filename) ? $project->filename : '%filename', ); diff --git a/core/modules/locale/locale.install b/core/modules/locale/locale.install index afe25ac..4abb2a7 100644 --- a/core/modules/locale/locale.install +++ b/core/modules/locale/locale.install @@ -198,9 +198,8 @@ function locale_schema() { 'default' => '', ), 'status' => array( - // @todo http://drupal.org/node/1627006#comment-6396658 - // Check where these status values are defined and reference it here. - 'description' => 'The update status of the project. Possible values are: deleted, updated, created, rebuilt, error.', + // locale.compare.inc gives possible values for status. + 'description' => 'The status of the project. Possible values are: 1 = enabled, 0 = disabled.', 'type' => 'int', 'not null' => TRUE, 'default' => 1,