- Patch #335067 by JamesAn: improved singular/plural strings in the simpletest UI.
parent
dcdc4f2e73
commit
23309d1022
|
@ -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,7 +285,7 @@ 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 leftover tables to remove.'));
|
||||
|
@ -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.'));
|
||||
|
|
Loading…
Reference in New Issue