mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-27 03:10:23 -06:00
27b15ffe3e
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5151 57a11ea4-9604-0410-9ed3-97b8803252fd
53 lines
1.1 KiB
Perl
53 lines
1.1 KiB
Perl
#!@-PERL-@ -w
|
|
# -*- perl -*-
|
|
#
|
|
# This perl script is used to make po/POTFILES.in, the list
|
|
# of C files to be searched for translatable strings.
|
|
#
|
|
# Author: Dave Peticolas <dave@krondo.com>
|
|
|
|
use strict;
|
|
|
|
use File::Basename;
|
|
|
|
my @cvsignores = `find src -name '.cvsignore'`;
|
|
my @cfiles = `find src -name '*.c'`;
|
|
|
|
chomp(my $cwd = `pwd`);
|
|
|
|
my %ignores;
|
|
|
|
foreach my $one_ignore (@cvsignores) {
|
|
chomp($one_ignore);
|
|
my ($name, $path) = fileparse($one_ignore);
|
|
$path =~ s/^\.\///;
|
|
open (IG, $one_ignore);
|
|
chdir $path;
|
|
foreach my $fl (<IG>) {
|
|
chomp $fl;
|
|
next unless $fl;
|
|
my @matches = glob ($fl);
|
|
foreach my $match (@matches) {
|
|
chomp($match);
|
|
next unless $match;
|
|
$ignores{$path . $match} = 1;
|
|
}
|
|
}
|
|
close (IG);
|
|
chdir $cwd;
|
|
}
|
|
|
|
print "# List of files which containing translatable strings.\n";
|
|
print "# This file was generated by ../make-gnucash-potfiles.in.\n";
|
|
print "\n";
|
|
|
|
foreach my $cfile (@cfiles) {
|
|
chomp($cfile);
|
|
my ($name, $path) = fileparse($cfile);
|
|
$path =~ s/^\.\///;
|
|
|
|
next if $ignores{$path . $name};
|
|
|
|
print $path . $name . "\n";
|
|
}
|