Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.606 diff -u -p -r1.606 theme.inc --- includes/theme.inc 22 Aug 2010 12:46:21 -0000 1.606 +++ includes/theme.inc 26 Aug 2010 14:35:02 -0000 @@ -1249,15 +1249,8 @@ function theme_enable($theme_list) { menu_rebuild(); drupal_theme_rebuild(); - // Notify locale module about new themes being enabled, so translations can - // be imported. This might start a batch, and only return to the redirect - // path after that. - module_invoke('locale', 'system_update', $theme_list); - - // Invoke hook_themes_enabled after the themes have been enabled. + // Invoke hook_themes_enabled() after the themes have been enabled. module_invoke_all('themes_enabled', $theme_list); - - return; } /** Index: modules/locale/locale.module =================================================================== RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v retrieving revision 1.297 diff -u -p -r1.297 locale.module --- modules/locale/locale.module 5 Aug 2010 08:08:43 -0000 1.297 +++ modules/locale/locale.module 26 Aug 2010 14:35:32 -0000 @@ -785,7 +785,24 @@ function locale_language_list($field = ' } /** - * Imports translations when new modules or themes are installed or enabled. + * Implements hook_modules_installed(). + */ +function locale_modules_installed($modules) { + locale_system_update($modules); +} + +/** + * Implements hook_themes_enabled(). + * + * @todo This is technically wrong. We must not import upon enabling, but upon + * initial installation. + */ +function locale_themes_enabled($themes) { + locale_system_update($themes); +} + +/** + * Imports translations when new modules or themes are installed. * * This function will either import translation for the component change * right away, or start a batch if more files need to be imported. Index: modules/system/system.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v retrieving revision 1.298 diff -u -p -r1.298 system.admin.inc --- modules/system/system.admin.inc 22 Aug 2010 12:55:04 -0000 1.298 +++ modules/system/system.admin.inc 26 Aug 2010 14:36:36 -0000 @@ -1252,11 +1252,6 @@ function system_modules_submit($form, &$ $form_state['redirect'] = 'admin/modules'; - // Notify locale module about module changes, so translations can be - // imported. This might start a batch, and only return to the redirect - // path after that. - module_invoke('locale', 'system_update', $actions['install']); - // Synchronize to catch any actions that were added or removed. actions_synchronize(); }