line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#! /bin/false |
2
|
|
|
|
|
|
|
# vim: ts=4:et |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# Copyright (C) 2016-2017 Guido Flohr , |
5
|
|
|
|
|
|
|
# all rights reserved. |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify it |
8
|
|
|
|
|
|
|
# under the terms of the GNU Library General Public License as published |
9
|
|
|
|
|
|
|
# by the Free Software Foundation; either version 2, or (at your option) |
10
|
|
|
|
|
|
|
# any later version. |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful, |
13
|
|
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
14
|
|
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15
|
|
|
|
|
|
|
# Library General Public License for more details. |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# You should have received a copy of the GNU Library General Public |
18
|
|
|
|
|
|
|
# License along with this program; if not, write to the Free Software |
19
|
|
|
|
|
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
20
|
|
|
|
|
|
|
# USA. |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
package Locale::XGettext::Text; |
23
|
|
|
|
|
|
|
$Locale::XGettext::Text::VERSION = '0.7'; |
24
|
15
|
|
|
15
|
|
1010487
|
use strict; |
|
15
|
|
|
|
|
179
|
|
|
15
|
|
|
|
|
514
|
|
25
|
|
|
|
|
|
|
|
26
|
15
|
|
|
15
|
|
8613
|
use Locale::TextDomain qw(Locale-XGettext); |
|
15
|
|
|
|
|
281690
|
|
|
15
|
|
|
|
|
95
|
|
27
|
|
|
|
|
|
|
|
28
|
15
|
|
|
15
|
|
414302
|
use base qw(Locale::XGettext); |
|
15
|
|
|
|
|
34
|
|
|
15
|
|
|
|
|
8627
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub readFile { |
31
|
40
|
|
|
40
|
1
|
158
|
my ($self, $filename) = @_; |
32
|
|
|
|
|
|
|
|
33
|
40
|
50
|
|
|
|
1361
|
open my $fh, '<', $filename |
34
|
|
|
|
|
|
|
or die __x("Error reading '{filename}': {error}!\n", |
35
|
|
|
|
|
|
|
filename => $filename, error => $!); |
36
|
|
|
|
|
|
|
|
37
|
40
|
|
|
|
|
139
|
my $chunk = ''; |
38
|
40
|
|
|
|
|
84
|
my $last_lineno = 1; |
39
|
40
|
|
|
|
|
728
|
while (my $line = <$fh>) { |
40
|
40
|
50
|
|
|
|
252
|
if ($line =~ /^[\x09-\x0d ]*$/) { |
41
|
0
|
0
|
|
|
|
0
|
if (length $chunk) { |
42
|
0
|
|
|
|
|
0
|
chomp $chunk; |
43
|
0
|
|
|
|
|
0
|
$self->addEntry({msgid => $chunk, |
44
|
|
|
|
|
|
|
reference => "$filename:$last_lineno"}); |
45
|
|
|
|
|
|
|
} |
46
|
0
|
|
|
|
|
0
|
$last_lineno = $. + 1; |
47
|
0
|
|
|
|
|
0
|
$chunk = ''; |
48
|
|
|
|
|
|
|
} else { |
49
|
40
|
|
|
|
|
372
|
$chunk .= $line; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
40
|
50
|
|
|
|
138
|
if (length $chunk) { |
54
|
40
|
|
|
|
|
120
|
chomp $chunk; |
55
|
40
|
|
|
|
|
402
|
$self->addEntry({msgid => $chunk, |
56
|
|
|
|
|
|
|
reference => "$filename:$last_lineno"}); |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
40
|
|
|
|
|
633
|
return $self; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub versionInformation { |
63
|
0
|
|
|
0
|
1
|
|
return __x('{program} (Locale-XGettext) {version} |
64
|
|
|
|
|
|
|
Copyright (C) {years} Cantanea EOOD (http://www.cantanea.com/). |
65
|
|
|
|
|
|
|
License LGPLv3+: GNU Lesser General Public Licence version 3 |
66
|
|
|
|
|
|
|
or later . |
67
|
|
|
|
|
|
|
This is free software: you are free to change and redistribute it. |
68
|
|
|
|
|
|
|
There is NO WARRANTY, to the extent permitted by law. |
69
|
|
|
|
|
|
|
Written by Guido Flohr (http://www.guido-flohr.net/). |
70
|
|
|
|
|
|
|
', program => $0, years => '2016-2017', version => $Locale::XGettext::VERSION); |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub fileInformation { |
74
|
0
|
|
|
0
|
1
|
|
return __(<
|
75
|
|
|
|
|
|
|
Input files are interpreted as plain text files with each paragraph being |
76
|
|
|
|
|
|
|
a separately translatable unit. |
77
|
|
|
|
|
|
|
EOF |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub canExtractAll { |
81
|
0
|
|
|
0
|
1
|
|
shift; |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
sub canKeywords { |
85
|
0
|
|
|
0
|
1
|
|
return; |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
1; |