r108405 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108404‎ | r108405 | r108406 >
Date:12:58, 9 January 2012
Author:santhosh
Status:resolved
Tags:i18nreview 
Comment:
Cleanup the convertPLural method for Lithuanian(lt)
Followup r108403
Modified paths:
  • /trunk/phase3/resources/mediawiki.language/languages/lt.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki.language/languages/lt.js
@@ -3,15 +3,12 @@
44 */
55
66 mediaWiki.language.convertPlural = function( count, forms ) {
7 - if ( forms.length == 2 ) {
8 - return count == 1 ? forms[0] : forms[1];
9 - }
107 forms = mediaWiki.language.preConvertPlural( forms, 3 );
118 if ( count % 10 == 1 && count % 100 != 11 ) {
129 return forms[0];
1310 }
1411 if ( count % 10 >= 2 && ( count % 100 < 10 || count % 100 >= 20 ) ) {
15 - return forms[1];
 12+ return forms[1];
1613 }
1714 return forms[2];
1815 };

Follow-up revisions

RevisionCommit summaryAuthorDate
r109022reintroduce the shortcut evaluation removed in r108403 and r108405santhosh10:05, 16 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108403Cleanup the convertPLural method for Lithuanian(lt)...santhosh12:46, 9 January 2012

Status & tagging log