[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: check_po_files to clear exec bits and warn on .pot among .po's?
From:       Chusslove Illich <caslav.ilic () gmx ! net>
Date:       2005-11-22 18:11:46
Message-ID: 200511221911.50124.caslav.ilic () gmx ! net
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


> [: Nicolas Goutte :]
> Scripty does it outside check_po_files (but this part is not called
> currently, as less as check_po_files.)
> [...]
> The executable part is not good, as it only does a chmod, but it would 
> need to delete the svn:executable property. (However check_po_files does
> not do any svn operation currently).

Would it still be advantageous to have this correction in check_po_files, 
as many translators have been accustomed to use it? (New patch attached.)

-- 
Chusslove Illich (Часлав Илић)
Serbian KDE translation team

["patch_c2.diff" (text/x-diff)]

Index: check_po_files
===================================================================
--- check_po_files	(revision 482287)
+++ check_po_files	(working copy)
@@ -16,6 +16,7 @@
 my $no_c_format;
 my $get_msg_current_file;
 my $topdir;
+my $issvndir;
 
 sub read_line {
 	$line_number++;
@@ -503,8 +504,15 @@
                         print STDERR "ERROR: File $filename is empty! Skipping!\n";
                 }
 		elsif (-f $filename && $filename =~ /\.po$/) {
+			if (-x $filename && $issvndir) {
+				system("svn propdel svn:executable '$filename' 1>/dev/null");
+				print STDERR "File $filename had executable bit set, removed.\n";
+			}
 			&checkfile($filename);
 		}
+		elsif (-f $filename && $filename =~ /\.pot$/) {
+			print STDERR "File $filename has .pot extension, perhaps it should be renamed?\n";
+		}
 	}
 	closedir(DIR);
 }
@@ -517,4 +525,8 @@
 	$startdir = cwd();
 }
 
+# Check if start directory is under SVN control.
+$issvndir =    (system("which svn 1>/dev/null 2>/dev/null") == 0)
+            && (system("svn info $startdir 1>/dev/null 2>/dev/null") == 0);
+
 &recursive_check($startdir);

[Attachment #6 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic