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
|
|
69
|
use vars '$VERSION'; |
|
13
|
|
|
|
|
20
|
|
|
13
|
|
|
|
|
545
|
|
7
|
|
|
|
|
|
|
$VERSION = '1.22'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
13
|
|
|
13
|
|
61
|
use warnings; |
|
13
|
|
|
|
|
19
|
|
|
13
|
|
|
|
|
250
|
|
11
|
13
|
|
|
13
|
|
51
|
use strict; |
|
13
|
|
|
|
|
18
|
|
|
13
|
|
|
|
|
221
|
|
12
|
|
|
|
|
|
|
|
13
|
13
|
|
|
13
|
|
48
|
use Log::Report 'log-report'; |
|
13
|
|
|
|
|
18
|
|
|
13
|
|
|
|
|
53
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
7
|
|
|
7
|
1
|
15
|
sub new(@) { my $class = shift; (bless {}, $class)->init({@_}) } |
|
7
|
|
|
|
|
28
|
|
17
|
7
|
|
|
7
|
0
|
33
|
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
|
111
|
{ my $msg = $_[1]; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
defined $msg->{_count} && $msg->{_count} != 1 |
29
|
|
|
|
|
|
|
? $msg->{_plural} |
30
|
87
|
100
|
100
|
|
|
354
|
: $msg->{_msgid}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
0
|
1
|
|
sub load($@) { undef } |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |