=== modified file 'includes/bootstrap.inc' --- includes/bootstrap.inc 2008-10-16 21:16:06 +0000 +++ includes/bootstrap.inc 2008-10-19 21:22:44 +0000 @@ -1152,18 +1152,6 @@ function drupal_maintenance_theme() { } /** - * Return the name of the localisation function. Use in code that needs to - * run both during installation and normal operation. - */ -function get_t() { - static $t; - if (is_null($t)) { - $t = function_exists('install_main') ? 'st' : 't'; - } - return $t; -} - -/** * Choose a language for the current page, based on site and user preferences. */ function drupal_init_language() { @@ -1577,3 +1565,158 @@ function registry_load_path_files($retur /** * @} End of "ingroup registry". */ + +/** + * Translate strings to the page language or a given language. + * + * All human-readable text that will be displayed somewhere within a page should + * be run through the t() function. + * + * Examples: + * @code + * if (!$info || !$info['extension']) { + * form_set_error('picture_upload', t('The uploaded file was not an image.')); + * } + * + * $form['submit'] = array( + * '#type' => 'submit', + * '#value' => t('Log in'), + * ); + * @endcode + * + * Any text within t() can be extracted by translators and changed into + * the equivalent text in their native language. + * + * Special variables called "placeholders" are used to signal dynamic + * information in a string which should not be translated. Placeholders + * can also be used for text that may change from time to time + * (such as link paths) to be changed without requiring updates to translations. + * + * For example: + * @code + * $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'))); + * @endcode + * + * There are three styles of placeholders: + * - !variable, which indicates that the text should be inserted as-is. This is + * useful for inserting variables into things like e-mail. + * @code + * $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", array('absolute' => TRUE)))); + * @endcode + * + * - @variable, which indicates that the text should be run through check_plain, + * to escape HTML characters. Use this for any output that's displayed within + * a Drupal page. + * @code + * drupal_set_title($title = t("@name's blog", array('@name' => $account->name)), PASS_THROUGH); + * @endcode + * + * - %variable, which indicates that the string should be HTML escaped and + * highlighted with theme_placeholder() which shows up by default as + * emphasized. + * @code + * $message = t('%name-from sent %name-to an e-mail.', array('%name-from' => $user->name, '%name-to' => $account->name)); + * @endcode + * + * When using t(), try to put entire sentences and strings in one t() call. + * This makes it easier for translators, as it provides context as to what each + * word refers to. HTML markup within translation strings is allowed, but should + * be avoided if possible. The exception are embedded links; link titles add a + * context for translators, so should be kept in the main string. + * + * Here is an example of incorrect usage of t(): + * @code + * $output .= t('

Go to the @contact-page.

', array('@contact-page' => l(t('contact page'), 'contact'))); + * @endcode + * + * Here is an example of t() used correctly: + * @code + * $output .= '

' . t('Go to the contact page.', array('@contact-page' => url('contact'))) . '

'; + * @endcode + * + * Also avoid escaping quotation marks wherever possible. + * + * Incorrect: + * @code + * $output .= t('Don\'t click me.'); + * @endcode + * + * Correct: + * @code + * $output .= t("Don't click me."); + * @endcode + * + * @param $string + * A string containing the English string to translate. + * @param $args + * An associative array of replacements to make after translation. Incidences + * of any key in this array are replaced with the corresponding value. + * Based on the first character of the key, the value is escaped and/or themed: + * - !variable: inserted as is + * - @variable: escape plain text to HTML (check_plain) + * - %variable: escape text and theme as a placeholder for user-submitted + * content (check_plain + theme_placeholder) + * @param $langcode + * Optional language code to translate to a language other than what is used + * to display the page. + * @param $install_time + * Optional boolean indicating that the string is used during install. + * @return + * The translated string. + */ +function t($string, $args = array(), $langcode = NULL, $install_time) { + global $language, $bootstrap_language, $bootstrap_full; + static $custom_strings; + + if (!isset($langcode)) { + $langcode = isset($language->language) ? $language->language : 'en'; + } + if (!isset($bootstrap_language) && drupal_get_bootstrap_phase() >= DRUPAL_BOOTSTRAP_LANGUAGE) { + $bootstrap_language = TRUE; + } + if (!isset($bootstrap_full) && drupal_get_bootstrap_phase() == DRUPAL_BOOTSTRAP_FULL) { + $bootstrap_full = TRUE; + } + + // First, check for an array of customized strings. If present, use the array + // *instead of* database lookups. This is a high performance way to provide a + // handful of string replacements. See settings.php for examples. + // Cache the $custom_strings variable to improve performance. + if (!isset($custom_strings[$langcode])) { + $custom_strings[$langcode] = defined('MAINTENANCE_MODE') ? install_load_strings() : variable_get('locale_custom_strings_' . $langcode, array()); + } + // Custom strings work for English too, even if locale module is disabled. + if (isset($custom_strings[$langcode][$string])) { + $string = $custom_strings[$langcode][$string]; + } + // Translate with locale module if enabled. + elseif ($bootstrap_language && $langcode != 'en' && function_exists('locale')) { + $string = locale($string, $langcode); + } + if (empty($args)) { + return $string; + } + else { + // Transform arguments before inserting them. + foreach ($args as $key => &$value) { + switch ($key[0]) { + case '@': + // Escaped only. + $value = check_plain($value); + break; + + case '%': + default: + // Escaped and placeholder. + $value = $bootstrap_full ? theme('placeholder', $value) : '' . $value . ''; + break; + + case '!': + // Pass-through. + } + } + return strtr($string, $args); + } +} === modified file 'includes/common.inc' --- includes/common.inc 2008-10-15 16:05:51 +0000 +++ includes/common.inc 2008-10-19 21:20:03 +0000 @@ -682,7 +682,7 @@ function _drupal_log_error($type, $messa drupal_set_message(t('@type: %message in %function (line %line of %file).', array('@type' => $type, '%message' => $message, '%function' => $caller['function'], '%line' => $caller['line'], '%file' => $caller['file'])), 'error'); } - watchdog('php', '%type: %message in %function (line %line of %file).', array('%type' => $type, '%message' => $message, '%function' => $caller['function'], '%file' => $caller['file'], '%line' => $caller['line']), WATCHDOG_ERROR); + watchdog('php', '%type: %message in %function (line %line of %file).', array('%type' => $type, '%message' => $message, '%function' => $caller['function'], '%file' => $caller['file'], '%line' => $caller['line']), WATCHDOG_ERROR); if ($fatal) { drupal_set_header($_SERVER['SERVER_PROTOCOL'] . ' Service unavailable'); @@ -691,7 +691,7 @@ function _drupal_log_error($type, $messa print theme('page', t('The website encountered an unexpected error. Please try again later.'), FALSE); } else { - print theme('maintenance_page', t('The website encountered an unexpected error. Please try again later.'), FALSE); + print theme('maintenance_page', t('The website encountered an unexpected error. Please try again later.'), FALSE); } exit; } @@ -774,153 +774,6 @@ function fix_gpc_magic() { } /** - * Translate strings to the page language or a given language. - * - * All human-readable text that will be displayed somewhere within a page should - * be run through the t() function. - * - * Examples: - * @code - * if (!$info || !$info['extension']) { - * form_set_error('picture_upload', t('The uploaded file was not an image.')); - * } - * - * $form['submit'] = array( - * '#type' => 'submit', - * '#value' => t('Log in'), - * ); - * @endcode - * - * Any text within t() can be extracted by translators and changed into - * the equivalent text in their native language. - * - * Special variables called "placeholders" are used to signal dynamic - * information in a string which should not be translated. Placeholders - * can also be used for text that may change from time to time - * (such as link paths) to be changed without requiring updates to translations. - * - * For example: - * @code - * $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'))); - * @endcode - * - * There are three styles of placeholders: - * - !variable, which indicates that the text should be inserted as-is. This is - * useful for inserting variables into things like e-mail. - * @code - * $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", array('absolute' => TRUE)))); - * @endcode - * - * - @variable, which indicates that the text should be run through check_plain, - * to escape HTML characters. Use this for any output that's displayed within - * a Drupal page. - * @code - * drupal_set_title($title = t("@name's blog", array('@name' => $account->name)), PASS_THROUGH); - * @endcode - * - * - %variable, which indicates that the string should be HTML escaped and - * highlighted with theme_placeholder() which shows up by default as - * emphasized. - * @code - * $message = t('%name-from sent %name-to an e-mail.', array('%name-from' => $user->name, '%name-to' => $account->name)); - * @endcode - * - * When using t(), try to put entire sentences and strings in one t() call. - * This makes it easier for translators, as it provides context as to what each - * word refers to. HTML markup within translation strings is allowed, but should - * be avoided if possible. The exception are embedded links; link titles add a - * context for translators, so should be kept in the main string. - * - * Here is an example of incorrect usage of t(): - * @code - * $output .= t('

Go to the @contact-page.

', array('@contact-page' => l(t('contact page'), 'contact'))); - * @endcode - * - * Here is an example of t() used correctly: - * @code - * $output .= '

' . t('Go to the contact page.', array('@contact-page' => url('contact'))) . '

'; - * @endcode - * - * Also avoid escaping quotation marks wherever possible. - * - * Incorrect: - * @code - * $output .= t('Don\'t click me.'); - * @endcode - * - * Correct: - * @code - * $output .= t("Don't click me."); - * @endcode - * - * @param $string - * A string containing the English string to translate. - * @param $args - * An associative array of replacements to make after translation. Incidences - * of any key in this array are replaced with the corresponding value. - * Based on the first character of the key, the value is escaped and/or themed: - * - !variable: inserted as is - * - @variable: escape plain text to HTML (check_plain) - * - %variable: escape text and theme as a placeholder for user-submitted - * content (check_plain + theme_placeholder) - * @param $langcode - * Optional language code to translate to a language other than what is used - * to display the page. - * @return - * The translated string. - */ -function t($string, $args = array(), $langcode = NULL) { - global $language; - static $custom_strings; - - if (!isset($langcode)) { - $langcode = $language->language; - } - - // First, check for an array of customized strings. If present, use the array - // *instead of* database lookups. This is a high performance way to provide a - // handful of string replacements. See settings.php for examples. - // Cache the $custom_strings variable to improve performance. - if (!isset($custom_strings[$langcode])) { - $custom_strings[$langcode] = variable_get('locale_custom_strings_' . $langcode, array()); - } - // Custom strings work for English too, even if locale module is disabled. - if (isset($custom_strings[$langcode][$string])) { - $string = $custom_strings[$langcode][$string]; - } - // Translate with locale module if enabled. - elseif (function_exists('locale') && $langcode != 'en') { - $string = locale($string, $langcode); - } - if (empty($args)) { - return $string; - } - else { - // Transform arguments before inserting them. - foreach ($args as $key => $value) { - switch ($key[0]) { - case '@': - // Escaped only. - $args[$key] = check_plain($value); - break; - - case '%': - default: - // Escaped and placeholder. - $args[$key] = theme('placeholder', $value); - break; - - case '!': - // Pass-through. - } - } - return strtr($string, $args); - } -} - -/** * @defgroup validation Input validation * @{ * Functions to validate user input. @@ -2773,7 +2626,7 @@ function drupal_system_listing($mask, $d /** * Hands off structured Drupal arrays to type-specific *_alter implementations. - * + * * This dispatch function hands off structured Drupal arrays to type-specific * *_alter implementations. It ensures a consistent interface for all altering * operations. === modified file 'includes/form.inc' --- includes/form.inc 2008-10-15 14:17:26 +0000 +++ includes/form.inc 2008-10-19 21:20:03 +0000 @@ -661,9 +661,6 @@ function drupal_redirect_form($form, $re function _form_validate($elements, &$form_state, $form_id = NULL) { static $complete_form; - // Also used in the installer, pre-database setup. - $t = get_t(); - // Recurse through all children. foreach (element_children($elements) as $key) { if (isset($elements[$key]) && $elements[$key]) { @@ -678,12 +675,12 @@ function _form_validate($elements, &$for // checkboxes, can return a valid value of '0'. Instead, check the // length if it's a string, and the item count if it's an array. if ($elements['#required'] && (!count($elements['#value']) || (is_string($elements['#value']) && strlen(trim($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']), NULL, TRUE)); } // Verify that the value is not longer than #maxlength. if (isset($elements['#maxlength']) && drupal_strlen($elements['#value']) > $elements['#maxlength']) { - form_error($elements, $t('!name cannot be longer than %max characters but is currently %length characters long.', array('!name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title'], '%max' => $elements['#maxlength'], '%length' => drupal_strlen($elements['#value'])))); + form_error($elements, t('!name cannot be longer than %max characters but is currently %length characters long.', array('!name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title'], '%max' => $elements['#maxlength'], '%length' => drupal_strlen($elements['#value'])), NULL, TRUE)); } if (isset($elements['#options']) && isset($elements['#value'])) { @@ -697,13 +694,13 @@ function _form_validate($elements, &$for $value = $elements['#type'] == 'checkboxes' ? array_keys(array_filter($elements['#value'])) : $elements['#value']; foreach ($value as $v) { if (!isset($options[$v])) { - form_error($elements, $t('An illegal choice has been detected. Please contact the site administrator.')); + form_error($elements, t('An illegal choice has been detected. Please contact the site administrator.', array(), NULL, TRUE)); watchdog('form', 'Illegal choice %choice in !name element.', array('%choice' => $v, '!name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title']), WATCHDOG_ERROR); } } } elseif (!isset($options[$elements['#value']])) { - form_error($elements, $t('An illegal choice has been detected. Please contact the site administrator.')); + form_error($elements, t('An illegal choice has been detected. Please contact the site administrator.', array(), NULL, TRUE)); watchdog('form', 'Illegal choice %choice in %name element.', array('%choice' => $elements['#value'], '%name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title']), WATCHDOG_ERROR); } } @@ -1761,7 +1758,7 @@ function form_process_radios($element) { /** * Add input format selector to text elements with the #input_format property. * - * The #input_format property should be the ID of an input format, found in + * The #input_format property should be the ID of an input format, found in * {filter_formats}.format, which gets passed to filter_form(). * * If the property #input_format is set, the form element will be expanded into @@ -1777,7 +1774,7 @@ function form_process_radios($element) { * '#type' => 'textarea', * '#title' => t('Body'), * '#input_format' => isset($node->format) ? $node->format : FILTER_FORMAT_DEFAULT, - * ); + * ); * @endcode * * Becomes: @@ -2253,23 +2250,20 @@ function theme_file($element) { * @ingroup themeable */ function theme_form_element($element, $value) { - // This is also used in the installer, pre-database setup. - $t = get_t(); - $output = '
*' : ''; + $required = !empty($element['#required']) ? '*' : ''; if (!empty($element['#title'])) { $title = $element['#title']; if (!empty($element['#id'])) { - $output .= ' \n"; + $output .= ' \n"; } else { - $output .= ' \n"; + $output .= ' \n"; } } @@ -2509,13 +2503,11 @@ function batch_set($batch_definition) { 'results' => array(), 'success' => FALSE, ); - // Use get_t() to allow batches at install time. - $t = get_t(); $defaults = array( - 'title' => $t('Processing'), - 'init_message' => $t('Initializing.'), - 'progress_message' => $t('Completed @current of @total.'), - 'error_message' => $t('An error has occurred.'), + 'title' => t('Processing', array(), NULL, TRUE), + 'init_message' => t('Initializing.', array(), NULL, TRUE), + 'progress_message' => t('Completed @current of @total.', array(), NULL, TRUE), + 'error_message' => t('An error has occurred.', array(), NULL, TRUE), 'css' => array(), ); $batch_set = $init + $batch_definition + $defaults; @@ -2584,8 +2576,7 @@ function batch_process($redirect = NULL, // Now that we have a batch id, we can generate the redirection link in // the generic error message. - $t = get_t(); - $batch['error_message'] = $t('Please continue to the error page', array('@error_url' => url($url, array('query' => array('id' => $batch['id'], 'op' => 'finished'))))); + $batch['error_message'] = t('Please continue to the error page', array('@error_url' => url($url, array('query' => array('id' => $batch['id'], 'op' => 'finished')))), NULL, TRUE); // Actually store the batch data and the token generated form the batch id. db_query("UPDATE {batch} SET token = '%s', batch = '%s' WHERE bid = %d", drupal_get_token($batch['id']), serialize($batch), $batch['id']); === modified file 'includes/install.inc' --- includes/install.inc 2008-10-11 22:46:21 +0000 +++ includes/install.inc 2008-10-19 21:20:03 +0000 @@ -88,7 +88,7 @@ function drupal_load_updates() { * @param $module * A module name. * @return - * If the module has updates, an array of available updates sorted by version. + * If the module has updates, an array of available updates sorted by version. * Otherwise, FALSE. */ function drupal_get_schema_versions($module) { @@ -105,10 +105,10 @@ function drupal_get_schema_versions($mod if (count($updates) == 0) { return FALSE; } - + // Make sure updates are run in numeric order, not in definition order. sort($updates, SORT_NUMERIC); - + return $updates; } @@ -231,7 +231,7 @@ function drupal_detect_database_types() unset($databases['mysql']); $databases = array('mysql' => $mysql_database) + $databases; } - + return $databases; } @@ -465,7 +465,7 @@ function drupal_verify_profile($profile, $missing_modules = array_diff($module_list, $present_modules); $requirements = array(); - + if (count($missing_modules)) { $modules = array(); foreach ($missing_modules as $module) { @@ -543,7 +543,7 @@ function _drupal_install_module($module) */ function drupal_install_init_database() { static $included = FALSE; - + if (!$included) { $connection_info = Database::getConnectionInfo(); $driver = $connection_info['default']['driver']; @@ -567,7 +567,7 @@ function drupal_install_system() { require_once DRUPAL_ROOT . '/' . $system_path . '/system.install'; drupal_install_init_database(); module_invoke('system', 'install'); - + $system_versions = drupal_get_schema_versions('system'); $system_version = $system_versions ? max($system_versions) : SCHEMA_INSTALLED; db_query("INSERT INTO {system} (filename, name, type, owner, status, bootstrap, schema_version) VALUES('%s', '%s', '%s', '%s', %d, %d, %d)", $system_path . '/system.module', 'system', 'module', '', 1, 0, $system_version); @@ -827,7 +827,7 @@ function drupal_install_fix_file($file, /** - * Send the user to a different installer page. + * Send the user to a different installer page. * * This issues an on-site HTTP redirect. Messages (and errors) are erased. * @@ -841,47 +841,15 @@ function install_goto($path) { exit(); } -/** - * Functional equivalent of t(), used when some systems are not available. - * - * Used during the install process, when database, theme, and localization - * system is possibly not yet available. - * - * @see t() - */ -function st($string, $args = array()) { - static $locale_strings = NULL; - global $profile, $install_locale; - - if (!isset($locale_strings)) { - $locale_strings = array(); - $filename = 'profiles/' . $profile . '/translations/' . $install_locale . '.po'; - if (file_exists(DRUPAL_ROOT . '/' . $filename)) { - require_once DRUPAL_ROOT . '/includes/locale.inc'; - $file = (object) array('filepath' => $filename); - _locale_import_read_po('mem-store', $file); - $locale_strings = _locale_import_one_string('mem-report'); - } - } - - require_once DRUPAL_ROOT . '/includes/theme.inc'; - // Transform arguments before inserting them - foreach ($args as $key => $value) { - switch ($key[0]) { - // Escaped only - case '@': - $args[$key] = check_plain($value); - break; - // Escaped and placeholder - case '%': - default: - $args[$key] = '' . check_plain($value) . ''; - break; - // Pass-through - case '!': - } +function install_load_strings() { + $locale_strings = array(); + $filename = 'profiles/' . $profile . '/translations/' . $install_locale . '.po'; + if (file_exists(DRUPAL_ROOT . '/' . $filename)) { + require_once DRUPAL_ROOT . '/includes/locale.inc'; + $file = (object) array('filepath' => $filename); + _locale_import_read_po('mem-store', $file); + $locale_strings = _locale_import_one_string('mem-report'); } - return strtr((!empty($locale_strings[$string]) ? $locale_strings[$string] : $string), $args); } /** @@ -926,7 +894,7 @@ function drupal_check_profile($profile) * Extract highest severity from requirements array. * * @param $requirements - * An array of requirements, in the same format as is returned by + * An array of requirements, in the same format as is returned by * hook_requirements(). * @return * The highest severity in the array. === modified file 'includes/locale.inc' --- includes/locale.inc 2008-10-12 04:30:05 +0000 +++ includes/locale.inc 2008-10-19 21:20:03 +0000 @@ -97,7 +97,7 @@ function theme_locale_languages_overview $header = array(array('data' => t('English name')), array('data' => t('Native name')), array('data' => t('Code')), array('data' => t('Direction')), array('data' => t('Enabled')), array('data' => t('Default')), array('data' => t('Weight')), array('data' => t('Operations'))); $output = theme('table', $header, $rows, array('id' => 'language-order')); $output .= drupal_render($form); - + drupal_add_tabledrag('language-order', 'order', 'sibling', 'language-order-weight'); return $output; @@ -1195,8 +1195,7 @@ function _locale_import_message($message if (isset($lineno)) { $vars['%line'] = $lineno; } - $t = get_t(); - drupal_set_message($t($message, $vars), 'error'); + drupal_set_message(t($message, $vars, NULL, TRUE), 'error'); } /** @@ -2538,7 +2537,6 @@ function locale_batch_by_component($comp * A batch structure */ function _locale_batch_build($files, $finished = NULL, $components = array()) { - $t = get_t(); if (count($files)) { $operations = array(); foreach ($files as $file) { @@ -2546,9 +2544,9 @@ function _locale_batch_build($files, $fi $operations[] = array('_locale_batch_import', array($file->filename)); } $batch = array( 'operations' => $operations, - 'title' => $t('Importing interface translations'), - 'init_message' => $t('Starting import'), - 'error_message' => $t('Error importing interface translations'), + 'title' => t('Importing interface translations', array(), NULL, TRUE), + 'init_message' => t('Starting import', array(), NULL, TRUE), + 'error_message' => t('Error importing interface translations', array(), NULL, TRUE), 'file' => 'includes/locale.inc', // This is not a batch API construct, but data passed along to the // installer, so we know what did we import already. === modified file 'includes/unicode.inc' --- includes/unicode.inc 2008-10-12 04:30:05 +0000 +++ includes/unicode.inc 2008-10-19 21:20:03 +0000 @@ -36,35 +36,32 @@ function unicode_check() { * Whether to report any fatal errors with form_set_error(). */ function _unicode_check() { - // Ensure translations don't break at install time - $t = get_t(); - // Set the standard C locale to ensure consistent, ASCII-only string handling. setlocale(LC_CTYPE, 'C'); // Check for outdated PCRE library // Note: we check if U+E2 is in the range U+E0 - U+E1. This test returns TRUE on old PCRE versions. if (preg_match('/[à-á]/u', 'â')) { - return array(UNICODE_ERROR, $t('The PCRE library in your PHP installation is outdated. This will cause problems when handling Unicode text. If you are running PHP 4.3.3 or higher, make sure you are using the PCRE library supplied by PHP. Please refer to the PHP PCRE documentation for more information.', array('@url' => 'http://www.php.net/pcre'))); + return array(UNICODE_ERROR, t('The PCRE library in your PHP installation is outdated. This will cause problems when handling Unicode text. If you are running PHP 4.3.3 or higher, make sure you are using the PCRE library supplied by PHP. Please refer to the PHP PCRE documentation for more information.', array('@url' => 'http://www.php.net/pcre'), NULL, TRUE)); } // Check for mbstring extension if (!function_exists('mb_strlen')) { - return array(UNICODE_SINGLEBYTE, $t('Operations on Unicode strings are emulated on a best-effort basis. Install the PHP mbstring extension for improved Unicode support.', array('@url' => 'http://www.php.net/mbstring'))); + return array(UNICODE_SINGLEBYTE, t('Operations on Unicode strings are emulated on a best-effort basis. Install the PHP mbstring extension for improved Unicode support.', array('@url' => 'http://www.php.net/mbstring'), NULL, TRUE)); } // Check mbstring configuration if (ini_get('mbstring.func_overload') != 0) { - return array(UNICODE_ERROR, $t('Multibyte string function overloading in PHP is active and must be disabled. Check the php.ini mbstring.func_overload setting. Please refer to the PHP mbstring documentation for more information.', array('@url' => 'http://www.php.net/mbstring'))); + return array(UNICODE_ERROR, t('Multibyte string function overloading in PHP is active and must be disabled. Check the php.ini mbstring.func_overload setting. Please refer to the PHP mbstring documentation for more information.', array('@url' => 'http://www.php.net/mbstring'), NULL, TRUE)); } if (ini_get('mbstring.encoding_translation') != 0) { - return array(UNICODE_ERROR, $t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini mbstring.encoding_translation setting. Please refer to the PHP mbstring documentation for more information.', array('@url' => 'http://www.php.net/mbstring'))); + return array(UNICODE_ERROR, t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini mbstring.encoding_translation setting. Please refer to the PHP mbstring documentation for more information.', array('@url' => 'http://www.php.net/mbstring'), array(), NULL, TRUE)); } if (ini_get('mbstring.http_input') != 'pass') { - return array(UNICODE_ERROR, $t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini mbstring.http_input setting. Please refer to the PHP mbstring documentation for more information.', array('@url' => 'http://www.php.net/mbstring'))); + return array(UNICODE_ERROR, t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini mbstring.http_input setting. Please refer to the PHP mbstring documentation for more information.', array('@url' => 'http://www.php.net/mbstring'), NULL, TRUE)); } if (ini_get('mbstring.http_output') != 'pass') { - return array(UNICODE_ERROR, $t('Multibyte string output conversion in PHP is active and must be disabled. Check the php.ini mbstring.http_output setting. Please refer to the PHP mbstring documentation for more information.', array('@url' => 'http://www.php.net/mbstring'))); + return array(UNICODE_ERROR, t('Multibyte string output conversion in PHP is active and must be disabled. Check the php.ini mbstring.http_output setting. Please refer to the PHP mbstring documentation for more information.', array('@url' => 'http://www.php.net/mbstring'), NULL, TRUE)); } // Set appropriate configuration @@ -77,13 +74,10 @@ function _unicode_check() { * Return Unicode library status and errors. */ function unicode_requirements() { - // Ensure translations don't break at install time - $t = get_t(); - $libraries = array( - UNICODE_SINGLEBYTE => $t('Standard PHP'), - UNICODE_MULTIBYTE => $t('PHP Mbstring Extension'), - UNICODE_ERROR => $t('Error'), + UNICODE_SINGLEBYTE => t('Standard PHP', array(), NULL, TRUE), + UNICODE_MULTIBYTE => t('PHP Mbstring Extension', array(), NULL, TRUE), + UNICODE_ERROR => t('Error', array(), NULL, TRUE), ); $severities = array( UNICODE_SINGLEBYTE => REQUIREMENT_WARNING, @@ -93,7 +87,7 @@ function unicode_requirements() { list($library, $description) = _unicode_check(); $requirements['unicode'] = array( - 'title' => $t('Unicode library'), + 'title' => t('Unicode library', array(), NULL, TRUE), 'value' => $libraries[$library], ); if ($description) { === modified file 'install.php' --- install.php 2008-10-16 13:47:06 +0000 +++ install.php 2008-10-19 21:20:03 +0000 @@ -132,9 +132,9 @@ function install_main() { if ($severity == REQUIREMENT_ERROR) { install_task_list('requirements'); - drupal_set_title(st('Requirements problem')); + drupal_set_title(t('Requirements problem'), array(), NULL, TRUE); $status_report = theme('status_report', $requirements); - $status_report .= st('Please check the error messages and try again.', array('!url' => request_uri())); + $status_report .= t('Please check the error messages and try again.', array('!url' => request_uri()), NULL, TRUE); print theme('install_page', $status_report); exit; } @@ -210,7 +210,7 @@ function install_change_settings($profil install_task_list('database'); $output = drupal_get_form('install_settings_form', $profile, $install_locale, $settings_file, $database); - drupal_set_title(st('Database configuration')); + drupal_set_title(t('Database configuration', array(), NULL, TRUE)); print theme('install_page', $output); exit; } @@ -224,14 +224,14 @@ function install_settings_form(&$form_st if (!$drivers) { $form['no_drivers'] = array( - '#markup' => st('Your web server does not appear to support any common database types. Check with your hosting provider to see if they offer any databases that Drupal supports.', array('@drupal-databases' => 'http://drupal.org/node/270#database')), + '#markup' => t('Your web server does not appear to support any common database types. Check with your hosting provider to see if they offer any databases that Drupal supports.', array('@drupal-databases' => 'http://drupal.org/node/270#database'), NULL, TRUE), ); } else { $form['basic_options'] = array( '#type' => 'fieldset', - '#title' => st('Basic options'), - '#description' => '

' . st('To set up your @drupal database, enter the following information.', array('@drupal' => drupal_install_profile_name())) . '

', + '#title' => t('Basic options', array(), NULL, TRUE), + '#description' => '

' . t('To set up your @drupal database, enter the following information.', array('@drupal' => drupal_install_profile_name()), NULL, TRUE) . '

', ); if (count($drivers) == 1) { @@ -239,24 +239,24 @@ function install_settings_form(&$form_st '#type' => 'hidden', '#value' => current(array_keys($drivers)), ); - $database_description = st('The name of the %driver database your @drupal data will be stored in. It must exist on your server before @drupal can be installed.', array('%driver' => current($drivers), '@drupal' => drupal_install_profile_name())); + $database_description = t('The name of the %driver database your @drupal data will be stored in. It must exist on your server before @drupal can be installed.', array('%driver' => current($drivers), '@drupal' => drupal_install_profile_name()), NULL, TRUE); } else { $form['basic_options']['driver'] = array( '#type' => 'radios', - '#title' => st('Database type'), + '#title' => t('Database type', array(), NULL, TRUE), '#required' => TRUE, '#options' => $drivers, '#default_value' => !empty($database['driver']) ? $database['driver'] : current(array_keys($drivers)), - '#description' => st('The type of database your @drupal data will be stored in.', array('@drupal' => drupal_install_profile_name())), + '#description' => t('The type of database your @drupal data will be stored in.', array('@drupal' => drupal_install_profile_name()), NULL, TRUE), ); - $database_description = st('The name of the database your @drupal data will be stored in. It must exist on your server before @drupal can be installed.', array('@drupal' => drupal_install_profile_name())); + $database_description = t('The name of the database your @drupal data will be stored in. It must exist on your server before @drupal can be installed.', array('@drupal' => drupal_install_profile_name()), NULL, TRUE); } // Database name $form['basic_options']['database'] = array( '#type' => 'textfield', - '#title' => st('Database name'), + '#title' => t('Database name', array(), NULL, TRUE), '#default_value' => empty($database['database']) ? '' : $database['database'], '#size' => 45, '#maxlength' => 45, @@ -267,7 +267,7 @@ function install_settings_form(&$form_st // Database username $form['basic_options']['username'] = array( '#type' => 'textfield', - '#title' => st('Database username'), + '#title' => t('Database username', array(), NULL, TRUE), '#default_value' => empty($database['username']) ? '' : $database['username'], '#size' => 45, '#maxlength' => 45, @@ -277,7 +277,7 @@ function install_settings_form(&$form_st // Database username $form['basic_options']['password'] = array( '#type' => 'password', - '#title' => st('Database password'), + '#title' => t('Database password', array(), NULL, TRUE), '#default_value' => empty($database['password']) ? '' : $database['password'], '#size' => 45, '#maxlength' => 45, @@ -285,47 +285,47 @@ function install_settings_form(&$form_st $form['advanced_options'] = array( '#type' => 'fieldset', - '#title' => st('Advanced options'), + '#title' => t('Advanced options', array(), NULL, TRUE), '#collapsible' => TRUE, '#collapsed' => TRUE, - '#description' => st("These options are only necessary for some sites. If you're not sure what you should enter here, leave the default settings or check with your hosting provider.") + '#description' => t("These options are only necessary for some sites. If you're not sure what you should enter here, leave the default settings or check with your hosting provider.", array(), NULL, TRUE) ); // Database host $form['advanced_options']['host'] = array( '#type' => 'textfield', - '#title' => st('Database host'), + '#title' => t('Database host', array(), NULL, TRUE), '#default_value' => empty($database['host']) ? 'localhost' : $database['host'], '#size' => 45, '#maxlength' => 45, '#required' => TRUE, - '#description' => st('If your database is located on a different server, change this.'), + '#description' => t('If your database is located on a different server, change this.', array(), NULL, TRUE), ); // Database port $form['advanced_options']['port'] = array( '#type' => 'textfield', - '#title' => st('Database port'), + '#title' => t('Database port', array(), NULL, TRUE), '#default_value' => empty($database['port']) ? '' : $database['port'], '#size' => 45, '#maxlength' => 45, - '#description' => st('If your database server is listening to a non-standard port, enter its number.'), + '#description' => t('If your database server is listening to a non-standard port, enter its number.', array(), NULL, TRUE), ); // Table prefix $db_prefix = ($profile == 'default') ? 'drupal_' : $profile . '_'; $form['advanced_options']['db_prefix'] = array( '#type' => 'textfield', - '#title' => st('Table prefix'), + '#title' => t('Table prefix', array(), NULL, TRUE), '#default_value' => '', '#size' => 45, '#maxlength' => 45, - '#description' => st('If more than one application will be sharing this database, enter a table prefix such as %prefix for your @drupal site here.', array('@drupal' => drupal_install_profile_name(), '%prefix' => $db_prefix)), + '#description' => t('If more than one application will be sharing this database, enter a table prefix such as %prefix for your @drupal site here.', array('@drupal' => drupal_install_profile_name(), '%prefix' => $db_prefix), NULL, TRUE), ); $form['save'] = array( '#type' => 'submit', - '#value' => st('Save and continue'), + '#value' => t('Save and continue', array(), NULL, TRUE), ); $form['errors'] = array(); @@ -352,18 +352,18 @@ function _install_settings_form_validate global $databases; // Verify the table prefix if (!empty($database['prefix']) && is_string($database['prefix']) && !preg_match('/^[A-Za-z0-9_.]+$/', $database['dprefix'])) { - form_set_error('db_prefix', st('The database table prefix you have entered, %db_prefix, is invalid. The table prefix can only contain alphanumeric characters, periods, or underscores.', array('%db_prefix' => $db_prefix)), 'error'); + form_set_error('db_prefix', t('The database table prefix you have entered, %db_prefix, is invalid. The table prefix can only contain alphanumeric characters, periods, or underscores.', array('%db_prefix' => $db_prefix), NULL, TRUE), 'error'); } if (!empty($database['port']) && !is_numeric($database['port'])) { - form_set_error('db_port', st('Database port must be a number.')); + form_set_error('db_port', t('Database port must be a number.', array(), NULL, TRUE)); } // Check database type $database_types = drupal_detect_database_types(); $driver = $database['driver']; if (!isset($database_types[$driver])) { - form_set_error('driver', st("In your %settings_file file you have configured @drupal to use a %driver server, however your PHP installation currently does not support this database type.", array('%settings_file' => $settings_file, '@drupal' => drupal_install_profile_name(), '%driver' => $database['driver']))); + form_set_error('driver', t("In your %settings_file file you have configured @drupal to use a %driver server, however your PHP installation currently does not support this database type.", array('%settings_file' => $settings_file, '@drupal' => drupal_install_profile_name(), '%driver' => $database['driver']), array(), NULL, TRUE)); } else { if (isset($form)) { @@ -375,7 +375,7 @@ function _install_settings_form_validate $return = $test->test(); if (!$return || $test->error) { if (!empty($test->success)) { - form_set_error('db_type', st('In order for Drupal to work, and to continue with the installation process, you must resolve all permission issues reported above. We were able to verify that we have permission for the following commands: %commands. For more help with configuring your database server, see the Installation and upgrading handbook. If you are unsure what any of this means you should probably contact your hosting provider.', array('%commands' => implode($test->success, ', ')))); + form_set_error('db_type', t('In order for Drupal to work, and to continue with the installation process, you must resolve all permission issues reported above. We were able to verify that we have permission for the following commands: %commands. For more help with configuring your database server, see the Installation and upgrading handbook. If you are unsure what any of this means you should probably contact your hosting provider.', array('%commands' => implode($test->success, ', ')), NULL, TRUE)); } else { form_set_error('driver', ''); @@ -438,7 +438,7 @@ function install_select_profile() { install_task_list('profile-select'); - drupal_set_title(st('Select an installation profile')); + drupal_set_title(t('Select an installation profile', array(), NULL, TRUE)); print theme('install_page', drupal_get_form('install_select_profile_form', $profiles)); exit; } @@ -487,7 +487,7 @@ function install_select_profile_form(&$f } $form['submit'] = array( '#type' => 'submit', - '#value' => st('Save and continue'), + '#value' => t('Save and continue', array(), NULL, TRUE), ); return $form; } @@ -521,18 +521,18 @@ function install_select_locale($profilen if (count($locales) == 1) { if ($profilename == 'default') { install_task_list('locale-select'); - drupal_set_title(st('Choose language')); + drupal_set_title(t('Choose language', array(), NULL, TRUE)); if (!empty($_GET['localize'])) { - $output = '

' . st('With the addition of an appropriate translation package, this installer is capable of proceeding in another language of your choice. To install and use Drupal in a language other than English:') . '

'; - $output .= '

' . st('Alternatively, to install and use Drupal in English, or to defer the selection of an alternative language until after installation, select the first link below.') . '

'; - $output .= '

' . st('How should the installation continue?') . '

'; - $output .= ''; + $output = '

' . t('With the addition of an appropriate translation package, this installer is capable of proceeding in another language of your choice. To install and use Drupal in a language other than English:', array(), NULL, TRUE) . '

'; + $output .= '

' . t('Alternatively, to install and use Drupal in English, or to defer the selection of an alternative language until after installation, select the first link below.', array(), NULL, TRUE) . '

'; + $output .= '

' . t('How should the installation continue?', array(), NULL, TRUE) . '

'; + $output .= ''; } else { - $output = ''; + $output = ''; } print theme('install_page', $output); exit; @@ -563,7 +563,7 @@ function install_select_locale($profilen install_task_list('locale-select'); - drupal_set_title(st('Choose language')); + drupal_set_title(t('Choose language', array(), NULL, TRUE)); print theme('install_page', drupal_get_form('install_select_locale_form', $locales)); exit; } @@ -579,19 +579,19 @@ function install_select_locale_form(&$fo // Try to use verbose locale name $name = $locale->name; if (isset($languages[$name])) { - $name = $languages[$name][0] . (isset($languages[$name][1]) ? ' ' . st('(@language)', array('@language' => $languages[$name][1])) : ''); + $name = $languages[$name][0] . (isset($languages[$name][1]) ? ' ' . t('(@language)', array('@language' => $languages[$name][1]), NULL, TRUE) : ''); } $form['locale'][$locale->name] = array( '#type' => 'radio', '#return_value' => $locale->name, '#default_value' => ($locale->name == 'en' ? TRUE : FALSE), - '#title' => $name . ($locale->name == 'en' ? ' ' . st('(built-in)') : ''), + '#title' => $name . ($locale->name == 'en' ? ' ' . t('(built-in)', array(), NULL, TRUE) : ''), '#parents' => array('locale') ); } $form['submit'] = array( '#type' => 'submit', - '#value' => st('Select language'), + '#value' => t('Select language', array(), NULL, TRUE), ); return $form; } @@ -601,8 +601,8 @@ function install_select_locale_form(&$fo */ function install_no_profile_error() { install_task_list('profile-select'); - drupal_set_title(st('No profiles available')); - print theme('install_page', '

' . st('We were unable to find any installer profiles. Installer profiles tell us what modules to enable and what schema to install in the database. A profile is necessary to continue with the installation process.') . '

'); + drupal_set_title(t('No profiles available', array(), NULL, TRUE)); + print theme('install_page', '

' . t('We were unable to find any installer profiles. Installer profiles tell us what modules to enable and what schema to install in the database. A profile is necessary to continue with the installation process.', array(), NULL, TRUE) . '

'); exit; } @@ -613,8 +613,8 @@ function install_no_profile_error() { function install_already_done_error() { global $base_url; - drupal_set_title(st('Drupal already installed')); - print theme('install_page', st('', array('@base-url' => $base_url))); + drupal_set_title(t('Drupal already installed', array(), NULL, TRUE)); + print theme('install_page', t('', array('@base-url' => $base_url), NULL, TRUE)); exit; } @@ -655,8 +655,8 @@ function install_tasks($profile, $task) $batch = array( 'operations' => $operations, 'finished' => '_install_profile_batch_finished', - 'title' => st('Installing @drupal', array('@drupal' => drupal_install_profile_name())), - 'error_message' => st('The installation has encountered an error.'), + 'title' => t('Installing @drupal', array('@drupal' => drupal_install_profile_name()), NULL, TRUE), + 'error_message' => t('The installation has encountered an error.', array(), NULL, TRUE), ); // Start a batch, switch to 'profile-install-batch' task. We need to // set the variable here, because batch_process() redirects. @@ -712,16 +712,16 @@ function install_tasks($profile, $task) if (!variable_get('site_name', FALSE) && !variable_get('site_mail', FALSE)) { // Not submitted yet: Prepare to display the form. $output = $form; - drupal_set_title(st('Configure site')); + drupal_set_title(t('Configure site', array(), NULL, TRUE)); // Warn about settings.php permissions risk $settings_dir = './' . conf_path(); $settings_file = $settings_dir . '/settings.php'; if (!drupal_verify_install_file($settings_file, FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE) || !drupal_verify_install_file($settings_dir, FILE_NOT_WRITABLE, 'dir')) { - drupal_set_message(st('All necessary changes to %dir and %file have been made, so you should remove write permissions to them now in order to avoid security risks. If you are unsure how to do so, please consult the online handbook.', array('%dir' => $settings_dir, '%file' => $settings_file, '@handbook_url' => 'http://drupal.org/getting-started')), 'error'); + drupal_set_message(t('All necessary changes to %dir and %file have been made, so you should remove write permissions to them now in order to avoid security risks. If you are unsure how to do so, please consult the online handbook.', array('%dir' => $settings_dir, '%file' => $settings_file, '@handbook_url' => 'http://drupal.org/getting-started'), NULL, TRUE), 'error'); } else { - drupal_set_message(st('All necessary changes to %dir and %file have been made. They have been set to read-only for security.', array('%dir' => $settings_dir, '%file' => $settings_file))); + drupal_set_message(t('All necessary changes to %dir and %file have been made. They have been set to read-only for security.', array('%dir' => $settings_dir, '%file' => $settings_file), NULL, TRUE)); } // Add JavaScript validation. @@ -729,7 +729,7 @@ function install_tasks($profile, $task) drupal_add_js(drupal_get_path('module', 'system') . '/system.js', 'module'); // We add these strings as settings because JavaScript translation does not // work on install time. - drupal_add_js(array('copyFieldValue' => array('edit-site-mail' => array('edit-account-mail')), 'cleanURL' => array('success' => st('Your server has been successfully tested to support this feature.'), 'failure' => st('Your system configuration does not currently support this feature. The handbook page on Clean URLs has additional troubleshooting information.'), 'testing' => st('Testing clean URLs...'))), 'setting'); + drupal_add_js(array('copyFieldValue' => array('edit-site-mail' => array('edit-account-mail')), 'cleanURL' => array('success' => t('Your server has been successfully tested to support this feature.', array(), NULL, TRUE), 'failure' => t('Your system configuration does not currently support this feature. The handbook page on Clean URLs has additional troubleshooting information.', array(), NULL, TRUE), 'testing' => t('Testing clean URLs...', array(), NULL, TRUE))), 'setting'); drupal_add_js(' // Global Killswitch if (Drupal.jsEnabled) { @@ -805,10 +805,10 @@ if (Drupal.jsEnabled) { // Display a 'finished' page to user. if ($task == 'finished') { - drupal_set_title(st('@drupal installation complete', array('@drupal' => drupal_install_profile_name()))); + drupal_set_title(t('@drupal installation complete', array('@drupal' => drupal_install_profile_name()), NULL, TRUE)); $messages = drupal_set_message(); - $output = '

' . st('Congratulations, @drupal has been successfully installed.', array('@drupal' => drupal_install_profile_name())) . '

'; - $output .= '

' . (isset($messages['error']) ? st('Please review the messages above before continuing on to your new site.', array('@url' => url(''))) : st('You may now visit your new site.', array('@url' => url('')))) . '

'; + $output = '

' . t('Congratulations, @drupal has been successfully installed.', array('@drupal' => drupal_install_profile_name()), NULL, TRUE) . '

'; + $output .= '

' . (isset($messages['error']) ? t('Please review the messages above before continuing on to your new site.', array('@url' => url('')), NULL, TRUE) : t('You may now visit your new site.', array('@url' => url('')), NULL, TRUE)) . '

'; $task = 'done'; } @@ -853,7 +853,7 @@ function _install_module_batch($module, // steps. module_enable(array($module)); $context['results'][] = $module; - $context['message'] = st('Installed %module module.', array('%module' => $module_name)); + $context['message'] = t('Installed %module module.', array('%module' => $module_name), NULL, TRUE); } /** @@ -918,30 +918,30 @@ function install_check_requirements($pro if (!$exists) { $requirements['settings file exists'] = array( - 'title' => st('Settings file'), - 'value' => st('The settings file does not exist.'), + 'title' => t('Settings file', array(), NULL, TRUE), + 'value' => t('The settings file does not exist.', array(), NULL, TRUE), 'severity' => REQUIREMENT_ERROR, - 'description' => st('The @drupal installer requires that you create a settings file as part of the installation process. Copy the %default_file file to %file. More details about installing Drupal are available in INSTALL.txt.', array('@drupal' => drupal_install_profile_name(), '%file' => $file, '%default_file' => $conf_path .'/default.settings.php')), + 'description' => t('The @drupal installer requires that you create a settings file as part of the installation process. Copy the %default_file file to %file. More details about installing Drupal are available in INSTALL.txt.', array('@drupal' => drupal_install_profile_name(), '%file' => $file, '%default_file' => $conf_path .'/default.settings.php'), NULL, TRUE), ); } elseif ($exists) { $requirements['settings file exists'] = array( - 'title' => st('Settings file'), - 'value' => st('The %file file exists.', array('%file' => $file)), + 'title' => t('Settings file', array(), NULL, TRUE), + 'value' => t('The %file file exists.', array('%file' => $file), NULL, TRUE), ); } if (!$writable) { $requirements['settings file writable'] = array( - 'title' => st('Settings file'), - 'value' => st('The settings file is not writable.'), + 'title' => t('Settings file', array(), NULL, TRUE), + 'value' => t('The settings file is not writable.', array(), NULL, TRUE), 'severity' => REQUIREMENT_ERROR, - 'description' => st('The @drupal installer requires write permissions to %file during the installation process. If you are unsure how to grant file permissions, please consult the online handbook.', array('@drupal' => drupal_install_profile_name(), '%file' => $file, '@handbook_url' => 'http://drupal.org/server-permissions')), + 'description' => t('The @drupal installer requires write permissions to %file during the installation process. If you are unsure how to grant file permissions, please consult the online handbook.', array('@drupal' => drupal_install_profile_name(), '%file' => $file, '@handbook_url' => 'http://drupal.org/server-permissions'), NULL, TRUE), ); } elseif ($writable) { $requirements['settings file'] = array( - 'title' => st('Settings file'), - 'value' => st('Settings file is writable.'), + 'title' => t('Settings file', array(), NULL, TRUE), + 'value' => t('Settings file is writable.', array(), NULL, TRUE), ); } } @@ -954,13 +954,13 @@ function install_check_requirements($pro function install_task_list($active = NULL) { // Default list of tasks. $tasks = array( - 'profile-select' => st('Choose profile'), - 'locale-select' => st('Choose language'), - 'requirements' => st('Verify requirements'), - 'database' => st('Set up database'), - 'profile-install-batch' => st('Install profile'), - 'locale-initial-batch' => st('Set up translations'), - 'configure' => st('Configure site'), + 'profile-select' => t('Choose profile', array(), NULL, TRUE), + 'locale-select' => t('Choose language', array(), NULL, TRUE), + 'requirements' => t('Verify requirements', array(), NULL, TRUE), + 'database' => t('Set up database', array(), NULL, TRUE), + 'profile-install-batch' => t('Install profile', array(), NULL, TRUE), + 'locale-initial-batch' => t('Set up translations', array(), NULL, TRUE), + 'configure' => t('Configure site', array(), NULL, TRUE), ); $profiles = install_find_profiles(); @@ -971,7 +971,7 @@ function install_task_list($active = NUL // and rename 'Install profile'. if (count($profiles) == 1) { unset($tasks['profile-select']); - $tasks['profile-install-batch'] = st('Install site'); + $tasks['profile-install-batch'] = t('Install site', array(), NULL, TRUE); } // Add tasks defined by the profile. @@ -991,12 +991,12 @@ function install_task_list($active = NUL } else { // If required, add remaining translations import task. - $tasks += array('locale-remaining-batch' => st('Finish translations')); + $tasks += array('locale-remaining-batch' => t('Finish translations', array(), NULL, TRUE)); } // Add finished step as the last task. $tasks += array( - 'finished' => st('Finished') + 'finished' => t('Finished', array(), NULL, TRUE) ); // Let the theming function know that 'finished' and 'done' @@ -1013,51 +1013,51 @@ function install_task_list($active = NUL function install_configure_form(&$form_state, $url) { $form['intro'] = array( - '#markup' => st('To configure your website, please provide the following information.'), + '#markup' => t('To configure your website, please provide the following information.', array(), NULL, TRUE), '#weight' => -10, ); $form['site_information'] = array( '#type' => 'fieldset', - '#title' => st('Site information'), + '#title' => t('Site information', array(), NULL, TRUE), '#collapsible' => FALSE, ); $form['site_information']['site_name'] = array( '#type' => 'textfield', - '#title' => st('Site name'), + '#title' => t('Site name', array(), NULL, TRUE), '#required' => TRUE, '#weight' => -20, ); $form['site_information']['site_mail'] = array( '#type' => 'textfield', - '#title' => st('Site e-mail address'), + '#title' => t('Site e-mail address', array(), NULL, TRUE), '#default_value' => ini_get('sendmail_from'), - '#description' => st("The From address in automated e-mails sent during registration and new password requests, and other notifications. (Use an address ending in your site's domain to help prevent this e-mail being flagged as spam.)"), + '#description' => t("The From address in automated e-mails sent during registration and new password requests, and other notifications. (Use an address ending in your site's domain to help prevent this e-mail being flagged as spam.)", array(), NULL, TRUE), '#required' => TRUE, '#weight' => -15, ); $form['admin_account'] = array( '#type' => 'fieldset', - '#title' => st('Administrator account'), + '#title' => t('Administrator account', array(), NULL, TRUE), '#collapsible' => FALSE, ); $form['admin_account']['account']['#tree'] = TRUE; $form['admin_account']['markup'] = array( - '#markup' => '

' . st('The administrator account has complete access to the site; it will automatically be granted all permissions and can perform any administrative activity. This will be the only account that can perform certain activities, so keep its credentials safe.') . '

', + '#markup' => '

' . t('The administrator account has complete access to the site; it will automatically be granted all permissions and can perform any administrative activity. This will be the only account that can perform certain activities, so keep its credentials safe.', array(), NULL, TRUE) . '

', '#weight' => -10, ); $form['admin_account']['account']['name'] = array('#type' => 'textfield', - '#title' => st('Username'), + '#title' => t('Username', array(), NULL, TRUE), '#maxlength' => USERNAME_MAX_LENGTH, - '#description' => st('Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.'), + '#description' => t('Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.', array(), NULL, TRUE), '#required' => TRUE, '#weight' => -10, ); $form['admin_account']['account']['mail'] = array('#type' => 'textfield', - '#title' => st('E-mail address'), + '#title' => t('E-mail address'), '#maxlength' => EMAIL_MAX_LENGTH, - '#description' => st('All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.'), + '#description' => t('All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.', array(), NULL, TRUE), '#required' => TRUE, '#weight' => -5, ); @@ -1070,24 +1070,24 @@ function install_configure_form(&$form_s $form['server_settings'] = array( '#type' => 'fieldset', - '#title' => st('Server settings'), + '#title' => t('Server settings', array(), NULL, TRUE), '#collapsible' => FALSE, ); $form['server_settings']['date_default_timezone'] = array( '#type' => 'select', - '#title' => st('Default time zone'), + '#title' => t('Default time zone', array(), NULL, TRUE), '#default_value' => 0, '#options' => _system_zonelist(), - '#description' => st('By default, dates in this site will be displayed in the chosen time zone.'), + '#description' => t('By default, dates in this site will be displayed in the chosen time zone.', array(), NULL, TRUE), '#weight' => 5, ); $form['server_settings']['clean_url'] = array( '#type' => 'radios', - '#title' => st('Clean URLs'), + '#title' => t('Clean URLs', array(), NULL, TRUE), '#default_value' => 0, - '#options' => array(0 => st('Disabled'), 1 => st('Enabled')), - '#description' => st('This option makes Drupal emit "clean" URLs (i.e. without ?q= in the URL).'), + '#options' => array(0 => t('Disabled'), 1 => t('Enabled')), + '#description' => t('This option makes Drupal emit "clean" URLs (i.e. without ?q= in the URL).', array(), NULL, TRUE), '#disabled' => TRUE, '#prefix' => '
', '#suffix' => '
', @@ -1096,16 +1096,16 @@ function install_configure_form(&$form_s $form['server_settings']['update_status_module'] = array( '#type' => 'checkboxes', - '#title' => st('Update notifications'), - '#options' => array(1 => st('Check for updates automatically')), + '#title' => t('Update notifications', array(), NULL, TRUE), + '#options' => array(1 => t('Check for updates automatically', array(), NULL, TRUE)), '#default_value' => array(1), - '#description' => st('With this option enabled, Drupal will notify you when new releases are available. This will significantly enhance your site\'s security and is highly recommended. This requires your site to periodically send anonymous information on its installed components to drupal.org. For more information please see the update notification information.', array('@drupal' => 'http://drupal.org', '@update' => 'http://drupal.org/handbook/modules/update')), + '#description' => t('With this option enabled, Drupal will notify you when new releases are available. This will significantly enhance your site\'s security and is highly recommended. This requires your site to periodically send anonymous information on its installed components to drupal.org. For more information please see the update notification information.', array('@drupal' => 'http://drupal.org', '@update' => 'http://drupal.org/handbook/modules/update'), NULL, TRUE), '#weight' => 15, ); $form['submit'] = array( '#type' => 'submit', - '#value' => st('Save and continue'), + '#value' => t('Save and continue', array(), NULL, TRUE), '#weight' => 15, ); $form['#action'] = $url; === modified file 'modules/menu/menu.install' --- modules/menu/menu.install 2008-09-18 10:44:19 +0000 +++ modules/menu/menu.install 2008-10-19 21:20:49 +0000 @@ -8,10 +8,9 @@ function menu_install() { // Create tables. drupal_install_schema('menu'); - $t = get_t(); - db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'navigation', $t('Navigation'), $t('The navigation menu is provided by Drupal and is the main interactive menu for any site. It is usually the only menu that contains personalized links for authenticated users, and is often not even visible to anonymous users.')); - db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'main-menu', $t('Main menu'), $t('The Main menu is often used by themes to show the major sections of a site.')); - db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'secondary-menu', $t('Secondary menu'), $t('The Secondary menu is often used for pages like legal notices, contact details, and other navigation items that play a lesser role than the Main menu.')); + db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'navigation', t('Navigation', array(), NULL, TRUE), t('The navigation menu is provided by Drupal and is the main interactive menu for any site. It is usually the only menu that contains personalized links for authenticated users, and is often not even visible to anonymous users.', array(), NULL, TRUE)); + db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'main-menu', t('Main menu', array(), NULL, TRUE), t('The Main menu is often used by themes to show the major sections of a site.', array(), NULL, TRUE)); + db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'secondary-menu', t('Secondary menu', array(), NULL, TRUE), t('The Secondary menu is often used for pages like legal notices, contact details, and other navigation items that play a lesser role than the Main menu.', array(), NULL, TRUE)); } /** === modified file 'modules/system/system.install' --- modules/system/system.install 2008-10-13 20:29:42 +0000 +++ modules/system/system.install 2008-10-19 21:20:03 +0000 @@ -12,13 +12,10 @@ function system_requirements($phase) { global $base_url; $requirements = array(); - // Ensure translations don't break at install time - $t = get_t(); - // Report Drupal version if ($phase == 'runtime') { $requirements['drupal'] = array( - 'title' => $t('Drupal'), + 'title' => t('Drupal', array(), NULL, TRUE), 'value' => VERSION, 'severity' => REQUIREMENT_INFO, 'weight' => -10, @@ -28,23 +25,23 @@ function system_requirements($phase) { // Web server information. $software = $_SERVER['SERVER_SOFTWARE']; $requirements['webserver'] = array( - 'title' => $t('Web server'), + 'title' => t('Web server', array(), NULL, TRUE), 'value' => $software, ); // Test PHP version $requirements['php'] = array( - 'title' => $t('PHP'), + 'title' => t('PHP', array(), NULL, TRUE), 'value' => ($phase == 'runtime') ? l(phpversion(), 'admin/reports/status/php') : phpversion(), ); if (version_compare(phpversion(), DRUPAL_MINIMUM_PHP) < 0) { - $requirements['php']['description'] = $t('Your PHP installation is too old. Drupal requires at least PHP %version.', array('%version' => DRUPAL_MINIMUM_PHP)); + $requirements['php']['description'] = t('Your PHP installation is too old. Drupal requires at least PHP %version.', array('%version' => DRUPAL_MINIMUM_PHP), NULL, TRUE); $requirements['php']['severity'] = REQUIREMENT_ERROR; } // Test PHP register_globals setting. $requirements['php_register_globals'] = array( - 'title' => $t('PHP register globals'), + 'title' => t('PHP register globals', array(), NULL, TRUE), ); $register_globals = trim(ini_get('register_globals')); // Unfortunately, ini_get() may return many different values, and we can't @@ -53,42 +50,42 @@ function system_requirements($phase) { // (register_globals off), when it is in fact on. We can only guarantee // register_globals is off if the value returned is 'off', '', or 0. if (!empty($register_globals) && strtolower($register_globals) != 'off') { - $requirements['php_register_globals']['description'] = $t('register_globals is enabled. Drupal requires this configuration directive to be disabled. Your site may not be secure when register_globals is enabled. The PHP manual has instructions for how to change configuration settings.'); + $requirements['php_register_globals']['description'] = t('register_globals is enabled. Drupal requires this configuration directive to be disabled. Your site may not be secure when register_globals is enabled. The PHP manual has instructions for how to change configuration settings.', array(), NULL, TRUE); $requirements['php_register_globals']['severity'] = REQUIREMENT_ERROR; - $requirements['php_register_globals']['value'] = $t("Enabled ('@value')", array('@value' => $register_globals)); + $requirements['php_register_globals']['value'] = t("Enabled ('@value')", array('@value' => $register_globals), NULL, TRUE); } else { - $requirements['php_register_globals']['value'] = $t('Disabled'); + $requirements['php_register_globals']['value'] = t('Disabled', array(), NULL, TRUE); } // Test PHP memory_limit $memory_limit = ini_get('memory_limit'); $requirements['php_memory_limit'] = array( - 'title' => $t('PHP memory limit'), + 'title' => t('PHP memory limit', array(), NULL, TRUE), 'value' => $memory_limit, ); if ($memory_limit && parse_size($memory_limit) < parse_size(DRUPAL_MINIMUM_PHP_MEMORY_LIMIT)) { $description = ''; if ($phase == 'install') { - $description = $t('Consider increasing your PHP memory limit to %memory_minimum_limit to help prevent errors in the installation process.', array('%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT)); + $description = t('Consider increasing your PHP memory limit to %memory_minimum_limit to help prevent errors in the installation process.', array('%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT), NULL, TRUE); } elseif ($phase == 'update') { - $description = $t('Consider increasing your PHP memory limit to %memory_minimum_limit to help prevent errors in the update process.', array('%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT)); + $description = t('Consider increasing your PHP memory limit to %memory_minimum_limit to help prevent errors in the update process.', array('%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT), NULL, TRUE); } elseif ($phase == 'runtime') { - $description = $t('Depending on your configuration, Drupal can run with a %memory_limit PHP memory limit. However, a %memory_minimum_limit PHP memory limit or above is recommended, especially if your site uses additional custom or contributed modules.', array('%memory_limit' => $memory_limit, '%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT)); + $description = t('Depending on your configuration, Drupal can run with a %memory_limit PHP memory limit. However, a %memory_minimum_limit PHP memory limit or above is recommended, especially if your site uses additional custom or contributed modules.', array('%memory_limit' => $memory_limit, '%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT), NULL, TRUE); } if (!empty($description)) { if ($php_ini_path = get_cfg_var('cfg_file_path')) { - $description .= ' ' . $t('Increase the memory limit by editing the memory_limit parameter in the file %configuration-file and then restart your web server (or contact your system administrator or hosting provider for assistance).', array('%configuration-file' => $php_ini_path)); + $description .= ' ' . t('Increase the memory limit by editing the memory_limit parameter in the file %configuration-file and then restart your web server (or contact your system administrator or hosting provider for assistance).', array('%configuration-file' => $php_ini_path), NULL, TRUE); } else { - $description .= ' ' . $t('Contact your system administrator or hosting provider for assistance with increasing your PHP memory limit.'); + $description .= ' ' . t('Contact your system administrator or hosting provider for assistance with increasing your PHP memory limit.', array(), NULL, TRUE); } - $requirements['php_memory_limit']['description'] = $description . ' ' . $t('See the Drupal requirements for more information.', array('@url' => 'http://drupal.org/requirements')); + $requirements['php_memory_limit']['description'] = $description . ' ' . t('See the Drupal requirements for more information.', array('@url' => 'http://drupal.org/requirements'), NULL, TRUE); $requirements['php_memory_limit']['severity'] = REQUIREMENT_WARNING; } } @@ -105,23 +102,23 @@ function system_requirements($phase) { $conf_file = drupal_verify_install_file(conf_path() . '/settings.php', FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE); if (!$conf_dir || !$conf_file) { $requirements['settings.php'] = array( - 'value' => $t('Not protected'), + 'value' => t('Not protected', array(), NULL, TRUE), 'severity' => REQUIREMENT_ERROR, 'description' => '', ); if (!$conf_dir) { - $requirements['settings.php']['description'] .= $t('The directory %file is not protected from modifications and poses a security risk. You must change the directory\'s permissions to be non-writable. ', array('%file' => conf_path())); + $requirements['settings.php']['description'] .= t('The directory %file is not protected from modifications and poses a security risk. You must change the directory\'s permissions to be non-writable. ', array('%file' => conf_path()), NULL, TRUE); } if (!$conf_file) { - $requirements['settings.php']['description'] .= $t('The file %file is not protected from modifications and poses a security risk. You must change the file\'s permissions to be non-writable.', array('%file' => conf_path() . '/settings.php')); + $requirements['settings.php']['description'] .= t('The file %file is not protected from modifications and poses a security risk. You must change the file\'s permissions to be non-writable.', array('%file' => conf_path() . '/settings.php'), NULL, TRUE); } } else { $requirements['settings.php'] = array( - 'value' => $t('Protected'), + 'value' => t('Protected', array(), NULL, TRUE), ); } - $requirements['settings.php']['title'] = $t('Configuration file'); + $requirements['settings.php']['title'] = t('Configuration file', array(), NULL, TRUE); } // Report cron status. @@ -131,7 +128,7 @@ function system_requirements($phase) { // Cron error threshold defaults to two weeks. $threshold_error = variable_get('cron_threshold_error', 1209600); // Cron configuration help text. - $help = $t('For more information, see the online handbook entry for configuring cron jobs.', array('@cron-handbook' => 'http://drupal.org/cron')); + $help = t('For more information, see the online handbook entry for configuring cron jobs.', array('@cron-handbook' => 'http://drupal.org/cron'), NULL, TRUE); // Determine when cron last ran. If never, use the install time to // determine the warning or error status. @@ -155,27 +152,27 @@ function system_requirements($phase) { // administration page, instead of an error, we display a helpful reminder // to configure cron jobs. if ($never_run && $severity != REQUIREMENT_ERROR && $_GET['q'] == 'admin' && user_access('administer site configuration')) { - drupal_set_message($t('Cron has not run. Please visit the status report for more information.', array('@status' => url('admin/reports/status')))); + drupal_set_message(t('Cron has not run. Please visit the status report for more information.', array('@status' => url('admin/reports/status')), NULL, TRUE)); } // Set summary and description based on values determined above. if ($never_run) { - $summary = $t('Never run'); - $description = $t('Cron has not run.') . ' ' . $help; + $summary = t('Never run', array(), NULL, TRUE); + $description = t('Cron has not run.', array(), NULL, TRUE) . ' ' . $help; } else { - $summary = $t('Last run !time ago', array('!time' => format_interval(REQUEST_TIME - $cron_last))); + $summary = t('Last run !time ago', array('!time' => format_interval(REQUEST_TIME - $cron_last)), NULL, TRUE); $description = ''; if ($severity != REQUIREMENT_OK) { - $description = $t('Cron has not run recently.') . ' ' . $help; + $description = t('Cron has not run recently.', array(), NULL, TRUE) . ' ' . $help; } } - $description .= ' ' . $t('You can run cron manually.', array('@cron' => url('admin/reports/status/run-cron'))); - $description .= '
' . $t('To run cron from outside the site, go to !cron', array('!cron' => url($base_url . '/cron.php', array('external' => TRUE, 'query' => 'cron_key=' . variable_get('cron_key', 'drupal'))))); + $description .= ' ' . t('You can run cron manually.', array('@cron' => url('admin/reports/status/run-cron')), NULL, TRUE); + $description .= '
' . t('To run cron from outside the site, go to !cron', array('!cron' => url($base_url . '/cron.php', array('external' => TRUE, 'query' => 'cron_key=' . variable_get('cron_key', 'drupal'))), NULL, TRUE)); $requirements['cron'] = array( - 'title' => $t('Cron maintenance tasks'), + 'title' => t('Cron maintenance tasks', array(), NULL, TRUE), 'severity' => $severity, 'value' => $summary, 'description' => $description @@ -185,7 +182,7 @@ function system_requirements($phase) { // Test files directory $directory = file_directory_path(); $requirements['file system'] = array( - 'title' => $t('File system'), + 'title' => t('File system', array(), NULL, TRUE), ); // For installer, create the directory if possible. @@ -197,21 +194,21 @@ function system_requirements($phase) { $is_directory = is_dir($directory); if (!$is_writable || !$is_directory) { $description = ''; - $requirements['file system']['value'] = $t('Not writable'); + $requirements['file system']['value'] = t('Not writable', array(), NULL, TRUE); if (!$is_directory) { - $error = $t('The directory %directory does not exist.', array('%directory' => $directory)); + $error = t('The directory %directory does not exist.', array('%directory' => $directory), NULL, TRUE); } else { - $error = $t('The directory %directory is not writable.', array('%directory' => $directory)); + $error = t('The directory %directory is not writable.', array('%directory' => $directory), NULL, TRUE); } // The files directory requirement check is done only during install and runtime. if ($phase == 'runtime') { - $description = $error . ' ' . $t('You may need to set the correct directory at the file system settings page or change the current directory\'s permissions so that it is writable.', array('@admin-file-system' => url('admin/settings/file-system'))); + $description = $error . ' ' . t('You may need to set the correct directory at the file system settings page or change the current directory\'s permissions so that it is writable.', array('@admin-file-system' => url('admin/settings/file-system')), NULL, TRUE); } elseif ($phase == 'install') { // For the installer UI, we need different wording. 'value' will // be treated as version, so provide none there. - $description = $error . ' ' . $t('An automated attempt to create this directory failed, possibly due to a permissions problem. To proceed with the installation, either create the directory and modify its permissions manually, or ensure that the installer has the permissions to create it automatically. For more information, please see INSTALL.txt or the online handbook.', array('@handbook_url' => 'http://drupal.org/server-permissions')); + $description = $error . ' ' . t('An automated attempt to create this directory failed, possibly due to a permissions problem. To proceed with the installation, either create the directory and modify its permissions manually, or ensure that the installer has the permissions to create it automatically. For more information, please see INSTALL.txt or the online handbook.', array('@handbook_url' => 'http://drupal.org/server-permissions'), NULL, TRUE); $requirements['file system']['value'] = ''; } if (!empty($description)) { @@ -221,19 +218,19 @@ function system_requirements($phase) { } else { if (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PUBLIC) { - $requirements['file system']['value'] = $t('Writable (public download method)'); + $requirements['file system']['value'] = t('Writable (public download method)', array(), NULL, TRUE); } else { - $requirements['file system']['value'] = $t('Writable (private download method)'); + $requirements['file system']['value'] = t('Writable (private download method)', array(), NULL, TRUE); } } // See if updates are available in update.php. if ($phase == 'runtime') { $requirements['update'] = array( - 'title' => $t('Database updates'), + 'title' => t('Database updates', array(), NULL, TRUE), 'severity' => REQUIREMENT_OK, - 'value' => $t('Up to date'), + 'value' => t('Up to date', array(), NULL, TRUE), ); // Check installed modules. @@ -243,8 +240,8 @@ function system_requirements($phase) { $default = drupal_get_installed_schema_version($module); if (max($updates) > $default) { $requirements['update']['severity'] = REQUIREMENT_ERROR; - $requirements['update']['value'] = $t('Out of date'); - $requirements['update']['description'] = $t('Some modules have database schema updates to install. You should run the database update script immediately.', array('@update' => base_path() . 'update.php')); + $requirements['update']['value'] = t('Out of date', array(), NULL, TRUE); + $requirements['update']['description'] = t('Some modules have database schema updates to install. You should run the database update script immediately.', array('@update' => base_path() . 'update.php'), NULL, TRUE); break; } } @@ -255,17 +252,17 @@ function system_requirements($phase) { if ($phase == 'runtime') { if (!empty($GLOBALS['update_free_access'])) { $requirements['update access'] = array( - 'value' => $t('Not protected'), + 'value' => t('Not protected', array(), NULL, TRUE), 'severity' => REQUIREMENT_ERROR, - 'description' => $t('The update.php script is accessible to everyone without authentication check, which is a security risk. You must change the $update_free_access value in your settings.php back to FALSE.'), + 'description' => t('The update.php script is accessible to everyone without authentication check, which is a security risk. You must change the $update_free_access value in your settings.php back to FALSE.', array(), NULL, TRUE), ); } else { $requirements['update access'] = array( - 'value' => $t('Protected'), + 'value' => t('Protected', array(), NULL, TRUE), ); } - $requirements['update access']['title'] = $t('Access to update.php'); + $requirements['update access']['title'] = t('Access to update.php', array(), NULL, TRUE); } // Test Unicode library @@ -276,25 +273,25 @@ function system_requirements($phase) { if ($phase == 'runtime') { if (!module_exists('update')) { $requirements['update status'] = array( - 'value' => $t('Not enabled'), + 'value' => t('Not enabled', array(), NULL, TRUE), 'severity' => REQUIREMENT_WARNING, - 'description' => $t('Update notifications are not enabled. It is highly recommended that you enable the update status module from the module administration page in order to stay up-to-date on new releases. For more information please read the Update status handbook page.', array('@update' => 'http://drupal.org/handbook/modules/update', '@module' => url('admin/build/modules'))), + 'description' => t('Update notifications are not enabled. It is highly recommended that you enable the update status module from the module administration page in order to stay up-to-date on new releases. For more information please read the Update status handbook page.', array('@update' => 'http://drupal.org/handbook/modules/update', '@module' => url('admin/build/modules')), NULL, TRUE), ); } else { $requirements['update status'] = array( - 'value' => $t('Enabled'), + 'value' => t('Enabled', array(), NULL, TRUE), ); if (variable_get('drupal_http_request_fails', FALSE)) { $requirements['http requests'] = array( - 'title' => $t('HTTP request status'), - 'value' => $t('Fails'), + 'title' => t('HTTP request status', array(), NULL, TRUE), + 'value' => t('Fails', array(), NULL, TRUE), 'severity' => REQUIREMENT_ERROR, - 'description' => $t('Your system or network configuration does not allow Drupal to access web pages, resulting in reduced functionality. This could be due to your webserver configuration or PHP settings, and should be resolved in order to download information about available updates, fetch aggregator feeds, sign in via OpenID, or use other network-dependent services.'), + 'description' => t('Your system or network configuration does not allow Drupal to access web pages, resulting in reduced functionality. This could be due to your webserver configuration or PHP settings, and should be resolved in order to download information about available updates, fetch aggregator feeds, sign in via OpenID, or use other network-dependent services.', array(), NULL, TRUE), ); } } - $requirements['update status']['title'] = $t('Update notifications'); + $requirements['update status']['title'] = t('Update notifications', array(), NULL, TRUE); } return $requirements; @@ -3067,7 +3064,7 @@ function system_update_7011() { 'permission' => 'bypass node access', )); } - $insert->execute(); + $insert->execute(); return $ret; }