From 81938a3cdc7b9bd13d58e355c59d9835e830fea4 Mon Sep 17 00:00:00 2001
From: Steven Wittens To set up your %drupal database, enter the following information. To set up your @drupal database, enter the following information. Congratulations, %drupal has been successfully installed. Congratulations, @drupal has been successfully installed. '. t('The news aggregator is a powerful on-site RSS syndicator/news reader that can gather fresh content from news sites and weblogs around the web.') .' '. t('Users can view the latest news chronologically in the main news aggregator display or by source. Administrators can add, edit and delete feeds and choose how often to check for newly updated news for each individual feed. Administrators can also tag individual feeds with categories, offering selective grouping of some feeds into separate displays. Listings of the latest news for individual sources or categorized sources can be enabled as blocks for display in the sidebar through the block administration page. The news aggregator requires cron to check for the latest news from the sites to which you have subscribed. Drupal also provides a machine-readable OPML file of all of your subscribed feeds.', array('%aggregator' => url('aggregator'), '%aggregator-sources' => url('aggregator/sources'), '%admin-block' => url('admin/build/block'), '%aggregator-opml' => url('aggregator/opml'))) .' '. t('Users can view the latest news chronologically in the main news aggregator display or by source. Administrators can add, edit and delete feeds and choose how often to check for newly updated news for each individual feed. Administrators can also tag individual feeds with categories, offering selective grouping of some feeds into separate displays. Listings of the latest news for individual sources or categorized sources can be enabled as blocks for display in the sidebar through the block administration page. The news aggregator requires cron to check for the latest news from the sites to which you have subscribed. Drupal also provides a machine-readable OPML file of all of your subscribed feeds.', array('@aggregator' => url('aggregator'), '@aggregator-sources' => url('aggregator/sources'), '@admin-block' => url('admin/build/block'), '@aggregator-opml' => url('aggregator/opml'))) .' You can '. t('For more information please read the configuration and customization handbook Aggregator page.', array('%aggregator' => 'http://drupal.org/handbook/modules/aggregator/')) .' '. t('For more information please read the configuration and customization handbook Aggregator page.', array('@aggregator' => 'http://drupal.org/handbook/modules/aggregator/')) .' Thousands of sites (particularly news sites and weblogs) publish their latest headlines and/or stories in a machine-readable format so that other sites can easily link to them. This content is usually in the form of an RSS feed (which is an XML-based syndication standard). To display the feed or category in a block you must decide how many items to show by editing the feed or block and turning on the feed\'s block. Thousands of sites (particularly news sites and weblogs) publish their latest headlines and/or stories in a machine-readable format so that other sites can easily link to them. This content is usually in the form of an RSS feed (which is an XML-based syndication standard). To display the feed or category in a block you must decide how many items to show by editing the feed or block and turning on the feed\'s block. Add a site that has an RSS/RDF/Atom feed. The URL is the full path to the feed file. For the feed to update automatically you must run "cron.php" on a regular basis. If you already have a feed with the URL you are planning to use, the system will not accept another feed with the same URL. '. t('Some modules generate blocks that become available when the modules are enabled. These blocks can be administered via the blocks administration page.%htaccess
", array('%directory' => theme('placeholder', $directory), '%htaccess' => '
'. str_replace("\n", '
', check_plain($htaccess_lines))));
+ $message = t("Security warning: Couldn't write .htaccess file. Please create a .htaccess file in your %directory directory which contains the following lines: !htaccess
", array('%directory' => $directory, '!htaccess' => '
'. nl2br(check_plain($htaccess_lines))));
form_set_error($form_item, $message);
watchdog('security', $message, WATCHDOG_ERROR);
}
@@ -204,17 +204,17 @@ function file_check_upload($source = 'upload') {
case UPLOAD_ERR_INI_SIZE:
case UPLOAD_ERR_FORM_SIZE:
- drupal_set_message(t('The file %file could not be saved, because it exceeds the maximum allowed size for uploads.', array('%file' => theme('placeholder', $source))), 'error');
+ drupal_set_message(t('The file %file could not be saved, because it exceeds the maximum allowed size for uploads.', array('%file' => $source)), 'error');
return 0;
case UPLOAD_ERR_PARTIAL:
case UPLOAD_ERR_NO_FILE:
- drupal_set_message(t('The file %file could not be saved, because the upload did not complete.', array('%file' => theme('placeholder', $source))), 'error');
+ drupal_set_message(t('The file %file could not be saved, because the upload did not complete.', array('%file' => $source)), 'error');
return 0;
// Unknown error
default:
- drupal_set_message(t('The file %file could not be saved. An unknown error has occurred.', array('%file' => theme('placeholder', $source))),'error');
+ drupal_set_message(t('The file %file could not be saved. An unknown error has occurred.', array('%file' => $source)),'error');
return 0;
}
@@ -238,7 +238,7 @@ function file_check_upload($source = 'upload') {
// This overcomes open_basedir restrictions for future file operations.
if (!move_uploaded_file($_FILES["edit"]["tmp_name"][$source], $file->filepath)) {
drupal_set_message(t('File upload error. Could not move uploaded file.'));
- watchdog('file', t('Upload Error. Could not move uploaded file(%file) to destination(%destination).', array('%file' => theme('placeholder', $_FILES["edit"]["tmp_name"][$source]), '%destination' => theme('placeholder', $file->filepath))));
+ watchdog('file', t('Upload Error. Could not move uploaded file (%file) to destination (%destination).', array('%file' => $_FILES["edit"]["tmp_name"][$source], '%destination' => $file->filepath)));
return FALSE;
}
@@ -318,8 +318,8 @@ function file_copy(&$source, $dest = 0, $replace = FILE_EXISTS_RENAME) {
// Make sure we at least have a valid directory.
if ($basename === FALSE) {
$source = is_object($source) ? $source->filepath : $source;
- drupal_set_message(t('The selected file %file could not be uploaded, because the destination %directory is not properly configured.', array('%file' => theme('placeholder', $source), '%directory' => theme('placeholder', $dest))), 'error');
- watchdog('file system', t('The selected file %file could not not be uploaded, because the destination %directory could not be found, or because its permissions do not allow the file to be written.', array('%file' => theme('placeholder', $source), '%directory' => theme('placeholder', $dest))), WATCHDOG_ERROR);
+ drupal_set_message(t('The selected file %file could not be uploaded, because the destination %directory is not properly configured.', array('%file' => $source, '%directory' => $dest)), 'error');
+ watchdog('file system', t('The selected file %file could not not be uploaded, because the destination %directory could not be found, or because its permissions do not allow the file to be written.', array('%file' => $source, '%directory' => $dest)), WATCHDOG_ERROR);
return 0;
}
@@ -334,7 +334,7 @@ function file_copy(&$source, $dest = 0, $replace = FILE_EXISTS_RENAME) {
$source = realpath($source);
if (!file_exists($source)) {
- drupal_set_message(t('The selected file %file could not be copied, because no file by that name exists. Please check that you supplied the correct filename.', array('%file' => theme('placeholder', $source))), 'error');
+ drupal_set_message(t('The selected file %file could not be copied, because no file by that name exists. Please check that you supplied the correct filename.', array('%file' => $source)), 'error');
return 0;
}
@@ -366,13 +366,13 @@ function file_copy(&$source, $dest = 0, $replace = FILE_EXISTS_RENAME) {
break;
case FILE_EXISTS_ERROR:
- drupal_set_message(t('The selected file %file could not be copied, because a file by that name already exists in the destination.', array('%file' => theme('placeholder', $source))), 'error');
+ drupal_set_message(t('The selected file %file could not be copied, because a file by that name already exists in the destination.', array('%file' => $source)), 'error');
return 0;
}
}
if (!@copy($source, $dest)) {
- drupal_set_message(t('The selected file %file could not be copied.', array('%file' => theme('placeholder', $source))), 'error');
+ drupal_set_message(t('The selected file %file could not be copied.', array('%file' => $source)), 'error');
return 0;
}
@@ -421,7 +421,7 @@ function file_move(&$source, $dest = 0, $replace = FILE_EXISTS_RENAME) {
if ($path_original == $path_current || file_delete($path_original)) {
return 1;
}
- drupal_set_message(t('The removal of the original file %file has failed.', array('%file' => theme('placeholder', $path_original))), 'error');
+ drupal_set_message(t('The removal of the original file %file has failed.', array('%file' => $path_original)), 'error');
}
return 0;
}
diff --git a/includes/form.inc b/includes/form.inc
index 3fe49840610..291933d1f84 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -283,7 +283,7 @@ function _form_validate($elements, $form_id = NULL) {
// and a textfield could return '0' and empty('0') returns TRUE so we
// need a special check for the '0' string.
if ($elements['#required'] && empty($elements['#value']) && $elements['#value'] !== '0') {
- form_error($elements, t('%name field is required.', array('%name' => $elements['#title'])));
+ form_error($elements, t('!name field is required.', array('!name' => $elements['#title'])));
}
// Add legal choice check if element has #options. Can be skipped, but then you must validate your own element.
@@ -299,7 +299,7 @@ function _form_validate($elements, $form_id = NULL) {
foreach ($value as $v) {
if (!isset($options[$v])) {
form_error($elements, t('An illegal choice has been detected. Please contact the site administrator.'));
- watchdog('form', t('Illegal choice %choice in %name element.', array('%choice' => theme('placeholder', check_plain($v)), '%name' => theme_placeholder(empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title']))), WATCHDOG_ERROR);
+ watchdog('form', t('Illegal choice %choice in !name element.', array('%choice' => $v, '!name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title'])), WATCHDOG_ERROR);
}
}
}
@@ -1147,10 +1147,10 @@ function theme_form_element($element, $value) {
if (!empty($element['#title'])) {
$title = $element['#title'];
if (!empty($element['#id'])) {
- $output .= ' \n";
+ $output .= ' \n";
}
else {
- $output .= ' \n";
+ $output .= ' \n";
}
}
diff --git a/includes/image.inc b/includes/image.inc
index f14afa9c0f2..37f377c1ab9 100644
--- a/includes/image.inc
+++ b/includes/image.inc
@@ -58,7 +58,7 @@ function image_toolkit_invoke($method, $params = array()) {
return call_user_func_array($function, $params);
}
else {
- watchdog('php', t("The selected image handling toolkit '%toolkit' can not correctly process '%function'.", array('%toolkit' => "$toolkit", '%function' => "$function")), WATCHDOG_ERROR);
+ watchdog('php', t("The selected image handling toolkit %toolkit can not correctly process %function.", array('%toolkit' => $toolkit, '%function' => $function)), WATCHDOG_ERROR);
return FALSE;
}
}
@@ -184,7 +184,7 @@ function image_gd_settings() {
return t('The built-in GD2 toolkit is installed and working properly.');
}
else {
- form_set_error('image_toolkit', t("The built-in GD image toolkit requires that the GD module for PHP be installed and configured properly. For more information see %url.", array('%url' => 'http://php.net/image')));
+ form_set_error('image_toolkit', t('The built-in GD image toolkit requires that the GD module for PHP be installed and configured properly. For more information see PHP\'s image documentation.', array('@url' => 'http://php.net/image')));
return FALSE;
}
}
diff --git a/includes/install.inc b/includes/install.inc
index 77dd88d54aa..1de8261eef1 100644
--- a/includes/install.inc
+++ b/includes/install.inc
@@ -550,5 +550,27 @@ function install_goto($path) {
*/
function st($string, $args = array()) {
require_once './includes/theme.inc';
- return strtr($string, array_map('theme_placeholder', $args));
+ $GLOBALS['theme'] = 'theme';
+ // Transform arguments before inserting them
+ array_walk($args, '_st');
+ return strtr($string, $args);
+}
+
+/**
+ * Helper function: apply the appropriate transformation to st() and t() placeholders.
+ */
+function _st(&$value, $key) {
+ switch ($key[0]) {
+ // Escaped only
+ case '@':
+ $value = check_plain($value);
+ return;
+ // Escaped and placeholder
+ case '%':
+ default:
+ $value = ''. check_plain($value) .'';
+ return;
+ // Pass-through
+ case '!':
+ }
}
diff --git a/includes/locale.inc b/includes/locale.inc
index 2128ac76f34..0f6e3ee1d2a 100644
--- a/includes/locale.inc
+++ b/includes/locale.inc
@@ -23,13 +23,13 @@ function _locale_add_language($code, $name, $onlylanguage = TRUE) {
// the language addition, we need to inform the user on how to start
// a translation
if ($onlylanguage) {
- drupal_set_message(t('The language %locale has been created, and can now be used to import a translation. More information is available in the help screen.', array('%locale' => theme('placeholder', t($name)), '%locale-help' => url('admin/help/locale'))));
+ drupal_set_message(t('The language %locale has been created and can now be used to import a translation. More information is available in the help screen.', array('%locale' => t($name), '@locale-help' => url('admin/help/locale'))));
}
else {
- drupal_set_message(t('The language %locale has been created.', array('%locale' => theme('placeholder', t($name)))));
+ drupal_set_message(t('The language %locale has been created.', array('%locale' => t($name))));
}
- watchdog('locale', t('The %language language (%locale) has been created.', array('%language' => theme('placeholder', $name), '%locale' => theme('placeholder', $code))));
+ watchdog('locale', t('The %language language (%locale) has been created.', array('%language' => $name, '%locale' => $code)));
}
/**
@@ -154,7 +154,7 @@ function _locale_admin_manage_add_screen() {
'#size' => 12,
'#maxlength' => 60,
'#required' => TRUE,
- '#description' => t("Commonly this is an ISO 639 language code with an optional country code for regional variants. Examples include 'en', 'en-US' and 'zh-cn'.", array('%iso-codes' => 'http://www.w3.org/WAI/ER/IG/ert/iso639.htm')),
+ '#description' => t("Commonly this is an ISO 639 language code with an optional country code for regional variants. Examples include 'en', 'en-US' and 'zh-cn'.", array('@iso-codes' => 'http://www.w3.org/WAI/ER/IG/ert/iso639.htm')),
);
$form['custom language']['langname'] = array('#type' => 'textfield',
'#title' => t('Language name in English'),
@@ -175,7 +175,7 @@ function _locale_admin_manage_add_screen() {
*/
function locale_add_language_form_validate($form_id, $form_values) {
if ($duplicate = db_num_rows(db_query("SELECT locale FROM {locales_meta} WHERE locale = '%s'", $form_values['langcode'])) != 0) {
- form_set_error(t('The language %language (%code) already exists.', array('%language' => theme('placeholder', check_plain($form_values['langname'])), '%code' => theme('placeholder', $form_values['langcode']))));
+ form_set_error(t('The language %language (%code) already exists.', array('%language' => $form_values['langname'], '%code' => $form_values['langcode'])));
}
if (!isset($form_values['langname'])) {
@@ -259,7 +259,7 @@ function _locale_admin_import_submit($form_id, $form_values) {
// Now import strings into the language
$file = file_check_upload('file');
if ($ret = _locale_import_po($file, $form_values['langcode'], $form_values['mode']) == FALSE) {
- $message = t('The translation import of %filename failed.', array('%filename' => theme('placeholder', $file->filename)));
+ $message = t('The translation import of %filename failed.', array('%filename' => $file->filename));
drupal_set_message($message, 'error');
watchdog('locale', $message, WATCHDOG_ERROR);
}
@@ -469,7 +469,7 @@ function _locale_import_po($file, $lang, $mode) {
list($headerdone, $additions, $updates) = _locale_import_one_string('report', $mode);
if (!$headerdone) {
- drupal_set_message(t('The translation file %filename appears to have a missing or malformed header.', array('%filename' => theme('placeholder', $file->filename))), 'error');
+ drupal_set_message(t('The translation file %filename appears to have a missing or malformed header.', array('%filename' => $file->filename)), 'error');
}
// rebuild locale cache
@@ -479,7 +479,7 @@ function _locale_import_po($file, $lang, $mode) {
menu_rebuild();
drupal_set_message(t('The translation was successfully imported. There are %number newly created translated strings and %update strings were updated.', array('%number' => $additions, '%update' => $updates)));
- watchdog('locale', t('Imported %file into %locale: %number new strings added and %update updated.', array('%file' => theme('placeholder', $file->filename), '%locale' => theme('placeholder', $lang), '%number' => $additions, '%update' => $updates)));
+ watchdog('locale', t('Imported %file into %locale: %number new strings added and %update updated.', array('%file' => $file->filename, '%locale' => $lang, '%number' => $additions, '%update' => $updates)));
return TRUE;
}
@@ -982,8 +982,8 @@ function _locale_import_append_plural($entry, $key) {
}
// First remove any possibly false indices, then add new ones
- $entry = preg_replace('/(%count)\[[0-9]\]/', '\\1', $entry);
- return preg_replace('/(%count)/', "\\1[$key]", $entry);
+ $entry = preg_replace('/(@count)\[[0-9]\]/', '\\1', $entry);
+ return preg_replace('/(@count)/', "\\1[$key]", $entry);
}
/**
@@ -1083,7 +1083,7 @@ function _locale_export_po($language) {
$header .= "\"Plural-Forms: nplurals=". $meta->plurals ."; plural=". strtr($meta->formula, '$', '') .";\\n\"\n";
}
$header .= "\n";
- watchdog('locale', t('Exported %locale translation file: %filename.', array('%locale' => theme('placeholder', $meta->name), '%filename' => theme('placeholder', $filename))));
+ watchdog('locale', t('Exported %locale translation file: %filename.', array('%locale' => $meta->name, '%filename' => $filename)));
}
// Generating Portable Object Template
@@ -1104,7 +1104,7 @@ function _locale_export_po($language) {
$header .= "\"Content-Transfer-Encoding: 8bit\\n\"\n";
$header .= "\"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\\n\"\n";
$header .= "\n";
- watchdog('locale', t('Exported translation file: %filename.', array('%filename' => theme('placeholder', $filename))));
+ watchdog('locale', t('Exported translation file: %filename.', array('%filename' => $filename)));
}
// Start download process
@@ -1212,7 +1212,7 @@ function _locale_export_wrap($str, $len) {
* Removes plural index information from a string
*/
function _locale_export_remove_plural($entry) {
- return preg_replace('/(%count)\[[0-9]\]/', '\\1', $entry);
+ return preg_replace('/(@count)\[[0-9]\]/', '\\1', $entry);
}
/**
diff --git a/includes/theme.inc b/includes/theme.inc
index 265653a277e..e9bd3f3f63b 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -338,9 +338,8 @@ function theme_get_setting($setting_name, $refresh = FALSE) {
*/
/**
- * Format a dynamic text string for emphasized display in a placeholder.
- *
- * E.g. t('Added term %term', array('%term' => theme('placeholder', $term)))
+ * Formats text for emphasized display in a placeholder inside a sentence.
+ * Used automatically by t().
*
* @param $text
* The text to format (plain-text).
@@ -606,10 +605,10 @@ function theme_node($node, $teaser = FALSE, $page = FALSE) {
}
if ($page == 0) {
- $output .= t('%title by %name', array('%title' => ''. check_plain($node->title) .'
', '%name' => theme('username', $node)));
+ $output .= t('!title by !name', array('!title' => ''. check_plain($node->title) .'
', '!name' => theme('username', $node)));
}
else {
- $output .= t('by %name', array('%name' => theme('username', $node)));
+ $output .= t('by !name', array('!name' => theme('username', $node)));
}
if (count($terms)) {
@@ -889,7 +888,7 @@ function theme_item_list($items = array(), $title = NULL, $type = 'ul', $attribu
* Returns code that emits the 'more help'-link.
*/
function theme_more_help_link($url) {
- return '
-
-', array('%admin-aggregator' => url('admin/content/aggregator'), '%admin-aggregator-add-feed' => url('admin/content/aggregator/add/feed'), '%admin-aggregator-add-category' => url('admin/content/aggregator/add/category'), '%admin-settings-aggregator' => url('admin/settings/aggregator'), '%admin-access' => url('admin/user/access'), '%aggregator' => url('aggregator')));
- $output .= ''. t('Module blocks') .'
';
- $output .= '
'. t('Some modules generate blocks that become available when the modules are enabled. These blocks can be administered via the blocks administration page.
', array('@admin-block' => url('admin/build/block'))) .''; $output .= ''. t('Administrators can also define custom blocks. These blocks consist of a title, a description, and a body which can be as long as you wish. Block content can be in any of the input formats supported for other content.') .'
'; $output .= t('You can
'. t('For more information please read the configuration and customization handbook Block page.', array('%block' => 'http://drupal.org/handbook/modules/block/')) .'
'; +', array('@admin-block' => url('admin/build/block'), '@admin-block-add' => url('admin/build/block/add'))); + $output .= ''. t('For more information please read the configuration and customization handbook Block page.', array('@block' => 'http://drupal.org/handbook/modules/block/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Controls the boxes that are displayed around the main content.'); @@ -44,11 +44,11 @@ function block_help($section) { return t("Blocks are boxes of content that may be rendered into certain regions of your web pages, for example, into sidebars. They are usually generated automatically by modules, but administrators can create blocks manually.
Only enabled blocks are shown. You can position blocks by specifying which area of the page they should appear in (e.g., a sidebar). Highlighted labels on this page show the regions into which blocks can be rendered. You can specify where within a region a block will appear by adjusting its weight.
-If you want certain blocks to disable themselves temporarily during high server loads, check the 'Throttle' box. You can configure the auto-throttle on the throttle configuration page after having enabled the throttle module.
+If you want certain blocks to disable themselves temporarily during high server loads, check the 'Throttle' box. You can configure the auto-throttle on the throttle configuration page after having enabled the throttle module.
You can configure the behaviour of each block (for example, specifying on which pages and for what users it will appear) by clicking the 'configure' link for each block.
-", array('%throttle' => url('admin/settings/throttle'))); +", array('@throttle' => url('admin/settings/throttle'))); case 'admin/build/block/add': - return t('Here you can create a new block. Once you have created this block you must make it active and give it a place on the page using blocks. The title is used when displaying the block. The description is used in the "block" column on the blocks page.
', array('%overview' => url('admin/build/block'))); + return t('Here you can create a new block. Once you have created this block you must make it active and give it a place on the page using blocks. The title is used when displaying the block. The description is used in the "block" column on the blocks page.
', array('@overview' => url('admin/build/block'))); } } @@ -443,11 +443,11 @@ function block_admin_configure($module = NULL, $delta = 0) { } else { $options = array(t('Show on every page except the listed pages.'), t('Show on only the listed pages.')); - $description = t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are '%blog' for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => theme('placeholder', 'blog'), '%blog-wildcard' => theme('placeholder', 'blog/*'), '%front' => theme('placeholder', 'TRUE
(PHP-mode, experts only).');
- $description .= t('If the PHP-mode is chosen, enter PHP code between %php. Note that executing incorrect PHP-code can break your Drupal site.', array('%php' => theme('placeholder', '')));
+ $description .= t('If the PHP-mode is chosen, enter PHP code between %php. Note that executing incorrect PHP-code can break your Drupal site.', array('%php' => ''));
}
$form['page_vis_settings']['visibility'] = array(
'#type' => 'radios',
@@ -526,7 +526,7 @@ function block_box_delete($bid = 0) {
$form['info'] = array('#type' => 'hidden', '#value' => $box['info'] ? $box['info'] : $box['title']);
$form['bid'] = array('#type' => 'hidden', '#value' => $bid);
- return confirm_form('block_box_delete_confirm', $form, t('Are you sure you want to delete the block %name?', array('%name' => theme('placeholder', $box['info']))), 'admin/build/block', '', t('Delete'), t('Cancel'));
+ return confirm_form('block_box_delete_confirm', $form, t('Are you sure you want to delete the block %name?', array('%name' => $box['info'])), 'admin/build/block', '', t('Delete'), t('Cancel'));
}
/**
@@ -534,7 +534,7 @@ function block_box_delete($bid = 0) {
*/
function block_box_delete_confirm_submit($form_id, $form_values) {
db_query('DELETE FROM {boxes} WHERE bid = %d', $form_values['bid']);
- drupal_set_message(t('The block %name has been removed.', array('%name' => theme('placeholder', $form_values['info']))));
+ drupal_set_message(t('The block %name has been removed.', array('%name' => $form_values['info'])));
cache_clear_all();
return 'admin/build/block';
};
@@ -545,7 +545,7 @@ function block_box_form($edit = array()) {
'#title' => t('Block description'),
'#default_value' => $edit['info'],
'#maxlength' => 64,
- '#description' => t('A brief description of your block. Used on the block overview page.', array('%overview' => url('admin/build/block'))),
+ '#description' => t('A brief description of your block. Used on the block overview page.', array('@overview' => url('admin/build/block'))),
'#required' => TRUE,
'#weight' => -19,
);
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index 5e829a05c09..d5b8ac0eb94 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -67,14 +67,14 @@ function blog_help($section) {
$output .= ''. t('If a user has the ability to post blogs, then the import module (news aggregator) will display a blog-it link next to each news item in its lists. Clicking on this takes the user to the blog submission form, with the title, a link to the item, and a link to the source into the body text already in the text box, ready for the user to add a comment or explanation. This actively encourages people to add blog entries about things they see and hear elsewhere in the website and from your syndicated partner sites.') .'
'; $output .= t('You can
'. t('For more information please read the configuration and customization handbook Blog page.', array('%blog' => 'http://drupal.org/handbook/modules/blog/')) .'
'; +', array('@user' => url('user'), '@node-add-blog' => url('node/add/blog'), '@admin-node-configure-types-blog' => url('admin/content/types/blog'), '@admin-settings-blogapi' => url('admin/settings/blogapi'), '@admin-block' => url('admin/build/block'))); + $output .= ''. t('For more information please read the configuration and customization handbook Blog page.', array('@blog' => 'http://drupal.org/handbook/modules/blog/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Enables keeping an easily and regularly updated web page or a blog.'); @@ -167,7 +167,7 @@ function blog_page_user($uid) { drupal_add_link(array('rel' => 'alternate', 'type' => 'application/rss+xml', - 'title' => t('RSS - %title', array('%title' => $title)), + 'title' => t('RSS - !title', array('!title' => $title)), 'href' => url("blog/$account->uid/feed"))); return $output; } diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module index ceb8b46028d..878afd9f8e8 100644 --- a/modules/blogapi/blogapi.module +++ b/modules/blogapi/blogapi.module @@ -13,15 +13,15 @@ function blogapi_help($section) { switch ($section) { case 'admin/help#blogapi': $output = ''. t('The blog API module enables a post to be posted to a site via external GUI applications. Many users prefer to use external tools to improve their ability to read and post responses in a customized way. The blog api provides users the freedom to use the blogging tools they want but still have the blogging server of choice.') .'
'; - $output .= ''. t('When this module is enabled and configured you can use programs like Ecto to create and publish posts from your desktop. Blog API module supports several XML-RPC based blogging APIs such as the Blogger API, MetaWeblog API, and most of the Movable Type API. Any desktop blogging tools or other services (e.g. Flickr\'s "post to blog") that support these APIs should work with this site.', array('%external-http-ecto-kung-foo-tv' => 'http://ecto.kung-foo.tv/', '%-' => url('http://www.blogger.com/developers/api/1_docs/'), '%external-http-www-xmlrpc-com-metaWeblogApi' => 'http://www.xmlrpc.com/metaWeblogApi', '%external-http-www-movabletype-org-docs-mtmanual_programmatic-html' => 'http://www.movabletype.org/docs/mtmanual_programmatic.html', '%external-http-www-flickr-com' => 'http://www.flickr.com')) .'
'; + $output .= ''. t('When this module is enabled and configured you can use programs like Ecto to create and publish posts from your desktop. Blog API module supports several XML-RPC based blogging APIs such as the Blogger API, MetaWeblog API, and most of the Movable Type API. Any desktop blogging tools or other services (e.g. Flickr\'s "post to blog") that support these APIs should work with this site.', array('@external-http-ecto-kung-foo-tv' => 'http://ecto.kung-foo.tv/', '@-' => url('http://www.blogger.com/developers/api/1_docs/'), '@external-http-www-xmlrpc-com-metaWeblogApi' => 'http://www.xmlrpc.com/metaWeblogApi', '@external-http-www-movabletype-org-docs-mtmanual_programmatic-html' => 'http://www.movabletype.org/docs/mtmanual_programmatic.html', '@external-http-www-flickr-com' => 'http://www.flickr.com')) .'
'; $output .= ''. t('This module also allows site administrators to configure which content types can be posted via the external applications. So, for instance, users can post forum topics as well as blog posts. Where supported, the external applications will display each content type as a separate "blog".') .'
'; $output .= t('You can
'. t('For more information please read the configuration and customization handbook BlogApi page.', array('%blogapi' => 'http://drupal.org/handbook/modules/blogapi/')) .'
'; +', array('@file-xmlrpc' => 'xmlrpc.php', '@admin-settings-blogapi' => url('admin/settings/blogapi'))); + $output .= ''. t('For more information please read the configuration and customization handbook BlogApi page.', array('@blogapi' => 'http://drupal.org/handbook/modules/blogapi/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Allows users to post content using applications that support XML-RPC blog APIs.'); @@ -226,7 +226,7 @@ function blogapi_blogger_new_post($appkey, $blogid, $username, $password, $conte $node = node_submit($edit); node_save($node); if ($node->nid) { - watchdog('content', t('%type: added %title using blog API.', array('%type' => ''. t($node->type) .'', '%title' => theme('placeholder', $node->title))), WATCHDOG_NOTICE, l(t('view'), "node/$node->nid")); + watchdog('content', t('@type: added %title using blog API.', array('@type' => t($node->type), '%title' => $node->title)), WATCHDOG_NOTICE, l(t('view'), "node/$node->nid")); // blogger.newPost returns a string so we cast the nid to a string by putting it in double quotes: return "$node->nid"; } @@ -282,7 +282,7 @@ function blogapi_blogger_edit_post($appkey, $postid, $username, $password, $cont $node = node_submit($node); node_save($node); if ($node->nid) { - watchdog('content', t('%type: updated %title using blog API.', array('%type' => ''. t($node->type) .'', '%title' => theme('placeholder', $node->title))), WATCHDOG_NOTICE, l(t('view'), "node/$node->nid")); + watchdog('content', t('@type: updated %title using blog API.', array('@type' => t($node->type), '%title' => $node->title)), WATCHDOG_NOTICE, l(t('view'), "node/$node->nid")); return TRUE; } diff --git a/modules/book/book.module b/modules/book/book.module index 87214754fe8..20d1e88ff82 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -941,14 +941,14 @@ function book_admin_edit_submit($form_id, $form_values) { $node->weight = $row['weight']; node_save($node); - watchdog('content', t('%type: updated %title.', array('%type' => theme('placeholder', t('book')), '%title' => theme('placeholder', $node->title))), WATCHDOG_NOTICE, l(t('view'), 'node/'. $node->nid)); + watchdog('content', t('%type: updated %title.', array('%type' => t('book'), '%title' => $node->title)), WATCHDOG_NOTICE, l(t('view'), 'node/'. $node->nid)); } } if (is_numeric(arg(3))) { // Updating pages in a single book. $book = node_load(arg(3)); - drupal_set_message(t('Updated book %title.', array('%title' => theme('placeholder', $book->title)))); + drupal_set_message(t('Updated book %title.', array('%title' => $book->title))); } else { // Updating the orphan pages. @@ -988,19 +988,19 @@ function book_help($section) { switch ($section) { case 'admin/help#book': $output = ''. t('The book content type is suited for creating structured, multi-page hypertexts such as site resource guides, manuals, and Frequently Asked Questions (FAQs). It permits a document to have chapters, sections, subsections, etc. Authors with suitable permissions can add pages to a collaborative book, placing them into the existing document by adding them to a table of contents menu. ') .'
'; - $output .= ''. t('Books have additional previous, up, and next navigation elements at the bottom of each page for moving through the text. Additional navigation may be provided by enabling the book navigation block on the block administration page.', array('%admin-block' => url('admin/build/block'))) .'
'; + $output .= ''. t('Books have additional previous, up, and next navigation elements at the bottom of each page for moving through the text. Additional navigation may be provided by enabling the book navigation block on the block administration page.', array('@admin-block' => url('admin/build/block'))) .'
'; $output .= ''. t('Users can select the printer-friendly version link visible at the bottom of a book page to generate a printer-friendly display of the page and all of its subsections. ') .'
'; $output .= ''. t('Administrators can view a book outline, from which is it possible to change the titles of sections, and their weight (thus reordering sections). From this outline, it is also possible to edit and/or delete book pages. Many content types besides pages (for example, blog entries, stories, and polls) can be added to a collaborative book by choosing the outline tab when viewing the post.') .'
'; $output .= t('You can
'. t('For more information please read the configuration and customization handbook Book page.', array('%book' => 'http://drupal.org/handbook/modules/book/')) .'
'; +', array('@node-add-book' => url('node/add/book'), '@admin-node-book' => url('admin/content/book'), '@admin-settings-content-types-book-page' => url('admin/content/types/book'), '@admin-block' => url('admin/build/block'), '@admin-access' => url('admin/user/access'))); + $output .= ''. t('For more information please read the configuration and customization handbook Book page.', array('@book' => 'http://drupal.org/handbook/modules/book/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Allows users to collaboratively author a book.'); @@ -1011,7 +1011,7 @@ function book_help($section) { } if (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == 'outline') { - return t('The outline feature allows you to include posts in the book hierarchy.', array('%book' => url('book'))); + return t('The outline feature allows you to include posts in the book hierarchy.', array('@book' => url('book'))); } } diff --git a/modules/comment/comment.module b/modules/comment/comment.module index a6c14879dbd..cc88de53bd3 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -74,11 +74,11 @@ function comment_help($section) { $output .= ''. t('An administrator can give comment permissions to user groups, and users can (optionally) edit their last comment, assuming no others have been posted since. Attached to each comment board is a control panel for customizing the way that comments are displayed. Users can control the chronological ordering of posts (newest or oldest first) and the number of posts to display on each page. Comments behave like other user submissions. Filters, smileys and HTML that work in nodes will also work with comments. The comment module provides specific features to inform site members when new comments have been posted.') .'
'; $output .= t('You can
'. t('For more information please read the configuration and customization handbook Comment page.', array('%comment' => 'http://drupal.org/handbook/modules/comment/')) .'
'; +', array('@admin-access' => url('admin/user/access'), '@admin-settings-comment' => url('admin/content/comment/settings'))); + $output .= ''. t('For more information please read the configuration and customization handbook Comment page.', array('@comment' => 'http://drupal.org/handbook/modules/comment/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Allows users to comment on and discuss published content.'); @@ -181,7 +181,7 @@ function theme_comment_block() { $result = db_query_range(db_rewrite_sql('SELECT c.nid, c.subject, c.cid, c.timestamp FROM {comments} c INNER JOIN {node} n ON n.nid = c.nid WHERE n.status = 1 AND c.status = %d ORDER BY c.timestamp DESC', 'c'), COMMENT_PUBLISHED, 0, 10); $items = array(); while ($comment = db_fetch_object($result)) { - $items[] = l($comment->subject, 'node/'. $comment->nid, NULL, NULL, 'comment-'. $comment->cid) .''. t('The contact module enables the use of both personal and site-wide contact forms, thereby facilitating easy communication within the community. While personal contact forms allow users to contact each other by e-mail, site-wide forms allow community members to contact the site administration from a central location. Users can specify a subject and message in the contact form, and also request that a copy of the e-mail be sent to their own address.') .'
'; $output .= ''. t("Users can activate/deactivate their personal contact forms in their account settings. Upon activation, a contact tab will appear in their user profiles. Privileged users such as site administrators are able to contact users even if they have chosen not to enable this feature.") .'
'; $output .= ''. t("Note that the contact tab will not appear when a user views his or her own profile; only when viewing another user's profile, if that user's contact form is enabled.") .'
'; - $output .= ''. t('If the menu module is enabled, a menu item linking to the site-wide contact page is added to the navigation block. It is disabled by default, but can be enabled via the menu management page. Links to the contact page may also be added to the primary and secondary links using the same page.', array('%menu-module' => url('admin/build/menu'))) .'
'; + $output .= ''. t('If the menu module is enabled, a menu item linking to the site-wide contact page is added to the navigation block. It is disabled by default, but can be enabled via the menu management page. Links to the contact page may also be added to the primary and secondary links using the same page.', array('@menu-module' => url('admin/build/menu'))) .'
'; $output .= t('Contact module links:') .''. t('The contact module also adds a menu item (disabled by default) to the navigation block.', array('%menu-settings' => url('admin/build/menu'))) .' '. $menu_note .'
'; + $output .= ''. t('The contact module also adds a menu item (disabled by default) to the navigation block.', array('@menu-settings' => url('admin/build/menu'))) .' '. $menu_note .'
'; return($output); } } @@ -130,7 +130,7 @@ function contact_user($type, &$edit, &$user, $category = NULL) { $form['contact']['contact'] = array('#type' => 'checkbox', '#title' => t('Personal contact form'), '#default_value' => $edit['contact'], - '#description' => t('Allow other users to contact you by e-mail via your personal contact form. Note that while your e-mail address is not made public to other members of the community, privileged users such as site administrators are able to contact you even if you choose not to enable this feature.', array('%url' => url("user/$user->uid/contact"))), + '#description' => t('Allow other users to contact you by e-mail via your personal contact form. Note that while your e-mail address is not made public to other members of the community, privileged users such as site administrators are able to contact you even if you choose not to enable this feature.', array('@url' => url("user/$user->uid/contact"))), ); return $form; } @@ -216,7 +216,7 @@ function contact_admin_edit_validate($form_id, $form_values) { $recipients = explode(',', $form_values['recipients']); foreach($recipients as $recipient) { if (!valid_email_address(trim($recipient))) { - form_set_error('recipients', t('%recipient is an invalid e-mail address.', array('%recipient' => theme('placeholder', $recipient)))); + form_set_error('recipients', t('%recipient is an invalid e-mail address.', array('%recipient' => $recipient))); } } } @@ -238,14 +238,14 @@ function contact_admin_edit_submit($form_id, $form_values) { $form_values['recipients'] = implode(',', $recipients); if (arg(3) == 'add') { db_query("INSERT INTO {contact} (category, recipients, reply, weight, selected) VALUES ('%s', '%s', '%s', %d, %d)", $form_values['category'], $form_values['recipients'], $form_values['reply'], $form_values['weight'], $form_values['selected']); - drupal_set_message(t('Category %category has been added.', array('%category' => theme('placeholder', $form_values['category'])))); - watchdog('mail', t('Contact form: category %category added.', array('%category' => theme('placeholder', $form_values['category']))), WATCHDOG_NOTICE, l(t('view'), 'admin/build/contact')); + drupal_set_message(t('Category %category has been added.', array('%category' => $form_values['category']))); + watchdog('mail', t('Contact form: category %category added.', array('%category' => $form_values['category'])), WATCHDOG_NOTICE, l(t('view'), 'admin/build/contact')); } else { db_query("UPDATE {contact} SET category = '%s', recipients = '%s', reply = '%s', weight = %d, selected = %d WHERE cid = %d", $form_values['category'], $form_values['recipients'], $form_values['reply'], $form_values['weight'], $form_values['selected'], $form_values['cid']); - drupal_set_message(t('Category %category has been updated.', array('%category' => theme('placeholder', $form_values['category'])))); - watchdog('mail', t('Contact form: category %category updated.', array('%category' => theme('placeholder', $form_values['category']))), WATCHDOG_NOTICE, l(t('view'), 'admin/build/contact')); + drupal_set_message(t('Category %category has been updated.', array('%category' => $form_values['category']))); + watchdog('mail', t('Contact form: category %category updated.', array('%category' => $form_values['category'])), WATCHDOG_NOTICE, l(t('view'), 'admin/build/contact')); } return 'admin/build/contact'; @@ -260,7 +260,7 @@ function contact_admin_delete($cid = NULL) { '#value' => $info->category, ); - return confirm_form('contact_admin_delete', $form, t('Are you sure you want to delete %category?', array('%category' => theme('placeholder', $info->category))), 'admin/build/contact', t('This action cannot be undone.'), t('Delete'), t('Cancel')); + return confirm_form('contact_admin_delete', $form, t('Are you sure you want to delete %category?', array('%category' => $info->category)), 'admin/build/contact', t('This action cannot be undone.'), t('Delete'), t('Cancel')); } else { drupal_set_message(t('Category not found.'), 'error'); @@ -273,8 +273,8 @@ function contact_admin_delete($cid = NULL) { */ function contact_admin_delete_submit($form_id, $form_values) { db_query("DELETE FROM {contact} WHERE cid = %d", arg(4)); - drupal_set_message(t('Category %category has been deleted.', array('%category' => theme('placeholder', $form_values['category'])))); - watchdog('mail', t('Contact form: category %category deleted.', array('%category' => theme('placeholder', $form_values['category']))), WATCHDOG_NOTICE); + drupal_set_message(t('Category %category has been deleted.', array('%category' => $form_values['category']))); + watchdog('mail', t('Contact form: category %category deleted.', array('%category' => $form_values['category'])), WATCHDOG_NOTICE); return 'admin/build/contact'; } @@ -283,7 +283,7 @@ function contact_admin_settings() { $form['contact_form_information'] = array('#type' => 'textarea', '#title' => t('Additional information'), '#default_value' => variable_get('contact_form_information', t('You can leave a message using the contact form below.')), - '#description' => t('Information to show on the contact page. Can be anything from submission guidelines to your postal address or telephone number.', array('%form' => url('contact'))), + '#description' => t('Information to show on the contact page. Can be anything from submission guidelines to your postal address or telephone number.', array('@form' => url('contact'))), ); $form['contact_hourly_threshold'] = array('#type' => 'select', '#title' => t('Hourly threshold'), @@ -315,7 +315,7 @@ function contact_mail_user() { if ($account = user_load(array('uid' => arg(1)))) { if (!valid_email_address($user->mail)) { - $output = t('You need to provide a valid e-mail address to contact other users. Please update your user information and try again.', array('%url' => url("user/$user->uid/edit"))); + $output = t('You need to provide a valid e-mail address to contact other users. Please update your user information and try again.', array('@url' => url("user/$user->uid/edit"))); } else if (!flood_is_allowed('contact', variable_get('contact_hourly_threshold', 3))) { $output = t('You cannot contact more than %number users per hour. Please try again later.', array('%number' => variable_get('contact_hourly_threshold', 3))); @@ -367,8 +367,8 @@ function contact_mail_user_submit($form_id, $edit) { $account = user_load(array('uid' => arg(1), 'status' => 1)); // Compose the body: $message[] = "$account->name,"; - $message[] = t("%name (%name-url) has sent you a message via your contact form (%form-url) at %site.", array('%name' => $user->name, '%name-url' => url("user/$user->uid", NULL, NULL, TRUE), '%form-url' => url($_GET['q'], NULL, NULL, TRUE), '%site' => variable_get('site_name', 'drupal'))); - $message[] = t("If you don't want to receive such e-mails, you can change your settings at %url.", array('%url' => url("user/$account->uid", NULL, NULL, TRUE))); + $message[] = t("!name (!name-url) has sent you a message via your contact form (!form-url) at !site.", array('!name' => $user->name, '!name-url' => url("user/$user->uid", NULL, NULL, TRUE), '!form-url' => url($_GET['q'], NULL, NULL, TRUE), '!site' => variable_get('site_name', 'drupal'))); + $message[] = t("If you don't want to receive such e-mails, you can change your settings at !url.", array('!url' => url("user/$account->uid", NULL, NULL, TRUE))); $message[] = t('Message:'); $message[] = $edit['message']; @@ -397,7 +397,7 @@ function contact_mail_user_submit($form_id, $edit) { // Log the operation: flood_register_event('contact'); - watchdog('mail', t('%name-from sent %name-to an e-mail.', array('%name-from' => theme('placeholder', $user->name), '%name-to' => theme('placeholder', $account->name)))); + watchdog('mail', t('%name-from sent %name-to an e-mail.', array('%name-from' => $user->name, '%name-to' => $account->name))); // Set a status message: drupal_set_message(t('The message has been sent.')); @@ -543,7 +543,7 @@ function contact_mail_page_submit($form_id, $edit) { // Log the operation: flood_register_event('contact'); - watchdog('mail', t('%name-from sent an e-mail regarding %category.', array('%name-from' => theme('placeholder', $edit['name'] ." <$from>"), '%category' => theme('placeholder', $contact->category)))); + watchdog('mail', t('%name-from sent an e-mail regarding %category.', array('%name-from' => $edit['name'] ." <$from>", '%category' => $contact->category))); // Update user: drupal_set_message(t('Your message has been sent.')); diff --git a/modules/drupal/drupal.module b/modules/drupal/drupal.module index 40ce116c7b0..1e7d7fc5ffa 100644 --- a/modules/drupal/drupal.module +++ b/modules/drupal/drupal.module @@ -24,11 +24,11 @@ function drupal_help($section) { $output .= ''. t('The Drupal module administration page allows you to set the xml-rpc server page and other related options.') .'
'; $output .= t('You can
'. t('If you maintain a directory of sites, you can list them on a page using the drupal_client_page()
function. Sample instructions:
'. t('For more information please read the configuration and customization handbook Drupal page.', array('%drupal' => 'http://drupal.org/handbook/modules/drupal/')) .'
'; + $output .= ''. t('For more information please read the configuration and customization handbook Drupal page.', array('@drupal' => 'http://drupal.org/handbook/modules/drupal/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Lets you register your site with a central server and improve ranking of Drupal projects by posting information on your installed modules and themes; also enables users to log in using a Drupal ID.'); case 'admin/settings/distributed-authentication': - return t('Using this your site can "call home" to another Drupal server. By calling home to drupal.org and sending a list of your installed modules and themes, you help rank projects on drupal.org and so assist all Drupal administrators to find the best components for meeting their needs. If you want to register with a different server, you can change the Drupal XML-RPC server setting -- but the server has to be able to handle Drupal XML. Some XML-RPC servers may present directories of all registered sites. To get all your site information listed, go to the site information settings page and set the site name, the e-mail address, the slogan, and the mission statement.
', array('%site-settings' => url('admin/settings/site-information'))); + return t('Using this your site can "call home" to another Drupal server. By calling home to drupal.org and sending a list of your installed modules and themes, you help rank projects on drupal.org and so assist all Drupal administrators to find the best components for meeting their needs. If you want to register with a different server, you can change the Drupal XML-RPC server setting -- but the server has to be able to handle Drupal XML. Some XML-RPC servers may present directories of all registered sites. To get all your site information listed, go to the site information settings page and set the site name, the e-mail address, the slogan, and the mission statement.
', array('@site-settings' => url('admin/settings/site-information'))); case 'user/help#drupal': - return variable_get('drupal_authentication_service', 0) ? t("Drupal is the name of the software that powers %this-site. There are Drupal web sites all over the world, and many of them share their registration databases so that users may freely log in to any Drupal site using a single Drupal ID.
-So please feel free to log in to your account here at %this-site with a username from another Drupal site. The format of a Drupal ID is similar to an e-mail address: username@server. An example of a valid Drupal ID is mwlily@drupal.org.
", array('%Drupal' => 'http://drupal.org', '%this-site' => ''. variable_get('site_name', 'this web site') .'')) : ''; + return variable_get('drupal_authentication_service', 0) ? t("Drupal is the name of the software that powers %this-site. There are Drupal web sites all over the world, and many of them share their registration databases so that users may freely log in to any Drupal site using a single Drupal ID.
+So please feel free to log in to your account here at %this-site with a username from another Drupal site. The format of a Drupal ID is similar to an e-mail address: username@server. An example of a valid Drupal ID is mwlily@drupal.org.
", array('@Drupal' => 'http://drupal.org', '%this-site' => variable_get('site_name', 'this web site'))) : ''; } } function drupal_sites_registry_settings() { // Check if all required fields are present if ((variable_get('site_name', 'drupal') == 'drupal') || (variable_get('site_name', 'drupal') == '')) { - form_set_error('drupal_directory', t('You must set the name of your site on the administer » settings » site information page.', array('%url' => url('admin/settings/site-information')))); + form_set_error('drupal_directory', t('You must set the name of your site on the administer » settings » site information page.', array('@url' => url('admin/settings/site-information')))); } else if (variable_get('site_mail', ini_get('sendmail_from')) == '') { - form_set_error('drupal_directory', t('You must set an e-mail address for your site on the site information settings page.', array('%url' => url('admin/settings/site-information')))); + form_set_error('drupal_directory', t('You must set an e-mail address for your site on the site information settings page.', array('@url' => url('admin/settings/site-information')))); } else if (variable_get('site_slogan', '') == '') { - form_set_error('drupal_directory', t('You must set your site slogan on the site information settings page.', array('%url' => url('admin/settings/site-information')))); + form_set_error('drupal_directory', t('You must set your site slogan on the site information settings page.', array('@url' => url('admin/settings/site-information')))); } else if (variable_get('site_mission', '') == '') { - form_set_error('drupal_directory', t('You must set your site mission on the site information settings page.' , array('%url' => url('admin/settings/site-information')))); + form_set_error('drupal_directory', t('You must set your site mission on the site information settings page.' , array('@url' => url('admin/settings/site-information')))); } $options = array('1' => t('Enabled'), '0' => t('Disabled')); @@ -76,7 +76,7 @@ function drupal_sites_registry_settings() { '#title' => t('Register with a Drupal server'), '#default_value' => variable_get('drupal_register', 0), '#options' => $options, - '#description' => t("If enabled, your Drupal site will register itself with the specified Drupal XML-RPC server. For this to work properly, you must set your site's name, e-mail address, slogan and mission statement. When the \"Drupal XML-RPC server\" field is set to \"%drupal-xml-rpc\", your web site will register itself with drupal.org. Requires the cron feature to be enabled.", array("%drupal-xml-rpc" => "http://drupal.org/xmlrpc.php", "%drupal-sites" => "http://drupal.org/drupal-sites/")) + '#description' => t("If enabled, your Drupal site will register itself with the specified Drupal XML-RPC server. For this to work properly, you must set your site's name, e-mail address, slogan and mission statement. When the Drupal XML-RPC server field is set to %drupal-xml-rpc, your web site will register itself with drupal.org. Requires the cron feature to be enabled.", array("%drupal-xml-rpc" => "http://drupal.org/xmlrpc.php")) ); $form['drupal_server'] = array( @@ -130,7 +130,7 @@ function drupal_distributed_authentication_settings() { '#type' => 'textfield', '#title' => t('Default authentication server'), '#default_value' => variable_get('drupal_default_da_server', ''), - '#description' => t('The URL of the default Drupal authentication server. Omit the %http prefix (e.g. drupal.org, www.example.com, etc.). If the authentication service has been enabled, users registered at the server specified here, will not need to append the server to their user name when logging into your site. This enables users to provide a briefer, more familiar username in the login form.', array('%http' => theme('placeholder', 'http'))) + '#description' => t('The URL of the default Drupal authentication server. Omit the %http prefix (e.g. drupal.org, www.example.com, etc.). If the authentication service has been enabled, users registered at the server specified here, will not need to append the server to their user name when logging into your site. This enables users to provide a briefer, more familiar username in the login form.', array('%http' => 'http')) ); $form['drupal_default_da_server_only'] = array( @@ -202,7 +202,7 @@ function drupal_client_ping($client, $system) { db_query("INSERT INTO {client_system} (cid, name, type) VALUES (%d, '%s', '%s')", $client['cid'], $item['name'], $item['type']); } } - watchdog('client ping', t('Ping from %name (%link).', array('%name' => theme('placeholder', $client['name']), '%link' => theme('placeholder', $client['link']))), WATCHDOG_NOTICE, 'view'); + watchdog('client ping', t('Ping from %name (%link).', array('%name' => $client['name'], '%link' => $client['link'])), WATCHDOG_NOTICE, 'view'); return TRUE; } @@ -297,7 +297,7 @@ function drupal_notify($server) { $result = xmlrpc($server, 'drupal.client.ping', $client, $system); if ($result === FALSE) { - watchdog('server ping', t('Failed to notify %server; error code: %errno; error message: %error_msg.', array('%server' => theme('placeholder', $server), '%errno' => theme('placeholder', xmlrpc_errno()), '%error_msg' => theme('placeholder', xmlrpc_error_msg()))), WATCHDOG_WARNING); + watchdog('server ping', t('Failed to notify %server; error code: %errno; error message: %error_msg.', array('%server' => $server, '%errno' => xmlrpc_errno(), '%error_msg' => xmlrpc_error_msg())), WATCHDOG_WARNING); } } @@ -332,7 +332,7 @@ function drupal_auth($username, $password, $server = FALSE) { if (!empty($server)) { $result = xmlrpc("http://$server/xmlrpc.php", 'drupal.login', $username, $password); if ($result === FALSE) { - drupal_set_message(t('Error %code : %message', array('%code' => theme('placeholder', xmlrpc_errno()), '%message' => theme('placeholder', xmlrpc_error_msg()))), 'error'); + drupal_set_message(t('Error %code: %message', array('%code' => xmlrpc_errno(), '%message' => xmlrpc_error_msg())), 'error'); } else { return $result; diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 75756f9d642..d1fd2245605 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -24,11 +24,11 @@ function filter_help($section) { $output .= ''. t('Users can choose between the available input formats when creating or editing content. Administrators can configure which input formats are available to which user roles, as well as choose a default input format. Administrators can also create new input formats. Each input format can be configured to use a selection of filters.') .'
'; $output .= t('You can
'. t('For more information please read the configuration and customization handbook Filter page.', array('%filter' => 'http://drupal.org/handbook/modules/filter/')) .'
'; +', array('@admin-filters' => url('admin/settings/filters'))); + $output .= ''. t('For more information please read the configuration and customization handbook Filter page.', array('@filter' => 'http://drupal.org/handbook/modules/filter/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Handles the filtering of content in preparation for display.'); @@ -43,11 +43,11 @@ function filter_help($section) { case 'admin/settings/filters/'. arg(3): return t('Every filter performs one particular change on the user input, for example stripping out malicious HTML or making URLs clickable. Choose which filters you want to apply to text in this input format.
-If you notice some filters are causing conflicts in the output, you can rearrange them.
', array('%rearrange' => url('admin/settings/filters/'. arg(3) .'/order'))); +If you notice some filters are causing conflicts in the output, you can rearrange them.
', array('@rearrange' => url('admin/settings/filters/'. arg(3) .'/order'))); case 'admin/settings/filters/'. arg(3) .'/configure': return t(' -If you cannot find the settings for a certain filter, make sure you\'ve enabled it on the view tab first.
', array('%url' => url('admin/settings/filters/'. arg(3)))); +If you cannot find the settings for a certain filter, make sure you\'ve enabled it on the view tab first.
', array('@url' => url('admin/settings/filters/'. arg(3)))); case 'admin/settings/filters/'. arg(3) .'/order': return t(' @@ -101,7 +101,7 @@ function filter_menu($may_cache) { if (isset($formats[arg(3)])) { $items[] = array('path' => 'admin/settings/filters/'. arg(3), - 'title' => t("'%format' input format", array('%format' => $formats[arg(3)]->name)), + 'title' => t("!format input format", array('!format' => $formats[arg(3)]->name)), 'callback' => 'filter_admin_format_form', 'callback arguments' => array('format' => $formats[arg(3)]), 'type' => MENU_CALLBACK, @@ -216,7 +216,7 @@ function filter_filter_tips($delta, $format, $long = FALSE) { } else { $rows[] = array( - array('data' => t('No help provided for tag %tag.', array('%tag' => check_plain($tag))), 'class' => 'description', 'colspan' => 3), + array('data' => t('No help provided for tag %tag.', array('%tag' => $tag)), 'class' => 'description', 'colspan' => 3), ); } } @@ -359,7 +359,7 @@ function filter_admin_delete() { $form['format'] = array('#type' => 'hidden', '#value' => $format->format); $form['name'] = array('#type' => 'hidden', '#value' => $format->name); - return confirm_form('filter_admin_delete', $form, t('Are you sure you want to delete the input format %format?', array('%format' => theme('placeholder', $format->name))), 'admin/settings/filters', t('If you have any content left in this input format, it will be switched to the default input format. This action cannot be undone.'), t('Delete'), t('Cancel')); + return confirm_form('filter_admin_delete', $form, t('Are you sure you want to delete the input format %format?', array('%format' => $format->name)), 'admin/settings/filters', t('If you have any content left in this input format, it will be switched to the default input format. This action cannot be undone.'), t('Delete'), t('Cancel')); } else { drupal_set_message(t('The default format cannot be deleted.')); @@ -385,7 +385,7 @@ function filter_admin_delete_submit($form_id, $form_values) { db_query("UPDATE {boxes} SET format = %d WHERE format = %d", $default, $form_values['format']); cache_clear_all('filter:'. $form_values['format'], TRUE); - drupal_set_message(t('Deleted input format %format.', array('%format' => theme('placeholder', $form_values['name'])))); + drupal_set_message(t('Deleted input format %format.', array('%format' => $form_values['name']))); return 'admin/settings/filters'; } @@ -469,7 +469,7 @@ function filter_admin_format_form_validate($form_id, $form_values) { $name = trim($form_values['name']); $result = db_fetch_object(db_query("SELECT format FROM {filter_formats} WHERE name='%s'", $name)); if ($result) { - form_set_error('name', t('Filter format names need to be unique. A format named %name already exists.', array('%name' => theme('placeholder', $name)))); + form_set_error('name', t('Filter format names need to be unique. A format named %name already exists.', array('%name' => $name))); } } } @@ -489,7 +489,7 @@ function filter_admin_format_form_submit($form_id, $form_values) { db_query("INSERT INTO {filter_formats} (name) VALUES ('%s')", $name); $result = db_fetch_object(db_query("SELECT MAX(format) AS format FROM {filter_formats}")); $format = $result->format; - drupal_set_message(t('Added input format %format.', array('%format' => theme('placeholder', $name)))); + drupal_set_message(t('Added input format %format.', array('%format' => $name))); } else { drupal_set_message(t('The input format settings have been updated.')); diff --git a/modules/forum/forum.module b/modules/forum/forum.module index bf3801e1312..ced6cffb376 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -17,13 +17,13 @@ function forum_help($section) { $output .= ''. t('Forums module requires Taxonomy and Comments module be enabled.') .'
'; $output .= t('You can
'. t('For more information please read the configuration and customization handbook Forum page.', array('%forum' => 'http://drupal.org/handbook/modules/forum/')) .'
'; +', array('@admin-forum' => url('admin/content/forum'), '@admin-modules' => url('admin/settings/modules'), '@admin-help-comment' => url('admin/help/comment'), '@admin-help-taxonomy' => url('admin/help/taxonomy'))); + $output .= ''. t('For more information please read the configuration and customization handbook Forum page.', array('@forum' => 'http://drupal.org/handbook/modules/forum/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Enables threaded discussions about general topics.'); @@ -373,7 +373,7 @@ function forum_validate($node) { if (db_result(db_query('SELECT COUNT(*) FROM {term_data} WHERE tid = %d AND vid = %d', $term, $vocabulary))) { if (in_array($term, $containers)) { $term = taxonomy_get_term($term); - form_set_error('taxonomy', t('The item %forum is only a container for forums. Please select one of the forums below it.', array('%forum' => theme('placeholder', $term->name)))); + form_set_error('taxonomy', t('The item %forum is only a container for forums. Please select one of the forums below it.', array('%forum' => $term->name))); } } } @@ -547,10 +547,10 @@ function forum_form_submit($form_id, $form_values) { $containers[] = $form_values['tid']; variable_set('forum_containers', $containers); } - drupal_set_message(t('Created new %type %term.', array('%term' => theme('placeholder', $form_values['name']), '%type' => $type))); + drupal_set_message(t('Created new @type %term.', array('%term' => $form_values['name'], '@type' => $type))); break; case SAVED_UPDATED: - drupal_set_message(t('The %type %term has been updated.', array('%term' => theme('placeholder', $form_values['name']), '%type' => $type))); + drupal_set_message(t('The @type %term has been updated.', array('%term' => $form_values['name'], '@type' => $type))); break; } return 'admin/content/forum'; @@ -567,7 +567,7 @@ function _forum_confirm_delete($tid) { $form['tid'] = array('#type' => 'value', '#value' => $tid); $form['name'] = array('#type' => 'value', '#value' => $term->name); - return confirm_form('forum_confirm_delete', $form, t('Are you sure you want to delete the forum %name?', array('%name' => theme('placeholder', $term->name))), 'admin/content/forums', t('Deleting a forum or container will delete all sub-forums and associated posts as well. This action cannot be undone.'), t('Delete'), t('Cancel')); + return confirm_form('forum_confirm_delete', $form, t('Are you sure you want to delete the forum %name?', array('%name' => $term->name)), 'admin/content/forums', t('Deleting a forum or container will delete all sub-forums and associated posts as well. This action cannot be undone.'), t('Delete'), t('Cancel')); } /** @@ -575,8 +575,8 @@ function _forum_confirm_delete($tid) { */ function forum_confirm_delete_submit($form_id, $form_values) { taxonomy_del_term($form_values['tid']); - drupal_set_message(t('The forum %term and all sub-forums and associated posts have been deleted.', array('%term' => theme('placeholder', $form_values['name'])))); - watchdog('content', t('forum: deleted %term and all its sub-forums and associated posts.', array('%term' => theme('placeholder', $form_values['name'])))); + drupal_set_message(t('The forum %term and all sub-forums and associated posts have been deleted.', array('%term' => $form_values['name']))); + watchdog('content', t('forum: deleted %term and all its sub-forums and associated posts.', array('%term' => $form_values['name']))); return 'admin/content/forum'; } @@ -600,7 +600,7 @@ function forum_overview() { } } else { - $rows[] = array(array('data' => '' . t('There are no existing containers or forums. You may add some on the add container or add forum pages.', array('%container' => url('admin/content/forum/add/container'), '%forum' => url('admin/content/forum/add/forum'))) . '', 'colspan' => 2)); + $rows[] = array(array('data' => '' . t('There are no existing containers or forums. You may add some on the add container or add forum pages.', array('@container' => url('admin/content/forum/add/container'), '@forum' => url('admin/content/forum/add/forum'))) . '', 'colspan' => 2)); } return theme('table', $header, $rows); } @@ -692,7 +692,7 @@ function _forum_get_vid() { */ function _forum_format($topic) { if ($topic && $topic->timestamp) { - return t('%time agoThis guide explains what the various modules in Drupal do and how to configure them.
-It is not a substitute for the Drupal handbook available online and should be used in conjunction with it. The online reference handbook might be more up-to-date and has helpful user-contributed comments. It is your definitive reference point for all Drupal documentation.
-', array('%Drupal' => 'http://drupal.org', '%handbook' => 'http://drupal.org/handbook')); + $output = t('This guide explains what the various modules in Drupal do and how to configure them.
+It is not a substitute for the Drupal handbook available online and should be used in conjunction with it. The online reference handbook might be more up-to-date and has helpful user-contributed comments. It is your definitive reference point for all Drupal documentation.
+', array('@Drupal' => 'http://drupal.org', '@handbook' => 'http://drupal.org/handbook')); return $output; case 'admin/help#help': $output = ''. t('The help module displays context sensitive help information. Users can learn how to use modules and accomplish tasks quicker with less errors by clicking on links in provided by the help module.') .'
'; @@ -114,7 +114,7 @@ function help_help($section) { '); $output .= ''. t('You can not administer the help system.') .'
'; - $output .= ''. t('For more information please read the configuration and customization handbook Help page.', array('%help' => 'http://drupal.org/handbook/modules/help/')) .'
'; + $output .= ''. t('For more information please read the configuration and customization handbook Help page.', array('@help' => 'http://drupal.org/handbook/modules/help/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Manages the display of online help.'); diff --git a/modules/legacy/legacy.module b/modules/legacy/legacy.module index 5dd0443595c..2105ffb8d1f 100644 --- a/modules/legacy/legacy.module +++ b/modules/legacy/legacy.module @@ -25,7 +25,7 @@ function legacy_help($section) { '); $output .= ''. t('Legacy module has no configurable options.') .'
'; - $output .= ''. t('For more information please read the configuration and customization handbook Legacy page.', array('%legacy' => 'http://drupal.org/handbook/modules/legacy/')) .'
'; + $output .= ''. t('For more information please read the configuration and customization handbook Legacy page.', array('@legacy' => 'http://drupal.org/handbook/modules/legacy/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Provides legacy handlers for upgrades from older Drupal installations.'); diff --git a/modules/locale/locale.module b/modules/locale/locale.module index 42c69508d51..76758642915 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -24,28 +24,28 @@ function locale_help($section) { $output .= ''. t('If an existing translation does not meet your needs, the .po files are easily edited with special editing tools. The locale module\'s import feature allows you to add strings from such files into your site\'s database. The export functionality enables you to share your translations with others, generating Portable Object files from your site strings.') .'
'; $output .= t('You can
'. t('For more information please read the configuration and customization handbook Locale page.', array('%locale' => 'http://drupal.org/handbook/modules/locale/')) .'
'; +', array('@admin-locale' => url('admin/settings/locale'), '@admin-locale-string-search' => url('admin/settings/locale/string/search'), '@admin-locale-language-add' => url('admin/settings/locale/language/add'), '@external-http-drupal-org-project-Translations' => 'http://drupal.org/project/Translations')); + $output .= ''. t('For more information please read the configuration and customization handbook Locale page.', array('@locale' => 'http://drupal.org/handbook/modules/locale/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Enables the translation of the user interface to languages other than English.'); case 'admin/settings/locale': case 'admin/settings/locale/language/overview': - return t("Drupal provides support for the translation of its interface text into different languages. This page provides an overview of the installed languages. You can add a language on the add language page, or directly by importing a translation. If multiple languages are enabled, registered users will be able to set their preferred language. The site default will be used for anonymous visitors and for users without their own settings.
Drupal interface translations may be added or extended by several courses: by importing an existing translation, by translating everything from scratch, or by a combination of these approaches.
", array("%search" => url("admin/settings/locale/string/search"), "%import" => url("admin/settings/locale/language/import"), "%add-language" => url("admin/settings/locale/language/add"))); + return t("Drupal provides support for the translation of its interface text into different languages. This page provides an overview of the installed languages. You can add a language on the add language page, or directly by importing a translation. If multiple languages are enabled, registered users will be able to set their preferred language. The site default will be used for anonymous visitors and for users without their own settings.
Drupal interface translations may be added or extended by several courses: by importing an existing translation, by translating everything from scratch, or by a combination of these approaches.
", array("@search" => url("admin/settings/locale/string/search"), "@import" => url("admin/settings/locale/language/import"), "@add-language" => url("admin/settings/locale/language/add"))); case 'admin/settings/locale/language/add': - return t("You need to add all languages in which you would like to display the site interface. If you can't find the desired language in the quick-add dropdown, then you will need to provide the proper language code yourself. The language code may be used to negotiate with browsers and to present flags, etc., so it is important to pick a code that is standardised for the desired language. You can also add a language by importing a translation.
", array("%import" => url("admin/settings/locale/language/import"))); + return t("You need to add all languages in which you would like to display the site interface. If you can't find the desired language in the quick-add dropdown, then you will need to provide the proper language code yourself. The language code may be used to negotiate with browsers and to present flags, etc., so it is important to pick a code that is standardised for the desired language. You can also add a language by importing a translation.
", array("@import" => url("admin/settings/locale/language/import"))); case 'admin/settings/locale/language/import': - return t("This page allows you to import a translation provided in the gettext Portable Object (.po) format. The easiest way to get your site translated is to obtain an existing Drupal translation and to import it. You can find existing translations on the Drupal translation page. Note that importing a translation file might take a while.
", array('%url' => 'http://drupal.org/project/translations')); + return t("This page allows you to import a translation provided in the gettext Portable Object (.po) format. The easiest way to get your site translated is to obtain an existing Drupal translation and to import it. You can find existing translations on the Drupal translation page. Note that importing a translation file might take a while.
", array('@url' => 'http://drupal.org/project/translations')); case 'admin/settings/locale/language/export': return t("This page allows you to export Drupal strings. The first option is to export a translation so it can be shared. The second option generates a translation template, which contains all Drupal strings, but without their translations. You can use this template to start a new translation using various software packages designed for this task.
"); case 'admin/settings/locale/string/search': - return t("It is often convenient to get the strings from your setup on the export page, and use a desktop Gettext translation editor to edit the translations. On this page you can search in the translated and untranslated strings, and the default English texts provided by Drupal.
", array("%export" => url("admin/settings/locale/language/export"))); + return t("It is often convenient to get the strings from your setup on the export page, and use a desktop Gettext translation editor to edit the translations. On this page you can search in the translated and untranslated strings, and the default English texts provided by Drupal.
", array("@export" => url("admin/settings/locale/language/export"))); } } @@ -338,7 +338,7 @@ function locale_admin_manage_delete_form() { } else { $form['langcode'] = array('#type' => 'value', '#value' => $langcode); - return confirm_form('locale_admin_manage_delete_form', $form, t('Are you sure you want to delete the language %name?', array('%name' => theme('placeholder', t($languages['name'][$langcode])))), 'admin/settings/locale/language/overview', t('Deleting a language will remove all data associated with it. This action cannot be undone.'), t('Delete'), t('Cancel')); + return confirm_form('locale_admin_manage_delete_form', $form, t('Are you sure you want to delete the language %name?', array('%name' => t($languages['name'][$langcode]))), 'admin/settings/locale/language/overview', t('Deleting a language will remove all data associated with it. This action cannot be undone.'), t('Delete'), t('Cancel')); } } @@ -350,7 +350,7 @@ function locale_admin_manage_delete_form_submit($form_id, $form_values) { if (isset($languages['name'][$form_values['langcode']])) { db_query("DELETE FROM {locales_meta} WHERE locale = '%s'", $form_values['langcode']); db_query("DELETE FROM {locales_target} WHERE locale = '%s'", $form_values['langcode']); - $message = t('The language %locale has been removed.', array('%locale' => theme('placeholder', t($languages['name'][$form_values['langcode']])))); + $message = t('The language %locale has been removed.', array('%locale' => t($languages['name'][$form_values['langcode']]))); drupal_set_message($message); watchdog('locale', $message); } diff --git a/modules/menu/menu.module b/modules/menu/menu.module index d0167119d86..8e6d424144f 100644 --- a/modules/menu/menu.module +++ b/modules/menu/menu.module @@ -12,31 +12,31 @@ function menu_help($section) { switch ($section) { case 'admin/help#menu': - $output = t('Menus are a collection of links (menu items) used to navigate a website. The menu module provides an interface to control and customize the powerful menu system that comes with Drupal. Menus are primarily displayed as a hierarchical list of links using Drupal\'s highly flexible blocks feature. Each menu automatically creates a block of the same name. By default, new menu items are placed inside a built-in menu labelled %navigation, but administrators can also create custom menus.
-Drupal themes generally provide out-of-the-box support for two menus commonly labelled %primary-links and %secondary-links. These are sets of links which are usually displayed in the header or footer of each page (depending on the currently active theme). Any menu can be designated as the primary or secondary links menu via the menu settings page.
+ $output = t('Menus are a collection of links (menu items) used to navigate a website. The menu module provides an interface to control and customize the powerful menu system that comes with Drupal. Menus are primarily displayed as a hierarchical list of links using Drupal\'s highly flexible blocks feature. Each menu automatically creates a block of the same name. By default, new menu items are placed inside a built-in menu labelled %navigation, but administrators can also create custom menus.
+Drupal themes generally provide out-of-the-box support for two menus commonly labelled %primary-links and %secondary-links. These are sets of links which are usually displayed in the header or footer of each page (depending on the currently active theme). Any menu can be designated as the primary or secondary links menu via the menu settings page.
Menu administration tabs:You can
'. t('For more information please read the configuration and customization handbook Menu page.', array('%menu' => 'http://drupal.org/handbook/modules/menu/')) .'
'; +', array('@admin-menu' => url('admin/build/menu'), '@admin-block' => url('admin/build/block'), '@admin-menu-menu-add' => url('admin/build/menu/menu/add'), '@admin-menu-item-add' => url('admin/build/menu/item/add'), '@admin-settings-menus' => url('admin/build/menu/settings'))); + $output .= ''. t('For more information please read the configuration and customization handbook Menu page.', array('@menu' => 'http://drupal.org/handbook/modules/menu/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Allows administrators to customize the site navigation menu.'); case 'admin/build/menu': - return ''. t('Menus are a collection of links (menu items) used to navigate a website. The list(s) below display the currently available menus along with their menu items. Select an operation from the list to manage each menu or menu item.', array('%admin-settings-menus' => url('admin/build/menu/settings'), '%admin-block'=>url('admin/build/block'))) .'
'; + return ''. t('Menus are a collection of links (menu items) used to navigate a website. The list(s) below display the currently available menus along with their menu items. Select an operation from the list to manage each menu or menu item.', array('@admin-settings-menus' => url('admin/build/menu/settings'), '@admin-block'=> url('admin/build/block'))) .'
'; case 'admin/build/menu/menu/add': - return ''. t('Enter the name for your new menu. Remember to enable the newly created block in the blocks administration page.', array('%blocks' => url('admin/build/block'))) .'
'; + return ''. t('Enter the name for your new menu. Remember to enable the newly created block in the blocks administration page.', array('@blocks' => url('admin/build/block'))) .'
'; case 'admin/build/menu/item/add': return ''. t('Enter the title, path, position and the weight for your new menu item.') .'
'; } @@ -251,7 +251,7 @@ function menu_form_alter($form_id, &$form) { ); $form['menu']['advanced'] = array('#type' => 'item', - '#value' => t('You may also edit the advanced settings for this menu item.', array('%edit' => url("admin/build/menu/item/edit/{$item['mid']}"))), + '#value' => t('You may also edit the advanced settings for this menu item.', array('@edit' => url("admin/build/menu/item/edit/{$item['mid']}"))), ); } } @@ -271,7 +271,7 @@ function menu_configure() { ); $form['settings_links']['intro'] = array('#type' => 'item', - '#value' => t('Primary and secondary links provide a navigational menu system which usually (depending on your theme) appears at the top-right of the browser window. The links displayed can be generated either from a custom list created via the menu administration page or from a built-in list of menu items such as the navigation menu links.', array('%menu' => url('admin/build/menu'))), + '#value' => t('Primary and secondary links provide a navigational menu system which usually (depending on your theme) appears at the top-right of the browser window. The links displayed can be generated either from a custom list created via the menu administration page or from a built-in list of menu items such as the navigation menu links.', array('@menu' => url('admin/build/menu'))), ); $form['settings_links']['menu_primary_menu'] = array('#type' => 'select', @@ -375,7 +375,7 @@ function menu_edit_item_form($type, $mid = 0) { $form['path'] = array('#type' => 'textfield', '#title' => t('Path'), '#default_value' => $item['path'], - '#description' => t('The path this menu item links to. This can be an internal Drupal path such as %add-node or an external URL such as %drupal. Enter %front to link to the front page.', array('%front' => theme('placeholder', 'You can
'. t('For more information please read the configuration and customization handbook Node page.', array('%node' => 'http://drupal.org/handbook/modules/node/')) .'
'; +', array('@search' => url('search'), '@admin-settings-content-types' => url('admin/content/types'))); + $output .= ''. t('For more information please read the configuration and customization handbook Node page.', array('@node' => 'http://drupal.org/handbook/modules/node/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Allows content to be submitted to the site and displayed on pages.'); @@ -72,7 +72,7 @@ function node_cron() { */ function node_title_list($result, $title = NULL) { while ($node = db_fetch_object($result)) { - $items[] = l($node->title, 'node/'. $node->nid, $node->comment_count ? array('title' => format_plural($node->comment_count, '1 comment', '%count comments')) : ''); + $items[] = l($node->title, 'node/'. $node->nid, $node->comment_count ? array('title' => format_plural($node->comment_count, '1 comment', '@count comments')) : ''); } return theme('node_list', $items, $title); @@ -1528,7 +1528,7 @@ function node_multiple_delete_confirm_submit($form_id, $edit) { * Generate an overview table of older revisions of a node. */ function node_revision_overview($node) { - drupal_set_title(t('Revisions for %title', array('%title' => check_plain($node->title)))); + drupal_set_title(t('Revisions for %title', array('%title' => $node->title))); $header = array(t('Revision'), array('data' => t('Operations'), 'colspan' => 2)); @@ -1548,13 +1548,13 @@ function node_revision_overview($node) { $operations = array(); if ($revision->current_vid > 0) { - $row[] = array('data' => t('%date by %username', array('%date' => l(format_date($revision->timestamp, 'small'), "node/$node->nid"), '%username' => theme('username', $revision))) + $row[] = array('data' => t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'small'), "node/$node->nid"), '!username' => theme('username', $revision))) . (($revision->log != '') ? ''. filter_xss($revision->log) .'
' : ''), 'class' => 'revision-current'); $operations[] = array('data' => theme('placeholder', t('current revision')), 'class' => 'revision-current', 'colspan' => 2); } else { - $row[] = t('%date by %username', array('%date' => l(format_date($revision->timestamp, 'small'), "node/$node->nid/revisions/$revision->vid/view"), '%username' => theme('username', $revision))) + $row[] = t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'small'), "node/$node->nid/revisions/$revision->vid/view"), '!username' => theme('username', $revision))) . (($revision->log != '') ? ''. filter_xss($revision->log) .'
' : ''); if ($revert_permission) { $operations[] = l(t('revert'), "node/$node->nid/revisions/$revision->vid/revert"); @@ -1581,13 +1581,13 @@ function node_revision_revert($nid, $revision) { if ((user_access('revert revisions') || user_access('administer nodes')) && node_access('update', $node)) { if ($node->vid) { $node->revision = 1; - $node->log = t('Copy of the revision from %date.', array('%date' => theme('placeholder', format_date($node->revision_timestamp)))); + $node->log = t('Copy of the revision from %date.', array('%date' => format_date($node->revision_timestamp))); $node->taxonomy = array_keys($node->taxonomy); node_save($node); - drupal_set_message(t('%title has been reverted back to the revision from %revision-date', array('%revision-date' => theme('placeholder', format_date($node->revision_timestamp)), '%title' => theme('placeholder', check_plain($node->title))))); - watchdog('content', t('%type: reverted %title revision %revision.', array('%type' => theme('placeholder', t($node->type)), '%title' => theme('placeholder', $node->title), '%revision' => theme('placeholder', $revision)))); + drupal_set_message(t('%title has been reverted back to the revision from %revision-date', array('%revision-date' => format_date($node->revision_timestamp), '%title' => $node->title))); + watchdog('content', t('@type: reverted %title revision %revision.', array('@type' => t($node->type), '%title' => $node->title, '%revision' => $revision))); } else { drupal_set_message(t('You tried to revert to an invalid revision.'), 'error'); @@ -1611,8 +1611,8 @@ function node_revision_delete($nid, $revision) { db_query("DELETE FROM {node_revisions} WHERE nid = %d AND vid = %d", $nid, $revision); node_invoke_nodeapi($node, 'delete revision'); - drupal_set_message(t('Deleted %title revision %revision.', array('%title' => theme('placeholder', $node->title), '%revision' => theme('placeholder', $revision)))); - watchdog('content', t('%type: deleted %title revision %revision.', array('%type' => theme('placeholder', t($node->type)), '%title' => theme('placeholder', $node->title), '%revision' => theme('placeholder', $revision)))); + drupal_set_message(t('Deleted %title revision %revision.', array('%title' => $node->title, '%revision' => $revision))); + watchdog('content', t('@type: deleted %title revision %revision.', array('@type' => t($node->type), '%title' => $node->title, '%revision' => $revision))); } else { @@ -1804,7 +1804,7 @@ function node_validate($node, $form = array()) { // Make sure the body has the minimum number of words. // todo use a better word counting algorithm that will work in other languages if (isset($node->body) && count(explode(' ', $node->body)) < $type->min_word_count) { - form_set_error('body', t('The body of your %type is too short. You need at least %words words.', array('%words' => $type->min_word_count, '%type' => $type->name))); + form_set_error('body', t('The body of your @type is too short. You need at least %words words.', array('%words' => $type->min_word_count, '%type' => $type->name))); } if (isset($node->nid) && (node_last_changed($node->nid) > $_POST['edit']['changed'])) { @@ -1817,7 +1817,7 @@ function node_validate($node, $form = array()) { // The use of empty() is mandatory in the context of usernames // as the empty string denotes the anonymous user. In case we // are dealing with an anonymous user we set the user ID to 0. - form_set_error('name', t('The username %name does not exist.', array ('%name' => theme('placeholder', $node->name)))); + form_set_error('name', t('The username %name does not exist.', array('%name' => $node->name))); } // Validate the "authored on" field. As of PHP 5.1.0, strtotime returns FALSE instead of -1 upon failure. @@ -1903,7 +1903,7 @@ function node_form_array($node) { if (user_access('administer nodes')) { // Node author information $form['author'] = array('#type' => 'fieldset', '#title' => t('Authoring information'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => 20); - $form['author']['name'] = array('#type' => 'textfield', '#title' => t('Authored by'), '#maxlength' => 60, '#autocomplete_path' => 'user/autocomplete', '#default_value' => $node->name ? $node->name : '', '#weight' => -1, '#description' => t('Leave blank for %anonymous.', array('%anonymous' => theme('placeholder', variable_get('anonymous', 'Anonymous'))))); + $form['author']['name'] = array('#type' => 'textfield', '#title' => t('Authored by'), '#maxlength' => 60, '#autocomplete_path' => 'user/autocomplete', '#default_value' => $node->name ? $node->name : '', '#weight' => -1, '#description' => t('Leave blank for %anonymous.', array('%anonymous' => variable_get('anonymous', 'Anonymous')))); $form['author']['date'] = array('#type' => 'textfield', '#title' => t('Authored on'), '#maxlength' => 25, '#description' => t('Format: %time. Leave blank to use the time of form submission.', array('%time' => $node->date))); if (isset($node->nid)) { @@ -2008,14 +2008,14 @@ function node_add($type = NULL) { $node = array('uid' => $user->uid, 'name' => $user->name, 'type' => $type); $output = node_form($node); - drupal_set_title(t('Submit %name', array('%name' => check_plain($types[$type]->name)))); + drupal_set_title(t('Submit @name', array('%name' => $types[$type]->name))); } else { // If no (valid) node type has been provided, display a node type overview. foreach ($types as $type) { if (function_exists($type->module .'_form') && node_access('create', $type->type)) { $type_url_str = str_replace('_', '-', $type->type); - $title = t('Add a new %s.', array('%s' => check_plain($type->name))); + $title = t('Add a new @s.', array('%s' => $type->name)); $out = 'For more information, please refer to the help section, or the online Drupal handbooks. You may also post at the Drupal forum, or view the wide range of other support options available.
', - array('%drupal' => 'http://drupal.org/', '%register' => url('user/register'), '%admin' => url('admin'), '%config' => url('admin/settings'), '%modules' => url('admin/settings/modules'), '%download_modules' => 'http://drupal.org/project/modules', '%themes' => url('admin/build/themes'), '%download_themes' => 'http://drupal.org/project/themes', '%content' => url('node/add'), '%help' => url('admin/help'), '%handbook' => 'http://drupal.org/handbooks', '%forum' => 'http://drupal.org/forum', '%support' => 'http://drupal.org/support') +For more information, please refer to the help section, or the online Drupal handbooks. You may also post at the Drupal forum, or view the wide range of other support options available.
', + array('@drupal' => 'http://drupal.org/', '@register' => url('user/register'), '@admin' => url('admin'), '@config' => url('admin/settings'), '@modules' => url('admin/settings/modules'), '@download_modules' => 'http://drupal.org/project/modules', '@themes' => url('admin/build/themes'), '@download_themes' => 'http://drupal.org/project/themes', '@content' => url('node/add'), '@help' => url('admin/help'), '@handbook' => 'http://drupal.org/handbooks', '@forum' => 'http://drupal.org/forum', '@support' => 'http://drupal.org/support') ); $output = 'You can
'. t('For more information please read the configuration and customization handbook Path page.', array('%path' => 'http://drupal.org/handbook/modules/path/')) .'
'; +', array('@admin-path-add' => url('admin/build/path/add'), '@admin-path' => url('admin/build/path'), '@external-http-drupal-org-node-15365' => 'http://drupal.org/node/15365', '@admin-clean-url-settings' => url('admin/settings/clean-urls'))); + $output .= ''. t('For more information please read the configuration and customization handbook Path page.', array('@path' => 'http://drupal.org/handbook/modules/path/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Allows users to rename URLs.'); @@ -104,7 +104,7 @@ function path_admin_delete_confirm($pid) { if (user_access('administer url aliases')) { $form['pid'] = array('#type' => 'value', '#value' => $pid); $output = confirm_form('path_admin_delete_confirm', $form, - t('Are you sure you want to delete path alias %title?', array('%title' => theme('placeholder', $path['dst']))), + t('Are you sure you want to delete path alias %title?', array('%title' => $path['dst'])), $_GET['destination'] ? $_GET['destination'] : 'admin/build/path', t('This action cannot be undone.'), t('Delete'), t('Cancel') ); } @@ -329,15 +329,15 @@ function path_form_submit() { $pid = $edit['pid']; if (!valid_url($src)) { - form_set_error('src', t('The system path %path is invalid.', array('%path' => theme('placeholder', $src)))); + form_set_error('src', t('The system path %path is invalid.', array('%path' => $src))); } if (!valid_url($dst)) { - form_set_error('dst', t('The alias %alias is invalid.', array('%alias' => theme('placeholder', $dst)))); + form_set_error('dst', t('The alias %alias is invalid.', array('%alias' => $dst))); } if (db_result(db_query("SELECT COUNT(dst) FROM {url_alias} WHERE pid != %d AND dst = '%s'", $pid, $dst))) { - form_set_error('dst', t('The alias %alias is already in use.', array('%alias' => theme('placeholder', $dst)))); + form_set_error('dst', t('The alias %alias is already in use.', array('%alias' => $dst))); } if (form_get_errors()) { diff --git a/modules/ping/ping.module b/modules/ping/ping.module index 8297ada6814..279fd8f2e70 100644 --- a/modules/ping/ping.module +++ b/modules/ping/ping.module @@ -12,16 +12,16 @@ function ping_help($section) { switch ($section) { case 'admin/help#ping': - $output = ''. t('The ping module is useful for notifying interested sites that your site has changed. It automatically sends notifications (called "pings") to the pingomatic service to tell it that your site has changed. In turn pingomatic will ping other services such as weblogs.com, Technorati, blo.gs, BlogRolling, Feedster.com, Moreover, etc.', array('%external-http-pingomatic-com' => 'http://pingomatic.com/')) .'
'; + $output = ''. t('The ping module is useful for notifying interested sites that your site has changed. It automatically sends notifications (called "pings") to the pingomatic service to tell it that your site has changed. In turn pingomatic will ping other services such as weblogs.com, Technorati, blo.gs, BlogRolling, Feedster.com, Moreover, etc.', array('@external-http-pingomatic-com' => 'http://pingomatic.com/')) .'
'; $output .= ''. t('The ping module requires cron
or a similar periodic job scheduler to be enabled.') .'
You can:
'. t('For more information please read the configuration and customization handbook Ping page.', array('%ping' => 'http://drupal.org/handbook/modules/ping/')) .'
'; +', array('@admin-modules' => url('admin/settings/modules'), '@file-cron' => 'cron.php', '@external-http-drupal-org-node-23714' => 'http://drupal.org/node/23714')); + $output .= ''. t('For more information please read the configuration and customization handbook Ping page.', array('@ping' => 'http://drupal.org/handbook/modules/ping/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Alerts other sites when your site has been updated.'); diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 5b75f69d85d..3162bbe3372 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -14,14 +14,14 @@ function poll_help($section) { switch ($section) { case 'admin/help#poll': $output = ''. t('The poll module can be used to create simple polls for site users. A poll is a simple multiple choice questionnaire which displays the cumulative results of the answers to the poll. Having polls on the site is a good way to get instant feedback from community members.') .'
'; - $output .= ''. t('Users can create a poll. The title of the poll should be the question, then enter the answers and the "base" vote counts. You can also choose the time period over which the vote will run.The poll item in the navigation menu will take you to a page where you can see all the current polls, vote on them (if you haven\'t already) and view the results.', array('%poll' => url('poll'))) .'
'; + $output .= ''. t('Users can create a poll. The title of the poll should be the question, then enter the answers and the "base" vote counts. You can also choose the time period over which the vote will run.The poll item in the navigation menu will take you to a page where you can see all the current polls, vote on them (if you haven\'t already) and view the results.', array('@poll' => url('poll'))) .'
'; $output .= t('You can
'. t('For more information please read the configuration and customization handbook Poll page.', array('%poll' => 'http://drupal.org/handbook/modules/poll/')) .'
'; +', array('@poll' => url('poll'), '@admin-node-configure-types-poll' => url('admin/content/types/poll'))); + $output .= ''. t('For more information please read the configuration and customization handbook Poll page.', array('@poll' => 'http://drupal.org/handbook/modules/poll/')) .'
'; return $output; case 'admin/settings/modules#description': return t("Allows your site to capture votes on different topics in the form of multiple choice questions."); @@ -143,9 +143,9 @@ function poll_form(&$node) { // Poll choices $form['choice'] += array('#type' => 'fieldset', '#title' => t('Choices'), '#prefix' => 'You can
'. t('For more information please read the configuration and customization handbook Profile page.', array('%profile' => 'http://drupal.org/handbook/modules/profile/')) .'
'; + $output .= ''. t('For more information please read the configuration and customization handbook Profile page.', array('@profile' => 'http://drupal.org/handbook/modules/profile/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Supports configurable user profiles.'); @@ -116,7 +116,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) { '#title' => t('Profile fields to display'), '#default_value' => variable_get('profile_block_author_fields', NULL), '#options' => $fields, - '#description' => t('Select which profile fields you wish to display in the block. Only fields designated as public in the profile field configuration are available.', array('%profile-admin' => url('admin/user/profile'))), + '#description' => t('Select which profile fields you wish to display in the block. Only fields designated as public in the profile field configuration are available.', array('@profile-admin' => url('admin/user/profile'))), ); return $form; } @@ -367,7 +367,7 @@ function profile_field_delete($fid) { $form['fid'] = array('#type' => 'value', '#value' => $fid); $form['title'] = array('#type' => 'value', '#value' => $field->title); - return confirm_form('profile_field_delete', $form, t('Are you sure you want to delete the field %field?', array('%field' => theme('placeholder', $field->title))), 'admin/user/profile', t('This action cannot be undone. If users have entered values into this field in their profile, these entries will also be deleted. If you want to keep the user-entered data, instead of deleting the field you may wish to edit this field and change it to a %hidden-field so that it may only be accessed by administrators.', array('%edit-field' => url('admin/user/profile/edit/' . $fid), '%hidden-field' => theme('placeholder', t('hidden profile field')))), t('Delete'), t('Cancel')); + return confirm_form('profile_field_delete', $form, t('Are you sure you want to delete the field %field?', array('%field' => $field->title)), 'admin/user/profile', t('This action cannot be undone. If users have entered values into this field in their profile, these entries will also be deleted. If you want to keep the user-entered data, instead of deleting the field you may wish to edit this field and change it to a hidden profile field so that it may only be accessed by administrators.', array('@edit-field' => url('admin/user/profile/edit/' . $fid))), t('Delete'), t('Cancel')); } /** @@ -379,8 +379,8 @@ function profile_field_delete_submit($form_id, $form_values) { cache_clear_all(); - drupal_set_message(t('The field %field has been deleted.', array('%field' => theme('placeholder', $form_values['title'])))); - watchdog('profile', t('Profile field %field deleted.', array('%field' => theme('placeholder', $form_values['title']))), WATCHDOG_NOTICE, l(t('view'), 'admin/user/profile')); + drupal_set_message(t('The field %field has been deleted.', array('%field' => $form_values['title']))); + watchdog('profile', t('Profile field %field deleted.', array('%field' => $form_values['title'])), WATCHDOG_NOTICE, l(t('view'), 'admin/user/profile')); return 'admin/user/profile'; } @@ -757,12 +757,12 @@ function profile_validate_profile($edit, $category) { if ($edit[$field->name]) { if ($field->type == 'url') { if (!valid_url($edit[$field->name], TRUE)) { - form_set_error($field->name, t('The value provided for %field is not a valid URL.', array('%field' => theme('placeholder', $field->title)))); + form_set_error($field->name, t('The value provided for %field is not a valid URL.', array('%field' => $field->title))); } } } else if ($field->required && !user_access('administer users')) { - form_set_error($field->name, t('The field %field is required.', array('%field' => theme('placeholder', $field->title)))); + form_set_error($field->name, t('The field %field is required.', array('%field' => $field->title))); } } diff --git a/modules/search/search.module b/modules/search/search.module index 34f70c55155..d9e17accee1 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -100,12 +100,12 @@ function search_help($section) { $output .= ''. t('The search engine works by maintaining an index of the words in your site\'s content. It indexes the posts and users. You can adjust the settings to tweak the indexing behaviour. Note that the search requires cron to be set up correctly. The index percentage sets the maximum amount of items that will be indexed in one cron run. Set this number lower if your cron is timing out or if PHP is running out of memory.') .'
'; $output .= t('You can
'. t('For more information please read the configuration and customization handbook Search page.', array('%search' => 'http://drupal.org/handbook/modules/search/')) .'
'; +'. t('For more information please read the configuration and customization handbook Search page.', array('@search' => 'http://drupal.org/handbook/modules/search/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Enables site-wide keyword searching.'); @@ -220,7 +220,7 @@ function search_admin_settings() { $total += $status['total']; } } - $count = format_plural($remaining, 'There is 1 item left to index.', 'There are %count items left to index.'); + $count = format_plural($remaining, 'There is 1 item left to index.', 'There are @count items left to index.'); $percentage = ((int)min(100, 100 * ($total - $remaining) / max(1, $total))) . '%'; $status = ''. t('%percentage of the site has been indexed.', array('%percentage' => $percentage)) .' '. $count .'
'; $form['status'] = array('#type' => 'fieldset', '#title' => t('Indexing status')); @@ -849,7 +849,7 @@ function do_search($keywords, $type, $join1 = '', $where1 = '1', $arguments1 = a $query = search_parse_query($keywords); if ($query[2] == '') { - form_set_error('keys', t('You must include at least one positive keyword with %count characters or more.', array('%count' => variable_get('minimum_word_size', 3)))); + form_set_error('keys', t('You must include at least one positive keyword with @count characters or more.', array('@count' => variable_get('minimum_word_size', 3)))); } if ($query === NULL || $query[0] == '' || $query[2] == '') { return array(); @@ -917,7 +917,7 @@ function search_view() { // Only perform search if there is non-whitespace search term: if (trim($keys)) { // Log the search keys: - watchdog('search', t('Search: %keys (%type).', array('%keys' => theme('placeholder', $keys), '%type' => module_invoke($type, 'search', 'name'))), WATCHDOG_NOTICE, l(t('results'), 'search/'. $type .'/'. $keys)); + watchdog('search', t('Search: %keys (@type).', array('%keys' => $keys, '@type' => module_invoke($type, 'search', 'name'))), WATCHDOG_NOTICE, l(t('results'), 'search/'. $type .'/'. $keys)); // Collect the search results: $results = search_data($keys, $type); diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index cd87f8d62ee..bed1cdbbfa1 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -33,18 +33,18 @@ function statistics_help($section) { '); $output .= t('You can
'. t('For more information please read the configuration and customization handbook Statistics page.', array('%statistics' => 'http://drupal.org/handbook/modules/statistics/')) .'
'; +', array('@admin-settings-statistics' => url('admin/logs/settings'), '@admin-logs' => url('admin/logs'), '@admin-logs-hits' => url('admin/logs/hits'), '@admin-block' => url('admin/build/block'))); + $output .= ''. t('For more information please read the configuration and customization handbook Statistics page.', array('@statistics' => 'http://drupal.org/handbook/modules/statistics/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Logs access statistics for your site.'); case 'admin/logs/settings': - return t('Settings for the statistical information that Drupal will keep about the site. See site statistics for the actual information.
', array('%statistics' => url('admin/logs/hits'))); + return t('Settings for the statistical information that Drupal will keep about the site. See site statistics for the actual information.
', array('@statistics' => url('admin/logs/hits'))); case 'admin/logs/hits': return t('This page shows you the most recent hits.
'); case 'admin/logs/referrers': @@ -99,7 +99,7 @@ function statistics_link($type, $node = NULL, $teaser = FALSE) { if ($type != 'comment' && user_access('view post access counter')) { $statistics = statistics_get($node->nid); if ($statistics) { - $links['statistics_counter']['title'] = format_plural($statistics['totalcount'], '1 read', '%count reads'); + $links['statistics_counter']['title'] = format_plural($statistics['totalcount'], '1 read', '@count reads'); } } @@ -361,7 +361,7 @@ function statistics_top_referrers() { $result = pager_query($query, 30, 0, $query_cnt, $_SERVER['HTTP_HOST']); while ($referrer = db_fetch_object($result)) { - $rows[] = array($referrer->hits, _statistics_link($referrer->url), t('%time ago', array('%time' => format_interval(time() - $referrer->last)))); + $rows[] = array($referrer->hits, _statistics_link($referrer->url), t('@time ago', array('@time' => format_interval(time() - $referrer->last)))); } $output = theme('table', $header, $rows); diff --git a/modules/system/system.module b/modules/system/system.module index e21ab2a13d8..4f4e1033e48 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -21,14 +21,14 @@ function system_help($section) { $output .= ''. t('There is a caching mechanism which stores dynamically generated web pages in a database. By caching a web page, the system module does not have to create the page each time someone wants to view it, instead it takes only one SQL query to display it, reducing response time and the server\'s load. Only pages requested by anonymous users are cached. In order to reduce server load and save bandwidth, the system module stores and sends cached pages compressed.') .'
'; $output .= t('You can
'. t('For more information please read the configuration and customization handbook System page.', array('%system' => 'http://drupal.org/handbook/modules/system/')) .'
'; +', array('@file-cron' => 'cron.php', '@external-http-drupal-org-cron' => 'http://drupal.org/cron', '@cron-status' => url('admin/settings/cron-status'), '@cron-manually' => url('admin/settings/cron-status/cron'), '@admin-settings' => url('admin/settings/page-caching'))); + $output .= ''. t('For more information please read the configuration and customization handbook System page.', array('@system' => 'http://drupal.org/handbook/modules/system/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Handles general site configuration for administrators.'); @@ -41,10 +41,10 @@ function system_help($section) { case 'admin/build/themes/settings/'. arg(3): $reference = explode('.', arg(3), 2); $theme = array_pop($reference); - return t('These options control the display settings for the %template
theme. When your site is displayed using this theme, these settings will be used. By clicking "Reset to defaults," you can choose to use the global settings for this theme.
These options control the display settings for the %template
theme. When your site is displayed using this theme, these settings will be used. By clicking "Reset to defaults," you can choose to use the global settings for this theme.
Modules are plugins for Drupal that extend its core functionality. Here you can select which modules are enabled. Click on the name of the module in the navigation menu for their individual configuration pages. Once a module is enabled, new permissions might be made available. Modules can automatically be temporarily disabled to reduce server load when your site becomes extremely busy by enabling the throttle.module and checking throttle. The auto-throttle functionality must be enabled on the throttle configuration page after having enabled the throttle module.
-It is important that update.php is run every time a module is updated to a newer version.
', array('%permissions' => url('admin/user/access'), '%throttle' => url('admin/settings/throttle'), '%update-php' => $base_url .'/update.php')); + return t('Modules are plugins for Drupal that extend its core functionality. Here you can select which modules are enabled. Click on the name of the module in the navigation menu for their individual configuration pages. Once a module is enabled, new permissions might be made available. Modules can automatically be temporarily disabled to reduce server load when your site becomes extremely busy by enabling the throttle.module and checking throttle. The auto-throttle functionality must be enabled on the throttle configuration page after having enabled the throttle module.
+It is important that update.php is run every time a module is updated to a newer version.
', array('@permissions' => url('admin/user/access'), '@throttle' => url('admin/settings/throttle'), '@update-php' => $base_url .'/update.php')); } } @@ -519,7 +519,7 @@ function system_clean_url_settings() { if (!variable_get('clean_url', 0)) { if (strpos(request_uri(), '?q=') !== FALSE) { - $form['clean_url']['#description'] .= t(' Before enabling clean URLs, you must perform a test to determine if your server is properly configured. If you are able to see this page again after clicking the "Run the clean URL test" link, the test has succeeded and the radio buttons above will be available. If instead you are directed to a "Page not found" error, you will need to change the configuration of your server. The handbook page on Clean URLs has additional troubleshooting information. %run-test', array('%handbook' => 'http://drupal.org/node/15365', '%run-test' => ''. t('Run the clean URL test') .'')); + $form['clean_url']['#description'] .= t(' Before enabling clean URLs, you must perform a test to determine if your server is properly configured. If you are able to see this page again after clicking the "Run the clean URL test" link, the test has succeeded and the radio buttons above will be available. If instead you are directed to a "Page not found" error, you will need to change the configuration of your server. The handbook page on Clean URLs has additional troubleshooting information. !run-test', array('@handbook' => 'http://drupal.org/node/15365', '!run-test' => ''. t('Run the clean URL test') .'')); $form['clean_url']['#attributes'] = array('disabled' => 'disabled'); } else { @@ -742,13 +742,13 @@ function system_site_status_settings() { '#title' => t('Site status'), '#default_value' => variable_get('site_offline', 0), '#options' => array(t('Online'), t('Off-line')), - '#description' => t('When set to "Online", all visitors will be able to browse your site normally. When set to "Off-line", only users with the "administer site configuration" permission will be able to access your site to perform maintenance; all other visitors will see the site off-line message configured below. Authorized users can log in during "Off-line" mode directly via the user login page.', array('%user-login' => url('user'))), + '#description' => t('When set to "Online", all visitors will be able to browse your site normally. When set to "Off-line", only users with the "administer site configuration" permission will be able to access your site to perform maintenance; all other visitors will see the site off-line message configured below. Authorized users can log in during "Off-line" mode directly via the user login page.', array('@user-login' => url('user'))), ); $form['site_offline_message'] = array( '#type' => 'textarea', '#title' => t('Site off-line message'), - '#default_value' => variable_get('site_offline_message', t('%site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('%site' => variable_get('site_name', t('This Drupal site'))))), + '#default_value' => variable_get('site_offline_message', t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => variable_get('site_name', t('This Drupal site'))))), '#description' => t('Message to show visitors when the site is in off-line mode.') ); @@ -776,7 +776,7 @@ function system_cron_status($cron = '') { $status = t('Cron is running. The last cron job ran %time ago.', array('%time' => format_interval(time() - $cron_last))); } else { - $status = t('Cron has not run. It appears cron jobs have not been setup on your system. Please check the help pages for configuring cron jobs.', array('%url' => 'http://drupal.org/cron')); + $status = t('Cron has not run. It appears cron jobs have not been setup on your system. Please check the help pages for configuring cron jobs.', array('@url' => 'http://drupal.org/cron')); } $status .= ' '. t('Cron can, if necessary, also be run manually.', array('%cron' => url('admin/settings/cron-status/cron'))); diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index dafc267f2e6..6d2f0582257 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -226,12 +226,12 @@ function taxonomy_form_vocabulary($edit = array()) { '#title' => t('Hierarchy'), '#default_value' => $edit['hierarchy'], '#options' => array(t('Disabled'), t('Single'), t('Multiple')), - '#description' => t('Allows a tree-like hierarchy between terms of this vocabulary.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'hierarchy'))), + '#description' => t('Allows a tree-like hierarchy between terms of this vocabulary.', array('@help-url' => url('admin/help/taxonomy', NULL, NULL, 'hierarchy'))), ); $form['relations'] = array('#type' => 'checkbox', '#title' => t('Related terms'), '#default_value' => $edit['relations'], - '#description' => t('Allows related terms in this vocabulary.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'related-terms'))), + '#description' => t('Allows related terms in this vocabulary.', array('@help-url' => url('admin/help/taxonomy', NULL, NULL, 'related-terms'))), ); $form['tags'] = array('#type' => 'checkbox', '#title' => t('Free tagging'), @@ -271,10 +271,10 @@ function taxonomy_form_vocabulary_submit($form_id, $form_values) { $form_values['nodes'] = array_filter($form_values['nodes']); switch (taxonomy_save_vocabulary($form_values)) { case SAVED_NEW: - drupal_set_message(t('Created new vocabulary %name.', array('%name' => theme('placeholder', $form_values['name'])))); + drupal_set_message(t('Created new vocabulary %name.', array('%name' => $form_values['name']))); break; case SAVED_UPDATED: - drupal_set_message(t('Updated vocabulary %name.', array('%name' => theme('placeholder', $form_values['name'])))); + drupal_set_message(t('Updated vocabulary %name.', array('%name' => $form_values['name']))); break; } return 'admin/content/taxonomy'; @@ -335,7 +335,7 @@ function _taxonomy_confirm_del_vocabulary($vid) { $form['name'] = array('#type' => 'value', '#value' => $vocabulary->name); return confirm_form('taxonomy_vocabulary_confirm_delete', $form, t('Are you sure you want to delete the vocabulary %title?', - array('%title' => theme('placeholder', $vocabulary->name))), + array('%title' => $vocabulary->name)), 'admin/content/taxonomy', t('Deleting a vocabulary will delete all the terms in it. This action cannot be undone.'), t('Delete'), t('Cancel')); @@ -343,7 +343,7 @@ function _taxonomy_confirm_del_vocabulary($vid) { function taxonomy_vocabulary_confirm_delete_submit($form_id, $form_values) { $status = taxonomy_del_vocabulary($form_values['vid']); - drupal_set_message(t('Deleted vocabulary %name.', array('%name' => theme('placeholder', $form_values['name'])))); + drupal_set_message(t('Deleted vocabulary %name.', array('%name' => $form_values['name']))); return 'admin/content/taxonomy'; } @@ -377,7 +377,7 @@ function taxonomy_form_term($edit = array()) { $form['relations'] = _taxonomy_term_select(t('Related terms'), 'relations', array_keys(taxonomy_get_related($edit['tid'])), $vocabulary_id, NULL, 1, '<'. t('none') .'>', array($edit['tid'])); } - $form['synonyms'] = array('#type' => 'textarea', '#title' => t('Synonyms'), '#default_value' => implode("\n", taxonomy_get_synonyms($edit['tid'])), '#description' => t('Synonyms of this term, one synonym per line.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'synonyms')))); + $form['synonyms'] = array('#type' => 'textarea', '#title' => t('Synonyms'), '#default_value' => implode("\n", taxonomy_get_synonyms($edit['tid'])), '#description' => t('Synonyms of this term, one synonym per line.', array('@help-url' => url('admin/help/taxonomy', NULL, NULL, 'synonyms')))); $form['weight'] = array('#type' => 'weight', '#title' => t('Weight'), '#default_value' => $edit['weight'], '#description' => t('In listings, the heavier terms will sink and the lighter terms will be positioned nearer the top.')); // Add extra term form elements. @@ -410,10 +410,10 @@ function taxonomy_form_term($edit = array()) { function taxonomy_form_term_submit($form_id, $form_values) { switch (taxonomy_save_term($form_values)) { case SAVED_NEW: - drupal_set_message(t('Created new term %term.', array('%term' => theme('placeholder', $form_values['name'])))); + drupal_set_message(t('Created new term %term.', array('%term' => $form_values['name']))); break; case SAVED_UPDATED: - drupal_set_message(t('The term %term has been updated.', array('%term' => theme('placeholder', $form_values['name'])))); + drupal_set_message(t('The term %term has been updated.', array('%term' => $form_values['name']))); break; } return 'admin/content/taxonomy'; @@ -521,7 +521,7 @@ function _taxonomy_confirm_del_term($tid) { $form['tid'] = array('#type' => 'value', '#value' => $tid); return confirm_form('taxonomy_term_confirm_delete', $form, t('Are you sure you want to delete the term %title?', - array('%title' => theme('placeholder', $term->name))), + array('%title' => $term->name)), 'admin/content/taxonomy', t('Deleting a term will delete all its children if there are any. This action cannot be undone.'), t('Delete'), @@ -530,7 +530,7 @@ function _taxonomy_confirm_del_term($tid) { function taxonomy_term_confirm_delete_submit($form_id, $form_values) { taxonomy_del_term($form_values['tid']); - drupal_set_message(t('Deleted term %name.', array('%name' => theme('placeholder', $form_values['name'])))); + drupal_set_message(t('Deleted term %name.', array('%name' => $form_values['name']))); return 'admin/content/taxonomy'; } @@ -709,7 +709,7 @@ function taxonomy_node_validate(&$node) { if (!$vocabulary->tags) { // see form_get_error $key = implode('][', $element['#parents']); // on why this is the key - form_set_error("taxonomy][tags][$vid", t('The %name vocabulary can not be modified in this way.', array('%name' => theme('placeholder', $vocabulary->name)))); + form_set_error("taxonomy][tags][$vid", t('The %name vocabulary can not be modified in this way.', array('%name' => $vocabulary->name))); } } } @@ -1330,13 +1330,13 @@ function taxonomy_help($section) { $output .= ''. t('A controlled vocabulary is a set of terms to use for describing content (known as descriptors in indexing lingo). Drupal allows you to describe each piece of content (blog, story, etc.) using one or many of these terms. For simple implementations, you might create a set of categories without subcategories, similar to Slashdot\'s sections. For more complex implementations, you might create a hierarchical list of categories.') .'
'; $output .= t('You can
'. t('For more information please read the configuration and customization handbook Taxonomy page.', array('%taxonomy' => 'http://drupal.org/handbook/modules/taxonomy/')) .'
'; +', array('@admin-taxonomy-add-vocabulary' => url('admin/content/taxonomy/add/vocabulary'), '@admin-taxonomy' => url('admin/content/taxonomy'), '@external-http-drupal-org-project-taxonomy_access' => 'http://drupal.org/project/taxonomy_access', '@external-http-drupal-org-project-taxonomy_browser' => 'http://drupal.org/project/taxonomy_browser')); + $output .= ''. t('For more information please read the configuration and customization handbook Taxonomy page.', array('@taxonomy' => 'http://drupal.org/handbook/modules/taxonomy/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Enables the categorization of content.'); diff --git a/modules/throttle/throttle.module b/modules/throttle/throttle.module index 8526e2ad0fe..641ee049073 100644 --- a/modules/throttle/throttle.module +++ b/modules/throttle/throttle.module @@ -81,7 +81,7 @@ function throttle_exit() { variable_set('throttle_level', 1); $message = format_plural($users, '1 user accessing site; throttle enabled.', - '%count users accessing site; throttle enabled.'); + '@count users accessing site; throttle enabled.'); } } elseif ($max_guests && $guests > $max_guests) { @@ -89,15 +89,15 @@ function throttle_exit() { variable_set('throttle_level', 1); $message = format_plural($guests, '1 guest accessing site; throttle enabled.', - '%count guests accessing site; throttle enabled.'); + '@count guests accessing site; throttle enabled.'); } } else { if ($throttle) { variable_set('throttle_level', 0); // Note: unorthodox format_plural() usage due to Gettext plural limitations. - $message = format_plural($users, '1 user', '%count users') .', '; - $message .= format_plural($guests, '1 guest accessing site; throttle disabled', '%count guests accessing site; throttle disabled'); + $message = format_plural($users, '1 user', '@count users') .', '; + $message .= format_plural($guests, '1 guest accessing site; throttle disabled', '@count guests accessing site; throttle disabled'); } } if ($message) { @@ -110,7 +110,7 @@ function throttle_exit() { function _throttle_validate($value, $form) { if ($value != NULL) { if (!is_numeric($value) || $value < 0) { - form_set_error($form, t("'%value' is not a valid auto-throttle setting. Please enter a positive numeric value.", array('%value' => theme('placeholder', $value)))); + form_set_error($form, t("%value is not a valid auto-throttle setting. Please enter a positive numeric value.", array('%value' => $value))); } } } @@ -125,12 +125,12 @@ function throttle_help($section) { $output .= ''. t('The congestion control throttle can be automatically enabled when the number of anonymous or authenticated users currently visiting the site exceeds the specified threshold. ') .'
'; $output .= t('You can
'. t('For more information please read the configuration and customization handbook Throttle page.', array('%throttle' => 'http://drupal.org/handbook/modules/throttle/')) .'
'; +', array('@admin-modules' => url('admin/settings/modules'), '@admin-block' => url('admin/build/block'), '@admin-settings-throttle' => url('admin/settings/throttle'))); + $output .= ''. t('For more information please read the configuration and customization handbook Throttle page.', array('@throttle' => 'http://drupal.org/handbook/modules/throttle/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Handles the auto-throttling mechanism, to control site congestion.'); diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module index c590582a878..f323d644ee4 100644 --- a/modules/tracker/tracker.module +++ b/modules/tracker/tracker.module @@ -16,12 +16,12 @@ function tracker_help($section) { $output .= ''. t('The "recent posts" page is available via a link in the navigation menu block and contains a reverse chronological list of new and recently-updated content. The table displays the content type, the title, the author\'s name, how many comments that item has received, and when it was last updated. Updates include any changes to the text, either by the original author or someone else, as well as any new comments added to an item. To use the tracker module to watch for a user\'s updated content, click on that user\'s profile, then the track tab.') .'
'; $output .= t('You can
'. t('For more information please read the configuration and customization handbook Tracker page.', array('%tracker' => 'http://drupal.org/handbook/modules/tracker/')) .'
'; +', array('@tracker' => url('tracker'), '@profile' => url('profile'))); + $output .= ''. t('For more information please read the configuration and customization handbook Tracker page.', array('@tracker' => 'http://drupal.org/handbook/modules/tracker/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Enables tracking of recent posts for users.'); @@ -109,7 +109,7 @@ function tracker_page($uid = 0) { if ($new = comment_num_new($node->nid)) { $comments .= ''. t('Users with the upload files permission can upload attachments. You can choose which post types can take attachments on the content types settings page. Each user role can be customized for the file size of uploads, and the dimension of image files.') .'
'; $output .= t('You can
'. t('For more information please read the configuration and customization handbook Upload page.', array('%upload' => 'http://drupal.org/handbook/modules/upload/')) .'
'; +', array('@admin-access' => url('admin/user/access'), '@admin-content-types' => url('admin/settings/types'), '@admin-upload' => url('admin/settings/upload'))); + $output .= ''. t('For more information please read the configuration and customization handbook Upload page.', array('@upload' => 'http://drupal.org/handbook/modules/upload/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Allows users to upload and attach files to content.'); case 'admin/settings/upload': - return t('Users with the upload files permission can upload attachments. Users with the view uploaded files permission can view uploaded attachments. You can choose which post types can take attachments on the content types settings page.
', array('%permissions' => url('admin/user/access'), '%types' => url('admin/settings/types'))); + return t('Users with the upload files permission can upload attachments. Users with the view uploaded files permission can view uploaded attachments. You can choose which post types can take attachments on the content types settings page.
', array('@permissions' => url('admin/user/access'), '@types' => url('admin/settings/types'))); } } @@ -54,7 +54,7 @@ function upload_link($type, $node = NULL, $teaser = FALSE) { } if ($num_files) { $links['upload_attachments'] = array( - 'title' => format_plural($num_files, '1 attachment', '%count attachments'), + 'title' => format_plural($num_files, '1 attachment', '@count attachments'), 'href' => "node/$node->nid", 'attributes' => array('title' => t('Read full article to view attachments.')), 'fragment' => 'attachments' @@ -223,7 +223,7 @@ function upload_admin_settings() { foreach ($roles as $rid => $role) { $form['settings_role_'. $rid] = array( '#type' => 'fieldset', - '#title' => t('Settings for %role', array('%role' => theme('placeholder', $role))), + '#title' => t('Settings for %role', array('%role' => $role)), '#collapsible' => TRUE, '#collapsed' => TRUE, ); @@ -434,19 +434,19 @@ function _upload_validate(&$node) { $user_roles = count($user->roles); $valid = TRUE; if ($error['extension'] == $user_roles) { - form_set_error('upload', t('The selected file %name can not be attached to this post, because it is only possible to attach files with the following extensions: %files-allowed.', array('%name' => theme('placeholder', $file->filename), '%files-allowed' => theme('placeholder', $extensions)))); + form_set_error('upload', t('The selected file %name can not be attached to this post, because it is only possible to attach files with the following extensions: %files-allowed.', array('%name' => $file->filename, '%files-allowed' => $extensions))); $valid = FALSE; } elseif ($error['uploadsize'] == $user_roles) { - form_set_error('upload', t('The selected file %name can not be attached to this post, because it exceeded the maximum filesize of %maxsize.', array('%name' => theme('placeholder', $file->filename), '%maxsize' => theme('placeholder', format_size($uploadsize))))); + form_set_error('upload', t('The selected file %name can not be attached to this post, because it exceeded the maximum filesize of %maxsize.', array('%name' => $file->filename, '%maxsize' => format_size($uploadsize)))); $valid = FALSE; } elseif ($error['usersize'] == $user_roles) { - form_set_error('upload', t('The selected file %name can not be attached to this post, because the disk quota of %quota has been reached.', array('%name' => theme('placeholder', $file->filename), '%quota' => theme('placeholder', format_size($usersize))))); + form_set_error('upload', t('The selected file %name can not be attached to this post, because the disk quota of %quota has been reached.', array('%name' => $file->filename, '%quota' => format_size($usersize)))); $valid = FALSE; } elseif (strlen($file->filename) > 255) { - form_set_error('upload', t('The selected file %name can not be attached to this post, because the filename is too long.', array('%name' => theme('placeholder', $file->filename)))); + form_set_error('upload', t('The selected file %name can not be attached to this post, because the filename is too long.', array('%name' => $file->filename))); $valid = FALSE; } @@ -533,7 +533,7 @@ function upload_nodeapi(&$node, $op, $teaser) { break; case 'search result': - return is_array($node->files) ? format_plural(count($node->files), '1 attachment', '%count attachments') : NULL; + return is_array($node->files) ? format_plural(count($node->files), '1 attachment', '@count attachments') : NULL; case 'rss item': if (is_array($node->files)) { @@ -859,7 +859,7 @@ function _upload_image($file) { $result = image_scale($file->filepath, $file->filepath, $width, $height); if ($result) { $file->filesize = filesize($file->filepath); - drupal_set_message(t('The image was resized to fit within the maximum allowed resolution of %resolution pixels.', array('%resolution' => theme('placeholder', variable_get('upload_max_resolution', 0))))); + drupal_set_message(t('The image was resized to fit within the maximum allowed resolution of %resolution pixels.', array('%resolution' => variable_get('upload_max_resolution', 0)))); } } } diff --git a/modules/user/user.module b/modules/user/user.module index 98670a02712..9f4ef44c3d3 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -253,13 +253,13 @@ function user_validate_name($name) { return t('The username contains an illegal character.'); } if (ereg('@', $name) && !eregi('@([0-9a-z](-?[0-9a-z])*.)+[a-z]{2}([zmuvtg]|fo|me)?$', $name)) return t('The username is not a valid authentication ID.'); - if (strlen($name) > 56) return t('The username %name is too long: it must be less than 56 characters.', array('%name' => theme('placeholder', $name))); + if (strlen($name) > 56) return t('The username %name is too long: it must be less than 56 characters.', array('%name' => $name)); } function user_validate_mail($mail) { if (!$mail) return t('You must enter an e-mail address.'); if (!valid_email_address($mail)) { - return t('The e-mail address %mail is not valid.', array('%mail' => theme('placeholder', $mail))); + return t('The e-mail address %mail is not valid.', array('%mail' => $mail)); } } @@ -291,7 +291,7 @@ function user_validate_picture($file, &$edit, $user) { $form_values['picture'] = $file->filepath; } else { - form_set_error('picture_upload', t("Failed to upload the picture image; the %directory directory doesn't exist.", array('%directory' => ''. variable_get('user_picture_path', 'pictures') .''))); + form_set_error('picture_upload', t("Failed to upload the picture image; the %directory directory doesn't exist.", array('%directory' => variable_get('user_picture_path', 'pictures')))); } } } @@ -562,10 +562,10 @@ function user_block($op = 'list', $delta = 0, $edit = array()) { // Format the output with proper grammar. if ($total_users == 1 && $guests->count == 1) { - $output = t('There is currently %members and %visitors online.', array('%members' => format_plural($total_users, '1 user', '%count users'), '%visitors' => format_plural($guests->count, '1 guest', '%count guests'))); + $output = t('There is currently %members and %visitors online.', array('%members' => format_plural($total_users, '1 user', '@count users'), '%visitors' => format_plural($guests->count, '1 guest', '@count guests'))); } else { - $output = t('There are currently %members and %visitors online.', array('%members' => format_plural($total_users, '1 user', '%count users'), '%visitors' => format_plural($guests->count, '1 guest', '%count guests'))); + $output = t('There are currently %members and %visitors online.', array('%members' => format_plural($total_users, '1 user', '@count users'), '%visitors' => format_plural($guests->count, '1 guest', '@count guests'))); } // Display a list of currently online users. @@ -868,10 +868,10 @@ function user_login($msg = '') { '#attributes' => array('tabindex' => '1'), ); if (variable_get('drupal_authentication_service', FALSE) && count(user_auth_help_links()) > 0) { - $form['name']['#description'] = t('Enter your %s username, or an ID from one of our affiliates: %a.', array('%s' => variable_get('site_name', 'local'), '%a' => implode(', ', user_auth_help_links()))); + $form['name']['#description'] = t('Enter your @s username, or an ID from one of our affiliates: !a.', array('@s' => variable_get('site_name', 'local'), '!a' => implode(', ', user_auth_help_links()))); } else { - $form['name']['#description'] = t('Enter your %s username.', array('%s' => variable_get('site_name', 'local'))); + $form['name']['#description'] = t('Enter your @s username.', array('@s' => variable_get('site_name', 'local'))); } $form['pass'] = array('#type' => 'password', '#title' => t('Password'), @@ -887,18 +887,18 @@ function user_login_validate($form_id, $form_values) { if ($form_values['name']) { if (user_is_blocked($form_values['name'])) { // blocked in user administration - form_set_error('login', t('The username %name has not been activated or is blocked.', array('%name' => theme('placeholder', $form_values['name'])))); + form_set_error('login', t('The username %name has not been activated or is blocked.', array('%name' => $form_values['name']))); } else if (drupal_is_denied('user', $form_values['name'])) { // denied by access controls - form_set_error('login', t('The name %name is a reserved username.', array('%name' => theme('placeholder', $form_values['name'])))); + form_set_error('login', t('The name %name is a reserved username.', array('%name' => $form_values['name']))); } else if ($form_values['pass']) { $user = user_authenticate($form_values['name'], trim($form_values['pass'])); if (!$user->uid) { form_set_error('login', t('Sorry. Unrecognized username or password.') .' '. l(t('Have you forgotten your password?'), 'user/password')); - watchdog('user', t('Login attempt failed for %user.', array('%user' => theme('placeholder', $form_values['name'])))); + watchdog('user', t('Login attempt failed for %user.', array('%user' => $form_values['name']))); } } } @@ -910,7 +910,7 @@ function user_login_submit($form_id, $form_values) { // To handle the edge case where this function is called during a // bootstrap, check for the existence of t(). if (function_exists('t')) { - $message = t('Session opened for %name.', array('%name' => theme('placeholder', $user->name))); + $message = t('Session opened for %name.', array('%name' => $user->name)); } else { $message = "Session opened for ". check_plain($user->name); @@ -949,7 +949,7 @@ function user_authenticate($name, $pass) { if ($server && ($result = user_get_authmaps("$name@$server"))) { if (module_invoke(key($result), 'auth', $name, $pass, $server)) { $user = user_external_load("$name@$server"); - watchdog('user', t('External load by %user using module %module.', array('%user' => theme('placeholder', $name .'@'. $server), '%module' => theme('placeholder', key($result))))); + watchdog('user', t('External load by %user using module %module.', array('%user' => $name .'@'. $server, '%module' => key($result)))); } } @@ -968,7 +968,7 @@ function user_authenticate($name, $pass) { $userinfo["authname_$module"] = $name; } $user = user_save('', $userinfo); - watchdog('user', t('New external user: %user using module %module.', array('%user' => theme('placeholder', $name), '%module' => theme('placeholder', $module))), WATCHDOG_NOTICE, l(t('edit'), 'user/'. $user->uid .'/edit')); + watchdog('user', t('New external user: %user using module %module.', array('%user' => $name, '%module' => $module)), WATCHDOG_NOTICE, l(t('edit'), 'user/'. $user->uid .'/edit')); break; } } @@ -983,7 +983,7 @@ function user_authenticate($name, $pass) { function user_logout() { global $user; - watchdog('user', t('Session closed for %name.', array('%name' => theme('placeholder', $user->name)))); + watchdog('user', t('Session closed for %name.', array('%name' => $user->name))); // Destroy the current session: session_destroy(); @@ -1021,10 +1021,10 @@ function user_pass_validate() { $name = $form_values['name']; $mail = $form_values['mail']; if ($name && !($form_values['account'] = user_load(array('name' => $name, 'status' => 1)))) { - form_set_error('name', t('Sorry. The username %name is not recognized.', array('%name' => theme('placeholder', $name)))); + form_set_error('name', t('Sorry. The username %name is not recognized.', array('%name' => $name))); } else if ($mail && !($form_values['account'] = user_load(array('mail' => $mail, 'status' => 1)))) { - form_set_error('mail', t('Sorry. The e-mail address %email is not recognized.', array('%email' => theme('placeholder', $mail)))); + form_set_error('mail', t('Sorry. The e-mail address %email is not recognized.', array('%email' => $mail))); } else if (!$mail && !$name) { form_set_error('password', t('You must provide either a username or e-mail address.')); @@ -1044,11 +1044,11 @@ function user_pass_submit($form_id, $form_values) { $mail_success = drupal_mail('user-pass', $account->mail, $subject, $body, $from); if ($mail_success) { - watchdog('user', t('Password reset instructions mailed to %name at %email.', array('%name' => ''. $account->name .'', '%email' => ''. $account->mail .''))); + watchdog('user', t('Password reset instructions mailed to %name at %email.', array('%name' => $account->name, '%email' => $account->mail))); drupal_set_message(t('Further instructions have been sent to your e-mail address.')); } else { - watchdog('user', t('Error mailing password reset instructions to %name at %email.', array('%name' => theme('placeholder', $account->name), '%email' => theme('placeholder', $account->mail))), WATCHDOG_ERROR); + watchdog('user', t('Error mailing password reset instructions to %name at %email.', array('%name' => $account->name, '%email' => $account->mail)), WATCHDOG_ERROR); drupal_set_message(t('Unable to send mail. Please contact the site admin.')); } return 'user'; @@ -1085,7 +1085,7 @@ function user_pass_reset($uid, $timestamp, $hashed_pass, $action = NULL) { else if ($account->uid && $timestamp > $account->login && $timestamp < $current && $hashed_pass == user_pass_rehash($account->pass, $timestamp, $account->login)) { // First stage is a confirmation form, then login if ($action == 'login') { - watchdog('user', t('User %name used one-time login link at time %timestamp.', array('%name' => "$account->name", '%timestamp' => $timestamp))); + watchdog('user', t('User %name used one-time login link at time %timestamp.', array('%name' => $account->name, '%timestamp' => $timestamp))); // Update the user table noting user has logged in. // And this also makes this hashed password a one-time-only login. db_query("UPDATE {users} SET login = %d WHERE uid = %d", time(), $account->uid); @@ -1098,7 +1098,7 @@ function user_pass_reset($uid, $timestamp, $hashed_pass, $action = NULL) { drupal_goto('user/'. $user->uid .'/edit'); } else { - $form['message'] = array('#value' => t('This is a one-time login for %user_name and will expire on %expiration_date
Click on this button to login to the site and change your password.
', array('%user_name' => theme('placeholder',$account->name), '%expiration_date' => format_date($timestamp + $timeout)))); + $form['message'] = array('#value' => t('This is a one-time login for %user_name and will expire on %expiration_date
Click on this button to login to the site and change your password.
', array('%user_name' => $account->name, '%expiration_date' => format_date($timestamp + $timeout)))); $form['help'] = array('#value' => t('This login can be used only once.
')); $form['submit'] = array('#type' => 'submit', '#value' => t('Log in')); $form['#action'] = url("user/reset/$uid/$timestamp/$hashed_pass/login"); @@ -1146,7 +1146,7 @@ function user_register() { $affiliates = user_auth_help_links(); if (!$admin && count($affiliates) > 0) { $affiliates = implode(', ', $affiliates); - $form['affiliates'] = array('#type' => 'markup', '#value' => ''. t('Note: if you have an account with one of our affiliates (%s), you may login now instead of registering.', array('%s' => $affiliates, '%login_uri' => url('user'))) .'
'); + $form['affiliates'] = array('#type' => 'markup', '#value' => ''. t('Note: if you have an account with one of our affiliates (!s), you may login now instead of registering.', array('!s' => $affiliates, '@login_uri' => url('user'))) .'
'); } // Merge in the default user edit fields. $form = array_merge($form, user_edit_form(NULL, NULL, TRUE)); @@ -1210,14 +1210,14 @@ function user_register_submit($form_id, $form_values) { } $account = user_save('', array_merge($form_values, array('pass' => $pass, 'init' => $mail, 'roles' => $roles, 'status' => ($admin || variable_get('user_register', 1) == 1)))); - watchdog('user', t('New user: %name %email.', array('%name' => theme('placeholder', $name), '%email' => theme('placeholder', '<'. $mail .'>'))), WATCHDOG_NOTICE, l(t('edit'), 'user/'. $account->uid .'/edit')); + watchdog('user', t('New user: %name %email.', array('%name' => theme('placeholder', $name), '%email' => '<'. $mail .'>')), WATCHDOG_NOTICE, l(t('edit'), 'user/'. $account->uid .'/edit')); - $variables = array('%username' => $name, '%site' => variable_get('site_name', 'drupal'), '%password' => $pass, '%uri' => $base_url, '%uri_brief' => substr($base_url, strlen('http://')), '%mailto' => $mail, '%date' => format_date(time()), '%login_uri' => url('user', NULL, NULL, TRUE), '%edit_uri' => url('user/'. $account->uid .'/edit', NULL, NULL, TRUE), '%login_url' => user_pass_reset_url($account)); + $variables = array('!username' => $name, '!site' => variable_get('site_name', 'drupal'), '!password' => $pass, '!uri' => $base_url, '!uri_brief' => substr($base_url, strlen('http://')), '!mailto' => $mail, '!date' => format_date(time()), '!login_uri' => url('user', NULL, NULL, TRUE), '!edit_uri' => url('user/'. $account->uid .'/edit', NULL, NULL, TRUE), '!login_url' => user_pass_reset_url($account)); // The first user may login immediately, and receives a customized welcome e-mail. if ($account->uid == 1) { - drupal_mail('user-register-admin', $mail, t('Drupal user account details for %s', array('%s' => $name)), strtr(t("%username,\n\nYou may now login to %uri using the following username and password:\n\n username: %username\n password: %password\n\n%edit_uri\n\n--drupal"), $variables), $from); - drupal_set_message(t('Welcome to Drupal. You are user #1, which gives you full and immediate access. All future registrants will receive their passwords via e-mail, so please make sure your website e-mail address is set properly under the general settings on the site information settings page.
Your password is %pass. You may change your password below.
', array('%pass' => $pass, '%settings' => url('admin/settings/site-information')))); + drupal_mail('user-register-admin', $mail, t('Drupal user account details for !s', array('!s' => $name)), strtr(t("!username,\n\nYou may now login to !uri using the following username and password:\n\n username: !username\n password: !password\n\n!edit_uri\n\n--drupal"), $variables), $from); + drupal_set_message(t('Welcome to Drupal. You are user #1, which gives you full and immediate access. All future registrants will receive their passwords via e-mail, so please make sure your website e-mail address is set properly under the general settings on the site information settings page.
Your password is %pass. You may change your password below.
', array('%pass' => $pass, '@settings' => url('admin/settings/site-information')))); user_authenticate($account->name, trim($pass)); return 'user/1/edit'; @@ -1242,7 +1242,7 @@ function user_register_submit($form_id, $form_values) { drupal_mail(($notify ? 'user-register-notify' : 'user-register-welcome'), $mail,$subject, $body, $from); if ($notify) { - drupal_set_message(t('Password and further instructions have been e-mailed to the new user %user.', array('%user' => theme('placeholder', $name)))); + drupal_set_message(t('Password and further instructions have been e-mailed to the new user %user.', array('%user' => $name))); } else { drupal_set_message(t('Your password and further instructions have been sent to your e-mail address.')); @@ -1304,7 +1304,7 @@ function user_edit_form($uid, $edit, $register = FALSE) { $roles = user_roles(1); unset($roles[DRUPAL_AUTHENTICATED_RID]); if ($roles) { - $form['account']['roles'] = array('#type' => 'checkboxes', '#title' => t('Roles'), '#default_value' => array_keys((array)$edit['roles']), '#options' => $roles, '#description' => t('The user receives the combined permissions of the %au role, and all roles selected here.', array('%au' => theme('placeholder', t('authenticated user'))))); + $form['account']['roles'] = array('#type' => 'checkboxes', '#title' => t('Roles'), '#default_value' => array_keys((array)$edit['roles']), '#options' => $roles, '#description' => t('The user receives the combined permissions of the %au role, and all roles selected here.', array('%au' => t('authenticated user')))); } } @@ -1332,10 +1332,10 @@ function _user_edit_validate($uid, &$edit) { form_set_error('name', $error); } else if (db_num_rows(db_query("SELECT uid FROM {users} WHERE uid != %d AND LOWER(name) = LOWER('%s')", $uid, $edit['name'])) > 0) { - form_set_error('name', t('The name %name is already taken.', array('%name' => theme('placeholder', $edit['name'])))); + form_set_error('name', t('The name %name is already taken.', array('%name' => $edit['name']))); } else if (drupal_is_denied('user', $edit['name'])) { - form_set_error('name', t('The name %name has been denied access.', array('%name' => theme('placeholder', $edit['name'])))); + form_set_error('name', t('The name %name has been denied access.', array('%name' => $edit['name']))); } } @@ -1344,10 +1344,10 @@ function _user_edit_validate($uid, &$edit) { form_set_error('mail', $error); } else if (db_num_rows(db_query("SELECT uid FROM {users} WHERE uid != %d AND LOWER(mail) = LOWER('%s')", $uid, $edit['mail'])) > 0) { - form_set_error('mail', t('The e-mail address %email is already taken.', array('%email' => theme('placeholder', $edit['mail'])))); + form_set_error('mail', t('The e-mail address %email is already taken.', array('%email' => $edit['mail']))); } else if (drupal_is_denied('mail', $edit['mail'])) { - form_set_error('mail', t('The e-mail address %email has been denied access.', array('%email' => theme('placeholder', $edit['mail'])))); + form_set_error('mail', t('The e-mail address %email has been denied access.', array('%email' => $edit['mail']))); } // If required, validate the uploaded picture. @@ -1386,7 +1386,7 @@ function user_edit($category = 'account') { drupal_goto('admin/user/user'); } else { - return confirm_form('user_confirm_delete', array(), t('Are you sure you want to delete the account %name?', array('%name' => theme('placeholder', $account->name))), 'user/'. $account->uid, t('All submissions made by this user will be attributed to the anonymous account. This action cannot be undone.'), t('Delete'), t('Cancel')); + return confirm_form('user_confirm_delete', array(), t('Are you sure you want to delete the account %name?', array('%name' => $account->name)), 'user/'. $account->uid, t('All submissions made by this user will be attributed to the anonymous account. This action cannot be undone.'), t('Delete'), t('Cancel')); } } else if ($_POST['op'] == t('Delete')) { @@ -1496,21 +1496,21 @@ function _user_mail_text($messageid, $variables = array()) { else { switch ($messageid) { case 'welcome_subject': - return t('Account details for %username at %site', $variables); + return t('Account details for !username at !site', $variables); case 'welcome_body': - return t("%username,\n\nThank you for registering at %site. You may now log in to %login_uri using the following username and password:\n\nusername: %username\npassword: %password\n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n%login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to %edit_uri so you can change your password.\n\n\n-- %site team", $variables); + return t("!username,\n\nThank you for registering at !site. You may now log in to !login_uri using the following username and password:\n\nusername: !username\npassword: !password\n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\n\n-- !site team", $variables); case 'admin_subject': - return t('An administrator created an account for you at %site', $variables); + return t('An administrator created an account for you at !site', $variables); case 'admin_body': - return t("%username,\n\nA site administrator at %site has created an account for you. You may now log in to %login_uri using the following username and password:\n\nusername: %username\npassword: %password\n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n%login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to %edit_uri so you can change your password.\n\n\n-- %site team", $variables); + return t("!username,\n\nA site administrator at !site has created an account for you. You may now log in to !login_uri using the following username and password:\n\nusername: !username\npassword: !password\n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\n\n-- !site team", $variables); case 'approval_subject': - return t('Account details for %username at %site (pending admin approval)', $variables); + return t('Account details for !username at !site (pending admin approval)', $variables); case 'approval_body': - return t("%username,\n\nThank you for registering at %site. Your application for an account is currently pending approval. Once it has been granted, you may log in to %login_uri using the following username and password:\n\nusername: %username\npassword: %password\n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n%login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you may wish to change your password at %edit_uri\n\n\n-- %site team", $variables); + return t("!username,\n\nThank you for registering at !site. Your application for an account is currently pending approval. Once it has been granted, you may log in to !login_uri using the following username and password:\n\nusername: !username\npassword: !password\n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you may wish to change your password at !edit_uri\n\n\n-- !site team", $variables); case 'pass_subject': - return t('Replacement login information for %username at %site', $variables); + return t('Replacement login information for !username at !site', $variables); case 'pass_body': - return t("%username,\n\nA request to reset the password for your account has been made at %site.\n\nYou may now log in to %uri_brief clicking on this link or copying and pasting it in your browser:\n\n%login_url\n\nThis is a one-time login, so it can be used only once. It expires after one day and nothing will happen if it's not used.\n\nAfter logging in, you will be redirected to %edit_uri so you can change your password.", $variables); + return t("!username,\n\nA request to reset the password for your account has been made at !site.\n\nYou may now log in to !uri_brief clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once. It expires after one day and nothing will happen if it's not used.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.", $variables); } } } @@ -1553,26 +1553,26 @@ function user_admin_access_check_submit($form_id, $edit) { switch ($edit['type']) { case 'user': if (drupal_is_denied('user', $edit['test'])) { - drupal_set_message(t('The username %name is not allowed.', array('%name' => theme('placeholder', $edit['test'])))); + drupal_set_message(t('The username %name is not allowed.', array('%name' => $edit['test']))); } else { - drupal_set_message(t('The username %name is allowed.', array('%name' => theme('placeholder', $edit['test'])))); + drupal_set_message(t('The username %name is allowed.', array('%name' => $edit['test']))); } break; case 'mail': if (drupal_is_denied('mail', $edit['test'])) { - drupal_set_message(t('The e-mail address %mail is not allowed.', array('%mail' => theme('placeholder', $edit['test'])))); + drupal_set_message(t('The e-mail address %mail is not allowed.', array('%mail' => $edit['test']))); } else { - drupal_set_message(t('The e-mail address %mail is allowed.', array('%mail' => theme('placeholder', $edit['test'])))); + drupal_set_message(t('The e-mail address %mail is allowed.', array('%mail' => $edit['test']))); } break; case 'host': if (drupal_is_denied('host', $edit['test'])) { - drupal_set_message(t('The hostname %host is not allowed.', array('%host' => theme('placeholder', $edit['test'])))); + drupal_set_message(t('The hostname %host is not allowed.', array('%host' => $edit['test']))); } else { - drupal_set_message(t('The hostname %host is allowed.', array('%host' => theme('placeholder', $edit['test'])))); + drupal_set_message(t('The hostname %host is allowed.', array('%host' => $edit['test']))); } break; default: @@ -1616,7 +1616,7 @@ function user_admin_access_delete($aid = 0) { $form = array(); $form['aid'] = array('#type' => 'hidden', '#value' => $aid); $output = confirm_form('user_admin_access_delete_confirm', $form, - t('Are you sure you want to delete the %type rule for %rule?', array('%type' => $access_types[$edit->type], '%rule' => theme('placeholder', $edit->mask))), + t('Are you sure you want to delete the @type rule for %rule?', array('@type' => $access_types[$edit->type], '%rule' => $edit->mask)), 'admin/user/rules', t('This action cannot be undone.'), t('Delete'), @@ -1766,7 +1766,7 @@ function user_admin_perm($str_rids = NULL) { $options = array(); foreach (module_list(FALSE, FALSE, TRUE) as $module) { if ($permissions = module_invoke($module, 'perm')) { - $form['permission'][] = array('#type' => 'markup', '#value' => t('%module module', array('%module' => $module))); + $form['permission'][] = array('#type' => 'markup', '#value' => t('@module module', array('@module' => $module))); asort($permissions); foreach ($permissions as $perm) { $options[$perm] = ''; @@ -1973,7 +1973,7 @@ function user_admin_account() { asort($users_roles); $form['roles'][$account->uid][0] = array('#value' => theme('item_list', $users_roles)); $form['member_for'][$account->uid] = array('#value' => format_interval(time() - $account->created)); - $form['last_access'][$account->uid] = array('#value' => $account->access ? t('%time ago', array('%time' => format_interval(time() - $account->access))) : t('never')); + $form['last_access'][$account->uid] = array('#value' => $account->access ? t('@time ago', array('@time' => format_interval(time() - $account->access))) : t('never')); $form['operations'][$account->uid] = array('#value' => l(t('edit'), "user/$account->uid/edit", array(), $destination)); } $form['accounts'] = array( @@ -2187,14 +2187,14 @@ function user_admin_settings() { // User e-mail settings. $form['email'] = array('#type' => 'fieldset', '#title' => t('User e-mail settings')); - $form['email']['user_mail_welcome_subject'] = array('#type' => 'textfield', '#title' => t('Subject of welcome e-mail'), '#default_value' => _user_mail_text('welcome_subject'), '#maxlength' => 180, '#description' => t('Customize the subject of your welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %date, %login_uri, %edit_uri, %login_url.'); - $form['email']['user_mail_welcome_body'] = array('#type' => 'textarea', '#title' => t('Body of welcome e-mail'), '#default_value' => _user_mail_text('welcome_body'), '#rows' => 15, '#description' => t('Customize the body of the welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %login_uri, %edit_uri, %login_url.'); - $form['email']['user_mail_admin_subject'] = array('#type' => 'textfield', '#title' => t('Subject of welcome e-mail (user created by administrator)'), '#default_value' => _user_mail_text('admin_subject'), '#maxlength' => 180, '#description' => t('Customize the subject of your welcome e-mail, which is sent to new member accounts created by an administrator.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %date, %login_uri, %edit_uri, %login_url.'); - $form['email']['user_mail_admin_body'] = array('#type' => 'textarea', '#title' => t('Body of welcome e-mail (user created by administrator)'), '#default_value' => _user_mail_text('admin_body'), '#rows' => 15, '#description' => t('Customize the body of the welcome e-mail, which is sent to new member accounts created by an administrator.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %login_uri, %edit_uri, %login_url.'); - $form['email']['user_mail_approval_subject'] = array('#type' => 'textfield', '#title' => t('Subject of welcome e-mail (awaiting admin approval)'), '#default_value' => _user_mail_text('approval_subject'), '#maxlength' => 180, '#description' => t('Customize the subject of your awaiting approval welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %date, %login_uri, %edit_uri, %login_url.'); - $form['email']['user_mail_approval_body'] = array('#type' => 'textarea', '#title' => t('Body of welcome e-mail (awaiting admin approval)'), '#default_value' => _user_mail_text('approval_body'), '#rows' => 15, '#description' => t('Customize the body of the awaiting approval welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %login_uri, %edit_uri, %login_url.'); - $form['email']['user_mail_pass_subject'] = array('#type' => 'textfield', '#title' => t('Subject of password recovery e-mail'), '#default_value' => _user_mail_text('pass_subject'), '#maxlength' => 180, '#description' => t('Customize the Subject of your forgotten password e-mail.') .' '. t('Available variables are:') .' %username, %site, %login_url, %uri, %uri_brief, %mailto, %date, %login_uri, %edit_uri.'); - $form['email']['user_mail_pass_body'] = array('#type' => 'textarea', '#title' => t('Body of password recovery e-mail'), '#default_value' => _user_mail_text('pass_body'), '#rows' => 15, '#description' => t('Customize the body of the forgotten password e-mail.') .' '. t('Available variables are:') .' %username, %site, %login_url, %uri, %uri_brief, %mailto, %login_uri, %edit_uri.'); + $form['email']['user_mail_welcome_subject'] = array('#type' => 'textfield', '#title' => t('Subject of welcome e-mail'), '#default_value' => _user_mail_text('welcome_subject'), '#maxlength' => 180, '#description' => t('Customize the subject of your welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' !username, !site, !password, !uri, !uri_brief, !mailto, !date, !login_uri, !edit_uri, !login_url.'); + $form['email']['user_mail_welcome_body'] = array('#type' => 'textarea', '#title' => t('Body of welcome e-mail'), '#default_value' => _user_mail_text('welcome_body'), '#rows' => 15, '#description' => t('Customize the body of the welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' !username, !site, !password, !uri, !uri_brief, !mailto, !login_uri, !edit_uri, !login_url.'); + $form['email']['user_mail_admin_subject'] = array('#type' => 'textfield', '#title' => t('Subject of welcome e-mail (user created by administrator)'), '#default_value' => _user_mail_text('admin_subject'), '#maxlength' => 180, '#description' => t('Customize the subject of your welcome e-mail, which is sent to new member accounts created by an administrator.') .' '. t('Available variables are:') .' !username, !site, !password, !uri, !uri_brief, !mailto, !date, !login_uri, !edit_uri, !login_url.'); + $form['email']['user_mail_admin_body'] = array('#type' => 'textarea', '#title' => t('Body of welcome e-mail (user created by administrator)'), '#default_value' => _user_mail_text('admin_body'), '#rows' => 15, '#description' => t('Customize the body of the welcome e-mail, which is sent to new member accounts created by an administrator.') .' '. t('Available variables are:') .' !username, !site, !password, !uri, !uri_brief, !mailto, !login_uri, !edit_uri, !login_url.'); + $form['email']['user_mail_approval_subject'] = array('#type' => 'textfield', '#title' => t('Subject of welcome e-mail (awaiting admin approval)'), '#default_value' => _user_mail_text('approval_subject'), '#maxlength' => 180, '#description' => t('Customize the subject of your awaiting approval welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' !username, !site, !password, !uri, !uri_brief, !mailto, !date, !login_uri, !edit_uri, !login_url.'); + $form['email']['user_mail_approval_body'] = array('#type' => 'textarea', '#title' => t('Body of welcome e-mail (awaiting admin approval)'), '#default_value' => _user_mail_text('approval_body'), '#rows' => 15, '#description' => t('Customize the body of the awaiting approval welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' !username, !site, !password, !uri, !uri_brief, !mailto, !login_uri, !edit_uri, !login_url.'); + $form['email']['user_mail_pass_subject'] = array('#type' => 'textfield', '#title' => t('Subject of password recovery e-mail'), '#default_value' => _user_mail_text('pass_subject'), '#maxlength' => 180, '#description' => t('Customize the Subject of your forgotten password e-mail.') .' '. t('Available variables are:') .' !username, !site, !login_url, !uri, !uri_brief, !mailto, !date, !login_uri, !edit_uri.'); + $form['email']['user_mail_pass_body'] = array('#type' => 'textarea', '#title' => t('Body of password recovery e-mail'), '#default_value' => _user_mail_text('pass_body'), '#rows' => 15, '#description' => t('Customize the body of the forgotten password e-mail.') .' '. t('Available variables are:') .' !username, !site, !login_url, !uri, !uri_brief, !mailto, !login_uri, !edit_uri.'); // If picture support is enabled, check whether the picture directory exists: if (variable_get('user_pictures', 0)) { @@ -2204,7 +2204,7 @@ function user_admin_settings() { $form['pictures'] = array('#type' => 'fieldset', '#title' => t('Pictures')); $form['pictures']['user_pictures'] = array('#type' => 'radios', '#title' => t('Picture support'), '#default_value' => variable_get('user_pictures', 0), '#options' => array(t('Disabled'), t('Enabled')), '#description' => t('Enable picture support.')); - $form['pictures']['user_picture_path'] = array('#type' => 'textfield', '#title' => t('Picture image path'), '#default_value' => variable_get('user_picture_path', 'pictures'), '#size' => 30, '#maxlength' => 255, '#description' => t('Subdirectory in the directory "%dir" where pictures will be stored.', array('%dir' => file_directory_path() .'/'))); + $form['pictures']['user_picture_path'] = array('#type' => 'textfield', '#title' => t('Picture image path'), '#default_value' => variable_get('user_picture_path', 'pictures'), '#size' => 30, '#maxlength' => 255, '#description' => t('Subdirectory in the directory %dir where pictures will be stored.', array('%dir' => file_directory_path() .'/'))); $form['pictures']['user_picture_default'] = array('#type' => 'textfield', '#title' => t('Default picture'), '#default_value' => variable_get('user_picture_default', ''), '#size' => 30, '#maxlength' => 255, '#description' => t('URL of picture to display for users with no custom picture selected. Leave blank for none.')); $form['pictures']['user_picture_dimensions'] = array('#type' => 'textfield', '#title' => t('Picture maximum dimensions'), '#default_value' => variable_get('user_picture_dimensions', '85x85'), '#size' => 15, '#maxlength' => 10, '#description' => t('Maximum dimensions for pictures.')); $form['pictures']['user_picture_file_size'] = array('#type' => 'textfield', '#title' => t('Picture maximum file size'), '#default_value' => variable_get('user_picture_file_size', '30'), '#size' => 15, '#maxlength' => 10, '#description' => t('Maximum file size for pictures, in kB.')); @@ -2244,14 +2244,14 @@ function user_help($section) { $output .= ''. t('Users can use their own name or handle and can fine tune some personal configuration settings through their individual my account page. Registered users need to authenticate by supplying either a local username and password, or a remote username and password such as DelphiForums ID, or one from a Drupal powered website. A visitor accessing your website is assigned an unique ID, the so-called session ID, which is stored in a cookie. For security\'s sake, the cookie does not contain personal information but acts as a key to retrieve the information stored on your server.') .'
'; $output .= t('You can
'. t('For more information please read the configuration and customization handbook User page.', array('%user' => 'http://drupal.org/handbook/modules/user/')) .'
'; +', array('@user' => url('user'), '@admin-user' => url('admin/user/user'), '@admin-themes' => url('admin/build/themes'), '@admin-help-profile' => url('admin/help/profile'), '@admin-help-system' => url('admin/help/system'))); + $output .= ''. t('For more information please read the configuration and customization handbook User page.', array('@user' => 'http://drupal.org/handbook/modules/user/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Manages the user registration and login system.'); @@ -2263,9 +2263,9 @@ function user_help($section) { case strstr($section, 'admin/user/rules'): return t('Set up username and e-mail address access rules for new and existing accounts (currently logged in accounts will not be logged out). If a username or e-mail address for an account matches any deny rule, but not an allow rule, then the account will not be allowed to be created or to log in. A host rule is effective for every page view, not just registrations.
'); case 'admin/user/access': - return t('Permissions let you control what users can do on your site. Each user role (defined on the user roles page) has its own set of permissions. For example, you could give users classified as "Administrators" permission to "administer nodes" but deny this power to ordinary, "authenticated" users. You can use permissions to reveal new features to privileged users (those with subscriptions, for example). Permissions also allow trusted users to share the administrative burden of running a busy site.
', array('%role' => url('admin/user/roles'))); + return t('Permissions let you control what users can do on your site. Each user role (defined on the user roles page) has its own set of permissions. For example, you could give users classified as "Administrators" permission to "administer nodes" but deny this power to ordinary, "authenticated" users. You can use permissions to reveal new features to privileged users (those with subscriptions, for example). Permissions also allow trusted users to share the administrative burden of running a busy site.
', array('@role' => url('admin/user/roles'))); case 'admin/user/roles': - return t('Roles allow you to fine tune the security and administration of Drupal. A role defines a group of users that have certain privileges as defined in user permissions. Examples of roles include: anonymous user, authenticated user, moderator, administrator and so on. In this area you will define the role names of the various roles. To delete a role choose "edit".
By default, Drupal comes with two user roles:
+ return t('Roles allow you to fine tune the security and administration of Drupal. A role defines a group of users that have certain privileges as defined in user permissions. Examples of roles include: anonymous user, authenticated user, moderator, administrator and so on. In this area you will define the role names of the various roles. To delete a role choose "edit".
By default, Drupal comes with two user roles:
One of the more tedious moments in visiting a new website is filling out the registration form. Here at %site, you do not have to fill out a registration form if you are already a member of %help-links. This capability is called distributed authentication, and is unique to Drupal, the software which powers %site.
-Distributed authentication enables a new user to input a username and password into the login box, and immediately be recognized, even if that user never registered at %site. This works because Drupal knows how to communicate with external registration databases. For example, lets say that new user 'Joe' is already a registered member of Delphi Forums. Drupal informs Joe on registration and login screens that he may login with his Delphi ID instead of registering with %site. Joe likes that idea, and logs in with a username of joe@remote.delphiforums.com and his usual Delphi password. Drupal then contacts the remote.delphiforums.com server behind the scenes (usually using XML-RPC, HTTP POST, or SOAP) and asks: \"Is the password for user Joe correct?\". If Delphi replies yes, then we create a new %site account for Joe and log him into it. Joe may keep on logging into %site in the same manner, and he will always be logged into the same account.
", array('%help-links' => (implode(', ', user_auth_help_links())), '%site' => "$site", '%drupal' => 'http://drupal.org', '%delphi-forums' => 'http://www.delphiforums.com', '%xml' => 'http://www.xmlrpc.com', '%http-post' => 'http://www.w3.org/Protocols/', '%soap' => 'http://www.soapware.org')); +One of the more tedious moments in visiting a new website is filling out the registration form. Here at %site, you do not have to fill out a registration form if you are already a member of !help-links. This capability is called distributed authentication, and is unique to Drupal, the software which powers %site.
+Distributed authentication enables a new user to input a username and password into the login box, and immediately be recognized, even if that user never registered at %site. This works because Drupal knows how to communicate with external registration databases. For example, lets say that new user 'Joe' is already a registered member of Delphi Forums. Drupal informs Joe on registration and login screens that he may login with his Delphi ID instead of registering with %site. Joe likes that idea, and logs in with a username of joe@remote.delphiforums.com and his usual Delphi password. Drupal then contacts the remote.delphiforums.com server behind the scenes (usually using XML-RPC, HTTP POST, or SOAP) and asks: \"Is the password for user Joe correct?\". If Delphi replies yes, then we create a new %site account for Joe and log him into it. Joe may keep on logging into %site in the same manner, and he will always be logged into the same account.
", array('!help-links' => (implode(', ', user_auth_help_links())), '%site' => $site, '%drupal' => 'http://drupal.org', '%delphi-forums' => 'http://www.delphiforums.com', '%xml' => 'http://www.xmlrpc.com', '%http-post' => 'http://www.w3.org/Protocols/', '%soap' => 'http://www.soapware.org')); foreach (module_list() as $module) { if (module_hook($module, 'auth')) { diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module index 07a4c9cba7e..ec33bb9d98d 100644 --- a/modules/watchdog/watchdog.module +++ b/modules/watchdog/watchdog.module @@ -22,11 +22,11 @@ function watchdog_help($section) { $output .= ''. t('The watchdog log is simply a list of recorded events containing usage data, performance data, errors, warnings and operational information. Administrators should check the watchdog report on a regular basis to ensure their site is working properly.') .'
'; $output .= t('You can
'. t('For more information please read the configuration and customization handbook Watchdog page.', array('%watchdog' => 'http://drupal.org/handbook/modules/watchdog/')) .'
'; +', array('@admin-watchdog' => url('admin/logs/watchdog'), '@admin-watchdog-events' => url('admin/logs/watchdog/events'))); + $output .= ''. t('For more information please read the configuration and customization handbook Watchdog page.', array('@watchdog' => 'http://drupal.org/handbook/modules/watchdog/')) .'
'; return $output; case 'admin/settings/modules#description': return t('Logs and records system events.'); @@ -94,7 +94,7 @@ function watchdog_overview() { $names['all'] = t('all messages'); foreach (_watchdog_get_message_types() as $type) { - $names[$type] = t('%type messages', array('%type' => t($type))); + $names[$type] = t('!type messages', array('!type' => t($type))); } if (empty($_SESSION['watchdog_overview_filter'])) {