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

(-)a/C4/Installer/PerlDependencies.pm (+10 lines)
Lines 590-595 our $PERL_DEPS = { Link Here
590
        'required' => '1',
590
        'required' => '1',
591
        'min_ver'  => '1.23',
591
        'min_ver'  => '1.23',
592
    },
592
    },
593
    'Locale::Maketext' => {
594
        'usage'    => 'Core',
595
        'required' => '1',
596
        'min_ver'  => '1.19',
597
    },
598
    'Locale::Maketext::Lexicon' => {
599
        'usage'    => 'Core',
600
        'required' => '1',
601
        'min_ver'  => '0.91',
602
    },
593
};
603
};
594
604
595
1;
605
1;
(-)a/misc/translator/LangInstaller.pm (-5 / +18 lines)
Lines 57-65 sub new { Link Here
57
    $self->{cp}              = `which cp`;
57
    $self->{cp}              = `which cp`;
58
    $self->{msgmerge}        = `which msgmerge`;
58
    $self->{msgmerge}        = `which msgmerge`;
59
    $self->{xgettext}        = `which xgettext`;
59
    $self->{xgettext}        = `which xgettext`;
60
    $self->{sed}             = `which sed`;
60
    chomp $self->{cp};
61
    chomp $self->{cp};
61
    chomp $self->{msgmerge};
62
    chomp $self->{msgmerge};
62
    chomp $self->{xgettext};
63
    chomp $self->{xgettext};
64
    chomp $self->{sed};
63
65
64
    # Get all .pref file names
66
    # Get all .pref file names
65
    opendir my $fh, $self->{path_pref_en};
67
    opendir my $fh, $self->{path_pref_en};
Lines 365-370 sub create_tmpl { Link Here
365
sub create_messages {
367
sub create_messages {
366
    my $self = shift;
368
    my $self = shift;
367
369
370
    print "Create messages ($self->{lang})\n" if $self->{verbose};
368
    system
371
    system
369
        "$self->{cp} $self->{domain}.pot " .
372
        "$self->{cp} $self->{domain}.pot " .
370
        "$self->{path_po}/$self->{lang}-$self->{domain}.po";
373
        "$self->{path_po}/$self->{lang}-$self->{domain}.po";
Lines 373-382 sub create_messages { Link Here
373
sub update_messages {
376
sub update_messages {
374
    my $self = shift;
377
    my $self = shift;
375
378
376
    system
379
    my $pofile = "$self->{path_po}/$self->{lang}-$self->{domain}.po";
377
        "$self->{msgmerge} -U " .
380
    print "Update messages ($self->{lang})\n" if $self->{verbose};
378
        "$self->{path_po}/$self->{lang}-$self->{domain}.po " .
381
    if ( not -f $pofile ) {
379
        "$self->{domain}.pot";
382
        print "File $pofile does not exist\n" if $self->{verbose};
383
        $self->create_messages();
384
    }
385
    system "$self->{msgmerge} -U $pofile $self->{domain}.pot";
386
380
}
387
}
381
388
382
sub extract_messages {
389
sub extract_messages {
Lines 408-413 sub extract_messages { Link Here
408
    if (system($xgettext_cmd) != 0) {
415
    if (system($xgettext_cmd) != 0) {
409
        die "system call failed: $xgettext_cmd";
416
        die "system call failed: $xgettext_cmd";
410
    }
417
    }
418
419
    my $replace_charset_cmd = "$self->{sed} --in-place " .
420
        "$Bin/$self->{domain}.pot " .
421
        "--expression='s/charset=CHARSET/charset=UTF-8/'";
422
    if (system($replace_charset_cmd) != 0) {
423
        die "system call failed: $replace_charset_cmd";
424
    }
411
}
425
}
412
426
413
sub remove_pot {
427
sub remove_pot {
414
- 

Return to bug 8044