View | Details | Raw Unified | Return to bug 9161
Collapse All | Expand All

(-)a/misc/translator/LangInstaller.pm (-3 / +3 lines)
Lines 320-326 sub install_tmpl { Link Here
320
            "-o $trans->{dir}/$self->{lang} ".
320
            "-o $trans->{dir}/$self->{lang} ".
321
            "-s $self->{path_po}/$self->{lang}$trans->{suffix} -r " .
321
            "-s $self->{path_po}/$self->{lang}$trans->{suffix} -r " .
322
            (
322
            (
323
                $files
323
                @$files
324
                    ? '-f ' . join ' -f ', @$files
324
                    ? '-f ' . join ' -f ', @$files
325
                    : ''
325
                    : ''
326
            )
326
            )
Lines 345-351 sub update_tmpl { Link Here
345
            "-i $trans->{dir}/en/ " .
345
            "-i $trans->{dir}/en/ " .
346
            "-s $self->{path_po}/$self->{lang}$trans->{suffix} -r " .
346
            "-s $self->{path_po}/$self->{lang}$trans->{suffix} -r " .
347
            (
347
            (
348
                $files
348
                @$files
349
                    ? '-f ' . join ' -f ', @$files
349
                    ? '-f ' . join ' -f ', @$files
350
                    : ''
350
                    : ''
351
            )
351
            )
Lines 380-386 sub create_tmpl { Link Here
380
            "-i $trans->{dir}/en/ " .
380
            "-i $trans->{dir}/en/ " .
381
            "-s $self->{path_po}/$self->{lang}$trans->{suffix} -r " .
381
            "-s $self->{path_po}/$self->{lang}$trans->{suffix} -r " .
382
            (
382
            (
383
                $files
383
                @$files
384
                    ? '-f ' . join ' -f ', @$files
384
                    ? '-f ' . join ' -f ', @$files
385
                    : ''
385
                    : ''
386
            )
386
            )
(-)a/misc/translator/tmpl_process3.pl (-8 / +14 lines)
Lines 146-152 sub listfiles { Link Here
146
            } elsif (-f $path) {
146
            } elsif (-f $path) {
147
                my $basename = basename $path;
147
                my $basename = basename $path;
148
                push @it, $path
148
                push @it, $path
149
                    if ( not @$filenames or ( grep { $basename =~ /$_/ } @$filenames ) )
149
                    if ( not @$filenames or ( grep { $path =~ /$_/ } @$filenames ) )
150
                       and (!defined $type || $dirent =~ /\.(?:$type)$/) || $action eq 'install';
150
                       and (!defined $type || $dirent =~ /\.(?:$type)$/) || $action eq 'install';
151
            } elsif (-d $path && $recursive_p) {
151
            } elsif (-d $path && $recursive_p) {
152
                push @it, listfiles($path, $type, $action, $filenames);
152
                push @it, listfiles($path, $type, $action, $filenames);
Lines 371-383 if ($action eq 'create') { Link Here
371
        (defined $charset_in? ('-I', $charset_in): ()),
371
        (defined $charset_in? ('-I', $charset_in): ()),
372
        (defined $charset_out? ('-O', $charset_out): ()));
372
        (defined $charset_out? ('-O', $charset_out): ()));
373
    if ($st == 0) {
373
    if ($st == 0) {
374
    # Merge the temporary "pot file" with the specified po file ($str_file)
374
        # Merge the temporary "pot file" with the specified po file ($str_file)
375
    # FIXME: msgmerge(1) is a Unix dependency
375
        # FIXME: msgmerge(1) is a Unix dependency
376
    # FIXME: need to check the return value
376
        # FIXME: need to check the return value
377
    $st = system("msgmerge -U ".($quiet?'-q':'')." -s $str_file $tmpfile2");
377
        if ( @filenames ) {
378
            my ($tmph3, $tmpfile3) = tmpnam();
379
            $st = system("msgcat $str_file $tmpfile2 > $tmpfile3");
380
            $st = system("msgmerge -U ".($quiet?'-q':'')." -s $str_file $tmpfile3")
381
                unless $st;
382
        } else {
383
            $st = system("msgmerge -U ".($quiet?'-q':'')." -s $str_file $tmpfile2");
384
        }
378
    } else {
385
    } else {
379
    error_normal "Text extraction failed: $xgettext: $!\n", undef;
386
        error_normal "Text extraction failed: $xgettext: $!\n", undef;
380
    error_additional "Will not run msgmerge\n", undef;
387
        error_additional "Will not run msgmerge\n", undef;
381
    }
388
    }
382
#   unlink $tmpfile1 || warn_normal "$tmpfile1: unlink failed: $!\n", undef;
389
#   unlink $tmpfile1 || warn_normal "$tmpfile1: unlink failed: $!\n", undef;
383
#   unlink $tmpfile2 || warn_normal "$tmpfile2: unlink failed: $!\n", undef;
390
#   unlink $tmpfile2 || warn_normal "$tmpfile2: unlink failed: $!\n", undef;
384
- 

Return to bug 9161