Added release notes for 'ContentHandler::runLegacyHooks' removal
[mediawiki.git] / resources / lib / jquery.i18n / src / languages / fi.js
blobd8e9578a67a80a7f50366261322f7b203db5a6a7
1 /**
2  * Finnish (Suomi) language functions
3  *
4  * @author Santhosh Thottingal
5  */
7 ( function ( $ ) {
8         'use strict';
10         $.i18n.languages.fi = $.extend( {}, $.i18n.languages['default'], {
11                 convertGrammar: function ( word, form ) {
12                         // vowel harmony flag
13                         var aou = word.match( /[aou][^äöy]*$/i ),
14                                 origWord = word;
15                         if ( word.match( /wiki$/i ) ) {
16                                 aou = false;
17                         }
19                         // append i after final consonant
20                         if ( word.match( /[bcdfghjklmnpqrstvwxz]$/i ) ) {
21                                 word += 'i';
22                         }
24                         switch ( form ) {
25                         case 'genitive':
26                                 word += 'n';
27                                 break;
28                         case 'elative':
29                                 word += ( aou ? 'sta' : 'stä' );
30                                 break;
31                         case 'partitive':
32                                 word += ( aou ? 'a' : 'ä' );
33                                 break;
34                         case 'illative':
35                                 // Double the last letter and add 'n'
36                                 word += word.substr( word.length - 1 ) + 'n';
37                                 break;
38                         case 'inessive':
39                                 word += ( aou ? 'ssa' : 'ssä' );
40                                 break;
41                         default:
42                                 word = origWord;
43                                 break;
44                         }
46                         return word;
47                 }
48         } );
49 }( jQuery ) );