From: Raimond Spekking Date: Fri, 17 Apr 2009 13:32:49 +0000 (+0000) Subject: * Add PLURAL function for Scots Gaelic (gd) X-Git-Tag: 1.31.0-rc.0~42114 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=63edb9062f6cb3e013bac52bbc96ac44abe10a87;p=lhc%2Fweb%2Fwiklou.git * Add PLURAL function for Scots Gaelic (gd) --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 6e23fe7386..7fa8aae9fc 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -427,6 +427,7 @@ changes to languages because of MediaZilla reports. * (bug 16909) 'histlegend' now reuses messages instead of copying them * Traditional/Simplified Gan Chinese conversion support * (bug 18474) Sorani (ckb - Central Kurdish) (renamed from ku-arab) +* Add PLURAL function for Scots Gaelic (gd) == Compatibility == diff --git a/languages/classes/LanguageGd.php b/languages/classes/LanguageGd.php new file mode 100644 index 0000000000..6c307f6005 --- /dev/null +++ b/languages/classes/LanguageGd.php @@ -0,0 +1,35 @@ += 11) + * + */ + function convertPlural( $count, $forms ) { + if ( !count($forms) ) { return ''; } + $forms = $this->preConvertPlural( $forms, 4 ); + + $count = abs( $count ); + if ( $count === 1 ) { + return $forms[0]; + } elseif ( $count === 2 ) { + return $forms[1]; + } elseif ( $count >= 3 && $count <= 10 ) { + return $forms[2]; + } else { + return $forms[3]; + } + } +}