intltool r733 - trunk



Author: dobey
Date: Sat Apr 12 20:07:47 2008
New Revision: 733
URL: http://svn.gnome.org/viewvc/intltool?rev=733&view=rev

Log:
2008-04-12  Rodney Dawes  <dobey pwns gmail com>

	* intltool-update.in (FindLeftoutFiles):
	Add code to handle skipping entire directores of translatable files

	Fixes #436241



Modified:
   trunk/ChangeLog
   trunk/intltool-update.in

Modified: trunk/intltool-update.in
==============================================================================
--- trunk/intltool-update.in	(original)
+++ trunk/intltool-update.in	Sat Apr 12 20:07:47 2008
@@ -360,7 +360,33 @@
 	    
 	while (<FILE>)
 	{
-	    push @buf_potfiles_ignore, $_ unless /^(#|\s*$)/;
+            next if (/^$/);
+            next if (/^(#|\s*$)/);
+
+            my $skipdir = "../$_";
+            $skipdir = "$SRCDIR/../$_" if "$SRCDIR" ne ".";
+            $skipdir =~ s/\n//g;
+
+            my @dirignored;
+
+            if (-d "$skipdir")
+            {
+                find sub {
+                    push @dirignored, "$File::Find::name" if /\.($buildin_gettext_support)$/;
+                    push @dirignored, "$File::Find::name" if /\.($xml_support)$/;
+                    push @dirignored, "$File::Find::name" if /\.($ini_support)$/;
+                    push @dirignored, "$File::Find::name" if /\.(schemas(\.in)+)$/;
+                }, "$skipdir";
+                foreach my $ignored (@dirignored)
+                {
+                    $ignored =~ s/^$SRCDIR\///g;
+                    $ignored =~ s/^..\///g;
+                    $ignored =~ s/$/\n/g;
+                    push @buf_potfiles_ignore, $ignored;
+                }
+                next;
+            }
+            push @buf_potfiles_ignore, $_;
 	}
 	close FILE;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]