From 23309d1022b4a401a4d8992ba0c10ba5d9b722ef Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 29 May 2009 21:25:05 +0000 Subject: [PATCH] - Patch #335067 by JamesAn: improved singular/plural strings in the simpletest UI. --- modules/simpletest/simpletest.module | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/simpletest/simpletest.module b/modules/simpletest/simpletest.module index 5def4f77641..b8a4eb6767b 100644 --- a/modules/simpletest/simpletest.module +++ b/modules/simpletest/simpletest.module @@ -189,10 +189,10 @@ function _simpletest_batch_operation($test_list_init, $test_id, &$context) { function _simpletest_batch_finished($success, $results, $operations, $elapsed) { if ($success) { - drupal_set_message(t('The tests finished in @elapsed.', array('@elapsed' => $elapsed))); + drupal_set_message(t('The test run finished in @elapsed.', array('@elapsed' => $elapsed))); } else { - drupal_set_message(t('The tests did not successfully finish.'), 'error'); + drupal_set_message(t('The test run did not successfully finish.'), 'error'); } module_invoke_all('test_group_finished'); } @@ -266,7 +266,7 @@ function simpletest_clean_environment() { simpletest_clean_database(); simpletest_clean_temporary_directories(); $count = simpletest_clean_results_table(); - drupal_set_message(t('Removed @count test results.', array('@count' => $count))); + drupal_set_message(format_plural($count, 'Removed 1 test result.', 'Removed @count test results.')); } /** @@ -285,15 +285,15 @@ function simpletest_clean_database() { } if (count($ret) > 0) { - drupal_set_message(t('Removed @count left over tables.', array('@count' => count($ret)))); + drupal_set_message(format_plural(count($ret), 'Removed 1 leftover table.', 'Removed @count leftover tables.')); } else { - drupal_set_message(t('No left over tables to remove.')); + drupal_set_message(t('No leftover tables to remove.')); } } /** - * Find all left over temporary directories and remove them. + * Find all leftover temporary directories and remove them. */ function simpletest_clean_temporary_directories() { $files = scandir(file_directory_path()); @@ -307,7 +307,7 @@ function simpletest_clean_temporary_directories() { } if ($count > 0) { - drupal_set_message(t('Removed @count temporary directories.', array('@count' => $count))); + drupal_set_message(format_plural($count, 'Removed 1 temporary directory.', 'Removed @count temporary directories.')); } else { drupal_set_message(t('No temporary directories to remove.'));