<?php
function locale_test_system_info_alter(&$info, $file, $type) {
if (Drupal::state()
->get('locale.test_system_info_alter')) {
if ($file->name == 'locale_test' || $file->name == 'locale_test_translate') {
$info['hidden'] = FALSE;
}
}
}
function locale_test_locale_translation_projects_alter(&$projects) {
if (Drupal::state()
->get('locale.test_projects_alter')) {
$url = url(NULL, array(
'absolute' => TRUE,
));
$remote_url = $url . variable_get('file_public_path', conf_path() . '/files') . '/remote/';
$base_url = url();
$projects = array(
'drupal' => array(
'name' => 'drupal',
'info' => array(
'name' => 'Drupal',
'interface translation server pattern' => $remote_url . '%core/%project/%project-%version.%language._po',
'package' => 'Core',
'version' => '8.0',
'project' => 'drupal',
'_info_file_ctime' => 1348824632,
'datestamp' => 0,
),
'datestamp' => 0,
'project_type' => 'core',
'project_status' => TRUE,
),
'contrib_module_one' => array(
'name' => 'contrib_module_one',
'info' => array(
'name' => 'Contributed module one',
'interface translation server pattern' => $remote_url . '%core/%project/%project-%version.%language._po',
'package' => 'Other',
'version' => '8.x-1.1',
'project' => 'contrib_module_one',
'datestamp' => '1344471537',
'_info_file_ctime' => 1348767306,
),
'datestamp' => '1344471537',
'project_type' => 'module',
'project_status' => TRUE,
),
'contrib_module_two' => array(
'name' => 'contrib_module_two',
'info' => array(
'name' => 'Contributed module two',
'interface translation server pattern' => $remote_url . '%core/%project/%project-%version.%language._po',
'package' => 'Other',
'version' => '8.x-2.0-beta4',
'project' => 'contrib_module_two',
'datestamp' => '1344471537',
'_info_file_ctime' => 1348767306,
),
'datestamp' => '1344471537',
'project_type' => 'module',
'project_status' => TRUE,
),
'contrib_module_three' => array(
'name' => 'contrib_module_three',
'info' => array(
'name' => 'Contributed module three',
'interface translation server pattern' => $remote_url . '%core/%project/%project-%version.%language._po',
'package' => 'Other',
'version' => '8.x-1.0',
'project' => 'contrib_module_three',
'datestamp' => '1344471537',
'_info_file_ctime' => 1348767306,
),
'datestamp' => '1344471537',
'project_type' => 'module',
'project_status' => TRUE,
),
'locale_test' => array(
'name' => 'locale_test',
'info' => array(
'name' => 'Locale test',
'interface translation project' => 'locale_test',
'interface translation server pattern' => 'core/modules/locale/tests/test.%language.po',
'package' => 'Other',
'version' => NULL,
'project' => 'locale_test',
'_info_file_ctime' => 1348767306,
'datestamp' => 0,
),
'datestamp' => 0,
'project_type' => 'module',
'project_status' => TRUE,
),
'custom_module_one' => array(
'name' => 'custom_module_one',
'info' => array(
'name' => 'Custom module one',
'interface translation project' => 'custom_module_one',
'interface translation server pattern' => 'translations://custom_module_one.%language.po',
'package' => 'Other',
'version' => NULL,
'project' => 'custom_module_one',
'_info_file_ctime' => 1348767306,
'datestamp' => 0,
),
'datestamp' => 0,
'project_type' => 'module',
'project_status' => TRUE,
),
);
}
}