Changeset 5639


Ignore:
Timestamp:
06/26/09 22:39:35 (3 years ago)
Author:
azawawi
Message:

[tools] Find 'locale' directory when it is not found in the current working directory.
[tools] This is mainly to support SpellCheck?, Perl6 and Ecliptic plugins easier localization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/update_pot_file.pl

    r3706 r5639  
    1111my $cwd       = cwd; 
    1212my $localedir = catdir ( $cwd, 'share', 'locale' ); 
     13unless(-d $localedir) { 
     14    # Search for the 'locale' directory when 'share/locale' 
     15    # directory is not found 
     16    my @files = File::Find::Rule->directory()-> 
     17        name('locale')->relative->in($cwd); 
     18    if(scalar @files > 0) { 
     19        $localedir = $files[0]; 
     20    } else { 
     21        die "locale directory not found.\n"; 
     22    } 
     23} 
     24 
    1325my $pot_file  = catfile( $localedir, 'messages.pot' ); 
    1426my $pmfiles   = catfile( $cwd, 'files.txt' ); 
Note: See TracChangeset for help on using the changeset viewer.