Hello!

So, instead of giving instructions (last week) what to correct I managed 
to make some patches for autocorrection of the missing gettext calls.

Attached are the diffs for lib/cmds/ and lib/functions/

I hope the patched files will end up in the current CVS asap.

Good luck,
Janez
--- ../correct/crypto-utils.lib 2004-08-23 13:20:57.000000000 +0200
+++ crypto-utils.lib    2004-08-23 13:21:03.000000000 +0200
@@ -504,7 +504,7 @@
     $max = "0".$max if (length ($max) % 2);
     print FD $max;
     close(FD);
-    print addLogLine (gettext($max));
+    print addLogLine ($max);
     print closeLogSection ();
   }
 
--- ../correct/export-import.lib        2004-08-23 13:27:47.000000000 +0200
+++ export-import.lib   2004-08-23 13:20:01.000000000 +0200
@@ -546,8 +546,8 @@
     my @datatype = eximObjectsGetDatatype ( @_ );
 
     print addLogSection ( i18nGettext ("Exporting __STATUS__ __OBJECT__ ...",
-                                       "__STATUS__", lc gettext($datatype [1]),
-                                       "__OBJECT__", gettext($datatype [0])) );
+                                       "__STATUS__", lc $datatype [1],
+                                       "__OBJECT__", $datatype [0]) );
 
     ## load first object
     my $export_datatype;
