commit b2ecaf834016f3c93cb4eb29ee0e18420984e920 Author: Erik Stielstra Date: Mon Dec 17 13:11:28 2012 +0100 #8 diff --git a/core/modules/locale/locale.batch.inc b/core/modules/locale/locale.batch.inc index 7e35571..8d87e48 100644 --- a/core/modules/locale/locale.batch.inc +++ b/core/modules/locale/locale.batch.inc @@ -309,7 +309,7 @@ function locale_translation_batch_fetch_import($project, $langcode, $options, &$ $file = $source_result->files[$import_type]; module_load_include('bulk.inc', 'locale'); $options += array( - 'message' => $t('Importing translation for @project.', array('@project' => $source->project)), + 'message' => $t('Importing translation for %project.', array('%project' => $source->project)), ); // Import the translation file. For large files the batch operations is // progressive and will be called repeatedly untill finished. diff --git a/core/modules/locale/locale.bulk.inc b/core/modules/locale/locale.bulk.inc index 5f03304..64d2c55 100644 --- a/core/modules/locale/locale.bulk.inc +++ b/core/modules/locale/locale.bulk.inc @@ -404,7 +404,7 @@ function locale_translate_batch_build($files, $options) { $batch = array( 'operations' => $operations, 'title' => $t('Importing interface translations'), - 'init_message' => $t('Starting import'), + 'progress_message' => '', 'error_message' => $t('Error importing interface translations'), 'file' => drupal_get_path('module', 'locale') . '/locale.bulk.inc', ); @@ -433,7 +433,8 @@ function locale_translate_batch_build($files, $options) { * are customized translations or come from a community source. Use * LOCALE_CUSTOMIZED or LOCALE_NOT_CUSTOMIZED. Optional, defaults to * LOCALE_NOT_CUSTOMIZED. - * - 'message': Alternative message to display during import. + * - 'message': Alternative message to display during import. Note, this must + * be sanitized text. * * @param $context * Contains a list of files imported. @@ -470,7 +471,7 @@ function locale_translate_batch_import($file, $options, &$context) { // http://drupal.org/node/1089472 $context['finished'] = min(0.95, $report['seek'] / filesize($file->uri)); if (isset($options['message'])) { - $context['message'] = t('@message (@percent%).', array('@message' => $options['message'], '@percent' => (int) ($context['finished'] * 100))); + $context['message'] = t('!message (@percent%).', array('!message' => $options['message'], '@percent' => (int) ($context['finished'] * 100))); } else { $context['message'] = t('Importing translation file: %filename (@percent%).', array('%filename' => $file->filename, '@percent' => (int) ($context['finished'] * 100))); @@ -532,6 +533,7 @@ function locale_translate_batch_import_save($context) { locale_translation_update_file_history($file); } } + $context['message'] = t('Translations imported.'); } }