* Do fewer unnecessary full writes of user rows; only update user_touched
[lhc/web/wiklou.git] / languages / LanguageRmy.php
1 <?php
2
3 class LanguageRmy extends Language {
4 /**
5 * Convert from the nominative form of a noun to some other case
6 * Invoked with {{GRAMMAR:case|word}}
7 *
8 * Cases: nominative, genitive-m-sg, genitive-f-sg, dative, locative, ablative, instrumental
9 */
10 public function convertGrammar( $word, $case ) {
11 global $wgGrammarForms;
12 if ( isset($wgGrammarForms['rmy'][$case][$word]) ) {
13 return $wgGrammarForms['rmy'][$case][$word];
14 }
15
16 switch ( $case ) {
17 case 'genitive-m-sg': # genitive (m.sg.)
18 if ( $word == 'Vikipidiya' ) {
19 $word = 'Vikipidiyako';
20 } elseif ( $word == 'Vikcyonaro' ) {
21 $word = 'Vikcyonaresko';
22 }
23 break;
24 case 'genitive-f-sg': # genitive (f.sg.)
25 if ( $word == 'Vikipidiya' ) {
26 $word = 'Vikipidiyaki';
27 } elseif ( $word == 'Vikcyonaro' ) {
28 $word = 'Vikcyonareski';
29 }
30 break;
31 case 'genitive-pl': # genitive (pl.)
32 if ( $word == 'Vikipidiya' ) {
33 $word = 'Vikipidiyake';
34 } elseif ( $word == 'Vikcyonaro' ) {
35 $word = 'Vikcyonareske';
36 }
37 break;
38 case 'dativ':
39 if ( $word == 'Vikipidiyake' ) {
40 $word = 'Wikipediji';
41 } elseif ( $word == 'Vikcyonaro' ) {
42 $word = 'Vikcyonareske';
43 }
44 break;
45 case 'locative':
46 if ( $word == 'Vikipidiyate' ) {
47 $word = 'Wikipedijo';
48 } elseif ( $word == 'Vikcyonaro' ) {
49 $word = 'Vikcyonareste';
50 }
51 break;
52 case 'ablative':
53 if ( $word == 'Vikipidiyatar' ) {
54 $word = 'o Wikipediji';
55 } elseif ( $word == 'Vikcyonaro' ) {
56 $word = 'Vikcyonarestar';
57 }
58 break;
59 case 'instrumental':
60 if ( $word == 'Vikipidiyasa' ) {
61 $word = 'z Wikipedijo';
62 } elseif ( $word == 'Vikcyonaro' ) {
63 $word = 'Vikcyonaresa';
64 }
65 break;
66 }
67
68 return $word; # this will return the original value for 'nominative' and all undefined case values
69 }
70 }
71
72 ?>