Merge "Added release notes for 'ContentHandler::runLegacyHooks' removal"
[mediawiki.git] / resources / lib / jquery.i18n / src / languages / ml.js
blobf724b7b2205d64b66f5596ab2fde3d5d2f898cf0
1 /**
2  * Malayalam language functions
3  *
4  * @author Santhosh Thottingal
5  */
7 ( function ( $ ) {
8         'use strict';
10         $.i18n.languages.ml = $.extend( {}, $.i18n.languages['default'], {
11                 convertGrammar: function ( word, form ) {
12                         form = form.toLowerCase();
13                         switch ( form ) {
14                                 case 'ഉദ്ദേശിക':
15                                 case 'dative':
16                                         if ( word.substr( -1 ) === 'ു' ||
17                                                 word.substr( -1 ) === 'ൂ' ||
18                                                 word.substr( -1 ) === 'ൗ' ||
19                                                 word.substr( -1 ) === 'ൌ'
20                                         ) {
21                                                 word += 'വിന്';
22                                         } else if ( word.substr( -1 ) === 'ം' ) {
23                                                 word = word.substr( 0, word.length - 1 ) + 'ത്തിന്';
24                                         } else if ( word.substr( -1 ) === 'ൻ' ) {
25                                                 // Atomic chillu n. അവൻ -> അവന്
26                                                 word = word.substr( 0, word.length - 1 ) + 'ന്';
27                                         } else if ( word.substr( -3 ) === 'ന്\u200d' ) {
28                                                 // chillu n. അവൻ -> അവന്
29                                                 word = word.substr( 0, word.length - 1 );
30                                         } else if ( word.substr( -1 ) === 'ൾ' || word.substr( -3 ) === 'ള്\u200d' ) {
31                                                 word += 'ക്ക്';
32                                         } else if ( word.substr( -1 ) === 'ർ' || word.substr( -3 ) === 'ര്\u200d' ) {
33                                                 word += 'ക്ക്';
34                                         } else if ( word.substr( -1 ) === 'ൽ' ) {
35                                                 // Atomic chillu ൽ , ഫയൽ -> ഫയലിന്
36                                                 word = word.substr( 0, word.length - 1 ) + 'ലിന്';
37                                         } else if ( word.substr( -3 ) === 'ല്\u200d' ) {
38                                                 // chillu ല്\u200d , ഫയല്\u200d -> ഫയലിന്
39                                                 word = word.substr( 0, word.length - 2 ) + 'ിന്';
40                                         } else if ( word.substr( -2 ) === 'ു്' ) {
41                                                 word = word.substr( 0, word.length - 2 ) + 'ിന്';
42                                         } else if ( word.substr( -1 ) === '്' ) {
43                                                 word = word.substr( 0, word.length - 1 ) + 'ിന്';
44                                         } else {
45                                                 // കാവ്യ -> കാവ്യയ്ക്ക്, ഹരി -> ഹരിയ്ക്ക്, മല -> മലയ്ക്ക്
46                                                 word += 'യ്ക്ക്';
47                                         }
49                                         break;
50                                 case 'സംബന്ധിക':
51                                 case 'genitive':
52                                         if ( word.substr( -1 ) === 'ം' ) {
53                                                 word = word.substr( 0, word.length - 1 ) + 'ത്തിന്റെ';
54                                         } else if ( word.substr( -2 ) === 'ു്' ) {
55                                                 word = word.substr( 0, word.length - 2 ) + 'ിന്റെ';
56                                         } else if ( word.substr( -1 ) === '്' ) {
57                                                 word = word.substr( 0, word.length - 1 ) + 'ിന്റെ';
58                                         } else if (  word.substr( -1 ) === 'ു' ||
59                                                 word.substr( -1 ) === 'ൂ' ||
60                                                 word.substr( -1 ) === 'ൗ' ||
61                                                 word.substr( -1 ) === 'ൌ'
62                                         ) {
63                                                 word += 'വിന്റെ';
64                                         } else if ( word.substr( -1 ) === 'ൻ' ) {
65                                                 // Atomic chillu n. അവൻ -> അവന്റെ
66                                                 word = word.substr( 0, word.length - 1 ) + 'ന്റെ';
67                                         } else if ( word.substr( -3 ) === 'ന്\u200d' ) {
68                                                 // chillu n. അവൻ -> അവന്റെ
69                                                 word = word.substr( 0, word.length - 1 ) + 'റെ';
70                                         } else if ( word.substr( -3 ) === 'ള്\u200d' ) {
71                                                 // chillu n. അവൾ -> അവളുടെ
72                                                 word = word.substr( 0, word.length - 2 ) + 'ുടെ';
73                                         } else if ( word.substr( -1 ) === 'ൾ' ) {
74                                                 // Atomic chillu n. അവള്\u200d -> അവളുടെ
75                                                 word = word.substr( 0, word.length - 1 ) + 'ളുടെ';
76                                         } else if ( word.substr( -1 ) === 'ൽ' ) {
77                                                 // Atomic l. മുയല്\u200d -> മുയലിന്റെ
78                                                 word = word.substr( 0, word.length - 1 ) + 'ലിന്റെ';
79                                         } else if ( word.substr( -3 ) === 'ല്\u200d' ) {
80                                                 // chillu l. മുയല്\u200d -> അവളുടെ
81                                                 word = word.substr( 0, word.length - 2 ) + 'ിന്റെ';
82                                         } else if ( word.substr( -3 ) === 'ര്\u200d' ) {
83                                                 // chillu r. അവര്\u200d -> അവരുടെ
84                                                 word = word.substr( 0, word.length - 2 ) + 'ുടെ';
85                                         } else if ( word.substr( -1 ) === 'ർ' ) {
86                                                 // Atomic chillu r. അവർ -> അവരുടെ
87                                                 word = word.substr( 0, word.length - 1 ) + 'രുടെ';
88                                         } else {
89                                                 word += 'യുടെ';
90                                         }
92                                         break;
93                         }
95                         return word;
96                 }
97         } );
98 }( jQuery ) );