[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Summary view] [Print] [Text view]
1 /*! 2 * Armenian (Հայերեն) language functions 3 */ 4 5 mediaWiki.language.convertGrammar = function ( word, form ) { 6 /*jshint onecase:true */ 7 var grammarForms = mediaWiki.language.getData( 'hy', 'grammarForms' ); 8 if ( grammarForms && grammarForms[form] ) { 9 return grammarForms[form][word]; 10 } 11 12 // These rules are not perfect, but they are currently only used for site names so it doesn't 13 // matter if they are wrong sometimes. Just add a special case for your site name if necessary. 14 15 switch ( form ) { 16 case 'genitive': // սեռական հոլով 17 if ( word.slice( -1 ) === 'ա' ) { 18 word = word.slice( 0, -1 ) + 'այի'; 19 } else if ( word.slice( -1 ) === 'ո' ) { 20 word = word.slice( 0, -1 ) + 'ոյի'; 21 } else if ( word.slice( -4 ) === 'գիրք' ) { 22 word = word.slice( 0, -4 ) + 'գրքի'; 23 } else { 24 word = word + 'ի'; 25 } 26 break; 27 } 28 return word; 29 };
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |