From: <Ant...@nt...> - 2005-12-30 16:16:51
|
Author: AntonioTerceiro Date: 2005-12-30 08:15:02 -0800 (Fri, 30 Dec 2005) New Revision: 8034 Modified: twiki/branches/DEVELOP/ twiki/branches/DEVELOP/tools/xgettext Log: Item0: tools/xgettext tweaks Property changes on: twiki/branches/DEVELOP ___________________________________________________________________ Name: svk:merge - 6fe119f3-adff-0310-8d65-eaf721ad8dcd:/local/twiki:12722 + 6fe119f3-adff-0310-8d65-eaf721ad8dcd:/local/twiki:12726 Modified: twiki/branches/DEVELOP/tools/xgettext =================================================================== --- twiki/branches/DEVELOP/tools/xgettext 2005-12-30 14:57:36 UTC (rev 8033) +++ twiki/branches/DEVELOP/tools/xgettext 2005-12-30 16:15:02 UTC (rev 8034) @@ -43,13 +43,26 @@ # extract the strings in a new potfile. print("I: scanning sources, it may take some time...\n"); + +my $progress = undef; +eval "use Term::ProgressBar;"; +if ( $@ ) { + print "(You could have a nice progress bar if you had Term::ProgressBar installed.)\n"; +} else { + $progress = Term::ProgressBar->new (scalar(@sources)); +} + my $extractor = new TWiki::I18N::Extract; +die("Could not create an extractor. Is Locale::Maketext installed? (see above messages)") unless $extractor; +my $counter = 0; foreach my $file (@sources) { if ( -e $file ) { $extractor->extract_file($file) ; } else { print "W: $file is listed in MANIFEST and does not exist!\n"; } + $counter++; + $progress->update($counter) if $progress; } $extractor->compile(); $extractor->write_po($newpotfile); |