summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-10-15 15:18:39 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-10-15 15:18:39 +0000
commit1e8ddda9b78365f66019c0443669557562e030ed (patch)
tree049ba636ffa046e85c8ef0f351c847dd887958ab /modules
parent19322c375bd5cc6b8d230cbef561bcf86e744bd9 (diff)
downloadbrdo-1e8ddda9b78365f66019c0443669557562e030ed.tar.gz
brdo-1e8ddda9b78365f66019c0443669557562e030ed.tar.bz2
#169079 by yched: improve consistency of menu API and batch API by allowing batch definition in non .module files, which opens the possibility of better performing batches (which are likely to reside in .admin.inc files generally)
- apply this change in locale.module - improve batch API code documentation
Diffstat (limited to 'modules')
-rw-r--r--modules/locale/locale.module39
1 files changed, 0 insertions, 39 deletions
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index 95d1fe9d3..1d6d5c83d 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -469,45 +469,6 @@ function locale_system_update($components) {
}
}
-/**
- * Finished callback of system page locale import batch.
- * Inform the user of translation files imported.
- */
-function _locale_batch_system_finished($success, $results) {
- if ($success) {
- drupal_set_message(format_plural(count($results), 'One translation file imported for the newly installed modules.', '@count translation files imported for the newly installed modules.'));
- }
-}
-
-/**
- * Finished callback of language addition locale import batch.
- * Inform the user of translation files imported.
- */
-function _locale_batch_language_finished($success, $results) {
- if ($success) {
- drupal_set_message(format_plural(count($results), 'One translation file imported for the enabled modules.', '@count translation files imported for the enabled modules.'));
- }
-}
-
-/**
- * Perform interface translation import as a batch step.
- *
- * @param $filepath
- * Path to a file to import.
- * @param $results
- * Contains a list of files imported.
- */
-function _locale_batch_import($filepath, &$context) {
- include_once 'includes/locale.inc';
- // The filename is either {langcode}.po or {prefix}.{langcode}.po, so
- // we can extract the language code to use for the import from the end.
- if (preg_match('!(/|\.)([^\./]+)\.po$!', $filepath, $langcode)) {
- $file = (object) array('filename' => basename($filepath), 'filepath' => $filepath);
- _locale_import_read_po('db-store', $file, LOCALE_IMPORT_KEEP, $langcode[2]);
- $context['results'][] = $filepath;
- }
-}
-
// ---------------------------------------------------------------------------------
// Language switcher block