HordeTranslationHandler::ngettext()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 2
eloc 2
nc 2
nop 3
crap 2
1
<?php
2
3
/**
4
 * @author Christoph Wurst <[email protected]>
5
 * @author Thomas Müller <[email protected]>
6
 *
7
 * Mail
8
 *
9
 * This code is free software: you can redistribute it and/or modify
10
 * it under the terms of the GNU Affero General Public License, version 3,
11
 * as published by the Free Software Foundation.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
 * GNU Affero General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU Affero General Public License, version 3,
19
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
20
 *
21
 */
22
namespace OCA\Mail;
23
24
use Horde_Translation_Handler;
25
26
class HordeTranslationHandler  implements Horde_Translation_Handler {
27
	/**
28
	 * Returns the translation of a message.
29
	 *
30
	 * @var string $message  The string to translate.
31
	 *
32
	 * @return string  The string translation, or the original string if no
33
	 *                 translation exists.
34
	 */
35 14
	public function t($message) {
36 14
		return $message;
37
	}
38
39
	/**
40
	 * Returns the plural translation of a message.
41
	 *
42
	 * @param string $singular  The singular version to translate.
43
	 * @param string $plural    The plural version to translate.
44
	 * @param integer $number   The number that determines singular vs. plural.
45
	 *
46
	 * @return string  The string translation, or the original string if no
47
	 *                 translation exists.
48
	 */
49 3
	public function ngettext($singular, $plural, $number) {
50 3
		return ($number > 1 ? $plural : $singular);
51
	}
52
}
53