From 8eca8478bbb2985cf5fbc445e0b47e44a5c1c37f Mon Sep 17 00:00:00 2001 From: acli Date: Tue, 24 Feb 2004 00:47:53 +0000 Subject: [PATCH] We now have a --help option. Minor comment update Removed forced backups and the comment about interrupting xgettext.pl corrupting the po file, now that we seem to be detecting the situation. --- misc/translator/tmpl_process3.pl | 36 +++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/misc/translator/tmpl_process3.pl b/misc/translator/tmpl_process3.pl index 5445bf4b11..788757781b 100755 --- a/misc/translator/tmpl_process3.pl +++ b/misc/translator/tmpl_process3.pl @@ -127,6 +127,33 @@ sub listfiles ($$) { ############################################################################### +sub usage ($) { + my($exitcode) = @_; + my $h = $exitcode? *STDERR: *STDOUT; + print $h < \$str_file, 'exclude|x=s' => \@excludes, 'pedantic-warnings|pedantic' => sub { $pedantic_p = 1 }, + 'help' => \&usage, ) || usage_error; VerboseWarnings::set_application_name $0; VerboseWarnings::set_pedantic_mode $pedantic_p; -# try to make sure .po files are backed up (see BUGS) -$ENV{VERSION_CONTROL} = 't'; - # keep the buggy Locale::PO quiet if it says stupid things $SIG{__WARN__} = sub { my($s) = @_; @@ -330,16 +355,11 @@ read strings in the PO file. =head1 BUGS -The --help option has not been implemented yet. - xgettext.pl must be present in the current directory; the msgmerge(1) command must also be present in the search path. The script currently does not check carefully whether these dependent commands are present. -If xgettext.pl is interrupted by the user, a corrupted po file -will result. This is very seriously wrong. - Locale::PO(3) has a lot of bugs. It can neither parse nor generate GNU PO files properly; a couple of workarounds have been written in TmplTokenizer and more is likely to be needed -- 2.39.5