Lines 337-348
if (defined $href) {
Link Here
|
337 |
# set our charset in to UTF-8 |
337 |
# set our charset in to UTF-8 |
338 |
if (!defined $charset_in) { |
338 |
if (!defined $charset_in) { |
339 |
$charset_in = TmplTokenizer::charset_canon 'UTF-8'; |
339 |
$charset_in = TmplTokenizer::charset_canon 'UTF-8'; |
340 |
warn "Warning: Can't determine original templates' charset, defaulting to $charset_in\n"; |
340 |
warn "Warning: Can't determine original templates' charset, defaulting to $charset_in\n" unless ( $quiet ); |
341 |
} |
341 |
} |
342 |
# set our charset out to UTF-8 |
342 |
# set our charset out to UTF-8 |
343 |
if (!defined $charset_out) { |
343 |
if (!defined $charset_out) { |
344 |
$charset_out = TmplTokenizer::charset_canon 'UTF-8'; |
344 |
$charset_out = TmplTokenizer::charset_canon 'UTF-8'; |
345 |
warn "Warning: Charset Out defaulting to $charset_out\n"; |
345 |
warn "Warning: Charset Out defaulting to $charset_out\n" unless ( $quiet ); |
346 |
} |
346 |
} |
347 |
my $xgettext = './xgettext.pl'; # actual text extractor script |
347 |
my $xgettext = './xgettext.pl'; # actual text extractor script |
348 |
my $st; |
348 |
my $st; |
Lines 350-356
my $st;
Link Here
|
350 |
if ($action eq 'create') { |
350 |
if ($action eq 'create') { |
351 |
# updates the list. As the list is empty, every entry will be added |
351 |
# updates the list. As the list is empty, every entry will be added |
352 |
if (!-s $str_file) { |
352 |
if (!-s $str_file) { |
353 |
warn "Removing empty file $str_file\n"; |
353 |
warn "Removing empty file $str_file\n" unless ( $quiet ); |
354 |
unlink $str_file || die "$str_file: $!\n"; |
354 |
unlink $str_file || die "$str_file: $!\n"; |
355 |
} |
355 |
} |
356 |
die "$str_file: Output file already exists\n" if -f $str_file; |
356 |
die "$str_file: Output file already exists\n" if -f $str_file; |
Lines 362-368
if ($action eq 'create') {
Link Here
|
362 |
print $tmph1 "$input\n"; |
362 |
print $tmph1 "$input\n"; |
363 |
} |
363 |
} |
364 |
close $tmph1; |
364 |
close $tmph1; |
365 |
warn "I $charset_in O $charset_out"; |
365 |
warn "I $charset_in O $charset_out" unless ( $quiet ); |
366 |
# Generate the specified po file ($str_file) |
366 |
# Generate the specified po file ($str_file) |
367 |
$st = system ($xgettext, '-s', '-f', $tmpfile1, '-o', $tmpfile2, |
367 |
$st = system ($xgettext, '-s', '-f', $tmpfile1, '-o', $tmpfile2, |
368 |
(defined $charset_in? ('-I', $charset_in): ()), |
368 |
(defined $charset_in? ('-I', $charset_in): ()), |
369 |
- |
|
|