Chameleon

Chameleon Commit Details

Date:2012-03-05 18:12:41 (12 years 1 month ago)
Author:JrCs
Commit:1865
Parents: 1864
Message:Update of the po4a translation module
Changes:
M/trunk/package/bin/po4a/lib/Locale/Po4a/Prop.pm

File differences

trunk/package/bin/po4a/lib/Locale/Po4a/Prop.pm
99
1010
1111
12
13
14
1512
1613
1714
......
2421
2522
2623
24
25
26
2727
2828
29
29
30
31
3032
33
34
35
36
37
38
39
40
41
42
43
3144
3245
3346
......
6174
6275
6376
64
65
77
78
6679
67
80
6881
6982
7083
# Modules and declarations
############################################################################
use Locale::Po4a::TransTractor qw(process new);
use Locale::Po4a::Common;
package Locale::Po4a::Prop;
use 5.006;
@ISA = qw(Locale::Po4a::TransTractor);
@EXPORT = qw();
use Locale::Po4a::TransTractor;
use Locale::Po4a::Common;
my $debug=0;
sub initialize {}
sub initialize {
my $self = shift;
my %options = @_;
$self->{options}{'wrap'}=0;
foreach my $opt (keys %options) {
if ($options{$opt}) {
die wrap_mod("po4a::prop",
dgettext("po4a", "Unknown option: %s"), $opt)
unless exists $self->{options}{$opt};
$self->{options}{$opt} = $options{$opt};
}
}
}
sub parse {
my $self=shift;
my ($line,$ref);
# Remove the final ";
$quoted_text =~ s/"\s*;[^"]*$//;
# Translate the string
$par = $self->translate($quoted_text, $ref, $pre_text);
$par = $self->translate($quoted_text, $ref, $pre_text,
'wrap'=>$self->{options}{'wrap'});
# Now push the result
$self->pushline($pre_text .' = "'.$par."\";\n");
$self->pushline($pre_text .' = "'.$par."\";\n");
print STDERR "End of line containing \".\n" if $debug;
}
else

Archive Download the corresponding diff file

Revision: 1865