Common subdirectories: ../l10n_update_ori/CVS and l10n_update/CVS diff -up ../l10n_update_ori/l10n_update.admin.inc l10n_update/l10n_update.admin.inc --- ../l10n_update_ori/l10n_update.admin.inc 2010-12-18 23:46:06.000000000 +0100 +++ l10n_update/l10n_update.admin.inc 2010-12-18 23:42:00.000000000 +0100 @@ -172,6 +172,14 @@ function l10n_update_admin_settings_form '#default_value' => variable_get('l10n_update_check_disabled', 0), '#description' => t('Enable if you want translations for disabled modules to be updated too. This comes with an important performance penalty so it is not recommended.'), ); + $form['l10n_update_force_dev_version'] = array( + '#type' => 'radios', + '#title' => t('Import latest translation if dev version detected'), + '#options' => array(t('Disabled'), t('Enabled')), + '#default_value' => variable_get('l10n_update_force_dev_version', 0), + '#description' => t('Enable if you want translations for dev modules to be updated too.'), + ); + $form['l10n_update_download_store'] = array( '#title' => t('Store downloaded files'), '#type' => 'textfield', diff -up ../l10n_update_ori/l10n_update.project.inc l10n_update/l10n_update.project.inc --- ../l10n_update_ori/l10n_update.project.inc 2010-12-18 23:46:06.000000000 +0100 +++ l10n_update/l10n_update.project.inc 2010-12-19 11:05:31.000000000 +0100 @@ -37,7 +37,24 @@ function l10n_update_build_projects() { // Mark all previous projects as disabled and store new project data db_query("UPDATE {l10n_update_project} SET status = 0"); $default_server = l10n_update_default_server(); - foreach ($projects as $name => $data) { + foreach ($projects as $name => $data) { + if (variable_get('l10n_update_force_dev_version', 0) && + ( + strpos($data['info']['version'],"-dev") || + strpos($data['info']['version'],"HEAD") + )){ + if (!$projects_info){ + require_once(realpath(drupal_get_path("module","update"))."/update.fetch.inc"); + require_once(realpath(drupal_get_path("module","update"))."/update.module"); + $projects_info = update_get_available(); + } + if (isset($projects_info[$name]['releases'])){ + $rel=array_shift($projects_info[$name]['releases']); + if (!empty($rel['version'])) + $data['info']['version']=$rel['version']; + } + } + $data += array( 'version' => isset($data['info']['version']) ? $data['info']['version'] : '', 'core' => isset($data['info']['core']) ? $data['info']['core'] : DRUPAL_CORE_COMPATIBILITY, Common subdirectories: ../l10n_update_ori/translations and l10n_update/translations