function _locale_translation_prepare_project_list

Prepare module and theme data.

Modify .info file data before it is processed by update_process_info_list(). In order for update_process_info_list() to recognize a project, it requires the 'project' parameter in the .info file data.

Custom modules or themes can bring their own gettext translation file. To enable import of this file the module or theme defines "interface translation project = myproject" in its .info file. This function will add a project "myproject" to the info data.

Parameters

array $data: Array of .info file data.

string $type: The project type. i.e. module, theme.

Return value

array Array of .info file data.

1 call to _locale_translation_prepare_project_list()
locale_translation_project_list in drupal/core/modules/locale/locale.compare.inc
Fetch an array of projects for translation update.

File

drupal/core/modules/locale/locale.compare.inc, line 246
The API for comparing project translation status with available translation.

Code

function _locale_translation_prepare_project_list($data, $type) {
  foreach ($data as $name => $file) {

    // Include interface translation projects. To allow
    // update_process_info_list() to identify this as a project the 'project'
    // property is filled with the 'interface translation project' value.
    if (isset($file->info['interface translation project'])) {
      $data[$name]->info['project'] = $file->info['interface translation project'];
    }
  }
  return $data;
}