r61282 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61281‎ | r61282 | r61283 >
Date:01:50, 20 January 2010
Author:tstarling
Status:ok
Tags:
Comment:
Fixes for r60599:
* Split $wgFixArchaicUnicode into two separate variables, one for Malayalam and one for Arabic
* Clarified documentation and switched them both on by default
* Removed accidentally added variable LanguageAr::$normalizeArray
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageAr.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageMl.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DefaultSettings.php
@@ -870,19 +870,27 @@
871871 $wgEditEncoding = '';
872872
873873 /**
874 - * Set this to true to clean up archaic Unicode sequences in Arabic and
875 - * Malayalam text. Currently only works if $wgLanguageCode is set to Arabic
876 - * or Malayalam.
 874+ * Set this to true to replace Arabic presentation forms with their standard
 875+ * forms in the U+0600-U+06FF block. This only works if $wgLanguageCode is
 876+ * set to "ar".
877877 *
878 - * Enabling this is generally a good idea for new wikis, since it fixes a few
879 - * technical problems to do with editing these languages. However, if it's
880 - * enabled on an existing wiki, pages which contain the problematic characters
881 - * in their page titles may become inaccessible. Running maintenance/cleanupTitles.php
882 - * after enabling it may fix this.
 878+ * Note that pages with titles containing presentation forms will become
 879+ * inaccessible, run maintenance/cleanupTitles.php to fix this.
883880 */
884 -$wgFixArchaicUnicode = false;
 881+$wgFixArabicUnicode = true;
885882
886883 /**
 884+ * Set this to true to replace ZWJ-based chillu sequences in Malayalam text
 885+ * with their Unicode 5.1 equivalents. This only works if $wgLanguageCode is
 886+ * set to "ml". Note that some clients (even new clients as of 2010) do not
 887+ * support these characters.
 888+ *
 889+ * If you enable this on an existing wiki, run maintenance/cleanupTitles.php to
 890+ * fix any ZWJ sequences in existing page titles.
 891+ */
 892+$wgFixMalayalamUnicode = true;
 893+
 894+/**
887895 * Locale for LC_CTYPE, to work around http://bugs.php.net/bug.php?id=45132
888896 * For Unix-like operating systems, set this to to a locale that has a UTF-8
889897 * character set. Only the character set is relevant.
@@ -4318,4 +4326,4 @@
43194327 * Extensions can add mwEmbed modules via adding paths to their loader.js to
43204328 * $wgExtensionJavascriptLoader[] = path/to/loader.js
43214329 */
4322 -$wgExtensionJavascriptLoader = array();
\ No newline at end of file
 4330+$wgExtensionJavascriptLoader = array();
Index: trunk/phase3/languages/classes/LanguageAr.php
@@ -6,8 +6,6 @@
77 * @author Niklas Laxström
88 */
99 class LanguageAr extends Language {
10 - var $normalizeArray;
11 -
1210 function convertPlural( $count, $forms ) {
1311 if ( !count($forms) ) { return ''; }
1412 $forms = $this->preConvertPlural( $forms, 6 );
@@ -36,9 +34,9 @@
3735 * performance impact of enabling it for all languages.
3836 */
3937 function normalize( $s ) {
40 - global $wgFixArchaicUnicode;
 38+ global $wgFixArabicUnicode;
4139 $s = parent::normalize( $s );
42 - if ( $wgFixArchaicUnicode ) {
 40+ if ( $wgFixArabicUnicode ) {
4341 $s = $this->transformUsingPairFile( 'normalize-ar.ser', $s );
4442 }
4543 return $s;
Index: trunk/phase3/languages/classes/LanguageMl.php
@@ -12,9 +12,9 @@
1313 * performance impact of enabling it for all languages.
1414 */
1515 function normalize( $s ) {
16 - global $wgFixArchaicUnicode;
 16+ global $wgFixMalayalamUnicode;
1717 $s = parent::normalize( $s );
18 - if ( $wgFixArchaicUnicode ) {
 18+ if ( $wgFixMalayalamUnicode ) {
1919 $s = $this->transformUsingPairFile( 'normalize-ml.ser', $s );
2020 }
2121 return $s;
Index: trunk/phase3/RELEASE-NOTES
@@ -294,8 +294,9 @@
295295 * (bug 19791) Add URL of file source as comment to thumbs (for ImageMagick)
296296 * (bug 21946) Sorted wikitables do not properly handle minus signs
297297 * (bug 18885) Red links for media files do not support shared repositories
298 -* Added $wgFixArchaicUnicode, which, if enabled, converts some deprecated
299 - Unicode sequences in Arabic and Malayalam text to their Unicode 5.1
 298+* Added $wgFixArabicUnicode, to convert deprecated presentation forms in
 299+ Arabic text to their modern equivalents, and $wgFixMalayalamUnicode, to
 300+ convert ZWJ-based chillu sequences in Malayalam text to their Unicode 5.1
300301 equivalents.
301302 * (bug 22051) Returing false in SpecialContributionsBeforeMainOutput hook now
302303 stops normal output

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r60599Fix for bug 9413 and the related Malayalam issue reported on wikitech-l....tstarling08:28, 4 January 2010

Status & tagging log