Changeset 5862


Ignore:
Timestamp:
07/05/09 22:10:58 (3 years ago)
Author:
ryan52
Message:

remove the .mo file generation

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre/privlib/Tools.pm

    r5316 r5862  
    1212    # "Default glob() will misinterpret spaces in folder names as seperators, install File::Glob::Windows to fix this behavior!"); 
    1313    require File::Glob::Windows; 
    14 } 
    15  
    16 sub convert_po_to_mo { 
    17     my $path   = shift; 
    18      
    19     my $msgfmt = get_msgfmt(); 
    20     return if not $msgfmt; 
    21  
    22     my @mo; 
    23     if ( $^O eq 'MSWin32' ) { 
    24         @mo = map { 
    25             substr( File::Basename::basename($_), 0, -3 ) 
    26         } File::Glob::Windows::glob("$path/share/locale/*.po"); 
    27     } else { 
    28         @mo = map { 
    29             substr( File::Basename::basename($_), 0, -3 ) 
    30         } glob "$path/share/locale/*.po"; 
    31     } 
    32     foreach my $locale ( @mo ) { 
    33         system( 
    34             $msgfmt, "-o", 
    35             "$path/share/locale/$locale.mo", 
    36             "$path/share/locale/$locale.po", 
    37         ); 
    38     } 
    39 } 
    40  
    41 sub get_msgfmt { 
    42  
    43     my $msgfmt; 
    44     if ( $^O =~ /(linux|bsd)/ ) { 
    45         $msgfmt = scalar File::Which::which('msgfmt'); 
    46     } elsif ( $^O eq 'MSWin32' ) { 
    47         my $p = "C:/Program Files/GnuWin32/bin/msgfmt.exe"; 
    48         if ( -e $p ) { 
    49             $msgfmt = $p; 
    50         } else { 
    51             $msgfmt = scalar File::Which::which('msgfmt'); 
    52         } 
    53     } 
    54      
    55     return $msgfmt; 
    5614} 
    5715 
  • trunk/tools/release.pl

    r5703 r5862  
    6969chdir 'src'; 
    7070 
    71 my $locale_path; 
    72 if ( -d 'share/locale' ) { 
    73     $locale_path = Cwd::cwd(); 
    74 } else { 
    75     ( my $path = $name ) =~ s{-}{/}g; 
    76     if ( -d "lib/$path/share/locale" ) { 
    77         $locale_path = Cwd::cwd() . "/lib/$path"; 
    78     } 
    79 } 
    80  
    81 if ($locale_path) { 
    82     print "locale path: '$locale_path'\n"; 
    83     convert_po_to_mo($locale_path); 
    84 } 
    85  
    8671#print "Setting VERSION $version\n"; 
    8772find( \&check_version, 'lib' ); 
Note: See TracChangeset for help on using the changeset viewer.