summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-03-07 13:08:04 +0000
committerDries Buytaert <dries@buytaert.net>2007-03-07 13:08:04 +0000
commitae093d1386d5c0678774130a8b217c660ef54785 (patch)
treeef2a9b7c26711df86ba51845b2ef5850de895f4c /modules
parent0be18f09ed9cd3aeaa751efdb75640e602feb0e1 (diff)
downloadbrdo-ae093d1386d5c0678774130a8b217c660ef54785.tar.gz
brdo-ae093d1386d5c0678774130a8b217c660ef54785.tar.bz2
- Patch #115047 by mindless: token replacement with format_plural.
Diffstat (limited to 'modules')
-rw-r--r--modules/node/content_types.inc6
-rw-r--r--modules/system/system.module6
2 files changed, 5 insertions, 7 deletions
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 .= '<p>'. strtr(format_plural($num_nodes, '<strong>Warning:</strong> 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.', '<strong>Warning:</strong> 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))) .'</p>';
+ $caption .= '<p>'. format_plural($num_nodes, '<strong>Warning:</strong> 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.', '<strong>Warning:</strong> 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)) .'</p>';
}
$caption .= '<p>'. t('This action cannot be undone.') .'</p>';
diff --git a/modules/system/system.module b/modules/system/system.module
index 3bf4d19e6..206dc69bf 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -1398,10 +1398,10 @@ function system_modules_confirm_form($modules, $form_values = array()) {
$missing_dependencies[$k] = $info['name'] ? $info['name'] : drupal_ucfirst($dependency);
}
$t_argument = array(
- '%module' => $modules[$name]->info['name'],
- '%dependencies' => implode(', ', $missing_dependencies),
+ '@module' => $modules[$name]->info['name'],
+ '@dependencies' => implode(', ', $missing_dependencies),
);
- $items[] = strtr(format_plural(count($missing_dependencies), 'You must enable the %dependencies module to install %module.', 'You must enable the %dependencies modules to install %module.'), $t_argument);
+ $items[] = format_plural(count($missing_dependencies), 'You must enable the @dependencies module to install @module.', 'You must enable the @dependencies modules to install @module.', $t_argument);
}
$form['text'] = array('#value' => theme('item_list', $items));
}