[Po4a-commits] "po4a po4a,1.40,1.41"
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Thu Nov 17 21:27:07 UTC 2005
Update of /cvsroot/po4a/po4a
In directory haydn:/tmp/cvs-serv27275
Modified Files:
po4a
Log Message:
Add a --force option to force the generation of the POT and PO files.
Index: po4a
===================================================================
RCS file: /cvsroot/po4a/po4a/po4a,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- po4a 17 Nov 2005 21:15:12 -0000 1.40
+++ po4a 17 Nov 2005 21:27:04 -0000 1.41
@@ -203,6 +203,25 @@
Output some debugging information.
+=item -f, --force
+
+Always generate the POT and PO files, even if po4a considers it is
+not necessary.
+
+The default behavior (when --force is not specified) is the following:
+
+=over
+
+If the POT file already exists, it is regenerated if a master document is
+more recent.
+The POT file is also written in a temporary document and po4a verifies
+that the changes are really needed.
+
+The PO files are re-generated based on the POT-Creation-Date of the POT
+and PO files.
+
+=back
+
=item --no-translations
Do not generate the translated documents, only update the POT and PO files.
@@ -306,6 +325,7 @@
'verbose|v' => \@verbose,
'debug|d' => \$opts{"debug"},
+ 'force|f' => \$opts{"force"},
'quiet|q' => \$opts{"quiet"},
'split|s' => \$opts{"split"},
'keep|k=s' => \$opts{"threshold"},
@@ -514,7 +534,8 @@
# The POT needs to be re-generated if a master document is more recent
# than the POT.
foreach my $master (keys %document) {
- if ((stat $master)[9] > $modtime) {
+ if ( ($po4a_opts{"force"})
+ or ((stat $master)[9] > $modtime) ) {
$update_pot_file = 1;
print wrap_msg(gettext("Updating %s:"), $pot_filename)
if $po4a_opts{"verbose"};
More information about the Po4a-commits
mailing list