From 81938a3cdc7b9bd13d58e355c59d9835e830fea4 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Fri, 18 Aug 2006 12:17:00 +0000 Subject: #76802: Introduce placeholder magic into t() See: http://drupal.org/node/64279#t-placeholders --- includes/unicode.inc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'includes/unicode.inc') diff --git a/includes/unicode.inc b/includes/unicode.inc index 26b9c212e..81fe2ffeb 100644 --- a/includes/unicode.inc +++ b/includes/unicode.inc @@ -31,7 +31,7 @@ function _unicode_check($errors = FALSE) { // 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', 'â')) { if ($errors) { - form_set_error('unicode', 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'))); + form_set_error('unicode', 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 UNICODE_ERROR; } @@ -44,25 +44,25 @@ function _unicode_check($errors = FALSE) { // Check mbstring configuration if (ini_get('mbstring.func_overload') != 0) { if ($errors) { - form_set_error('unicode', 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'))); + form_set_error('unicode', 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 UNICODE_ERROR; } if (ini_get('mbstring.encoding_translation') != 0) { if ($errors) { - form_set_error('unicode', 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'))); + form_set_error('unicode', 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 UNICODE_ERROR; } if (ini_get('mbstring.http_input') != 'pass') { if ($errors) { - form_set_error('unicode', 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'))); + form_set_error('unicode', 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 UNICODE_ERROR; } if (ini_get('mbstring.http_output') != 'pass') { if ($errors) { - form_set_error('unicode', 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'))); + form_set_error('unicode', 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 UNICODE_ERROR; } @@ -78,8 +78,8 @@ function _unicode_check($errors = FALSE) { */ function unicode_settings() { $status = _unicode_check(TRUE); - $options = array(UNICODE_SINGLEBYTE => t('Standard PHP: 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')), - UNICODE_MULTIBYTE => t('Multi-byte: operations on Unicode strings are supported through the PHP mbstring extension.', array('%url' => 'http://www.php.net/mbstring')), + $options = array(UNICODE_SINGLEBYTE => t('Standard PHP: 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')), + UNICODE_MULTIBYTE => t('Multi-byte: operations on Unicode strings are supported through the PHP mbstring extension.', array('@url' => 'http://www.php.net/mbstring')), UNICODE_ERROR => t('Invalid: the current configuration is incompatible with Drupal.')); $form['settings'] = array('#type' => 'item', '#title' => t('String handling method'), '#value' => $options[$status]); return $form; @@ -128,7 +128,7 @@ function drupal_xml_parser_create(&$data) { $data = ereg_replace('^(<\?xml[^>]+encoding)="([^"]+)"', '\\1="utf-8"', $out); } else { - watchdog('php', t("Could not convert XML encoding '%s' to UTF-8.", array('%s' => $encoding)), WATCHDOG_WARNING); + watchdog('php', t("Could not convert XML encoding %s to UTF-8.", array('%s' => $encoding)), WATCHDOG_WARNING); return 0; } } @@ -161,7 +161,7 @@ function drupal_convert_to_utf8($data, $encoding) { $out = @recode_string($encoding .'..utf-8', $data); } else { - watchdog('php', t("Unsupported encoding '%s'. Please install iconv, GNU recode or mbstring for PHP.", array('%s' => $encoding)), WATCHDOG_ERROR); + watchdog('php', t("Unsupported encoding %s. Please install iconv, GNU recode or mbstring for PHP.", array('%s' => $encoding)), WATCHDOG_ERROR); return FALSE; } -- cgit v1.2.3