summaryrefslogtreecommitdiff
path: root/modules/locale
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-05-22 07:42:37 +0000
committerDries Buytaert <dries@buytaert.net>2007-05-22 07:42:37 +0000
commit0047e35d9137a37235c0248daacaad70ed0105da (patch)
treeee6a8e51e90d2b099ffed5fd12c743a4796d8c60 /modules/locale
parent5094312d3b76d41aaf41c6a5c9dab04ccb7d1590 (diff)
downloadbrdo-0047e35d9137a37235c0248daacaad70ed0105da.tar.gz
brdo-0047e35d9137a37235c0248daacaad70ed0105da.tar.bz2
- Patch #145671 by Gabor: import translation files when adding a new language.
Diffstat (limited to 'modules/locale')
-rw-r--r--modules/locale/locale.module12
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index e5f952e25..8d826fd55 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -437,7 +437,7 @@ function locale_language_list($field = 'name', $all = FALSE) {
*/
function locale_system_update($components) {
include_once 'includes/locale.inc';
- if ($batch = locale_batch_system($components)) {
+ if ($batch = locale_batch_by_component($components)) {
batch_set($batch);
}
}
@@ -453,6 +453,16 @@ function _locale_batch_system_finished($success, $results) {
}
/**
+ * 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