Localisation updates from https://translatewiki.net.
[mediawiki.git] / resources / lib / jquery.i18n / src / languages / ml.js
blobd9c82cfb62bd6d1619be3d900d6422f0d69e3c61
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.slice( -1 ) === 'ു' ||
17                                                 word.slice( -1 ) === 'ൂ' ||
18                                                 word.slice( -1 ) === 'ൗ' ||
19                                                 word.slice( -1 ) === 'ൌ'
20                                         ) {
21                                                 word += 'വിന്';
22                                         } else if ( word.slice( -1 ) === 'ം' ) {
23                                                 word = word.slice( 0, -1 ) + 'ത്തിന്';
24                                         } else if ( word.slice( -1 ) === 'ൻ' ) {
25                                                 // Atomic chillu n. അവൻ -> അവന്
26                                                 word = word.slice( 0, -1 ) + 'ന്';
27                                         } else if ( word.slice( -3 ) === 'ന്\u200d' ) {
28                                                 // chillu n. അവൻ -> അവന്
29                                                 word = word.slice( 0, -1 );
30                                         } else if ( word.slice( -1 ) === 'ൾ' || word.slice( -3 ) === 'ള്\u200d' ) {
31                                                 word += 'ക്ക്';
32                                         } else if ( word.slice( -1 ) === 'ർ' || word.slice( -3 ) === 'ര്\u200d' ) {
33                                                 word += 'ക്ക്';
34                                         } else if ( word.slice( -1 ) === 'ൽ' ) {
35                                                 // Atomic chillu ൽ , ഫയൽ -> ഫയലിന്
36                                                 word = word.slice( 0, -1 ) + 'ലിന്';
37                                         } else if ( word.slice( -3 ) === 'ല്\u200d' ) {
38                                                 // chillu ല്\u200d , ഫയല്\u200d -> ഫയലിന്
39                                                 word = word.slice( 0, -2 ) + 'ിന്';
40                                         } else if ( word.slice( -2 ) === 'ു്' ) {
41                                                 word = word.slice( 0, -2 ) + 'ിന്';
42                                         } else if ( word.slice( -1 ) === '്' ) {
43                                                 word = word.slice( 0, -1 ) + 'ിന്';
44                                         } else {
45                                                 // കാവ്യ -> കാവ്യയ്ക്ക്, ഹരി -> ഹരിയ്ക്ക്, മല -> മലയ്ക്ക്
46                                                 word += 'യ്ക്ക്';
47                                         }
49                                         break;
50                                 case 'സംബന്ധിക':
51                                 case 'genitive':
52                                         if ( word.slice( -1 ) === 'ം' ) {
53                                                 word = word.slice( 0, -1 ) + 'ത്തിന്റെ';
54                                         } else if ( word.slice( -2 ) === 'ു്' ) {
55                                                 word = word.slice( 0, -2 ) + 'ിന്റെ';
56                                         } else if ( word.slice( -1 ) === '്' ) {
57                                                 word = word.slice( 0, -1 ) + 'ിന്റെ';
58                                         } else if ( word.slice( -1 ) === 'ു' ||
59                                                 word.slice( -1 ) === 'ൂ' ||
60                                                 word.slice( -1 ) === 'ൗ' ||
61                                                 word.slice( -1 ) === 'ൌ'
62                                         ) {
63                                                 word += 'വിന്റെ';
64                                         } else if ( word.slice( -1 ) === 'ൻ' ) {
65                                                 // Atomic chillu n. അവൻ -> അവന്റെ
66                                                 word = word.slice( 0, -1 ) + 'ന്റെ';
67                                         } else if ( word.slice( -3 ) === 'ന്\u200d' ) {
68                                                 // chillu n. അവൻ -> അവന്റെ
69                                                 word = word.slice( 0, -1 ) + 'റെ';
70                                         } else if ( word.slice( -3 ) === 'ള്\u200d' ) {
71                                                 // chillu n. അവൾ -> അവളുടെ
72                                                 word = word.slice( 0, -2 ) + 'ുടെ';
73                                         } else if ( word.slice( -1 ) === 'ൾ' ) {
74                                                 // Atomic chillu n. അവള്\u200d -> അവളുടെ
75                                                 word = word.slice( 0, -1 ) + 'ളുടെ';
76                                         } else if ( word.slice( -1 ) === 'ൽ' ) {
77                                                 // Atomic l. മുയല്\u200d -> മുയലിന്റെ
78                                                 word = word.slice( 0, -1 ) + 'ലിന്റെ';
79                                         } else if ( word.slice( -3 ) === 'ല്\u200d' ) {
80                                                 // chillu l. മുയല്\u200d -> അവളുടെ
81                                                 word = word.slice( 0, -2 ) + 'ിന്റെ';
82                                         } else if ( word.slice( -3 ) === 'ര്\u200d' ) {
83                                                 // chillu r. അവര്\u200d -> അവരുടെ
84                                                 word = word.slice( 0, -2 ) + 'ുടെ';
85                                         } else if ( word.slice( -1 ) === 'ർ' ) {
86                                                 // Atomic chillu r. അവർ -> അവരുടെ
87                                                 word = word.slice( 0, -1 ) + 'രുടെ';
88                                         } else {
89                                                 word += 'യുടെ';
90                                         }
92                                         break;
93                         }
95                         return word;
96                 }
97         } );
98 }( jQuery ) );