line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyrights 2007-2017 by [Mark Overmeer]. |
2
|
|
|
|
|
|
|
# For other contributors see ChangeLog. |
3
|
|
|
|
|
|
|
# See the manual pages for details on the licensing terms. |
4
|
|
|
|
|
|
|
# Pod stripped from pm file by OODoc 2.02. |
5
|
|
|
|
|
|
|
package Log::Report::Translator; |
6
|
13
|
|
|
13
|
|
76
|
use vars '$VERSION'; |
|
13
|
|
|
|
|
28
|
|
|
13
|
|
|
|
|
543
|
|
7
|
|
|
|
|
|
|
$VERSION = '1.21'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
13
|
|
|
13
|
|
67
|
use warnings; |
|
13
|
|
|
|
|
25
|
|
|
13
|
|
|
|
|
286
|
|
11
|
13
|
|
|
13
|
|
59
|
use strict; |
|
13
|
|
|
|
|
28
|
|
|
13
|
|
|
|
|
244
|
|
12
|
|
|
|
|
|
|
|
13
|
13
|
|
|
13
|
|
57
|
use Log::Report 'log-report'; |
|
13
|
|
|
|
|
21
|
|
|
13
|
|
|
|
|
65
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
7
|
|
|
7
|
1
|
16
|
sub new(@) { my $class = shift; (bless {}, $class)->init({@_}) } |
|
7
|
|
|
|
|
54
|
|
17
|
7
|
|
|
7
|
0
|
39
|
sub init($) { shift } |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
#------------ |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
#------------ |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# this is called as last resort: if a translator cannot find |
24
|
|
|
|
|
|
|
# any lexicon or has no matching language. |
25
|
|
|
|
|
|
|
sub translate($$$) |
26
|
87
|
|
|
87
|
1
|
142
|
{ my $msg = $_[1]; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
defined $msg->{_count} && $msg->{_count} != 1 |
29
|
|
|
|
|
|
|
? $msg->{_plural} |
30
|
87
|
100
|
100
|
|
|
469
|
: $msg->{_msgid}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
0
|
1
|
|
sub load($@) { undef } |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |