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
|
15
|
|
|
15
|
|
80
|
use vars '$VERSION'; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
639
|
|
7
|
|
|
|
|
|
|
$VERSION = '1.23'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
15
|
|
|
15
|
|
79
|
use warnings; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
383
|
|
11
|
15
|
|
|
15
|
|
105
|
use strict; |
|
15
|
|
|
|
|
30
|
|
|
15
|
|
|
|
|
306
|
|
12
|
|
|
|
|
|
|
|
13
|
15
|
|
|
15
|
|
70
|
use Log::Report 'log-report'; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
76
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
8
|
|
|
8
|
1
|
23
|
sub new(@) { my $class = shift; (bless {}, $class)->init({@_}) } |
|
8
|
|
|
|
|
53
|
|
17
|
8
|
|
|
8
|
0
|
45
|
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
|
89
|
|
|
89
|
1
|
127
|
{ my $msg = $_[1]; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
defined $msg->{_count} && $msg->{_count} != 1 |
29
|
|
|
|
|
|
|
? $msg->{_plural} |
30
|
89
|
100
|
100
|
|
|
419
|
: $msg->{_msgid}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
0
|
1
|
|
sub load($@) { undef } |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |