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

(-)a/misc/translator/LangInstaller.pm (-3 / +3 lines)
Lines 338-344 sub install_tmpl { Link Here
338
            "-o $trans->{dir}/$self->{lang} ".
338
            "-o $trans->{dir}/$self->{lang} ".
339
            "-s $self->{path_po}/$self->{lang}$trans->{suffix} -r " .
339
            "-s $self->{path_po}/$self->{lang}$trans->{suffix} -r " .
340
            (
340
            (
341
                $files
341
                @$files
342
                    ? '-f ' . join ' -f ', @$files
342
                    ? '-f ' . join ' -f ', @$files
343
                    : ''
343
                    : ''
344
            )
344
            )
Lines 363-369 sub update_tmpl { Link Here
363
            "-i $trans->{dir}/en/ " .
363
            "-i $trans->{dir}/en/ " .
364
            "-s $self->{path_po}/$self->{lang}$trans->{suffix} -r " .
364
            "-s $self->{path_po}/$self->{lang}$trans->{suffix} -r " .
365
            (
365
            (
366
                $files
366
                @$files
367
                    ? '-f ' . join ' -f ', @$files
367
                    ? '-f ' . join ' -f ', @$files
368
                    : ''
368
                    : ''
369
            )
369
            )
Lines 398-404 sub create_tmpl { Link Here
398
            "-i $trans->{dir}/en/ " .
398
            "-i $trans->{dir}/en/ " .
399
            "-s $self->{path_po}/$self->{lang}$trans->{suffix} -r " .
399
            "-s $self->{path_po}/$self->{lang}$trans->{suffix} -r " .
400
            (
400
            (
401
                $files
401
                @$files
402
                    ? '-f ' . join ' -f ', @$files
402
                    ? '-f ' . join ' -f ', @$files
403
                    : ''
403
                    : ''
404
            )
404
            )
(-)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