[Debian-l10n-commits] r1019 - /ddtss/trunk/ddts_lib.pm

kleptog-guest at users.alioth.debian.org kleptog-guest at users.alioth.debian.org
Sat Mar 22 14:10:01 UTC 2008


Author: kleptog-guest
Date: Sat Mar 22 14:10:01 2008
New Revision: 1019

URL: http://svn.debian.org/wsvn/?sc=1&rev=1019
Log:
Make it so that when a user tries a fetch a description that's already been 
fetched, it says so rather than saying it's been translated. At the same 
time change it so that force overrides this test also...

Modified:
    ddtss/trunk/ddts_lib.pm

Modified: ddtss/trunk/ddts_lib.pm
URL: http://svn.debian.org/wsvn/ddtss/trunk/ddts_lib.pm?rev=1019&op=diff
==============================================================================
--- ddtss/trunk/ddts_lib.pm (original)
+++ ddtss/trunk/ddts_lib.pm Sat Mar 22 14:10:01 2008
@@ -301,6 +301,7 @@
 
 	my $description_id;
 	my $found = 0;
+	my $locked = 0;
 
 	while(($description_id) = $sth->fetchrow_array) {
 	  # If not in force mode we need to check that this isn't translated
@@ -318,6 +319,15 @@
 	    push @files, $description_id;
 	    last;
 	  }
+	  else 
+	  { 
+	    $locked = 1;
+	    if( $force )
+	    {
+  	      push @files, $description_id;
+  	      last;
+	    }
+	  }
 	}
 	my $body;
 	if ($#files >= 0) {
@@ -325,8 +335,11 @@
 	} elsif( not $found ) {
 		status "ERROR: The server doesn't find a package with this name ($package)!";
 		die "Package $package not found\n";
+	} elsif( $locked ) {
+		status "WARNING: All found descriptions locked (force=$force)";
+		die "All descriptions for package $package already fetched by others\n";
 	} else {
-		status "WARNING: All found desriptions skipped (force=$force)";
+		status "WARNING: All found descriptions skipped (force=$force)";
 		die "All descriptions for package $package already translated\n";
 	}
 	return ($body);




More information about the Debian-l10n-commits mailing list