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-20 10:33:36.000000000 +0100 @@ -172,6 +172,13 @@ 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' => 'checkbox', + '#title' => t('Import latest translation if dev version detected'), + '#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-20 11:10:09.000000000 +0100 @@ -37,7 +37,18 @@ 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) && preg_match("/(dev|HEAD)/", $data['info']['version'])) { + if (!$projects_info) + $projects_info = update_get_available(); + if (isset($projects_info[$name]['releases'])) { + // Get the last available Release + $rel=array_shift($projects_info[$name]['releases']); + if (!empty($rel['version'])) //Replace dev version by last release 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