2007-04-08 20:51:00 +00:00
|
|
|
<?php
|
|
|
|
|
/** Arabic (العربية)
|
|
|
|
|
*
|
WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>
Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage
One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
|
|
|
* @ingroup Language
|
2007-04-08 20:51:00 +00:00
|
|
|
*
|
|
|
|
|
* @author Niklas Laxström
|
|
|
|
|
*/
|
|
|
|
|
class LanguageAr extends Language {
|
2007-11-18 20:15:49 +00:00
|
|
|
function convertPlural( $count, $forms ) {
|
2010-07-29 09:43:18 +00:00
|
|
|
if ( !count( $forms ) ) { return ''; }
|
2009-06-11 14:41:52 +00:00
|
|
|
$forms = $this->preConvertPlural( $forms, 6 );
|
2007-11-18 20:15:49 +00:00
|
|
|
|
2009-06-11 14:41:52 +00:00
|
|
|
if ( $count == 0 ) {
|
2007-04-08 20:51:00 +00:00
|
|
|
$index = 0;
|
2009-06-11 14:41:52 +00:00
|
|
|
} elseif ( $count == 1 ) {
|
2007-04-08 20:51:00 +00:00
|
|
|
$index = 1;
|
2010-07-29 09:43:18 +00:00
|
|
|
} elseif ( $count == 2 ) {
|
2007-04-08 20:51:00 +00:00
|
|
|
$index = 2;
|
2010-07-29 09:43:18 +00:00
|
|
|
} elseif ( $count % 100 >= 3 && $count % 100 <= 10 ) {
|
2007-04-08 20:51:00 +00:00
|
|
|
$index = 3;
|
2010-07-29 09:43:18 +00:00
|
|
|
} elseif ( $count % 100 >= 11 && $count % 100 <= 99 ) {
|
2007-04-08 20:51:00 +00:00
|
|
|
$index = 4;
|
2009-06-11 14:41:52 +00:00
|
|
|
} else {
|
|
|
|
|
$index = 5;
|
2007-04-08 20:51:00 +00:00
|
|
|
}
|
|
|
|
|
return $forms[$index];
|
|
|
|
|
}
|
2010-01-04 08:28:50 +00:00
|
|
|
|
|
|
|
|
/**
|
2010-07-29 09:43:18 +00:00
|
|
|
* Temporary hack for bug 9413: replace Arabic presentation forms with their
|
|
|
|
|
* standard equivalents.
|
2010-01-04 08:28:50 +00:00
|
|
|
*
|
2010-07-29 09:43:18 +00:00
|
|
|
* FIXME: This is language-specific for now only to avoid the negative
|
2010-01-04 08:28:50 +00:00
|
|
|
* performance impact of enabling it for all languages.
|
|
|
|
|
*/
|
|
|
|
|
function normalize( $s ) {
|
2010-01-20 01:50:16 +00:00
|
|
|
global $wgFixArabicUnicode;
|
2010-01-04 08:28:50 +00:00
|
|
|
$s = parent::normalize( $s );
|
2010-01-20 01:50:16 +00:00
|
|
|
if ( $wgFixArabicUnicode ) {
|
2010-01-04 08:28:50 +00:00
|
|
|
$s = $this->transformUsingPairFile( 'normalize-ar.ser', $s );
|
|
|
|
|
}
|
|
|
|
|
return $s;
|
|
|
|
|
}
|
2007-04-08 20:51:00 +00:00
|
|
|
}
|