From ae093d1386d5c0678774130a8b217c660ef54785 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 7 Mar 2007 13:08:04 +0000 Subject: - Patch #115047 by mindless: token replacement with format_plural. --- modules/node/content_types.inc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'modules/node') diff --git a/modules/node/content_types.inc b/modules/node/content_types.inc index 7b2c55b95..b026292f6 100644 --- a/modules/node/content_types.inc +++ b/modules/node/content_types.inc @@ -351,9 +351,7 @@ function node_node_type($op, $info) { $update_count = node_type_update_nodes($info->old_type, $info->type); if ($update_count) { - $substr_pre = 'Changed the content type of '; - $substr_post = strtr(' from %old-type to %type.', array('%old-type' => theme('placeholder', $info->old_type), '%type' => theme('placeholder', $info->type))); - drupal_set_message(format_plural($update_count, $substr_pre .'@count post'. $substr_post, $substr_pre .'@count posts'. $substr_post)); + drupal_set_message(format_plural($update_count, 'Changed the content type of 1 post from %old-type to %type.', 'Changed the content type of @count posts from %old-type to %type.', array('%old-type' => $info->old_type, '%type' => $info->type))); } } } @@ -391,7 +389,7 @@ function node_type_delete_confirm($type) { $num_nodes = db_num_rows(db_query("SELECT * FROM {node} WHERE type = '%s'", $type->type)); if ($num_nodes) { - $caption .= '

'. strtr(format_plural($num_nodes, 'Warning: there is currently @count %type post on your site. It may not be able to be displayed or edited correctly, once you have removed this content type.', 'Warning: there are currently @count %type posts on your site. They may not be able to be displayed or edited correctly, once you have removed this content type.'), array('%type' => theme('placeholder', $type->name))) .'

'; + $caption .= '

'. format_plural($num_nodes, 'Warning: there is currently 1 %type post on your site. It may not be able to be displayed or edited correctly, once you have removed this content type.', 'Warning: there are currently @count %type posts on your site. They may not be able to be displayed or edited correctly, once you have removed this content type.', array('%type' => $type->name)) .'

'; } $caption .= '

'. t('This action cannot be undone.') .'

'; -- cgit v1.2.3