r108491 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108490‎ | r108491 | r108492 >
Date:04:25, 10 January 2012
Author:santhosh
Status:ok (Comments)
Tags:i18nreview, todo 
Comment:
Make the javascript implementation of Macedonian(mk) plural consistant with php side rule.
Add a todo in php code since the rules differs from CLDR definition for mk plural.
Modified paths:
  • /trunk/phase3/languages/classes/LanguageMk.php (modified) (history)
  • /trunk/phase3/resources/mediawiki.language/languages/mk.js (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/classes/LanguageMk.php
@@ -17,7 +17,7 @@
1818 function convertPlural( $count, $forms ) {
1919 if ( !count( $forms ) ) { return ''; }
2020 $forms = $this->preConvertPlural( $forms, 2 );
21 -
 21+ // TODO CLDR defines forms[0] for n != 11 and not for n%100 !== 11
2222 if ( $count % 10 === 1 && $count % 100 !== 11 ) {
2323 return $forms[0];
2424 } else {
Index: trunk/phase3/resources/mediawiki.language/languages/mk.js
@@ -4,5 +4,5 @@
55
66 mediaWiki.language.convertPlural = function( count, forms ) {
77 forms = mediaWiki.language.preConvertPlural( forms, 2 );
8 - return ( count % 10 === 1 ) ? forms[0] : forms[1];
 8+ return ( ( count % 10 === 1 ) && ( count % 100 !== 11 ) ) ? forms[0] : forms[1];
99 };

Comments

#Comment by Nikerabbit (talk | contribs)   07:12, 10 January 2012

Sincerely, nobody is going to see that TODO in the PHP file. If we want to get it sorted out, we need to hunt language experts or at least file a bug.

Status & tagging log