@@ -638,8 +638,8 @@
   my $DEBUG = 0;
 
   print addLogSection (i18nGettext ("Importing __STATUS__ __OBJECT__ ...",
-                                    "__STATUS__", lc gettext($datatype [1]),
-                                    "__OBJECT__", gettext($datatype [0])) );
+                                    "__STATUS__", lc $datatype [1],
+                                    "__OBJECT__", $datatype [0]) );
 
   if ($datatype [0] =~ /LOG/) {
     print addPreLogLine (gettext ("Logs were only available on SQL-Databases!"));
@@ -1372,7 +1372,7 @@
   my $CACertDER = getRequired ( 'CACertificateDER');
   if( not $tools->copyFiles ( SRC  => "${exim_tmp_dir}/${key}.der",
                                  DEST => $CACertDER ) ) {
-    print addLogLine ( gettext("FAILED.") );
+    print addLogLine ( "FAILED." );
     print addPreLogLine( "<FONT COLOR=#FF0000>".
                          i18nGettext ("Copying latest ca-certificate into the 
RAServer failed (from __FILE__ to __TARGET__).",
                                       "__FILE__", "${exim_tmp_dir}/${key}.der",
@@ -1385,7 +1385,7 @@
   my $CACertTXT = getRequired ( 'CACertificateTXT');
   if( not $tools->copyFiles ( SRC  => "${exim_tmp_dir}/${key}.txt",
                                  DEST => $CACertTXT ) ) {
-    print addLogLine ( gettext("FAILED.") );
+    print addLogLine ( "FAILED." );
     print addPreLogLine( "<FONT COLOR=#FF0000>".
                          i18nGettext ("Copying latest ca-certificate into the 
RAServer failed (from __FILE__ to __TARGET__).",
                                       "__FILE__", "${exim_tmp_dir}/${key}.txt",
@@ -1394,7 +1394,7 @@
     print closeLogSection ();
     return 0;
   }
-  print addLogLine (gettext("OK."));
+  print addLogLine ("OK.");
   print closeLogSection (); 
 
   #// Now we copy the CA's certificate to the chain dir
@@ -1654,15 +1654,15 @@
 
 #  ## bring openssl.cnf to tmp-dir
 #
-#  print addLogSection(gettext("Exporting the OpenSSL-configurationfile of the CA 
..."));
+#  print addLogSection("Exporting the OpenSSL-configurationfile of the CA ... ");
 #  $ret = `cp $openssl . 2>&1`;
 #  if( $? != 0 ) {
-#    print addErrorLog(gettext("Cannot copy $openssl to $tmpdir!"));
+#    print addErrorLog("Cannot copy $openssl to $tmpdir!");
 #    print addLogLine( "cp $openssl ." );
 #    print closeLogSection ();
 #    return 0;
 #  }
-#  print addLogLine( gettext("Ok.") );
+#  print addLogLine( "Ok." );
 #  print closeLogSection ();
 
   ## bring RBAC/ to tmp-dir
@@ -1686,15 +1686,15 @@
   my $h_openssl_dir = $openssl_dir;
   $h_openssl_dir =~ s/\/[^\/]*(|\/)*$//;
   $openssl_dir   =~ s/^.*\/([^\/]+)(|\/)*$/$1/g;
-  print addLogSection(gettext("Exporting the OpenSSL-configuration of the roles 
..."));
+  print addLogSection("Exporting the OpenSSL-configuration of the roles ... ");
   $ret = `cd $h_openssl_dir; tar -cf - $openssl_dir | tar -xf - -C $tmpdir 2>&1`;
   if( $? != 0 ) {
-    print addErrorLog(gettext("Cannot copy $openssl_dir to $tmpdir!"));
+    print addErrorLog("Cannot copy $openssl_dir to $tmpdir!");
     print addLogLine( "cd $h_openssl_dir; tar -cf - $openssl_dir | tar -xf - -C 
$tmpdir" );
     print closeLogSection ();
     return 0;
   }
-  print addLogLine( gettext("Ok.") );
+  print addLogLine( "Ok." );
   print closeLogSection ();
 
   ## bring extfiles/ to tmp-dir
@@ -1702,15 +1702,15 @@
   my $h_ext_dir = $ext_dir;
   $h_ext_dir =~ s/\/[^\/]*(|\/)*$//;
   $ext_dir   =~ s/^.*\/([^\/]+)(|\/)*$/$1/g;
-  print addLogSection(gettext("Exporting the configuration of the extensions of the 
roles ... "));
+  print addLogSection("Exporting the configuration of the extensions of the roles ... 
");
   $ret = `cd $h_ext_dir; tar -cf - $ext_dir | tar -xf - -C $tmpdir 2>&1`;
   if( $? != 0 ) {
-    print addErrorLog(gettext("Cannot copy $ext_dir to $tmpdir!"));
+    print addErrorLog("Cannot copy $ext_dir to $tmpdir!");
     print addLogLine( "cd $h_ext_dir; tar -cf - $ext_dir | tar -xf - -C $tmpdir" );
     print closeLogSection ();
     return 0;
   }
-  print addLogLine(gettext("Ok."));
+  print addLogLine( "Ok." );
   print closeLogSection ();
 
   return 1;
@@ -1743,15 +1743,15 @@
 #
 #  my $sslconfig = $openssl;
 #  $sslconfig =~ s/.*\///g;
-#  print addLogSection(gettext("Importing the OpenSSL-configurationfile of the CA ... 
"));
+#  print addLogSection("Importing the OpenSSL-configurationfile of the CA ... ");
 #  $ret = `cp $sslconfig $openssl 2>&1`;
 #  if( $? != 0 ) {
-#    print addErrorLog(gettext("Cannot copy $sslconfig to $openssl!"));
+#    print addErrorLog("Cannot copy $sslconfig to $openssl!");
 #    print addLogLine( "cp $sslconfig $openssl" );
 #    print closeLogSection ();
 #    return 0;
 #  }
-#  print addLogLine(gettext("Ok."));
+#  print addLogLine( "Ok." );
 #  print closeLogSection ();
 
   ## importing RBAC/
@@ -1774,15 +1774,15 @@
   my $h_openssl_dir = $openssl_dir;
   $h_openssl_dir =~ s/\/[^\/]*(|\/)*$//;
   $openssl_dir   =~ s/^.*\/([^\/]+)(|\/)*$/$1/g;
-  print addLogSection(gettext("Importing the OpenSSL-configuration of the roles  ... 
"));
+  print addLogSection("Importing the OpenSSL-configuration of the roles  ... ");
   $ret = `cd $tmpdir; tar -cf - $openssl_dir | tar -xf - -C $h_openssl_dir 2>&1`;
   if( $? != 0 ) {
-    print addErrorLog(gettext("Cannot copy $openssl_dir to $h_openssl_dir!"));
+    print addErrorLog("Cannot copy $openssl_dir to $h_openssl_dir!");
     print addLogLine( "tar -cf - $openssl_dir | tar -xf - -C $h_openssl_dir" );
     print closeLogSection ();
     return 0;
   }
-  print addLogLine(gettext("Ok."));
+  print addLogLine( "Ok." );
   print closeLogSection ();
 
   ## importing extfiles/
@@ -1790,15 +1790,15 @@
   my $h_ext_dir = $ext_dir;
   $h_ext_dir =~ s/\/[^\/]*(|\/)*$//;
   $ext_dir   =~ s/^.*\/([^\/]+)(|\/)*$/$1/g;
-  print addLogSection(gettext("Importing the configuration of the extensions of the 
roles ... "));
+  print addLogSection("Importing the configuration of the extensions of the roles ... 
");
   $ret = `cd $tmpdir; tar -cf - $ext_dir | tar -xf - -C $h_ext_dir 2>&1`;
   if( $? != 0 ) {
-    print addErrorLog(gettext("Cannot copy $ext_dir to $h_ext_dir!"));
+    print addErrorLog("Cannot copy $ext_dir to $h_ext_dir!");
     print addLogLine( "tar -cf - $ext_dir | tar -xf - -C $h_ext_dir" );
     print closeLogSection ();
     return 0;
   }
-  print addLogLine(gettext("Ok."));
+  print addLogLine( "Ok." );
   print closeLogSection ();
 
   return 1;
@@ -1871,7 +1871,7 @@
         next if (not $type);
 
         print addLogSection(i18nGettext ("Importing the Mails (__TYPE__) ... ",
-                                         "__TYPE__", uc(gettext($type))));
+                                         "__TYPE__", uc($type)));
 
         my $directory = $exim_tmp_dir."/MAIL/".uc($type);
         opendir( DIR, $directory );
@@ -1914,7 +1914,7 @@
                } ## end of copyfiles
             } ## end of object-check
        } ## end of foreach
-       print addPreLogLine (gettext("No new mails found. No mails imported!")) if 
(not $found);
+       print addPreLogLine ("No new mails found. No mails imported!") if (not $found);
         print closeLogSection ();
     }
 
@@ -1977,7 +1977,7 @@
   }
 
   if (not -e $dir) {
-      print addLogLine (gettext("no data present"));
+      print addLogLine ("no data present");
       print closeLogSection ();
       return 1;
   }
@@ -2441,12 +2441,12 @@
   my $ldap = getRequired ('updateLDAPautomatic');
 
   if ( $ldap =~ /^(off|no)$/i ) {
-    print addLogSection (gettext("Automatic LDAP-update is deactivated"));
+    print addLogSection ("Automatic LDAP-update is deactivated");
     print addLogLine ("");
     print closeLogSection ();
     return 0;
   } else {
-    print addLogSection (gettext("Automatic LDAP-update is activated"));
+    print addLogSection ("Automatic LDAP-update is activated");
     print addLogLine ("");
     print closeLogSection ();
     return 1;
--- ../correct/misc-utils.lib   2004-08-23 13:19:20.000000000 +0200
+++ misc-utils.lib      2004-08-23 13:20:02.000000000 +0200
@@ -60,7 +60,7 @@
        }
 
         return libSendReply (
-                      "NAME"        => gettext("Administration Success"),
+                      "NAME"        => "Administration Success",
                       "EXPLANATION" => $num,
                       "INFO_LIST"   => $info_list
                      );
--- ./correct/bpExportPIN       2004-08-23 13:42:23.000000000 +0200
+++ bpExportPIN 2004-08-23 11:46:02.000000000 +0200
@@ -141,7 +141,7 @@
 
     $tools->saveFile (FILENAME => $filename, DATA => $file);
 
-    print addLogLine (gettext("OK"));
+    print addLogLine ("OK");
     print closeLogSection ();
 
     closePage();
--- ./correct/bpImportProcessData       2004-08-23 13:42:41.000000000 +0200
+++ bpImportProcessData 2004-08-23 11:46:02.000000000 +0200
@@ -30,7 +30,7 @@
        print closeLogPage ();
        return undef;
     }
-    print addLogLine (gettext("completed."));
+    print addLogLine ("completed.");
     print closeLogSection ();
 
     ## initialize state machine
--- ./correct/bpImportProcessDataCompact        2004-08-23 13:42:52.000000000 +0200
+++ bpImportProcessDataCompact  2004-08-23 11:46:02.000000000 +0200
@@ -30,7 +30,7 @@
        print closeLogPage ();
        return undef;
     }
-    print addLogLine (gettext("completed."));
+    print addLogLine ("completed.");
     print closeLogSection ();
 
     ## initialize state machine
--- ./correct/bpImportUpdateUser        2004-08-23 13:43:09.000000000 +0200
+++ bpImportUpdateUser  2004-08-23 11:46:02.000000000 +0200
@@ -23,7 +23,7 @@
        print closeLogPage ();
        return undef;
 }
-print addLogLine (gettext("completed."));
+print addLogLine ("completed.");
 print closeLogSection ();
 
 print addLogSection (gettext ("Running batch processor ..."));
--- ./correct/genCRL    2004-08-23 13:46:46.000000000 +0200
+++ genCRL      2004-08-23 11:46:02.000000000 +0200
@@ -23,7 +23,7 @@
        $nouniqueDN = 1;
 }
 
-print startLogPage(gettext("CRL Issuing"));
+print startLogPage("CRL Issuing");
 
 my $ca_token = $crypto_layer->getToken ('CA');
 if (not $ca_token)
--- ./correct/genCRLfromFile    2004-08-23 13:47:27.000000000 +0200
+++ genCRLfromFile      2004-08-23 11:46:02.000000000 +0200
@@ -27,7 +27,7 @@
 my $ca_token = $crypto_layer->getToken ('CA');
 if (not $ca_token)
 {
-       print startLogPage(gettext("CRL Issuing"));
+       print startLogPage("CRL Issuing");
        print addLogSection(gettext ("Loading CA token ... "));
        print addLogLine ("<FONT color=#ff0000>".gettext ("FAILED")."</FONT>");
        print addPreLogLine (i18nGettext ("OpenCA::Crypto errorcode: __ERRNO__", 
"__ERRNO__", $crypto_layer->errno));
@@ -38,7 +38,7 @@
 }
 if (not ($ca_token->keyOnline || $ca_token->login))
 {
-       print startLogPage(gettext("CRL Issuing"));
+       print startLogPage("CRL Issuing");
        print addLogSection(gettext ("Initializing CA token ... "));
        print addLogLine ("<FONT color=#ff0000>".gettext ("FAILED")."</FONT>");
        print addPreLogLine (i18nGettext ("OpenCA::Token errorcode: __ERRNO__", 
"__ERRNO__", $ca_token->errno));
@@ -66,7 +66,7 @@
     }
 }
 
-print startLogPage(gettext("CRL Issuing From CSV-File"));
+print startLogPage("CRL Issuing From CSV-File");
 
 print addLogSection(gettext ("Building list of serials ... "));
 my @csv = split ",", $csv_file;
--- ./correct/hsmLogin  2004-08-23 13:44:23.000000000 +0200
+++ hsmLogin    2004-08-23 11:46:02.000000000 +0200
@@ -8,17 +8,17 @@
 
 sub cmdHsmLogin {
 
-    print startLogPage (gettext("Login to hardware security module"));
+    print startLogPage ("Login to hardware security module");
 
-    print addLogSection (gettext("The login command is:"));
+    print addLogSection ("The login command is:");
     my $command = getRequired('HSM_LOGIN_CMD');
     print addPreLogLine ($command);
     print closeLogSection ();
 
-    print addLogSection (gettext("Run the command ... "));
+    print addLogSection ("Run the command ... ");
     my $ret=`$command`;
     if ($? == 0) {
-        print addLogLine (gettext("OK"));
+        print addLogLine ("OK");
     } else {
         print addLogLine ("<FONT COLOR=#FF0000>FAILED</FONT>");
         print addPreLogLine ("<FONT COLOR=#FF0000>$ret</FONT>");
--- ./correct/hsmLogout 2004-08-23 13:45:06.000000000 +0200
+++ hsmLogout   2004-08-23 11:46:02.000000000 +0200
@@ -8,17 +8,17 @@
 
 sub cmdHsmLogout {
 
-    print startLogPage (gettext("Logout from hardware security module"));
+    print startLogPage ("Logout from hardware security module");
 
-    print addLogSection (gettext("The logout command is:"));
+    print addLogSection ("The logout command is:");
     my $command = getRequired('HSM_LOGOUT_CMD');
     print addPreLogLine ($command);
     print closeLogSection ();
 
-    print addLogSection (gettext("Run the command ... "));
+    print addLogSection ("Run the command ... ");
     my $ret=`$command`;
     if ($? == 0) {
-        print addLogLine (gettext("OK"));
+        print addLogLine ("OK");
     } else {
         print addLogLine ("<FONT COLOR=#FF0000>FAILED</FONT>");
         print addPreLogLine ("<FONT COLOR=#FF0000>$ret</FONT>");
--- ./correct/importCACert      2004-08-23 13:47:50.000000000 +0200
+++ importCACert        2004-08-23 11:46:02.000000000 +0200
@@ -24,7 +24,7 @@
 my $chainDir   = getRequired ( 'ChainDir' );
 my $certDir    = getRequired ( 'CACertDir' );
 
-print startLogPage(gettext("Importing CA Certificate"));
+print startLogPage("Importing CA Certificate");
 $cmd = $query->subVar( $cmd, '@__DEVICE__@', $orig );
 $cmd = $query->subVar( $cmd, '@__DEST__@', $certDir );
 
--- ./correct/sendMail  2004-08-23 13:45:33.000000000 +0200
+++ sendMail    2004-08-23 11:46:02.000000000 +0200
@@ -13,7 +13,7 @@
 print addLogSection ( gettext("Load address ...") );
 my $email = $query->param ('emailaddress');
 if ($email =~ /[EMAIL PROTECTED]/) {
-       print addLogLine (gettext("OK"));
+       print addLogLine ("OK");
        print closeLogSection();
 } else {
        print addLogLine ("<FONT COLOR=#FF0000>".gettext("FAILED")."</FONT>");
--- ./correct/stopDaemon        2004-08-23 13:45:48.000000000 +0200
+++ stopDaemon  2004-08-23 11:46:02.000000000 +0200
@@ -19,7 +19,7 @@
         print addPreLogLine ( i18nGettext ("Error: __ERRNO__", "__ERRNO__", 
$crypto_layer->errno));
         print addPreLogLine ( i18nGettext ("Message: __ERRVAL__", "__ERRVAL__", 
$crypto_layer->errval));
     } else {
-        print addLogLine (gettext("OK"));
+        print addLogLine ("OK");
     }
 
     print closeLogSection;
--- ./correct/updateSearchAttributes    2004-08-23 13:48:12.000000000 +0200
+++ updateSearchAttributes      2004-08-23 11:46:02.000000000 +0200
@@ -9,7 +9,7 @@
 
 sub cmdUpdateSearchAttributes {
 
-    print startLogPage(gettext("Updating the searchable attributes of a database"));
+    print startLogPage("Updating the searchable attributes of a database");
 
     ## array with all objecttypes
     my @objects = ("CA_CERTIFICATE", "CERTIFICATE", "CRL", "CRR", "REQUEST");

Reply via email to