Index: trunk/phase3/includes/installer/Installer.php |
— | — | @@ -848,29 +848,34 @@ |
849 | 849 | * will properly normalize. This normalization was found at |
850 | 850 | * http://www.unicode.org/versions/Unicode5.2.0/#Character_Additions |
851 | 851 | * Note that we use the hex representation to create the code |
852 | | - * points in order to avoid any Unicode-destroying during transite. |
| 852 | + * points in order to avoid any Unicode-destroying during transit. |
853 | 853 | */ |
854 | 854 | $not_normal_c = $this->unicodeChar("FA6C"); |
855 | 855 | $normal_c = $this->unicodeChar("242EE"); |
856 | 856 | |
857 | 857 | $useNormalizer = 'config-unicode-php'; |
| 858 | + $needsUpdate = false; |
858 | 859 | |
859 | 860 | /** |
860 | 861 | * We're going to prefer the pecl extension here unless |
861 | 862 | * utf8_normalize is more up to date. |
862 | 863 | */ |
863 | 864 | if( $utf8 ) { |
| 865 | + $useNormalizer = 'config-unicode-utf8'; |
864 | 866 | $utf8 = utf8_normalize( $not_normal_c, UNORM_NFC ); |
865 | | - $useNormalizer = 'config-unicode-utf8'; |
| 867 | + if ( $utf8 !== $normal_c ) $needsUpdate = true; |
866 | 868 | } |
867 | 869 | if( $intl ) { |
| 870 | + $useNormalizer = 'config-unicode-intl'; |
868 | 871 | $intl = normalizer_normalize( $not_normal_c, Normalizer::FORM_C ); |
869 | | - $useNormalizer = 'config-unicode-intl'; |
| 872 | + if ( $intl !== $normal_c ) $needsUpdate = true; |
870 | 873 | } |
871 | 874 | |
872 | | - $this->showMessage( $useNormalizer ); |
| 875 | + $this->showMessage( 'config-unicode-using', wfMsg( $useNormalizer ) ); |
873 | 876 | if( $useNormalizer === 'config-unicode-php' ) { |
874 | 877 | $this->showMessage( 'config-unicode-pure-php-warning' ); |
| 878 | + } elseif( $needsUpdate ) { |
| 879 | + $this->showMessage( 'config-unicode-update-warning' ); |
875 | 880 | } |
876 | 881 | } |
877 | 882 | |
Index: trunk/phase3/includes/installer/Installer.i18n.php |
— | — | @@ -79,10 +79,12 @@ |
80 | 80 | 'config-env-latest-old' => "'''Warning:''' You are installing an outdated version of Mediawiki.", |
81 | 81 | 'config-env-latest-help' => 'You are installing version $1, but the latest version is $2. |
82 | 82 | You are advised to use the latest release, which can be downloaded from [http://www.mediawiki.org/wiki/Download mediawiki.org]', |
83 | | - 'config-unicode-php' => "Using pure PHP to normalize Unicode characters.", |
84 | | - '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].", |
85 | | - 'config-unicode-utf8' => "Using Brion Vibber's utf8_normalize.so for UTF", |
86 | | - 'config-unicode-intl' => "Using the [http://pecl.php.net/intl intl PECL extension] for UTF-8 normalization.", |
| 83 | + 'config-unicode-php' => "the slow PHP implementation", |
| 84 | + 'config-unicode-utf8' => "Brion Vibber's utf8_normalize.so", |
| 85 | + 'config-unicode-intl' => "the [http://pecl.php.net/intl intl PECL extension]", |
| 86 | + 'config-unicode-using' => 'Using $1 for Unicode normalization.', |
| 87 | + '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].", |
| 88 | + '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.", |
87 | 89 | 'config-no-db' => 'Could not find a suitable database driver!', |
88 | 90 | 'config-no-db-help' => 'You need to install a database driver for PHP. |
89 | 91 | The following database types are supported: $1. |