Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 27
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
LanguageGa
0.00% covered (danger)
0.00%
0 / 27
0.00% covered (danger)
0.00%
0 / 1
110
0.00% covered (danger)
0.00%
0 / 1
 convertGrammar
0.00% covered (danger)
0.00%
0 / 27
0.00% covered (danger)
0.00%
0 / 1
110
1<?php
2/**
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 * http://www.gnu.org/copyleft/gpl.html
17 *
18 * @file
19 */
20
21use MediaWiki\MainConfigNames;
22use MediaWiki\MediaWikiServices;
23
24/**
25 * Irish (Gaeilge)
26 *
27 * @ingroup Languages
28 */
29class LanguageGa extends Language {
30    public function convertGrammar( $word, $case ) {
31        $grammarForms =
32            MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::GrammarForms );
33        if ( isset( $grammarForms['ga'][$case][$word] ) ) {
34            return $grammarForms['ga'][$case][$word];
35        }
36
37        switch ( $case ) {
38            case 'ainmlae':
39                switch ( $word ) {
40                    case 'an Domhnach':
41                        $word = 'Dé Domhnaigh';
42                        break;
43                    case 'an Luan':
44                        $word = 'Dé Luain';
45                        break;
46                    case 'an Mháirt':
47                        $word = 'Dé Mháirt';
48                        break;
49                    case 'an Chéadaoin':
50                        $word = 'Dé Chéadaoin';
51                        break;
52                    case 'an Déardaoin':
53                        $word = 'Déardaoin';
54                        break;
55                    case 'an Aoine':
56                        $word = 'Dé hAoine';
57                        break;
58                    case 'an Satharn':
59                        $word = 'Dé Sathairn';
60                        break;
61                }
62        }
63        return $word;
64    }
65
66}