http://www.mediawiki.org/wiki/Special:Code/MediaWiki/70168

Revision: 70168
Author:   mah
Date:     2010-07-29 19:28:16 +0000 (Thu, 29 Jul 2010)

Log Message:
-----------
follow-up r70126 ?\226?\128?\148 better warnings

Modified Paths:
--------------
    trunk/phase3/includes/installer/Installer.i18n.php
    trunk/phase3/includes/installer/Installer.php

Modified: trunk/phase3/includes/installer/Installer.i18n.php
===================================================================
--- trunk/phase3/includes/installer/Installer.i18n.php  2010-07-29 19:09:52 UTC 
(rev 70167)
+++ trunk/phase3/includes/installer/Installer.i18n.php  2010-07-29 19:28:16 UTC 
(rev 70168)
@@ -79,10 +79,12 @@
        'config-env-latest-old'           => "'''Warning:''' You are installing 
an outdated version of Mediawiki.",
        'config-env-latest-help'          => 'You are installing version $1, 
but the latest version is $2.
 You are advised to use the latest release, which can be downloaded from 
[http://www.mediawiki.org/wiki/Download mediawiki.org]',
-       'config-unicode-php'              => "Using pure PHP to normalize 
Unicode characters.",
-       'config-unicode-pure-php-warning' => "'''Warning''': Either the PECL 
Intl extension is not available, or it uses an older version of 
[http://site.icu-project.org/ the ICU project's] library for handling Unicode 
normalization.  If you run a high-traffic site, you should read a little on 
[http://www.mediawiki.org/wiki/Unicode_normalization_considerations Unicode 
normalization].",
-       'config-unicode-utf8'             => "Using Brion Vibber's 
utf8_normalize.so for UTF",
-       'config-unicode-intl'             => "Using the 
[http://pecl.php.net/intl intl PECL extension] for UTF-8 normalization.",
+       'config-unicode-php'              => "the slow PHP implementation",
+       'config-unicode-utf8'             => "Brion Vibber's utf8_normalize.so",
+       'config-unicode-intl'             => "the [http://pecl.php.net/intl 
intl PECL extension]",
+       'config-unicode-using'            => 'Using $1 for Unicode 
normalization.',
+       'config-unicode-pure-php-warning' => "'''Warning''': The 
[http://pecl.php.net/intl intl PECL extension] is not available to handle 
Unicode normalization.  If you run a high-traffic site, you should read a 
little on [http://www.mediawiki.org/wiki/Unicode_normalization_considerations 
Unicode normalization].",
+       'config-unicode-update-warning'   => "'''Warning''': The installed 
version of the Unicode normalization wrapper uses an older version of 
[http://site.icu-project.org/ the ICU project's] library.  You should 
[http://www.mediawiki.org/wiki/Unicode_normalization_considerations upgrade] if 
you are at all concerned about using Unicode.",
        'config-no-db'                    => 'Could not find a suitable 
database driver!',
        'config-no-db-help'               => 'You need to install a database 
driver for PHP.
 The following database types are supported: $1.

Modified: trunk/phase3/includes/installer/Installer.php
===================================================================
--- trunk/phase3/includes/installer/Installer.php       2010-07-29 19:09:52 UTC 
(rev 70167)
+++ trunk/phase3/includes/installer/Installer.php       2010-07-29 19:28:16 UTC 
(rev 70168)
@@ -848,29 +848,34 @@
                 * will properly normalize.  This normalization was found at
                 * 
http://www.unicode.org/versions/Unicode5.2.0/#Character_Additions
                 * Note that we use the hex representation to create the code
-                * points in order to avoid any Unicode-destroying during 
transite.
+                * points in order to avoid any Unicode-destroying during 
transit.
                 */
                $not_normal_c = $this->unicodeChar("FA6C");
                $normal_c = $this->unicodeChar("242EE");
 
                $useNormalizer = 'config-unicode-php';
+               $needsUpdate = false;
 
                /**
                 * We're going to prefer the pecl extension here unless
                 * utf8_normalize is more up to date.
                 */
                if( $utf8 ) {
+                       $useNormalizer = 'config-unicode-utf8';
                        $utf8 = utf8_normalize( $not_normal_c, UNORM_NFC );
-                       $useNormalizer = 'config-unicode-utf8';
+                       if ( $utf8 !== $normal_c ) $needsUpdate = true;
                }
                if( $intl ) {
+                       $useNormalizer = 'config-unicode-intl';
                        $intl = normalizer_normalize( $not_normal_c, 
Normalizer::FORM_C );
-                       $useNormalizer = 'config-unicode-intl';
+                       if ( $intl !== $normal_c ) $needsUpdate = true;
                }
 
-               $this->showMessage( $useNormalizer );
+               $this->showMessage( 'config-unicode-using', wfMsg( 
$useNormalizer ) );
                if( $useNormalizer === 'config-unicode-php' ) {
                        $this->showMessage( 'config-unicode-pure-php-warning' );
+               } elseif( $needsUpdate ) {
+                       $this->showMessage( 'config-unicode-update-warning' );
                }
        }
 



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to